Skip to content

Match /bills UI to site, colocate under app/, fix proxy conflict#24

Merged
mikaalnaik merged 2 commits into
mainfrom
mikaal/bills-theme
Jul 6, 2026
Merged

Match /bills UI to site, colocate under app/, fix proxy conflict#24
mikaalnaik merged 2 commits into
mainfrom
mikaal/bills-theme

Conversation

@mikaalnaik

Copy link
Copy Markdown
Contributor

Summary

Three related changes to the ported /bills sub-app:

  1. UI — match the Build Canada brand. The bills section shipped as a stock shadcn/ui app (rounded corners, neutral OKLCH palette, raw Tailwind color chips). This re-themes the scoped .bills-scope tokens onto the brand linen / charcoal / auburn palette with square corners, replaces off-palette chips (impact, judgement, tenet alignment) with brand tones, swaps in the shared PageHeader / Button and type-* typography for titles and CTAs, and sweeps inline *-[var(--…)] utilities to semantic classes. Also fixes a few pre-existing broken class strings (text-[) found along the way. Follows the established sub-app theming pattern used by /tracker and /toronto.

  2. Structure — colocate bills code under its route. Moves all of src/bills/* into src/app/bills/* (git-tracked renames, history preserved) and rewrites the ~118 @/bills/* imports to @/app/bills/*. Updates the globals.css @import and stale path comments. src/bills/ is gone; everything bills-related now lives with the routes.

  3. Fix — resolve the middleware/proxy conflict. Next 16 renamed middlewareproxy and allows only one such file, but both src/middleware.ts (OAuth session renewal on /memos, /api/auth/me) and src/proxy.ts (dashboard PostHog flag gate) existed — throwing an unhandled rejection that broke all routing (the "site never loads" spinner). Merges both behaviors into a single src/proxy.ts, dispatched by path, and deletes src/middleware.ts. No behavior lost.

Verification

  • tsc --noEmit → 0 source errors; eslint → no new errors (only pre-existing unused-var warnings).
  • Ran the app: /bills, /bills/[id], /memos, /dashboard all render 200; rendered HTML/CSS confirm brand classes present and old off-palette classes gone; the rest of the site is unaffected (tokens stay scoped to .bills-scope). The merged proxy runs in ~5–43ms.

Notes for reviewers

  • The diff is large but mostly mechanical renames from the directory move; the substantive edits are the .bills-scope token block in bills.css, the chip/judgement components, and src/proxy.ts.
  • src/app/bills/types.ts (domain types) and the moved src/app/bills/types/ folder (ambient .d.ts) coexist intentionally — path imports resolve to the .ts file.

🤖 Generated with Claude Code

Restyle the ported /bills shadcn sub-app to the Build Canada brand and
colocate its code under the route, plus fix an app-breaking middleware/proxy
conflict.

UI: retheme the .bills-scope tokens onto the brand linen/charcoal/auburn
palette with square corners; replace raw Tailwind color chips (impact,
judgement, alignment) with brand tones; swap in the shared PageHeader/Button
and type-* typography for CTAs and titles; sweep inline CSS-var utilities to
semantic classes and fix a few pre-existing broken class strings.

Structure: move all of src/bills/* into src/app/bills/* (git-tracked renames)
and rewrite @/bills/* imports to @/app/bills/*, so bills code lives with its
routes. Update the globals.css @import and stale path comments.

Proxy: Next 16 allows a single proxy entrypoint, but both src/middleware.ts
(OAuth session renewal on /memos, /api/auth/me) and src/proxy.ts (dashboard
PostHog flag gate) existed, throwing an unhandled rejection that broke all
routing. Merge both behaviors into src/proxy.ts (dispatched by path) and
remove src/middleware.ts.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@mikaalnaik mikaalnaik requested a review from xrendan July 6, 2026 16:18
@mikaalnaik mikaalnaik self-assigned this Jul 6, 2026
The icon sat inside its own bordered, filled square (iconWrap) the same
size as the icon, which framed the already-circular check/x glyph in an
ugly nested box. Drop the icon wrapper and render the icon inline next to
the label, keeping only the outer badge border.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@mikaalnaik mikaalnaik merged commit ccb9f13 into main Jul 6, 2026
1 check passed
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