Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
61 changes: 61 additions & 0 deletions docs/HANDOFF.md
Original file line number Diff line number Diff line change
Expand Up @@ -4526,3 +4526,64 @@ rows", transactions 2 "show more" in steps of 20, plus a view-only list.
figures are refreshed.
- A model that names a category in its own words leaves that name in the
stored draft.

## HO-123: One page frame, one title, readable fields and the same controls on every page

- **Date:** 2026-10-11 (UTC)
- **Author:** Muhammad Tahub Khatri with Claude Code
- **Branch / PR:** `fix/ui-page-frame` / PR linked from the branch

### What changed
- A UI audit (four review agents plus the Web Interface Guidelines) found
pages that looked like different apps. This PR fixes the CSS-only part.
- **Dark greys** (left over from HO-119; PR #45 merged before this commit
was pushed): `--surface`, `--surface-soft`, `--line`, `--tint` and
`--ink-soft` are neutral, not blue-grey, and the dark `--head-tint`
override is gone.
- **Page frame:** new tokens `--gutter`, `--page-top`, `--page-narrow`
(48rem: Accounts, Transactions), `--page-medium` (60rem: Import,
Insights) and `--page-wide` (72rem: Bills, Recurring, Budgets,
Categorization, Transfers). Every page is left-aligned under the header
with the header's gutter. Budgets had no side padding at all (text
touched the screen edge on phones); Bills and Recurring were centred at
86rem with a 1rem top.
- **Titles:** the bare `h1` rule (dashboard headline, 3rem) applied to
every page. It is now `.hero h1`; `main h1` is the shared page title
(2.5rem, 650). Seven copies of that rule in modules are gone. Budgets'
1.4rem section heading uses the global h2.
- **Fields:** new `--field-line` (`#767676` light, `#707070` dark) for
every input and select border: 3:1 or better on every ground (WCAG
1.4.11). `--line` was about 1.3:1.
- **Focus:** per-page focus rings (green on Bills, purple on Budgets and
Insights, a 3px offset on Transfers) are gone; the global ink ring
applies. The header's tab ring is drawn inside the tab, because the
sideways-scrolling row clipped it.
- **Controls:** `--radius-control` (8px) and `--radius-card` (12px)
replace 8px, 10px, 12px, 14px, 0.65rem, 0.4rem, 0.35rem and 0.3rem.
Buttons in Bills, Recurring, Budgets and Transfers use 0.5rem 1rem
padding like the rest. Every primary button lightens on hover and
outlined ones take the tint. The selected Bills tab is filled with ink
(it was 1.04:1 against the page). The settings switch lost a blue
literal shadow.
- `tests/e2e/app-nav.spec.ts`: every page has the header's gutter, the
same title size, no sideways scroll at 360 and 1440px; a field border is
3:1 against its card in both themes; the dark greys are neutral.

### Verified
- `pnpm lint`, `typecheck`, `format:check`, `docs:check` and `build`
pass.
- `pnpm test:unit`: 2702 pass; 8 fail only because this container has no
Neon `storage-tests` credentials (TEST-05), and `scripts/db/verify.test.ts`
timed out once in the full run and passes on its own.
- Playwright was not run (Muhammad runs it); the screenshots in
`docs/screenshots/` regenerate when their specs run.

### What's next
- The same audit has two more PRs: accessibility fixes
(`fix/ui-a11y`) and confirmations and broken links
(`fix/ui-confirmations`).
- Buttons are still defined per feature; one shared button class needs TSX
changes in every feature and was left for later.

### Open problems
- Not checked visually in a browser in this session.
4 changes: 2 additions & 2 deletions src/app/(app)/layout.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
position: sticky;
top: 0;
z-index: 10;
padding: 0 clamp(1rem, 3vw, 3.5rem);
padding: 0 var(--gutter, clamp(1rem, 3vw, 3.5rem));
background-color: var(--head-bg, #161616);
background-image:
linear-gradient(
Expand Down Expand Up @@ -99,7 +99,7 @@
}

.loading {
padding: 2rem clamp(1rem, 3vw, 3.5rem);
padding: 2rem var(--gutter);
color: var(--ink-soft);
}

Expand Down
14 changes: 3 additions & 11 deletions src/app/(app)/w/[workspaceId]/settings/page.module.css
Original file line number Diff line number Diff line change
@@ -1,20 +1,12 @@
/* Uses the tokens in src/app/globals.css (ADR-046). */

/* A flex column, not a grid: globals.css gives every h1 a grid area for the
dashboard hero, which would pull this heading out of order in a grid. */
/* The title comes from `main h1` in src/app/globals.css. */
.page {
display: flex;
flex-direction: column;
align-items: flex-start;
gap: 1.5rem;
padding: clamp(1.5rem, 3vw, 2.5rem) clamp(1rem, 3vw, 3.5rem) 3rem;
}

.page h1 {
font-size: clamp(1.75rem, 1.2rem + 2vw, 2.5rem);
font-weight: 650;
letter-spacing: -0.03em;
line-height: 1.1;
padding: var(--page-top) var(--gutter) 3rem;
}

/* Sections fill the column up to their own maximum width. */
Expand All @@ -25,7 +17,7 @@
.note {
padding: 0.75rem 1rem;
border: 1px dashed var(--line);
border-radius: 8px;
border-radius: var(--radius-control);
color: var(--ink-soft);
font-size: 0.875rem;
}
2 changes: 1 addition & 1 deletion src/app/(auth)/layout.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
display: flex;
flex-direction: column;
min-height: 100vh;
padding: 1rem clamp(1rem, 3vw, 3.5rem) 3rem;
padding: 1rem var(--gutter) 3rem;
}

.top {
Expand Down
76 changes: 54 additions & 22 deletions src/app/globals.css
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@
--ink: #171717;
--ink-soft: #474747;
--line: #cfcfcf;
/* Input and select borders: 3:1 or more on every ground (WCAG 1.4.11).
--line stays for dividers and card edges. */
--field-line: #767676;
--tint: #e8e8e8;
--bar: #7d858b;
--in: #17734c;
Expand All @@ -38,6 +41,19 @@
/* Figures that should line up like a statement. */
--font-num: var(--font-mono), ui-monospace, Menlo, monospace;

/* One page frame for every signed-in page: the side gutter matches the
header's, the top padding is shared, and pages are left-aligned under
the wordmark. Lists and forms read best narrow; card grids go wide. */
--gutter: clamp(1rem, 3vw, 3.5rem);
--page-top: clamp(1.5rem, 3vw, 2.5rem);
--page-narrow: 48rem;
--page-medium: 60rem;
--page-wide: 72rem;

/* Corners: controls, then cards and panels. */
--radius-control: 8px;
--radius-card: 12px;

/* "Sample" label (ADR-024) and Insights' slight comparison tints
(ADR-056). Tints sit behind ink text: the words carry the meaning. */
--sample-bg: #fbefd9;
Expand All @@ -57,18 +73,19 @@
:root {
/* The header's night (--head-bg below), so pages and header match. */
--bg: #0a0a0a;
--surface: #181c1f;
--surface-soft: #15181b;
/* Neutral greys, like the header and the light theme: no blue cast. */
--surface: #171717;
--surface-soft: #131313;
--ink: #ededed;
--ink-soft: #a3a9ae;
--line: #2a2f33;
--tint: #22272b;
--ink-soft: #a3a3a3;
--line: #2e2e2e;
--field-line: #707070;
--tint: #242424;
--bar: #7d858b;
--in: #6bd49a;
--bill: #e0a84a;
--sub: #9da8f2;
--head-bg: #0a0a0a;
--head-tint: #22272b;
--page-grid: var(--head-grid);

--sample-bg: #3a2b12;
Expand Down Expand Up @@ -164,7 +181,7 @@ select {
}

.page {
padding: 1rem clamp(1rem, 3vw, 3.5rem) 3rem;
padding: 1rem var(--gutter) 3rem;
}

h2 {
Expand Down Expand Up @@ -212,8 +229,8 @@ strong {
gap: 0.5rem 3rem;
/* Style B: the headline continues the header's night band, edge to edge
(the negative margins undo .page's padding). */
margin: -1rem calc(-1 * clamp(1rem, 3vw, 3.5rem)) 1.5rem;
padding: clamp(1.5rem, 3vw, 2.5rem) clamp(1rem, 3vw, 3.5rem);
margin: -1rem calc(-1 * var(--gutter)) 1.5rem;
padding: var(--page-top) var(--gutter);
background-color: var(--head-bg);
background-image:
linear-gradient(var(--head-grid) 1px, transparent 1px),
Expand All @@ -236,7 +253,17 @@ strong {
outline-color: var(--head-ink);
}

h1 {
/* Every page's title. The dashboard's headline is bigger (.hero h1). */
main h1 {
font-size: clamp(1.75rem, 1.2rem + 2vw, 2.5rem);
font-weight: 650;
line-height: 1.1;
letter-spacing: -0.03em;
text-wrap: balance;
overflow-wrap: anywhere;
}

.hero h1 {
grid-area: headline;
max-width: 22ch;
font-size: clamp(1.75rem, 1.1rem + 2.2vw, 3rem);
Expand Down Expand Up @@ -500,8 +527,8 @@ h1 {
.go-day input {
min-height: 2.125rem;
padding: 0 0.5rem;
border: 1px solid var(--line);
border-radius: 8px;
border: 1px solid var(--field-line);
border-radius: var(--radius-control);
background: var(--surface);
color: var(--ink);
}
Expand Down Expand Up @@ -541,7 +568,7 @@ h1 {
gap: 1px;
overflow: hidden;
border: 1px solid var(--line);
border-radius: 10px;
border-radius: var(--radius-card);
background: var(--line);
}

Expand Down Expand Up @@ -744,7 +771,7 @@ button.cell:hover,
top: 1rem;
padding: 1.25rem;
border: 1px solid var(--line);
border-radius: 10px;
border-radius: var(--radius-card);
background: var(--surface);
}

Expand Down Expand Up @@ -899,7 +926,7 @@ a.item-remove:hover {
grid-template-columns: 1fr 1fr;
margin: 0.75rem 0;
padding: 0.1875rem;
border-radius: 8px;
border-radius: var(--radius-control);
background: var(--tint);
}

Expand All @@ -920,7 +947,7 @@ a.item-remove:hover {
.switch input:checked + span {
background: var(--surface);
font-weight: 600;
box-shadow: 0 1px 2px rgb(20 32 43 / 0.12);
box-shadow: 0 0 0 1px var(--line);
}

.switch input:focus-visible + span {
Expand All @@ -944,8 +971,8 @@ a.item-remove:hover {
.field select {
width: 100%;
padding: 0.5rem 0.625rem;
border: 1px solid var(--line);
border-radius: 8px;
border: 1px solid var(--field-line);
border-radius: var(--radius-control);
background: var(--surface);
}

Expand Down Expand Up @@ -988,7 +1015,7 @@ a.item-remove:hover {
margin-top: 1rem;
padding: 0.625rem;
border: 0;
border-radius: 8px;
border-radius: var(--radius-control);
background: var(--ink);
color: var(--bg);
font-weight: 600;
Expand All @@ -1005,7 +1032,7 @@ a.item-remove:hover {
padding: 0;
overflow: hidden;
border: 1px solid var(--line);
border-radius: 10px;
border-radius: var(--radius-card);
list-style: none;
background: var(--surface);
}
Expand Down Expand Up @@ -1075,7 +1102,7 @@ a.item-remove:hover {
.agenda-empty {
padding: 2rem 1rem;
border: 1px dashed var(--line);
border-radius: 10px;
border-radius: var(--radius-card);
color: var(--ink-soft);
}

Expand Down Expand Up @@ -1148,7 +1175,7 @@ a.item-remove:hover {
.plan {
padding: 0.375rem 0.75rem;
border: 1px solid var(--ink-soft);
border-radius: 8px;
border-radius: var(--radius-control);
background: none;
cursor: pointer;
font-size: 0.875rem;
Expand Down Expand Up @@ -1257,3 +1284,8 @@ footer {
transition: none !important;
}
}

/* Hover: ink buttons lighten a little, outlined ones pick up the tint. */
.primary:hover:not(:disabled) {
opacity: 0.88;
}
6 changes: 6 additions & 0 deletions src/components/ui/app-nav.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,12 @@
color: var(--head-ink);
}

/* The row scrolls sideways, which clips anything outside it: draw the
focus ring inside the tab so it is never cut off. */
.link:focus-visible {
outline-offset: -2px;
}

.link[aria-current="page"] {
box-shadow: inset 0 -2px 0 var(--head-ink);
color: var(--head-ink);
Expand Down
2 changes: 1 addition & 1 deletion src/components/ui/page-loading.module.css
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* Uses the tokens in src/app/globals.css (ADR-046). */

.loading {
padding: 2rem clamp(1rem, 3vw, 3.5rem);
padding: 2rem var(--gutter);
color: var(--ink-soft);
}
11 changes: 2 additions & 9 deletions src/components/ui/page-placeholder.module.css
Original file line number Diff line number Diff line change
@@ -1,14 +1,7 @@
/* Uses the tokens in src/app/globals.css (ADR-046). */

.page {
padding: clamp(1.5rem, 3vw, 2.5rem) clamp(1rem, 3vw, 3.5rem) 3rem;
}

.page h1 {
font-size: clamp(1.75rem, 1.2rem + 2vw, 2.5rem);
font-weight: 650;
letter-spacing: -0.03em;
line-height: 1.1;
padding: var(--page-top) var(--gutter) 3rem;
}

.purpose {
Expand All @@ -22,7 +15,7 @@
margin-top: 1.5rem;
padding: 0.75rem 1rem;
border: 1px dashed var(--line);
border-radius: 8px;
border-radius: var(--radius-control);
color: var(--ink-soft);
font-size: 0.875rem;
}
Loading
Loading