feat(client): matching screen step 6 — comparison detail cards#3901
feat(client): matching screen step 6 — comparison detail cards#3901gilgardosh wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
Code Review
This pull request introduces the ChargeDetailCard component to display detailed charge information, including transactions, miscellaneous expenses, and document previews, within a split comparison view on the charge matching review screen. It also extracts utility functions into a separate utils.ts file and adds comprehensive unit tests. The review feedback highlights several important improvements: implementing optional chaining and nullish coalescing to safely handle potentially nullable GraphQL fields, addressing a potential timezone bug in date formatting by specifying UTC, and removing redundant .toString() calls on image and file fields.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
faeef86 to
bcc9ec5
Compare
c729977 to
e2f51bd
Compare
bcc9ec5 to
7eecc10
Compare
- ChargeDetailCard: date, exact server-formatted amount with currency symbol (no conversion), counterparty, document type, description, document image thumbnail (with graceful null fallback), and an expandable 'More Details' accordion listing secondary transactions and misc expenses; optional match-confidence gauge via the shared Score component - Screen now renders two card instances side by side: active base charge (left) and top-scoring suggestion with confidence badge (right) - 4 component tests covering exact amount rendering, image null fallback, thumbnail rendering, and conditional score badge Step 6 of the matching-screen plan. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JBQoeDJraws6oq8cyxPri3
e2f51bd to
73a84fc
Compare
Step 6 of the matching-screen plan (Prompt 6: Comparison Cards). Stacked on #3900.
What
ChargeDetailCard— the shared visual card for 1:1 side-by-side comparison:imageis nullScorecomponent) rendered only whenconfidenceScoreis providedChargeDetailCardinstances: the active base charge fromuseChargeMatchQueueon the left and the top-scoring suggestion (with confidence badge) on the right; empty/completed states preservedchargeDate/chargeTitlehelpers extracted toutils.tsTests
__tests__/charge-detail-card.test.tsx— 4 component tests: exact amount string rendering, missing-image null fallback (no crash), thumbnail rendering, conditional score badge — covering the spec's §5.2 "Render Core" requirements.Verification
yarn vitest run --project unit— 4/4 passyarn workspace @accounter/client buildpasses; lint + prettier clean🤖 Generated with Claude Code
https://claude.ai/code/session_01JBQoeDJraws6oq8cyxPri3
Generated by Claude Code