Skip to content

New Transactions UI: attachments & unified add/edit dialog - #1

Draft
Mischa323 wants to merge 2 commits into
mainfrom
claude/keen-wozniak-19vgn1
Draft

New Transactions UI: attachments & unified add/edit dialog#1
Mischa323 wants to merge 2 commits into
mainfrom
claude/keen-wozniak-19vgn1

Conversation

@Mischa323

Copy link
Copy Markdown
Owner

Implements the Transaction Attachments & Editing design handoff inside the real FinTrack stack (React + Vite + Tailwind / Express + Prisma + SQLite), extending the existing components rather than introducing a parallel set.

What's new

Transactions screen

  • Table rebuilt as a GlassCard with the design's CSS-grid layout, inline filter bar (search / type / account / category), and uppercase muted headers.
  • New Receipt column showing 📎 {count} when a transaction has attachments.
  • Rows are clickable (hover highlight) and open the unified add/edit dialog.
  • Empty state and date-under-description (nl-NL formatting) per the spec.

Add / Edit dialog

  • Shared Dialog shell (glass-strong panel, blurred overlay, closes on overlay click / Esc / ×).
  • Type selector, description, amount + editable date row (so historical invoices can be corrected), account, category (hidden for transfers). Transfer keeps the existing from→to account behavior.
  • Receipts & invoices section: image thumbnails / PDF icon, add-file button, remove buttons, and a full-size viewer (image + PDF iframe).
  • Delete action available in edit mode.

Backend — real persistence

  • New Attachment Prisma model + migration, FK to Transaction with cascade delete.
  • Endpoints: POST /transactions/:id/attachments (multipart upload), GET /attachments/:id (inline stream), DELETE /attachments/:id.
  • Transaction list responses now include attachment metadata.
  • Files are auth-protected; the viewer fetches them as blobs via the existing api/client and renders object URLs.

Validation

  • vite build passes.
  • prisma validate passes and all migrations (incl. the new one) apply cleanly.

Notes

  • Attachments are stored on disk under backend/uploads/attachments/ (git-ignored), matching the existing import-upload pattern.

https://claude.ai/code/session_01HEUSQ8Ntz9nzGMcstCtKeh


Generated by Claude Code

claude added 2 commits June 10, 2026 15:06
Recreate the FinTrack Transactions design handoff in the real stack:

Frontend
- Redesigned Transactions table as a glass card with a grid layout,
  inline filter bar, and a new Receipt column (📎 count).
- Rows are clickable and open a unified add/edit dialog (shared Dialog
  component with overlay/Esc/click-out close).
- Dialog supports editing the date of historical transactions, an
  attachments section (image thumbnails / PDF icon), and a full-size
  attachment viewer (image + PDF iframe).
- Attachments are uploaded to the backend on save; removals and new
  files are reconciled. Auth-protected files are fetched as blobs.

Backend
- Add Attachment Prisma model + migration (FK to Transaction, cascade).
- New routes: POST /transactions/:id/attachments (multipart upload),
  GET /attachments/:id (inline stream), DELETE /attachments/:id.
- Include attachment metadata in transaction list responses.

https://claude.ai/code/session_01HEUSQ8Ntz9nzGMcstCtKeh
Read each attached receipt/invoice (image or PDF) with an AI model and
store searchable tags (merchant, category, line items) on the attachment.
The Transactions search box now matches these tags, so users can find
transactions by what was actually on the receipt.

Providers (configurable in Settings → AI, secrets stored like OIDC/Google):
- Claude (Anthropic SDK) with a user-selectable model (Haiku / Sonnet / Opus);
  falls back to ANTHROPIC_API_KEY env var.
- Odysseus (self-hosted) via its real API: Bearer token, POST /api/upload →
  /api/session → /api/chat.

Backend
- Attachment.tags + Settings AI fields (+ migration 20240111_ai_tagging).
- services/aiTagging.js: provider dispatch, vision/PDF input, lenient tag parsing.
- Tag on upload (best-effort, never fails the upload) + POST
  /transactions/:id/attachments/retag to re-analyze existing attachments.
- Transaction search matches description OR attachment tags.
- config route exposes/accepts AI settings (secrets returned as booleans only).

Frontend
- Settings 'AI' tab: provider toggle, model picker, keys.
- Transaction dialog shows AI tags as chips with a Re-analyze button;
  receipt column tooltip lists tags.

https://claude.ai/code/session_01HEUSQ8Ntz9nzGMcstCtKeh
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