feat: add accounts and transactions tabs to finance dashboard - #61
feat: add accounts and transactions tabs to finance dashboard#61reuel88 wants to merge 5 commits into
Conversation
Populates the two empty tabs on /dashboard/finance with native-feeling content that mirrors the existing Dashboard tab's card aesthetic. Accounts tab: account KPI strip, allocation breakdown, full account list with brand logos and 7-day balance sparklines, recent activity, upcoming inflows, and an "Add account" CTA card. Transactions tab: monthly inflow/outflow/net KPIs above a filterable, sortable, paginated TanStack table (~80 mock rows; search + account/category/type filters). Cross-tab UX: clicking the chevron on an account row switches to the Transactions tab, pre-filters by that account, and moves focus to the Transactions tab trigger. a11y: role=img + descriptive labels on sparklines and the allocation bar, aria-sort on sortable headers, aria-hidden on decorative icons and brand logos that sit next to redundant text, an explicit label on the search input, and tightened amber contrast on the Pending status badge.
- Derive transactions-kpis month prefix from the current date instead
of the hardcoded "2026-05" string so the KPI cards don't permanently
zero out once the calendar month rolls over.
- Rename Tabs value constants from stale time-range strings
("30-days" / "12-months" / "custom") to content-descriptive ones
("dashboard" / "accounts" / "transactions").
- Null-guard the largest-account reduce + render so the KPI card
no longer assumes a non-empty accounts list (shows "—" / "No linked
accounts" when the list is empty).
|
Thanks for the review — pushed 1a98c40 addressing all three threads:
|
|
Thanks for the PR! The overall direction looks good, but the design needs a bit more polish for consistency. On the Accounts tab, there’s a lot of empty space below the |
…grouping and layout
…n mismatch Module-scope `new Date()` in `upcoming-transactions` and an unconditional `format(new Date(), ...)` in the finance page produced different day strings on the server and client when the two runtimes' local timezones straddled midnight, causing a React hydration error. Compute "now" inside the components via useState + useEffect so SSR and the first client render emit matching placeholders. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…lesson UptimeRobot monitor live (last Phase-4 item) -> Phase 4 FULLY CLOSED: ADR-004 monitoring section, ROADMAP milestones (4325946), BRAIN current position. Disk builder-prune recorded honestly: 87%->74% (~4GB real, not the 21GB docker advertised - shared layers overcount). gh default-repo gotcha logged as a lesson (set-default now fork; was the arhamkhnz#59/arhamkhnz#61 misread cause). Post-merge push-to-deploy verified from the PR merge (~3m09s, health ok).

Summary
Builds out the two currently-empty tabs on the Finance dashboard (
/dashboard/finance) — Accounts and Transactions — with content that matches the existing Dashboard tab's card-heavy aesthetic.What's included
Accounts tab
Itemprimitives, with brand logos, monthly delta chips, and a 7-day balance sparkline per row.Transactions tab
opportunities-section.tsx: ~80 mock rows, search + Account/Category/Type dropdown filters, sortable Date and Amount columns, 10-rows-per-page pagination, row selection, and a per-row actions menu.Cross-tab UX
page.tsx. Clicking the chevron on an account row switches to the Transactions tab and seeds the Account filter; a `ref` on the Transactions tab trigger moves keyboard focus there so SR / keyboard users land in a sensible place.Accessibility
Consistency
Screenshots
Accounts tab
Transactions tab
Test plan
Greptile Summary
This PR builds out the two previously empty tabs on the Finance dashboard — Accounts and Transactions — with KPI strips, an accounts list with sparklines, an allocation bar, a TanStack-backed transactions table with filtering/sorting/pagination, and several supporting cards. The implementation is thorough and closely follows the existing repo conventions.
AccountKpis,AccountsList,AllocationByType,RecentAccountActivity,UpcomingInflows, andAddAccountCard, all wired throughpage.tsxwith a cross-tab navigation callback that seeds the account filter in the Transactions tab.opportunities-section.tsxpattern.upcoming-transactions.tsxis refactored to movenew Date()calls client-side viauseState(null) + useEffect, fixing a potential SSR/CSR hydration mismatch;page.tsxapplies the same pattern for the formatted header date.Confidence Score: 5/5
Safe to merge — all changes are additive UI components backed by static mock data, and the cross-tab navigation logic is straightforward and well-guarded.
The changes introduce new client components, a TanStack Table integration, and a useEffect-based cross-tab filter handoff, none of which touch shared primitives or existing routes. The table-in-deps effect runs more often than needed but the early-return guard keeps it correct. All other findings are style-level cleanups with no runtime impact.
No files require special attention; transactions-section.tsx has the useEffect dependency concern worth a second glance, but it does not affect correctness.
Important Files Changed
Sequence Diagram
sequenceDiagram participant User participant AccountsList participant Page as page.tsx (state) participant TransactionsSection participant TanStackTable User->>AccountsList: Click chevron on account row AccountsList->>Page: onSelectAccount(accountId) Page->>Page: setAccountFilterSeed(accountId) Page->>Page: setActiveTab("transactions") Page->>Page: requestAnimationFrame → focus Transactions trigger Page->>TransactionsSection: "render with initialAccountFilter=accountId" TransactionsSection->>TanStackTable: useState initializer sets columnFilters TransactionsSection->>TanStackTable: useEffect → setFilterValue(accountId) + setPageIndex(0) TransactionsSection->>Page: onAccountFilterConsumed() Page->>Page: setAccountFilterSeed(undefined) Page->>TransactionsSection: "re-render with initialAccountFilter=undefined" TransactionsSection->>TanStackTable: filter persists in internal statePrompt To Fix All With AI
Reviews (5): Last reviewed commit: "fix(finance): defer date-relative render..." | Re-trigger Greptile