Skip to content

feat(client): matching screen step 6 — comparison detail cards#3901

Open
gilgardosh wants to merge 1 commit into
matching-screenfrom
matching-screen-6-comparison-cards
Open

feat(client): matching screen step 6 — comparison detail cards#3901
gilgardosh wants to merge 1 commit into
matching-screenfrom
matching-screen-6-comparison-cards

Conversation

@gilgardosh

Copy link
Copy Markdown
Collaborator

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:
    • Core metadata: date, exact server-formatted amount with currency symbol (rendered as-is, no client-side conversion, per the spec's render rules), counterparty, document type(s), description
    • Document image thumbnail (links to the original file) with a graceful "No document preview" fallback when image is null
    • Expandable "More Details" accordion revealing secondary transactions and misc expenses
    • Optional match-confidence gauge (reuses the existing shared Score component) rendered only when confidenceScore is provided
  • Screen split view now renders two ChargeDetailCard instances: the active base charge from useChargeMatchQueue on the left and the top-scoring suggestion (with confidence badge) on the right; empty/completed states preserved
  • Shared chargeDate/chargeTitle helpers extracted to utils.ts

Tests

__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 pass
  • yarn workspace @accounter/client build passes; lint + prettier clean

🤖 Generated with Claude Code

https://claude.ai/code/session_01JBQoeDJraws6oq8cyxPri3


Generated by Claude Code

@gilgardosh
gilgardosh temporarily deployed to accounter-fullstack July 9, 2026 11:48 — with GitHub Actions Inactive
@gilgardosh gilgardosh self-assigned this Jul 9, 2026

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread packages/client/src/components/charge-matching/utils.ts
@gilgardosh
gilgardosh temporarily deployed to accounter-fullstack July 9, 2026 11:54 — with GitHub Actions Inactive
@gilgardosh
gilgardosh force-pushed the matching-screen-5-ui-scaffold branch from faeef86 to bcc9ec5 Compare July 9, 2026 12:05
@gilgardosh
gilgardosh force-pushed the matching-screen-6-comparison-cards branch from c729977 to e2f51bd Compare July 9, 2026 12:07
@gilgardosh
gilgardosh temporarily deployed to accounter-fullstack July 9, 2026 12:07 — with GitHub Actions Inactive
@gilgardosh
gilgardosh temporarily deployed to accounter-fullstack July 9, 2026 12:07 — with GitHub Actions Inactive
@gilgardosh
gilgardosh force-pushed the matching-screen-5-ui-scaffold branch from bcc9ec5 to 7eecc10 Compare July 16, 2026 18:16
Base automatically changed from matching-screen-5-ui-scaffold to matching-screen July 16, 2026 18:38
- 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
@gilgardosh
gilgardosh force-pushed the matching-screen-6-comparison-cards branch from e2f51bd to 73a84fc Compare July 16, 2026 18:40
@gilgardosh
gilgardosh temporarily deployed to accounter-fullstack July 16, 2026 18:40 — with GitHub Actions Inactive
@gilgardosh
gilgardosh temporarily deployed to accounter-fullstack July 16, 2026 18:40 — with GitHub Actions Inactive
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants