Skip to content

feat(web): clearing-ledger tokens, app shell and status system (1/4) - #9

Merged
daniel-tsx merged 1 commit into
mainfrom
feat/web-ui-shell
Oct 24, 2026
Merged

daniel-tsx merged 1 commit into
mainfrom
feat/web-ui-shell

Conversation

@daniel-tsx

@daniel-tsx daniel-tsx commented Oct 24, 2026 •

Copy link
Copy Markdown
Owner

Stacked PR 1 of 4 (#9 → #10 → #11 → #12). Dashboard revamp: shell → tables → detail → polish. Review and merge in order.

What and why

Slice 1 of the apps/web revamp (direction "Clearing ledger", approved in session): design tokens, app shell and one status system. The dashboard had no current-page indicator, 8–9px labels, two status colours under WCAG AA, and settled batches and paid-out payouts that rendered exactly like a captured payment. No API, schema or business-logic change.

  • globals.css rewritten as readable token / base / shell / component sections (colour, 11–28px type scale, spacing and motion tokens).
  • IBM Plex Sans/Mono via next/font/google (self-hosted at build time; no runtime request to Google), a skip link, aria-current on the current section, and one scrolling nav row on phones.
  • lib/status.ts: glyph + label + hue per tone. Settlement and payout SUCCEEDED render as settled / paid out; in-flight provider attempts read processing · outcome unknown. Covered by node:test, now wired into the web test script.
  • Fix: duplicate React keys in DataTable rows whose id was an element.

Screenshots were captured locally at 1440px and 390px (.tmp/web-ui-revamp/screens/before and slice1). They are not attached because the CLI cannot upload images.

Review guide

  • Read carefully: apps/web/lib/status.ts. It decides how every state looks (captured ≠ settled ≠ paid out; unknown never shown as success or failure).
  • Skim: apps/web/app/globals.css (full rewrite, mostly mechanical) and the one-line of= additions in five pages.
  • Least confident about: the web test script relies on Node's built-in TypeScript stripping (Node ≥ 22.18 or 24). CI's node-version: 22 resolves to the latest 22.x.
  • Tests removed, weakened or skipped: none. The web test script previously only printed a notice.

Task size

T1 (apps/web UI only; no T2 area touched).

Checks

Result Command Scope / notes
PASS pnpm --filter @fintech-lab/web lint web
PASS pnpm --filter @fintech-lab/web build web; downloads Plex fonts at build time
PASS pnpm --filter @fintech-lab/web typecheck web
PASS pnpm --filter @fintech-lab/web test 3/3 status-mapping tests
PASS git diff --check whitespace
PASS Browser (built-in browser and agent-browser) seeded local stack: skip link, focus rings, aria-current; every text token ≥ 6.2:1
NOT RUN pnpm lint/test/build/typecheck (repo-wide) at this head run at the top of the stack (#12), all PASS
NOT RUN Hosted CI pending on this PR

Unverified boundaries

No automated browser tests exist. Visual and keyboard checks were manual, against a disposable local PostgreSQL with seed data plus local confirm:false intents. An offline build fails because next/font/google fetches fonts at build time.

Review

T1 self-review (ponytail-review). Findings and disposition:

  • The status mapping had no test → extracted to lib/status.ts with node:test coverage.
  • The pending glyph ◌ fell back to a font where it looked like authorized ○ → changed to ….

Docs and temporary files

docs/ui-signature.md rewritten as the owner of the new conventions; one line in docs/verification.md updated for the web test script. Kept until the stack is merged or rejected: .tmp/web-ui-revamp/screens/ (before/after screenshots) and local server logs.

🤖 Generated with Claude Code

Slice 1 of the dashboard revamp (T1, apps/web only; no API or business logic change).

- Rewrite globals.css as readable token, base, shell and component sections:
  colour, type scale (11-28px, nothing smaller), spacing, radius and motion
  tokens; flat ruled panes; reduced-motion turns transitions off.
- Load IBM Plex Sans/Mono with next/font; add a skip link and a focusable main.
- Mark the current section with aria-current via a small client NavLink;
  mobile nav becomes one scrolling row.
- One status system (lib/status.ts): glyph + label + hue per tone. Settlement
  and payout SUCCEEDED render as settled / paid out so they never look like a
  capture; in-flight provider attempts read "processing - outcome unknown".
  Covered by node:test unit tests wired into the web test script.
- Fix duplicate React keys in DataTable rows whose id is an element.
- Ledger business types render as labels, not statuses; drop the decorative
  pulsing live dot; generic loading skeleton; global error loads tokens.
- docs/ui-signature.md now owns the clearing-ledger conventions.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.

1 participant