Skip to content

One calm layout for the whole web UI: overview with charts, consistent lists, plans and settings - #110

Open
kratofl wants to merge 10 commits into
mainfrom
enhancement/web-redesign
Open

kratofl wants to merge 10 commits into
mainfrom
enhancement/web-redesign

Conversation

@kratofl

@kratofl kratofl commented Oct 11, 2026 •

Copy link
Copy Markdown
Owner

The web UI looked like a stack of separate cards, with no common page structure. Charts were missing from the overview, and lists, plans and settings each used their own layout. This PR redesigns the whole web UI against one set of rules in docs/design-system/DESIGN.md. The rules say how to display things, not what a page contains, so they hold for future modules too. iOS, Windows and macOS are untouched.

What changes for a user

  • Every page has one structure. The toolbar shows the title, period stepper and caption on the left, and search plus one primary action on the right.
  • Four page types: Overview, List, Plan, Settings.
    • Overview: a hero number with a pace chart, Anstehend, Töpfe, the fun budget of the last 6 periods, and Zuletzt.
    • List: Ausgaben and Sparen get a metric strip, a filter row, a daily chart and one table card.
    • Plan: Einkommen & Rücklagen gets a breakdown chart, and the cost pages are lists.
    • Settings: Account and Admin pages share a calm 720px column.
  • Period stepper. Step back through closed periods. A closed period shows as it closed.
  • Design system. Floating chrome uses restrained glass. Sheets and dialogs are solid with a dimmed backdrop. Radii are tighter on desktop, and there are four elevation levels. Dark mode has deeper backgrounds.
  • Sidebar. Dashboard sits on top, then Budget, then Admin. Section headers fold their section. Inside Budget, Planung and Verwalten are parent rows that fold their pages. Folds are kept per device, and the group with the current page always opens. On the collapsed rail a parent row opens its pages as a menu; the phone view menu shows the same groups.
  • Sheets. Errors show inside the sheet that caused them, for users, categories, merchants and expenses. Before, they rendered behind the modal.
  • Subscriptions. Monthly and yearly subscriptions can name a merchant and carry a description. Anstehend and the Ausgaben side panel show the merchant's logo and the note.
  • Categories. Name, colour and icon are edited right in the table (the tile opens colour and icon) and saved with the plan's Save. Archive and restore are icon buttons in the row; there is no "…" menu. What a category did this period, including its latest expenses and a link to all of them, opens in a details sheet. Table fields are quiet: no edge until focused, so a table of fields reads as a table. The cost rows use them too.
  • Admin users. Admins create users from their own page through a sheet. Row actions are in a "…" menu.
  • One component per pattern. Settings, admin and budget pages now build their cards from one list kit (header with hint, rows, subheads, footer, empty line) instead of three look-alike copies. The merchant select and the app search are one combobox (cmdk) with menu-style options. The segmented control and the colour and icon choices are radio groups: one Tab stop, arrow keys select. The new-category sheet uses the same swatches and icon grid as the table popover.

Backend

  • Plan costs gain optional merchantId and description, and so do the costs listed per period. The merchant must exist and be the user's own or shared, as for expenses (invalid_merchant). Plan versions saved earlier read both as null, so no migration is needed.

  • GET /budget/monthly returns history: the last six periods' starting fun money and what was left, oldest first. Covered by an HTTP test.

  • Categories gain color and icon, editable in the categories table.

  • Identity, Pocket ID (OIDC) and audit problem responses gain a stable code extension member, for example user_exists. The English detail is unchanged, so other API readers keep working. The web translates the code; anything without a known code gets a translated message per HTTP status. Before, the German UI showed the API's English text.

Call-outs

  • ⚠️ Breaking: PUT /users is admin-only. It creates an active account; anonymous self-registration as pending is gone. Signing in with an unknown Pocket ID (OIDC) account still creates a pending account for an admin to activate. This came from the pending admin work bundled into this branch.
  • Migration 202610100001_MonthlyCategoryAppearance. It is additive: it adds color and icon to budget.monthly_categories and spreads the colours per user. Existing categories keep the icon the web client used to guess from their name.
  • Saved board layouts reset. The board ids moved to budget-overview-v2 and dashboard-v2, because every widget on those boards was replaced.
  • ADRs respected. Fixkosten, Monatliche Abos and Jährliche Abos stay separate pages (ADR 0069). Dashboards stay arrangeable widget boards; the new overview is the default arrangement (ADR 0068).
  • Bundled work. This branch also contains the previously uncommitted budget and admin work (commit da009c9).

Decisions I made without asking

  • Period names. A period is named after the month most of its days fall in, so 25 Sep – 24 Oct is October. The plan editor already used this rule; now every label does.
  • Upcoming bills for closed periods. Anstehend shows "Periode abgeschlossen" for a closed period instead of listing bills from today's plan. The API has no due dates per past period.
  • Plan drafts. A draft survives moving between the plan pages, but not a trip to Übersicht or Ausgaben and back. Lifting the draft higher would have kept a stepped-back period alive across pages.
  • Quiet table fields. A text field in an editable table has no visible edge until hovered or focused, so it misses the 3:1 control-edge rule. You picked this trade-off (option C); DESIGN.md records it as the one exception.
  • Saving categories only. When only category names or looks changed, Save patches the categories and writes no new plan version.
  • New dependency cmdk. It's the combobox shadcn/ui builds on, and it replaces two hand-written keyboard handlers. It always reports the field as expanded; the app search only lists results while it has focus, so that matches.
  • Colour chips became swatches. The new-category sheet showed colours as named chips; it now uses the popover's swatches (named by tooltip and screen reader), so both places pick the same way.
  • Due days. Monthly and fixed costs have no due day in the model, so Anstehend dates only yearly costs. I didn't add a field.

Not done / known

  • Arbitrary pixel text sizes in button.tsx, toast.tsx and sidebar.tsx predate this PR.
  • The Playwright specs under clients/web/e2e have no runner, so they weren't used.
  • Still outside the shared components: the native date field in the expense sheet (the browser's picker and its date format, not the app language), and "…" row menus on Ausgaben, Händler and Benutzer.

Verification

  • npm run lint (including check:i18n), tsc --noEmit and make web-build pass.
  • make backend-build passes, including style.
  • make backend-test passes: 135 tests.
  • Checked by hand on the dev stack in a headless browser, at desktop light/dark and phone sizes:
    • creating a user, including the duplicate-name error inside the sheet;
    • the duplicate-category error inside the sheet;
    • guided setup with a fresh user;
    • every page below;
    • keyboard paths of the merchant combobox (open, filter, empty, Escape, pick), the app search, the colour and icon groups, and the segmented control.

Before / after

Page Before (main) After
Übersicht
Übersicht (dark)
Übersicht (phone)
Ausgaben
Ausgaben (phone)
Sparen
Einkommen & Rücklagen
Fixkosten
Kategorien
Kategorien (dark, colour and icon open) –
Kategorie details –
Kategorien (phone) –
Kategorie hinzufügen
Händler wählen
Combobox (search, phone) –
Dashboard
Admin · Benutzer
Sidebar –
Konto –
Category error in sheet –

🤖 Generated with Claude Code

kratofl and others added 5 commits October 11, 2026 17:30
Carries the earlier uncommitted work (admins create users, focused budget
planning pages, category appearance, merchant search) and step 1 of the web
redesign: near-opaque glass only on small floating chrome, a 6/10/14px radius
scale, four elevation levels, a 3:1 control edge, near-black dark mode, and
DESIGN.md page rules (one lead answer per page, metric strips, chart rules).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The toolbar now carries a page's period control, caption and one primary
action; new hero metric, metric strip, period stepper and accessible SVG
charts follow the DESIGN.md chart rules. Settings, admin and login pages use
the settings and list page types. The monthly budget state returns the last
six periods so the overview can compare them, and the sidebar drops its lone
"Hauptbereich" header and orders Budget into clusters.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The overview leads with what is left to spend and how fast it is going,
beside what is still due, then the budget pots, the last six periods and the
latest expenses. Expenses, savings, costs, categories and merchants are list
pages with a metric strip, one filter for chart and list and one table card;
income and reserves shows where the income goes. Periods step with chevrons
in the toolbar, and each page's main action sits there too.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…nd pot actions

- Chart ticks step in whole euros and domains include shortfalls.
- Category, merchant, user and expense sheets show their own errors.
- Plan drafts survive moving between the plan pages.
- Expense scope, category filter and Savings search are back.
- Tapping a pot adds an expense again; the pots strip wraps cleanly.
- Periods are named after the month most of their days fall in.
- Closed periods no longer list upcoming bills from today's plan.
- Existing categories keep their name-based icon after the migration.
- e2 on the stuck toolbar and dragged widgets; no inset highlight on dark shadows.
- DESIGN.md matches the code; unused components and copy removed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions github-actions Bot added the size:XXL Effective changed lines below no limit (tests, lock files, generated migrations excluded). label Oct 11, 2026
kratofl and others added 5 commits October 11, 2026 18:50
The web showed the API's English problem detail verbatim, so a German
user saw "A user with this name or email already exists". Identity,
sign-in provider and audit problems now carry a stable `code` extension
that the web translates; the English detail stays for other API readers.
Anything without a known code falls back to a translated message per
HTTP status, and an unreachable server gets its own message. Merchant
conflicts were missing from the budget copy too.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Budget's pages were split by unlabelled gaps that looked like layout bugs.
Related pages now hang under a parent row (Planung, Verwalten) that folds
them, and every section header (Budget, Admin) folds its section. Folds are
kept per device, and the group holding the current page always opens. On
the collapsed rail a parent row opens its pages as a menu; the phone view
menu shows the same groups.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Monthly and yearly subscriptions can now pick a merchant and add a short
note. Both are labels stored on the plan's cost (older plan versions read
them as null) and checked like an expense's merchant. Anstehend and the
expenses side panel show the merchant's logo and the note. Picking a
merchant for an unnamed row names it after the merchant.

Also keeps a cost row's remove button on the first line on phones.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The categories table hid renaming and recolouring behind a "…" menu and left
most of its width empty. Names, colour and icon are now edited in the row and
saved with the plan's Save; a save that only touches categories writes no new
plan version. Archive and restore are icon buttons in the row. What a category
did this period (spent, reserve left, latest expenses, link to all of them)
opens in a read-only details sheet. Table fields are quiet: no edge until
focused, so a table of fields still reads as a table. Cost rows use them too.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Cards, popovers and pickers had grown several look-alike implementations: settings
pages had their own list cards, the budget pages hand-built headers and footers,
both comboboxes carried their own keyboard handling, and the category look was two
different pickers. Now each pattern exists once and pages compose it.

- grouped.tsx is the one list kit: ListCard, CardHeader (hint + action or aside),
  Group, FormRow, ListSubhead, ListFooter, ListEmpty, TextAction. The Settings*
  copies are gone; Card and list cards share one surface.
- New primitives: Popover, Command (cmdk) and RadioGroup. The searchable select
  and the app search are both Command comboboxes with menu-item options; the
  segmented control is a RadioGroup.
- The category look is one picker (swatches + icon grid, radio groups) in the
  sheet and in the table popover.
- Field no longer needs a type assertion.
- DESIGN.md: one component per pattern, Popover and combobox, Choice grid, and the
  card header, subheader and empty-list rules.

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

size:XXL Effective changed lines below no limit (tests, lock files, generated migrations excluded).

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant