Repository navigation
Style Guide
This page is the canonical reference for the Cornerstone design system. It documents every design token, component pattern, and visual convention in use. All new UI work must follow these specifications.
Managed by: ux-designer agent
Token source: client/src/styles/tokens.css
- Design Token Architecture
- Color Palette (Layer 1)
- Semantic Tokens (Layer 2)
- Shadow Scale
- Typography
- Spacing
- Border Radius
- Transitions
- Z-Index Scale
- Component Patterns
- Shared Components
- Badge
- CountBadge (#2231)
- SearchPicker
- Modal
- Skeleton
- EmptyState
- FormError
- InfiniteScrollFooter
- FilterChipGroup
- SpotThumbnail
- FileList
- Breadcrumbs and Back link (page identity)
- Grammar foundations: StatusMenu, UndoToast, ConfirmDialog (#2209)
- Top bar and user menu (#2206)
- Keyboard shortcuts overlay (#2253)
- Phone and tablet shell (#2207)
- Command search (#2211)
- New menu and object form (#2212)
- Companies, Trades and the call button (#2213)
- Settings > Project setup and ReferenceList (#2215)
- Areas index (#2218)
- Settings > Integrations (#2217)
- Capture screen (#2221)
- System events (#2223)
- Site diary rows (#2225): FeedRow entry variant and FeedGroup
- Photos: spots, select mode and the spot viewer (#2226)
- Home (#2230): Needs attention, This week, Pulse and the set-up checklist
- Detail template (#2233): ObjectHeader, SummaryStrip, ObjectTabs, SectionCard, DocumentsPanel
- Task page (#2248)
- Purchase page (#2249)
- Object list (#2234): ObjectList, ObjectListFiltersPanel and the ReferenceList search
- Related lists and the entity picker (#2236): RelatedList, EntityPicker
- Overflow menu (OverflowMenu)
- Money overview (#2237): MoneyFigure, SummaryStrip facts, BudgetBar and CostBreakdownTable
- Cost lines (#2235): CostLinesSection, CostLineTable, CostLineForm and the grid
- Money › Invoices and the offer and invoice page (#2238–#2241)
- Money › Financing (#2242) and the bank report (#2243)
- Company page (#2244)
- Lists on the object list (#2245, #2246): Tasks, Purchases, Companies, Milestones
- Milestone page (#2250)
- Area page (#2251)
- Documents page (#2252)
- Dark Mode Implementation Guide
- Brand Identity
- RapidCamera (#2227)
- Photo Annotator Pattern
- Settings > Users: locked accounts (#2219)
- Schedule (#2247)
- Accepted UX Deviations
Cornerstone uses a 3-layer token system defined in client/src/styles/tokens.css.
Layer 1 — Palette Raw named color values (hex) — source of truth
↓
Layer 2 — Semantic Purpose-driven aliases using var() references to Layer 1
↓
Layer 3 — Dark mode Scoped overrides on [data-theme="dark"] — replaces Layer 2 values only
Rules:
-
Always reference Layer 2 semantic tokens in component CSS Modules (
var(--color-bg-primary)) - Never use raw hex values in
.module.cssfiles — zero exceptions - Only use Layer 1 palette tokens directly when no semantic alias covers the use case
- Layer 3 requires no changes to component code — theming is automatic via CSS cascade
Verification command — must return zero results:
grep -rn '#[0-9a-fA-F]' client/src --include="*.module.css"These are raw color values. Reference these only through Layer 2 semantic tokens in component CSS.
| Token | Hex | Usage |
|---|---|---|
--color-white |
#ffffff |
Pure white |
--color-black |
#000000 |
Pure black |
--color-gray-50 |
#f9fafb |
Near-white backgrounds |
--color-gray-100 |
#f3f4f6 |
Subtle backgrounds, tertiary surfaces |
--color-gray-200 |
#e5e7eb |
Default borders |
--color-gray-300 |
#d1d5db |
Strong borders, dividers |
--color-gray-400 |
#9ca3af |
Placeholder text, disabled text |
--color-gray-500 |
#6b7280 |
Muted text (legacy), source-0 dot |
--color-gray-550 |
#5f6674 |
Muted / placeholder / quoted text (light, AA on bg-page, primary, secondary, tertiary) |
--color-gray-600 |
#4b5563 |
Subtle text |
--color-gray-700 |
#374151 |
Secondary text, sidebar hover |
--color-gray-800 |
#1f2937 |
Sidebar background (light mode), inverse bg |
--color-gray-900 |
#111827 |
Primary text, darkest surface |
| Token | Hex | Usage |
|---|---|---|
--color-blue-100 |
#dbeafe |
Primary background tint |
--color-blue-200 |
#bfdbfe |
Primary background tint (hover) |
--color-blue-400 |
#60a5fa |
Sidebar focus ring |
--color-blue-500 |
#3b82f6 |
Focus ring base, dark primary active, favicon |
--color-blue-600 |
#2563eb |
Light primary, focus border, active nav item (white text 5.17:1) |
--color-blue-700 |
#1d4ed8 |
Light primary hover |
--color-blue-800 |
#1e40af |
Light primary active, badge text on light bg |
| Token | Hex | Usage |
|---|---|---|
--color-red-50 |
#fef2f2 |
Danger background (very light) |
--color-red-100 |
#fee2e2 |
Danger background, blocked badge bg |
--color-red-200 |
#fecaca |
Danger border |
--color-red-400 |
#ef4444 |
Danger input border |
--color-red-350 |
#f87171 |
Dark danger (new in #2200) |
--color-red-500 |
#dc2626 |
Focus-ring-danger base |
--color-red-600 |
#b91c1c |
Light danger |
--color-red-700 |
#991b1b |
Light danger hover, badge text |
--color-red-800 |
#7f1d1d |
Light danger active (new in #2200) |
Note: these values map to a mix of Tailwind's green and emerald scales.
| Token | Hex | Usage |
|---|---|---|
--color-green-50 |
#f0fdf4 |
Success background (very light) |
--color-green-100 |
#d1fae5 |
Emerald-100; completed badge bg, success badge bg |
--color-green-150 |
#dcfce7 |
Green-100 (non-standard step); user active badge bg |
--color-green-200 |
#bbf7d0 |
Success border |
--color-green-500 |
#10b981 |
Dark success hover |
--color-green-600 |
#059669 |
Legacy success (no longer --color-success) |
--color-green-650 |
#047857 |
Light success (white text 5.48:1; new in #2200) |
--color-green-700 |
#166534 |
Success text on light bg, user active badge text |
--color-green-900 |
#065f46 |
Completed badge text |
| Token | Hex | Usage |
|---|---|---|
--color-slate-950 |
#0c1424 |
Dark page background (--color-bg-page), new in #2200 |
--color-slate-900 |
#0f172a |
Dark sidebar |
--color-slate-600 |
#1e293b |
Dark cards (--color-bg-primary), sidebar hover |
--color-slate-550 |
#273449 |
Dark secondary / hover / inset surface, new in #2200 |
--color-slate-500 |
#334155 |
Dark tertiary surface, sidebar separator |
--color-slate-400 |
#475569 |
Dark default border, disabled text |
--color-slate-300 |
#64748b |
Dark strong border |
--color-slate-200 |
#94a3b8 |
Dark muted / body / placeholder text |
--color-slate-150 |
#cbd5e1 |
Dark secondary text |
--color-slate-100 |
#e2e8f0 |
Dark sidebar text |
--color-slate-50 |
#f1f5f9 |
Dark primary text |
Removed in #2200 (no consumers): --color-slate-800, --color-slate-700, --color-slate-250 and the semantic --color-sidebar-active. Do not reintroduce them; use --color-nav-active-bg / --color-nav-active-text for the active nav item.
Reference these tokens in all component CSS. They automatically adapt to dark mode via Layer 3 overrides.
| Token | Light Value | Dark Value | Usage |
|---|---|---|---|
--color-bg-page |
#f9fafb (gray-50) |
#0c1424 (slate-950) |
Page canvas behind cards: body, .pageContent, auth pages, loading screen. Print resets it to #f9fafb in print.css. |
--color-bg-primary |
#ffffff (white) |
#1e293b (slate-600) |
Cards, panels, modals (sits on bg-page; dark cards reach 1.26:1 against the page) |
--color-bg-secondary |
#f9fafb (gray-50) |
#273449 (slate-550) |
Secondary panels, inset areas |
--color-bg-tertiary |
#f3f4f6 (gray-100) |
#334155 (slate-500) |
Code blocks, inset regions, tracks |
--color-bg-inverse |
#1f2937 (gray-800) |
#f3f4f6 (gray-100) |
Tooltips, dark callouts |
--color-bg-hover |
#f9fafb (gray-50) |
#273449 (slate-550) |
Row/item hover state |
Use --color-bg-page for the canvas and --color-bg-primary for cards. Never use --color-bg-primary as a page background.
| Token | Light Value | Dark Value | Usage |
|---|---|---|---|
--color-text-primary |
#111827 (gray-900) |
#f1f5f9 (slate-50) |
Headings, prominent labels |
--color-text-secondary |
#374151 (gray-700) |
#cbd5e1 (slate-150) |
Sub-headings, labels |
--color-text-body |
#374151 (gray-700) |
#94a3b8 (slate-200) |
Body copy, descriptions |
--color-text-muted |
#5f6674 (gray-550) |
#94a3b8 (slate-200) |
Helper text, metadata. AA on bg-page, bg-primary, bg-secondary and bg-tertiary in both themes |
--color-text-subtle |
#4b5563 (gray-600) |
#94a3b8 (slate-200) |
Less-prominent secondary copy |
--color-text-inverse |
#ffffff (white) |
#111827 (gray-900) |
Text on dark/inverse surfaces |
--color-text-placeholder |
#5f6674 (gray-550) |
#94a3b8 (slate-200) |
Text only: input placeholders. Meets 4.5:1 (WCAG 1.4.3) |
--color-text-disabled |
#9ca3af (gray-400) |
#475569 (slate-400) |
Non-text only: disabled control text/borders (exempt from 1.4.3). Never use for readable text; use --color-text-placeholder or --color-text-muted
|
--color-text-quoted |
#5f6674 (gray-550) |
#94a3b8 (slate-200) |
Quoted (not-yet-final) amounts in quotation status. AA in both themes. Reserve for those monetary values |
| Token | Light Value | Dark Value | Usage |
|---|---|---|---|
--color-border |
#e5e7eb (gray-200) |
#475569 (slate-400) |
Default borders, dividers |
--color-border-strong |
#d1d5db (gray-300) |
#64748b (slate-300) |
Emphasized borders, table lines, input outlines |
--color-border-focus |
#2563eb (blue-600) |
#60a5fa (blue-400) |
Focused input border color |
| Token | Light Value | Dark Value | Usage |
|---|---|---|---|
--color-primary |
#2563eb (blue-600) |
#60a5fa (blue-400) |
Button background, links (white text 5.17:1) |
--color-primary-hover |
#1d4ed8 (blue-700) |
#93c5fd (blue-300) |
Button hover state |
--color-primary-active |
#1e40af (blue-800) |
#3b82f6 (blue-500) |
Button active/pressed |
--color-primary-text |
#ffffff |
#111827 |
Text on primary button |
--color-primary-bg |
#dbeafe |
rgba(59,130,246,0.15) |
Subtle primary tint (tags, etc.) |
--color-primary-bg-hover |
#bfdbfe |
rgba(59,130,246,0.25) |
Subtle primary tint hover |
--color-primary-badge-text |
#1e40af |
#93c5fd |
Text inside primary-tinted badges |
| Token | Light Value | Dark Value | Usage |
|---|---|---|---|
--color-danger |
#b91c1c (red-600) |
#f87171 (red-350) |
Destructive button, error icon |
--color-danger-hover |
#991b1b (red-700) |
#fca5a5 (red-300) |
Destructive button hover |
--color-danger-active |
#7f1d1d (red-800) |
#ef4444 (red-400) |
Destructive button pressed |
--color-danger-text |
#ffffff |
#111827 |
Text on danger button |
--color-danger-bg |
#fef2f2 |
rgba(239,68,68,0.1) |
Error banner background |
--color-danger-bg-strong |
#fee2e2 |
rgba(239,68,68,0.2) |
Error badge background |
--color-danger-border |
#fecaca |
rgba(239,68,68,0.3) |
Error banner border |
--color-danger-text-on-light |
#991b1b |
#fca5a5 |
Error text on light bg |
--color-danger-input-border |
#ef4444 |
#ef4444 |
Invalid input border |
| Token | Light Value | Dark Value | Usage |
|---|---|---|---|
--color-success |
#047857 (green-650) |
#34d399 (emerald-400) |
Success button, icon, checkmark (white text 5.48:1) |
--color-success-hover |
#166534 (green-700) |
#10b981 (green-500) |
Success button hover |
--color-success-bg |
#f0fdf4 |
rgba(16,185,129,0.1) |
Success banner background |
--color-success-border |
#bbf7d0 |
rgba(16,185,129,0.3) |
Success banner border |
--color-success-text-on-light |
#166534 |
#6ee7b7 |
Success text on light bg |
--color-success-badge-bg |
#d1fae5 |
rgba(16,185,129,0.15) |
Success badge background |
--color-success-badge-bg-alt |
#dcfce7 |
rgba(16,185,129,0.2) |
Alternate success badge background |
--color-success-badge-text |
#065f46 |
#a7f3d0 |
Success badge text |
| Token | Light Value | Dark Value | Usage |
|---|---|---|---|
--color-sidebar-bg |
#1f2937 (gray-800) |
#0f172a |
Sidebar panel background |
--color-sidebar-text |
#f9fafb (gray-50) |
#e2e8f0 |
Sidebar text and icons |
--color-sidebar-hover |
#374151 (gray-700) |
#1e293b |
Nav item hover background |
--color-sidebar-focus-ring |
#60a5fa (blue-400) |
#60a5fa |
Keyboard focus ring in sidebar |
--color-sidebar-separator |
#374151 (gray-700) |
#334155 |
Horizontal rule in sidebar |
--color-nav-active-bg |
#2563eb (blue-600) |
same | Active nav item background (defined once in :root, no dark override) |
--color-nav-active-text |
#ffffff |
same | Active nav item text, weight 600 (5.17:1 on the active background) |
--color-sidebar-active was removed in #2200.
The sidebar is rendered only from NavConfig (navSections(ctx)); no entry, label or path is written in the component. No new token and no new shared component.
Structure. Logo (opens Home, aria-label "Go to Home") · <nav aria-label="Main navigation"> with the primary group (Home, Tasks, Purchases, Site diary, Photos, Money, Companies), a .navSeparator, then the quiet group (Areas, History, Documents; each only when served, Documents only with Paperless) · pinned footer with a second <nav aria-label="Settings"> holding the Settings entry (opens Project setup), and, from 1024px, nothing else (#2206 moved theme, Log out, version and the GitHub link to the user menu). Below 1024px the sidebar is not mounted; the same actions live in the More sheet's user block (see Phone and tablet shell (#2207)), so exactly one control per action is reachable at any width. Each group is a <ul>; a section with views nests a <ul> inside its <li>. Entries that are not served or not allowed for the role are not rendered (removed, never disabled).
Nested views. They render only while the current route belongs to the section. No chevron, no toggle, no collapsed-but-focusable rows: the section entry is a plain link to its main view ("Tasks" always opens the list; Schedule is a view under Tasks, not an entry of its own). The main view is the section entry itself and is not repeated as a nested row.
| Element | Recipe |
|---|---|
Top-level link (.navLink) |
padding var(--spacing-3) var(--spacing-6), --font-size-base
|
Quiet link (.navLinkQuiet) |
same padding, --font-size-sm, no opacity (it would cut contrast); the quiet look comes from the separator and the smaller size |
Nested link (.navLinkNested) |
padding var(--spacing-2) var(--spacing-6) var(--spacing-2) var(--spacing-12), --font-size-sm
|
| Hover |
--color-sidebar-hover, transition: background-color var(--transition-medium)
|
| Focus-visible |
2px solid var(--color-sidebar-focus-ring), outline-offset: -2px (not --shadow-focus, which clips on edge-to-edge dark rows) |
Active (.active) |
--color-nav-active-bg / --color-nav-active-text, --font-weight-semibold, plus box-shadow: inset 3px 0 0 var(--color-sidebar-focus-ring) as a second cue (the fill alone is about 2.7:1 against the light sidebar); aria-current="page"
|
In-section parent (.sectionCurrent) |
--font-weight-semibold only: no fill, no aria-current
|
Single highlighted entry. Exactly one element carries .active and aria-current="page" on every page. The entry is resolved from the route map (the matched route and its parent chain, then the section that owns the route), never from NavLink prefix matching, which double-highlights. A detail page highlights its list view (a task highlights Tasks; a milestone highlights Milestones; an invoice highlights Invoices). Legacy and interim aliases resolve to their section (/project/overview highlights Home, /settings/vendors highlights Companies).
404, No access and unknown routes. Nothing is highlighted: no .active, no .sectionCurrent, no aria-current, and no nested group is open.
No in-page tab rows. Tasks, Money and Settings pages render no tab row. The ten copied tab arrays and ScheduleSubNav are gone, PageLayout has no subNav slot, and no empty row is reserved: pages start with their header, at the same top spacing as every other page. Views are reached from the sidebar (and, on phones and tablets, from the title menu under the top bar). SubNav remains as a component only for the future object-tab pattern; it has no consumers.
Interim views (#2205–#2242). Until Financing was served (#2242), Money listed Invoices, Funding sources, Grants and Bank report, so no capability lost its navigation entry when the tab row was removed. These three carried interimUntil: 'financing' in NavConfig; #2242 served Financing and deleted them. No view is interim today; the rules below stay for a future interim entry. They look like every other nested row: no "temporary" badge, no different weight, no different indent. They are not page-identity views: their pages keep the Money breadcrumb and fixed headings, while the sidebar highlights the interim view. Document any further interim entry the same way.
Responsive. Desktop: static 240px panel, the nav region scrolls, footer pinned; at viewport heights up to 640px the whole panel scrolls so an open Settings group never hides the primary list. Below 1024px (#2207) the sidebar is not mounted at all (the off-canvas drawer, its overlay and the floating button are gone); destinations come from the bottom bar and More sheet. Reduced motion: hover transitions are off; state is never conveyed by motion.
Accessibility. Tab order is DOM order (logo, main links with nested links right after their parent, quiet group, Settings); links activate with Enter; no roving tabindex. The active state is never colour alone (weight, inset bar, aria-current). Labels are the glossary's plain words ("Schedule", never "Gantt").
| Token | Light Value | Dark Value | Usage |
|---|---|---|---|
--color-focus-ring |
rgba(59,130,246,0.3) |
rgba(96,165,250,0.4) |
Standard blue focus ring color |
--color-focus-ring-subtle |
rgba(59,130,246,0.1) |
rgba(96,165,250,0.15) |
Subtle focus ring |
--color-focus-ring-danger |
rgba(220,38,38,0.1) |
rgba(239,68,68,0.15) |
Focus ring on danger element |
--color-focus-ring-primary-alt |
rgba(37,99,235,0.1) |
rgba(96,165,250,0.15) |
Focus ring on alternate primary |
| Token | Light Value | Dark Value | Usage |
|---|---|---|---|
--color-overlay |
rgba(0,0,0,0.5) |
rgba(0,0,0,0.7) |
Modal backdrop |
--color-overlay-light |
rgba(0,0,0,0.1) |
rgba(0,0,0,0.3) |
Hover overlay on images |
--color-overlay-medium |
rgba(0,0,0,0.15) |
rgba(0,0,0,0.4) |
Medium-weight overlay |
--color-overlay-danger |
rgba(153,27,27,0.1) |
rgba(239,68,68,0.15) |
Danger action overlay |
--color-overlay-delete |
rgba(220,38,38,0.1) |
rgba(239,68,68,0.15) |
Delete confirmation overlay |
Theme-invariant: defined once in :root and not overridden in [data-theme="dark"], because the photo viewer and photo overlays always sit on a dark stage regardless of app theme. Use these (never --color-text-*/--color-bg-*, which flip with the theme) for any surface rendered on top of or beside a photo.
| Token | Value | Usage |
|---|---|---|
--color-photo-overlay-caption |
rgba(0,0,0,0.8) |
Caption strip over a photo |
--color-photo-control-bg / --color-photo-control-bg-hover
|
rgba(0,0,0,0.5/0.8) |
Round overlay controls; count badge on thumbs |
--color-photo-bar-bg |
rgba(0,0,0,0.7) |
Viewer info/toolbar bar |
--color-photo-border |
rgba(255,255,255,0.1) |
Hairlines on dark overlays |
--color-photo-focus-ring |
rgba(255,255,255,0.6) |
Focus ring on dark surfaces (blue ring is low-contrast on black) |
--color-photo-active-bg |
rgba(255,255,255,0.25) |
Pressed/active overlay control |
--color-photo-action-primary-bg / --color-photo-action-danger-bg
|
blue / red at 0.9 alpha | Primary and destructive actions on overlays |
--color-photo-stage-bg |
#0b0f17 |
SpotViewer image stage |
--color-photo-panel-bg / --color-photo-panel-border
|
gray-900 / gray-800 | SpotViewer details panel and filmstrip |
--color-photo-text / --color-photo-text-secondary / --color-photo-text-muted
|
gray-50 / 300 / 400 | Text on the dark panel (all meet AA on panel-bg) |
--color-photo-link |
blue-300 | Links on the dark panel |
--color-photo-item-hover-bg / --color-photo-item-current-bg / --color-photo-item-current-ring
|
white 6% / white 12% / blue-400 | Filmstrip item hover, current item, current ring |
| Token | Light Value | Dark Value | Usage |
|---|---|---|---|
--color-status-not-started-bg |
#e5e7eb (gray-200) |
#334155 |
Not Started badge background |
--color-status-not-started-text |
#374151 (gray-700) |
#94a3b8 |
Not Started badge text |
--color-status-in-progress-bg |
#dbeafe (blue-100) |
rgba(59,130,246,0.2) |
In Progress badge background |
--color-status-in-progress-text |
#1e40af (blue-800) |
#93c5fd |
In Progress badge text |
--color-status-completed-bg |
#d1fae5 (green-100) |
rgba(16,185,129,0.15) |
Completed badge background |
--color-status-completed-text |
#065f46 (green-900) |
#a7f3d0 |
Completed badge text |
--color-status-blocked-bg |
#fee2e2 (red-100) |
rgba(239,68,68,0.15) |
Blocked badge background |
--color-status-blocked-text |
#991b1b (red-700) |
#fca5a5 |
Blocked badge text |
| Token | Light Value | Dark Value | Usage |
|---|---|---|---|
--color-role-admin-bg |
#dbeafe (blue-100) |
rgba(59,130,246,0.2) |
Admin role badge background |
--color-role-admin-text |
#1e40af (blue-800) |
#93c5fd |
Admin role badge text |
--color-role-member-bg |
#f3f4f6 (gray-100) |
#334155 |
Member role badge background |
--color-role-member-text |
#374151 (gray-700) |
#94a3b8 |
Member role badge text |
| Token | Light Value | Dark Value | Usage |
|---|---|---|---|
--color-user-active-bg |
#dcfce7 (green-150) |
rgba(16,185,129,0.15) |
Active user badge background |
--color-user-active-text |
#166534 (green-700) |
#6ee7b7 |
Active user badge text |
--color-user-inactive-bg |
#fee2e2 (red-100) |
rgba(239,68,68,0.15) |
Inactive user badge background |
--color-user-inactive-text |
#991b1b (red-700) |
#fca5a5 |
Inactive user badge text |
Every text/background token pair used in the app meets WCAG 2.1 AA (4.5:1 normal text, 3:1 large text and meaningful non-text) in both themes, enforced by a unit test that resolves the tokens from tokens.css (dark falls back to the light value where the dark block has no override). A token change that drops a pair below AA fails CI. Rules that follow:
- A new colour token or a changed value must keep every consuming pair AA; add the pair to the test.
-
--color-text-placeholder,--color-text-muted,--color-text-quoted: readable text, 4.5:1. -
--color-text-disabled: non-text only (disabled controls are exempt from 1.4.3). Never for content users must read. - Check
--color-text-mutedand--color-primarytext on--color-bg-tertiaryin dark mode, and--color-primaryon--color-primary-bgin light mode (use--color-primary-badge-textwhere it fails). - Hover on a bordered control must change border or fill to a visible state: pagination buttons use
--color-bg-hoverplusborder-color: var(--color-primary). - Disabled controls are exempt, but the surrounding labels are not.
Shadows automatically deepen in dark mode via Layer 3 overrides.
| Token | Light Value | Dark Value | Usage |
|---|---|---|---|
--shadow-sm |
0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06) |
0 1px 3px rgba(0,0,0,0.3), 0 1px 2px rgba(0,0,0,0.2) |
Cards, small surfaces |
--shadow-md |
0 4px 6px rgba(0,0,0,0.1) |
0 4px 6px rgba(0,0,0,0.3) |
Raised elements |
--shadow-lg |
0 10px 15px rgba(0,0,0,0.1), 0 4px 6px rgba(0,0,0,0.05) |
0 10px 15px rgba(0,0,0,0.3), 0 4px 6px rgba(0,0,0,0.2) |
Dropdowns, popovers |
--shadow-xl |
0 20px 25px rgba(0,0,0,0.15) |
0 20px 25px rgba(0,0,0,0.4) |
Modals |
--shadow-xl-strong |
0 20px 25px -5px rgba(0,0,0,0.1), 0 10px 10px -5px rgba(0,0,0,0.04) |
0 20px 25px -5px rgba(0,0,0,0.3), 0 10px 10px -5px rgba(0,0,0,0.2) |
Large modals |
--shadow-2xl |
0 20px 25px rgba(0,0,0,0.2) |
0 20px 25px rgba(0,0,0,0.5) |
Full-page overlays |
--shadow-inset-deep |
0 10px 25px rgba(0,0,0,0.2) |
0 10px 25px rgba(0,0,0,0.4) |
Sidebar depth, inset panels |
--shadow-kbd |
0 1px 0 rgba(0,0,0,0.05) |
0 1px 0 rgba(255,255,255,0.1) |
Keyboard shortcut keys |
--shadow-focus |
0 0 0 3px rgba(59,130,246,0.3) |
0 0 0 3px rgba(96,165,250,0.4) |
Standard focus ring |
--shadow-focus-subtle |
0 0 0 3px rgba(59,130,246,0.1) |
0 0 0 3px rgba(96,165,250,0.15) |
Subtle focus ring |
--shadow-focus-primary-alt |
0 0 0 3px rgba(37,99,235,0.1) |
0 0 0 3px rgba(96,165,250,0.15) |
Alternate primary focus ring |
--shadow-focus-danger |
0 0 0 3px rgba(220,38,38,0.1) |
0 0 0 3px rgba(239,68,68,0.15) |
Focus ring on danger element |
The application uses the system-ui font stack — no web font loading, no layout shift:
font-family:
system-ui,
-apple-system,
BlinkMacSystemFont,
'Segoe UI',
Roboto,
Oxygen,
Ubuntu,
Cantarell,
'Helvetica Neue',
sans-serif;This is set globally in client/src/styles/index.css and should not be overridden per-component.
| Token | Value | Pixels | Usage |
|---|---|---|---|
--font-size-2xs |
0.8125rem |
13px | Between xs and sm — fine print, dense metadata |
--font-size-xs |
0.75rem |
12px | Micro labels, timestamps |
--font-size-sm |
0.875rem |
14px | Form labels, secondary text, badges |
--font-size-base |
1rem |
16px | Body text, inputs |
--font-size-lg |
1.125rem |
18px | Slightly emphasized text |
--font-size-xl |
1.25rem |
20px | Card titles, section headings |
--font-size-2xl |
1.5rem |
24px | Page sub-headings |
--font-size-3xl |
1.875rem |
30px | Major page headings |
--font-size-4xl |
2rem |
32px | Hero headings, large dashboard numbers |
| Token | Value | Usage |
|---|---|---|
--font-weight-normal |
400 |
Body text |
--font-weight-medium |
500 |
Labels, metadata with slight emphasis |
--font-weight-semibold |
600 |
Section headings, button text |
--font-weight-bold |
700 |
Page titles, badges, strong emphasis |
All spacing tokens follow a 4px base grid. Use these tokens for padding, margin, and gap.
| Token | Value | Pixels | Common Usage |
|---|---|---|---|
--spacing-0 |
0 |
0 | Reset |
--spacing-px |
1px |
1px | Hairline borders, fine adjustments |
--spacing-0-5 |
0.125rem |
2px | Micro gaps |
--spacing-1 |
0.25rem |
4px | Icon padding, tight inline spacing |
--spacing-1-5 |
0.375rem |
6px | Dense list items |
--spacing-2 |
0.5rem |
8px | Default inner padding small elements |
--spacing-2-5 |
0.625rem |
10px | Medium-small gap |
--spacing-3 |
0.75rem |
12px | Badge padding, compact list items |
--spacing-4 |
1rem |
16px | Standard inner padding (cards, inputs) |
--spacing-5 |
1.25rem |
20px | Section spacing |
--spacing-6 |
1.5rem |
24px | Card gap, form field spacing |
--spacing-7 |
1.75rem |
28px | Wide gap |
--spacing-8 |
2rem |
32px | Major section padding |
--spacing-10 |
2.5rem |
40px | Large section separation |
--spacing-12 |
3rem |
48px | Page-level vertical rhythm |
--spacing-16 |
4rem |
64px | Hero-level spacing |
| Token | Value | Pixels | Usage |
|---|---|---|---|
--radius-sm |
0.25rem |
4px | Small elements: badges, keyboard keys |
--radius-md |
0.375rem |
6px | Inputs, buttons, dropdowns, popovers |
--radius-lg |
0.5rem |
8px | Cards, modals, dialog sections |
--radius-circle |
50% |
-- | Circular elements (avatar, icon button) |
--radius-full |
9999px |
-- | Pills: tags, status badges |
| Token | Value | Usage |
|---|---|---|
--transition-fast |
0.1s ease |
Opacity fade (sidebar close button) |
--transition-normal |
0.15s ease |
Most interactive elements (buttons, inputs) |
--transition-medium |
0.2s ease |
Hover effects on larger elements |
--transition-slow |
0.3s ease |
Sidebar slide, modals |
Pre-built multi-property transitions for consistency across components:
| Token | Value | Usage |
|---|---|---|
--transition-input |
border-color 0.15s ease, box-shadow 0.15s ease |
Form input focus transitions |
--transition-button |
background-color 0.15s ease, box-shadow 0.15s ease |
Button background + shadow |
--transition-button-border |
background-color 0.15s ease, border-color 0.15s ease |
Outline button hover |
| Token | Value | Usage |
|---|---|---|
--z-dropdown |
10 |
Dropdown menus, date pickers |
--z-overlay |
50 |
Backdrop overlays (below sidebar) |
--z-sidebar |
100 |
Mobile sidebar panel |
--z-modal |
1000 |
Modal dialogs (above everything) |
Always reference Layer 2 semantic tokens with var():
/* CORRECT */
.card {
background: var(--color-bg-primary);
border: 1px solid var(--color-border);
border-radius: var(--radius-lg);
box-shadow: var(--shadow-sm);
padding: var(--spacing-6);
color: var(--color-text-body);
}
/* WRONG — hardcoded values break dark mode */
.card {
background: #ffffff;
border: 1px solid #e5e7eb;
}- Always prefer semantic tokens — they adapt automatically to dark mode
- Use palette tokens directly only when creating a new component that genuinely needs a specific hue not yet covered by a semantic alias (e.g., a new badge type)
- If you find yourself using palette tokens repeatedly for the same purpose, add a semantic alias to
tokens.cssat all 3 layers
Use the --color-status-* token family for work item status indicators. Apply --radius-full for pill shape:
.badge {
display: inline-flex;
align-items: center;
padding: var(--spacing-1) var(--spacing-3);
border-radius: var(--radius-full);
font-size: var(--font-size-xs);
font-weight: var(--font-weight-medium);
}
.notStarted {
background: var(--color-status-not-started-bg);
color: var(--color-status-not-started-text);
}
.inProgress {
background: var(--color-status-in-progress-bg);
color: var(--color-status-in-progress-text);
}
.completed {
background: var(--color-status-completed-bg);
color: var(--color-status-completed-text);
}
.blocked {
background: var(--color-status-blocked-bg);
color: var(--color-status-blocked-text);
}Standard input with focus ring and error state:
.input {
width: 100%;
padding: var(--spacing-2) var(--spacing-3);
border: 1px solid var(--color-border);
border-radius: var(--radius-md);
background: var(--color-bg-primary);
color: var(--color-text-primary);
font-size: var(--font-size-base);
transition: var(--transition-input);
}
.input::placeholder {
color: var(--color-text-placeholder);
}
.input:focus {
outline: none;
border-color: var(--color-border-focus);
box-shadow: var(--shadow-focus);
}
/* Error state */
.inputError {
border-color: var(--color-danger-input-border);
}
.inputError:focus {
box-shadow: var(--shadow-focus-danger);
}Three button variants — primary, danger, and outline:
/* Primary button */
.buttonPrimary {
background: var(--color-primary);
color: var(--color-primary-text);
border: none;
border-radius: var(--radius-md);
padding: var(--spacing-2) var(--spacing-4);
font-size: var(--font-size-sm);
font-weight: var(--font-weight-semibold);
cursor: pointer;
transition: var(--transition-button);
}
.buttonPrimary:hover {
background: var(--color-primary-hover);
}
.buttonPrimary:active {
background: var(--color-primary-active);
}
.buttonPrimary:focus-visible {
outline: none;
box-shadow: var(--shadow-focus);
}
/* Danger button */
.buttonDanger {
background: var(--color-danger);
color: var(--color-danger-text);
/* ... same shape/font/cursor tokens ... */
}
.buttonDanger:hover {
background: var(--color-danger-hover);
}
.buttonDanger:active {
background: var(--color-danger-active);
}
.buttonDanger:focus-visible {
box-shadow: var(--shadow-focus-danger);
}
/* Outline / secondary button */
.buttonOutline {
background: transparent;
color: var(--color-text-primary);
border: 1px solid var(--color-border-strong);
/* ... same shape/font/cursor tokens ... */
transition: var(--transition-button-border);
}
.buttonOutline:hover {
background: var(--color-bg-hover);
border-color: var(--color-border-focus);
}
.buttonOutline:focus-visible {
box-shadow: var(--shadow-focus-subtle);
}Rule (house pattern, decided under #2065 AC6): the choice depends on what the control is doing, not on a global preference.
| Situation | Mechanism |
|---|---|
| In-place async button — triggers async work, stays mounted in the same spot, and may be activated again afterwards (load-more / retry, save-and-stay, refresh) |
aria-disabled="true" while busy + handler early-return guard. Do not use disabled. |
| Validity-gated or permanently unavailable control (required field empty, no permission, form invalid, submit that navigates away or unmounts the control) | Native disabled (keeps the ~500 existing uses; no migration required) |
| Disabled-with-reason (user should be able to focus it to read why) |
aria-disabled="true" + aria-describedby/tooltip, as in DataTableHeader
|
Why: a natively disabled button that has focus drops it (focus falls to <body>) the moment it becomes disabled. For an in-place control that re-enables a moment later, keyboard and screen-reader users lose their place and must re-navigate. aria-disabled keeps the element focusable and announces "dimmed/unavailable" without moving focus.
Required pieces for an in-place async button (all five):
-
aria-disabled={busy}('true'while busy; omit orfalseotherwise) — never also setdisabled. - Handler early-return:
onClick={() => { if (busy) return; ... }}.aria-disableddoes not block clicks or Enter/Space. - Busy visual state keyed off the attribute, including a hover override, because
:hover:not(:disabled)rules still match:
.asyncButton[aria-disabled='true'] {
opacity: 0.5;
cursor: not-allowed;
}
/* keep the resting background; shared btn hover rules use :not(:disabled) and still match */
.asyncButton[aria-disabled='true']:hover {
background-color: var(--color-bg-tertiary); /* the button's resting background token */
}-
:focus-visiblering stays visible while busy (box-shadow: var(--shadow-focus); token flips in dark mode — verify in both themes). Do not suppress the ring or lower its opacity with the dimmed state's styling. - If the control unmounts when work completes (e.g. end of list), move focus deliberately to a
tabIndex={-1}target (heading, status row) — never let it fall to<body>. Announce state changes through an existing live region; do not rely on the attribute alone.
Note: opacity 0.5 on text is exempt from contrast minimums for disabled controls under WCAG 1.4.3, but the focus ring and any surrounding status text must still meet 3:1 / 4.5:1.
Existing aria-disabled uses (MassMoveModal, AutoItemizeLineList, DiaryEntryCreatePage, InvoicesPage) were added for mixed reasons and are not retrofitted by this rule; audit them opportunistically when touched. Reference implementation: client/src/components/InfiniteScrollFooter/.
All interactive elements on phone widths must meet the 44px minimum touch target, written as the token var(--touch-target-min) (never a literal 44px):
@media (max-width: 767px) {
.button {
min-height: var(--touch-target-min);
}
}The hit-area patterns (size or centred ::before/::after overlay), the overlay rule and the exemptions (inline prose links, Gantt and month-grid items, the unfocused skip link, the BudgetBar chart marked data-chart="budget-bar") are defined in Architecture › Frontend Conventions › Accessibility (#2261) and checked by e2e/fixtures/a11y.ts.
React Router does not add a literal active class when using CSS Modules. Use the function form:
<NavLink
to="/work-items"
className={({ isActive }) => `${styles.navLink} ${isActive ? styles.active : ''}`}
>
Work Items
</NavLink>These components are the required building blocks for all new UI work. Before creating a new component, verify that none of these existing shared components already cover the use case. Using them ensures consistent tokens, accessibility behavior, and dark mode support without additional effort.
Policy: Any new UI that resembles one of these components MUST use it instead of creating a parallel implementation. Extending an existing component with new props is always preferred over duplication.
File: client/src/components/Badge/Badge.tsx
Import: import { Badge } from '../components/Badge/Badge.js'
A parameterized pill badge driven by a variant map. Replaces the previous StatusBadge, HouseholdItemStatusBadge, DiaryOutcomeBadge, and DiarySeverityBadge components — all badge needs should go through this one component.
Props:
| Prop | Type | Required | Description |
|---|---|---|---|
variants |
BadgeVariantMap |
Yes | Maps string values to { label, className } display configs |
value |
string |
Yes | The current value — looked up in variants; falls back to raw value if not found |
ariaLabel |
string |
No | Override the accessible label (use when label text alone is insufficient) |
testId |
string |
No |
data-testid for test selectors |
className |
string |
No | Additional CSS class for positioning/sizing overrides |
Types:
interface BadgeVariant {
label: string; // human-readable display label
className: string; // CSS Module class that sets bg + text color
}
type BadgeVariantMap = Record<string, BadgeVariant>;Usage:
Define the variant map once (typically in the domain component file) then pass it to every Badge instance:
import { Badge, type BadgeVariantMap } from '../components/Badge/Badge.js';
import badgeStyles from '../components/Badge/Badge.module.css';
const WORK_ITEM_STATUS_VARIANTS: BadgeVariantMap = {
not_started: { label: 'Not Started', className: badgeStyles.not_started },
in_progress: { label: 'In Progress', className: badgeStyles.in_progress },
completed: { label: 'Completed', className: badgeStyles.completed },
};
// In JSX:
<Badge variants={WORK_ITEM_STATUS_VARIANTS} value={workItem.status} />;Built-in variant classes in Badge.module.css (reference by importing the CSS module):
| Class name | Token family used | Domain |
|---|---|---|
not_started |
--color-status-not-started-* |
Work item status |
in_progress |
--color-status-in-progress-* |
Work item status |
completed |
--color-status-completed-* |
Work item status |
planned |
--color-hi-status-planned-* |
Household item status |
purchased |
--color-hi-status-purchased-* |
Household item status |
scheduled |
--color-hi-status-scheduled-* |
Household item status |
arrived |
--color-hi-status-arrived-* |
Household item status |
pass |
--color-diary-outcome-pass-* |
Diary inspection outcome |
fail |
--color-diary-outcome-fail-* |
Diary inspection outcome |
conditional |
--color-diary-outcome-conditional-* |
Diary inspection outcome |
low |
--color-diary-severity-low-* |
Diary issue severity |
medium |
--color-diary-severity-medium-* |
Diary issue severity |
high |
--color-diary-severity-high-* |
Diary issue severity |
critical |
--color-diary-severity-critical-* |
Diary issue severity |
For a new badge domain, add variant classes to Badge.module.css using the appropriate --color-* token family. Do not inline colors or create a separate CSS module.
File: client/src/components/Badge/CountBadge.tsx
The decorative count pill on the shell bell and the bottom-bar Home slot. Props: count (renders nothing at 0 or below), max (default 99; above it the pill reads 99+), className (the host positions it; the pill has no position of its own), testId.
- Tokens:
--color-danger/--color-danger-text(flip in dark mode),--color-bg-primaryfor a 1pxbox-shadowring (a shadow, not a border, keeps the 16px box centred),--spacing-4height and min-width,--spacing-1inline padding,--radius-full,--font-size-xs,--font-weight-semibold. - Always
aria-hidden: the host control's accessible name carries the exact count ("Needs attention, 3"; "Home, 3 need attention"). Never put anaria-liveon it, and render no badge (not "0") while loading or after an error. - The visible cap is the badge only: headings, tab titles and accessible names show the exact number.
- Use it for any future shell count; do not add another count pill.
File: client/src/components/SearchPicker/SearchPicker.tsx
Import: import { SearchPicker } from '../components/SearchPicker/SearchPicker.js'
A generic, search-as-you-type entity picker with a controlled text input, debounced search, a role="listbox" dropdown, and a clear button. Use this for any "select an entity from a searched list" interaction — work items, household items, users, invoices, etc.
Props:
| Prop | Type | Required | Default | Description |
|---|---|---|---|---|
searchFn |
(query: string, excludeIds: string[]) => Promise<T[]> |
Yes | — | Async search function called on each debounced keystroke |
renderItem |
(item: T) => { id: string; label: string } |
Yes | — | Maps a result item to its display label and stable ID |
value |
string |
Yes | — | Currently selected ID; '' means no selection |
onChange |
(id: string) => void |
Yes | — | Called with the selected item's ID (or '' on clear) |
excludeIds |
string[] |
Yes | — | Item IDs to omit from results (e.g. already-linked items) |
onSelectItem |
(item: { id: string; label: string }) => void |
No | — | Optional callback with both ID and label on selection |
disabled |
boolean |
No | false |
Disables all interaction |
placeholder |
string |
No | 'Search items...' |
Input placeholder text |
getStatusBorderColor |
(item: T) => string | undefined |
No | — | Returns a CSS color string for the selected-item left border accent |
specialOptions |
SpecialOption[] |
No | — | Fixed options shown above the search results (e.g. "None") |
showItemsOnFocus |
boolean |
No | — | When true, loads and shows all results on input focus |
initialTitle |
string |
No | — | Pre-populate the selected display when value is already set but the full item object is not yet loaded |
emptyHint |
string |
No | 'Type to search items' |
Message shown when the dropdown is open but no query entered |
noResultsMessage |
string |
No | 'No matching items found' |
Message shown when a search returns no results |
loadErrorMessage |
string |
No | 'Failed to load items' |
Error shown when initial load fails |
searchErrorMessage |
string |
No | 'Failed to search items' |
Error shown when a search query fails |
Usage:
import { SearchPicker } from '../components/SearchPicker/SearchPicker.js';
<SearchPicker<WorkItem>
value={selectedWorkItemId}
onChange={(id) => setSelectedWorkItemId(id)}
excludeIds={[]}
searchFn={(query, excludeIds) => api.searchWorkItems(query, excludeIds)}
renderItem={(item) => ({ id: item.id, label: item.name })}
placeholder="Search work items..."
showItemsOnFocus
/>;With specialOptions (e.g. a "None / unassigned" choice):
<SearchPicker<User>
value={assigneeId}
onChange={setAssigneeId}
excludeIds={[]}
searchFn={searchUsers}
renderItem={(u) => ({ id: u.id, label: u.name })}
specialOptions={[{ id: 'none', label: 'Unassigned' }]}
/>Behavior notes:
- Debounce delay is 300ms.
- Calling
onChange('')from the clear button resets the picker to its empty state. - When
valueis externally reset to'', the component self-clears. -
showItemsOnFocustriggers a full list load on input focus (useful when the dataset is small enough to show all items without filtering first). -
Trailing slot (
renderTrailing, #2295 follow-up). A same-line, right-aligned text after the title (an amount, a short status). Rendered as the last child of the option button in.resultTrailing:flex-shrink: 0,margin-left: auto,--font-size-sm,--color-text-secondary,font-variant-numeric: tabular-nums,text-align: right,white-space: nowrap. A long status phrase (not an amount) must wrap instead (white-space: normal,max-width: 50%) so it never ellipsizes the title; the title block keepsmin-width: 0. The secondary line stays under the title (company name under an invoice number). -
Add mode (
clearOnSelect). For add-style lists: a pick or a created item callsonChange/onSelectItembut shows no selected chip; the input empties and keeps focus without reopening the list, so focus never drops to<body>. Consumers keepvalue="". Pickers that choose one value keep the default chip with "Clear selection". -
Per-row test id (
getOptionTestId) puts adata-testidon each result option;inputAriaProps['aria-label']names an input that has no visible<label>(an input with a label useshtmlForinstead and gets noaria-label). - Rows of a portaled listbox are reached with ArrowDown/ArrowUp from the input, never with Tab (a preselected value shows as the selected chip, not as prefilled input text).
File: client/src/components/Modal/Modal.tsx
Import: import { Modal } from '../components/Modal/index.js'
A dialog overlay rendered via createPortal into document.body. Handles all standard modal behaviors: backdrop dismiss, Escape key close, focus management (auto-focuses first focusable child on mount), and correct ARIA attributes.
Props:
| Prop | Type | Required | Description |
|---|---|---|---|
title |
string |
Yes | Modal heading — announced by screen readers via aria-labelledby
|
onClose |
() => void |
Yes | Called on backdrop click, Escape key, or close button press |
children |
React.ReactNode |
Yes | Modal body content |
footer |
React.ReactNode |
No | Action buttons rendered in the footer strip |
className |
string |
No | Additional CSS class applied to the content panel (use for width overrides) |
Usage:
import { Modal } from '../components/Modal/index.js';
{
isOpen && (
<Modal
title="Confirm Deletion"
onClose={() => setIsOpen(false)}
footer={
<>
<button className={sharedStyles.btnSecondary} onClick={() => setIsOpen(false)}>
Cancel
</button>
<button className={sharedStyles.btnDanger} onClick={handleDelete}>
Delete
</button>
</>
}
>
<p>Are you sure you want to delete this item? This action cannot be undone.</p>
</Modal>
);
}Sizing: The default modal width is set by shared.module.css → .modalContent. Override for wide modals (e.g. pickers) by passing a className with a max-width rule:
/* In the consuming component's CSS Module */
.wideModal {
max-width: min(860px, calc(100vw - 2rem));
}<Modal title="Select Document" onClose={onClose} className={styles.wideModal}>
...
</Modal>Accessibility: The modal root element carries role="dialog" aria-modal="true" aria-labelledby={titleId}. The title element has the matching id. Focus is moved to the first interactive child on mount. Escape key always closes.
File: client/src/components/Skeleton/Skeleton.tsx
Import: import { Skeleton } from '../components/Skeleton/index.js'
A shimmer placeholder shown during data loading. Renders a configurable number of lines with staggered widths. Use instead of spinner-plus-text loading states for content regions.
Props:
| Prop | Type | Required | Default | Description |
|---|---|---|---|---|
lines |
number |
No | 3 |
Number of skeleton lines to render |
widths |
string[] |
No | — | Width per line (e.g. ['100%', '75%', '50%']); cycles 100/80/60% when omitted |
loadingLabel |
string |
No | 'Loading' |
aria-label for the container; customize to describe the specific content loading |
className |
string |
No | — | Additional CSS class for layout positioning |
Usage:
import { Skeleton } from '../components/Skeleton/index.js';
// Basic 3-line loading placeholder
{
isLoading && <Skeleton />;
}
// Custom count with explicit widths
{
isLoading && (
<Skeleton
lines={4}
widths={['100%', '100%', '70%', '40%']}
loadingLabel="Loading work item details"
/>
);
}Accessibility: The container has role="status" aria-busy="true" and an aria-label that describes what is loading. Individual line elements are aria-hidden="true".
Animation: The shimmer animation uses --color-bg-tertiary and --color-bg-hover as gradient stops. The animation is automatically disabled for users with prefers-reduced-motion: reduce — the lines render as static placeholders without the sweep effect.
File: client/src/components/EmptyState/EmptyState.tsx
Import: import { EmptyState } from '../components/EmptyState/index.js'
A centered empty-content display with an optional icon, main message, supporting description, and an action button or link. Use whenever a list, table, or content region has no items to show.
Props:
| Prop | Type | Required | Description |
|---|---|---|---|
message |
string |
Yes | Primary empty-state message (e.g. "No work items yet") |
icon |
ReactNode |
No | Icon to display above the message — emoji string or React element; always aria-hidden
|
description |
string |
No | Secondary helper text beneath the message |
action |
EmptyStateAction |
No | Optional CTA; renders an <a> when href is set, a <button> otherwise |
className |
string |
No | Additional CSS class for layout positioning |
EmptyStateAction shape:
interface EmptyStateAction {
label: string;
href?: string; // renders an <a> link
onClick?: () => void; // renders a <button>; href takes precedence
}Usage:
import { EmptyState } from '../components/EmptyState/index.js';
// List has no items
<EmptyState
icon="📋"
message="No work items yet"
description="Add your first work item to start tracking progress."
action={{ label: 'Add Work Item', onClick: () => setShowForm(true) }}
/>
// Filter produced no results (no icon, no CTA)
<EmptyState
message="No items match your filters"
description="Try adjusting or clearing your filters."
action={{ label: 'Clear filters', onClick: clearFilters }}
/>Pattern guidance: Use the full form (icon + message + description + action) for the "resource does not exist yet" state. Use the minimal form (message + optional description + text action) for "filter returned no results" — omit the icon in filtered-empty states so the two cases are visually distinct.
A signed-in member who opens an admin-only URL (/settings/users, /settings/backups) sees the No access page in place: URL kept, no redirect, sidebar stays, with nothing highlighted. Built from EmptyState (no new component): the message is the page's real <h1> via the messageAs="h1" prop (default 'p', so existing consumers are unchanged), styled by .messageHeading (--font-size-base, --font-weight-semibold, --color-text-primary), with a "Back to Home" in-app link as the action. The guard (RoleGuard, a pathless layout route) renders nothing while auth loads, so the admin page never flashes. Admin-only Settings views (Users, Backups) are not rendered in the sidebar for members (removed, not disabled).
File: client/src/components/FormError/FormError.tsx
Import: import { FormError } from '../components/FormError/index.js'
Displays validation or API error messages in forms. Returns null when message is falsy — safe to always render without conditional wrapping. Two visual variants: a full-width banner for form-level errors and a small inline message for field-level errors.
Props:
| Prop | Type | Required | Default | Description |
|---|---|---|---|---|
message |
string | null |
No | — | Error text to display; component renders nothing when absent |
variant |
'banner' | 'field' |
No | 'banner' |
banner = full-width error panel; field = inline field hint |
className |
string |
No | — | Additional CSS class |
Usage:
import { FormError } from '../components/FormError/index.js';
// Form-level (banner variant — default)
<FormError message={submitError} />
// Field-level inline error
<label htmlFor="email">Email</label>
<input id="email" className={emailError ? styles.inputError : undefined} />
<FormError message={emailError} variant="field" />Accessibility: The banner variant renders with role="alert", which causes screen readers to announce the error immediately when it appears. The field variant omits the role — it is associated with its input through the label/input relationship and does not need live-region behavior.
File: client/src/components/InfiniteScrollFooter/InfiniteScrollFooter.tsx
Hook: useInfiniteScroll (client/src/hooks/) owns the IntersectionObserver and loading state machine.
Scroll-driven batch-loading footer: sentinel, loading indicator, inline error, end-of-list row, and a load-more/retry button. Parameterized by label props and testIdPrefix; no hardcoded i18n namespace. Use it for every paginated/infinite list instead of hand-rolling a footer.
Button behavior (reference implementation of Disabled vs. Busy Buttons):
- Load-more/retry button stays focusable during a batch:
aria-disabled="true"+onClickearly-return, never nativedisabled. -
.loadMoreButton[aria-disabled='true']:opacity: 0.5; cursor: not-allowed;plus a:hoveroverride restoring--color-bg-tertiary(sharedbtnSecondary:hover:not(:disabled)would otherwise still match). - On mobile (
max-width: 767px) the button is full width withmin-height: 44px. - When the list ends, the button unmounts and focus is handed to the end-of-list row (
tabIndex={-1},:focus-visibleuses--shadow-focus; plain:focusshows no ring).
Accessibility: loading, error, and end-of-list changes must be reachable by assistive tech via the component's status/alert semantics; the focus target on list end prevents focus loss to <body>. Pages that must announce while the footer is unmounted (e.g. a 0-entry initial load, or an all-filtered end-of-list) use the useInfiniteScrollAnnouncements hook (client/src/hooks/) to drive their own role="status" region (which already implies aria-live="polite"; do not add both) rather than a slot on the footer.
File: client/src/components/FilterChipGroup/FilterChipGroup.tsx
Pick-one chip group (e.g. Photos page orientation filter). Props: options: {value,label}[], value, onChange, ariaLabel, testIdPrefix. Each chip is a <button type="button"> exposing aria-pressed; the wrapper is role="group" with aria-label. Use it for a small, always-visible single-select filter instead of a <select> or a bespoke button row.
- Chips:
min-height: 2.75rem(44px touch target),--radius-full,--color-border-strongborder,--color-bg-primaryfill; pressed state inverts to--color-bg-inverse/--color-text-inverse. - Focus:
box-shadow: var(--shadow-focus). The group scrolls horizontally (overflow-x: auto, which also clips vertically), so it carriespadding: var(--spacing-1)with a matching negative margin to keep the 3px ring unclipped without shifting layout. Preserve this pairing if you change the focus ring size. - Not a segmented control for form fields; for a form "choose one" field use the radio group pattern.
- Props added in #2221:
layout: 'scroll' | 'wrap'(wrap=flex-wrap, no horizontal scroll, no ring padding),deselectable(tapping the pressed chip callsonChange('')),labelledBy(id of a visible label, instead ofariaLabel),tone: 'default' | 'onPhoto'(off-theme chips for the camera:--color-photo-*tokens, white pressed fill) andoptions[].action(dashed-border chip that callsonSelect(), noaria-pressed). Existing callers are unchanged. See Capture screen (#2221).
File: client/src/components/SpotThumbnail/SpotThumbnail.tsx
Thumbnail for a photo spot (area x orientation) used in the Photos browser. Variants: cell (16:9, unbordered, for table cells) and card (4:3, bordered --radius-lg card with title and date lines, for the mobile layout). Rendering is data-driven:
-
With
to: renders a router<Link>whose accessible name isariaLabel(required); the image is decorative (alt="", lazy), the photo-count pill isaria-hidden(the count belongs inariaLabel). -
Without
to: non-interactive dashed placeholder showingemptyLabel(optional visually hiddenemptySrPrefixfor context); reserves the date line height so rows do not jump. -
Image failure/missing: swaps to a
--color-bg-tertiaryfallback with a picture-off icon and an sr-onlyimageUnavailableLabel. - Hover/focus: 2px
--color-primaryring on the thumb (inset oncard), plus--shadow-focuson the link on focus-visible. Count pill uses--color-photo-control-bg-hoverwith--color-whitetext.prefers-reduced-motiondisables the ring transition.
File: client/src/components/FileList/FileList.tsx (story #2161)
List of generated files, each with its own action (e.g. the split-report parts in the Source Reports wizard, step 5). Use it for any multi-file export instead of a bespoke list. All strings come from props (no i18n namespace). Props: heading, summary, items: FileListItem[] (id, name, meta, optional badges, optional detail, actionLabel, actionAriaLabel, onAction, actionDisabled), headingRef, testIdPrefix (default file-list), and children (rendered between summary and list, e.g. a stale-state notice).
-
Structure:
<section aria-labelledby>with an<h3 tabIndex={-1}>(programmatic focus target after an upload round) and a summary<p>that the<ul>references viaaria-describedby. Rows are<li>. -
Row:
--color-bg-secondaryfill,1px solid var(--color-border),--radius-md,--spacing-3padding,--spacing-2list gap; grid1fr auto. Name:--font-size-sm/--font-weight-medium/--color-text-primary,overflow-wrap: anywhere. Meta:--font-size-xs/--color-text-muted. Badges: flex-wrap row (useBadge; status always has a text label). Detail:--font-size-xs/--color-text-secondary. -
Action: composes
btnSecondaryCompact;aria-labelmust be unique per row (e.g. "Download {filename}"). -
Responsive: below 768px (
max-width: 767px) rows stack and the action is full width withmin-height: 44px. (The #2161 spec said 640px; implementation uses the app-wide 767px mobile breakpoint, accepted for consistency withInfiniteScrollFooter/FilterChipGroup.) - Dark mode: semantic tokens only; no local overrides.
File: client/src/components/Breadcrumbs/Breadcrumbs.tsx (story #2202; reused by #2203/#2204). Presentational: parents: {label, href, dynamic?}[], origin?: {label, href}, pending?, testId. Data comes from usePageBreadcrumbs / PageBreadcrumbs (route-map parent chain + NavConfig labels, never the URL). Replaces every per-page back link ("Back to Diary", "Back to Schedule", ...); delete the link, its CSS and its i18n keys. Exception: the photo spot viewer keeps its dark chrome back link.
Page identity rules
| Rule | Value |
|---|---|
| h1 | list = object plural; view = NavConfig view name; detail = object name; create = "New ‹object›"; edit = "Edit ‹object›". Never a container name ("Project", "Manage", "Budget"). Exactly one h1 per state. |
| Typed fallback | Empty/whitespace name: "Untitled task/purchase/milestone". Loading: plain noun ("Task"). Not found: "Task not found" / "Purchase not found" / "Milestone not found" (deviation from "keeps the existing text": the old text used banned words, see Accepted UX Deviations). |
| Tab title |
‹page› · ‹section› · ‹house› (U+00B7, one space each side) via useDocumentTitle. Section dropped when equal to the page text. House = householdName, else "Cornerstone". Must never lag the h1. |
| Breadcrumb | Parents only, never the current page; root first; unserved ancestors skipped; an object ancestor with no loaded name is omitted (row keeps its height). Views (NavConfig main views and views[]) show no trail and no Back. Nothing to show renders nothing (no empty <nav>). |
| Back | "‹ Back to ‹origin›" only when the origin pathname differs from the nearest breadcrumb parent and the current page. Origin lives in router state (full URL incl. query; label = object name or NavConfig label, never stored translated); no known label = no Back. Back is a normal push and returns the exact URL (Schedule/Calendar view kept). |
Markup: <div class=row> containing the Back link (plain <a>, outside the landmark) and <nav aria-label="You are here"><ol> of links; › (U+203A) separators are aria-hidden spans, not CSS content, no trailing separator. Anchors via useHref + useLinkClickHandler (EmptyState pattern), not <Link>.
Tokens
| Element | Tokens |
|---|---|
| Row | flex, wrap, align-items: center, column-gap: var(--spacing-4), margin-bottom: var(--spacing-3) (--spacing-2 below 768px), min-height: var(--spacing-8)
|
| Trail link |
--font-size-sm, --font-weight-normal, --color-text-muted, no underline, --radius-sm, color var(--transition-fast)
|
| Back link |
--font-size-sm, --font-weight-medium, --color-text-secondary; ‹ glyph aria-hidden, margin-inline-end: var(--spacing-1)
|
| Hover |
--color-text-primary + underline |
| Focus |
:focus-visible only: outline: none; box-shadow: var(--shadow-focus)
|
| Separator |
--color-text-muted, margin-inline: var(--spacing-2)
|
| Long text | Object-name item flex: 0 1 auto; min-width: 0 with ellipsis; Back link max-width: 100% ellipsis; accessible name stays complete. h1 gets overflow-wrap: anywhere. |
Responsive
| Width | Behaviour |
|---|---|
| < 768px | One element only: Back if present, otherwise the nearest parent as "‹ ‹parent›" (other items display: none). Row min-height: 44px, link inline-flex so the target is at least 44px. |
| 768-1023px | Full trail, Back to its left, wraps; links min-height: 44px. |
| >= 1024px | Same; pointer target at least 24px. |
| Row hidden. |
From 1024px the shell top bar (#2206) hosts this row and the page does not render it, so only one You are here landmark exists; below 1024px (#2207) it is hosted by the top bar as well, in the compact layout, so the in-page row no longer exists at any width. tokens.css has no breakpoint tokens; media queries use literal px as in PageLayout.module.css.
Dark mode: semantic Layer-2 tokens only, no override block. --color-text-muted on --color-bg-page is 5.52:1 light / 7.18:1 dark; secondary 9.86 / 12.39 (all at least 4.5:1). Links are distinguished by position, separators and underline on hover/focus, so colour is never the only signal.
Accessibility: one breadcrumb <nav> per page, label differs from sidebar and AreaBreadcrumb; no aria-current (current page is not in the trail); tab order Back, trail left to right, content; no focus moved on arrival; only a colour transition, so prefers-reduced-motion sets transition: none. Opening an object, a crumb and Back are pushes; tab, view and filter changes use replace; no page navigates on mount.
Not reused: AreaBreadcrumb is a non-interactive content path (direction: rtl truncation), only its › and muted type recipe are repeated.
Status: implemented by #2209 (full spec: comment on issue #2209; implementation reviewed in PR #2285). Files: components/StatusMenu/ (new), components/ConfirmDialog/ (new, on Modal), components/Modal/AnchoredPanel (new, Floating UI popover), Toast (extended with an undo variant). Reuse: Badge look via composes, OverflowMenu row recipe, Sheet, FilterChipGroup chip look, FormError, Skeleton, Floating UI (ADR-033).
Confirm or undo (decided in this order): bank-facing action = ConfirmDialog with count and sum; destroys a record others reference, or Undo cannot restore it = ConfirmDialog ("Delete ‹name›?" with counts); status change or actual date = UndoToast; other reversible action = UndoToast once its server snapshot exists; discarding input = ConfirmDialog ("Discard changes?" / "Discard this entry?", cancel side "Keep editing" / "Keep entry"). Never window.confirm, double confirmation, inline Confirm/Cancel swap or a Delete key that deletes directly.
StatusMenu. One implementation for every status vocabulary; three appearances: chip (the status chip is the button), button ("Set status"), action (one transition, e.g. "Start"). No allowed transition = plain Badge. Chip colour only from useStatusBadgeVariants; hover/open = inset 0 0 0 1px currentColor; focus = 0 0 0 2px var(--color-bg-primary), 0 0 0 4px var(--color-border-focus) (a borderless chip needs the two-ring form); hit area extended to 44 px with a ::before; busy = aria-disabled (never disabled). Two steps in one surface: list (role="menu", header "Now: ‹status›", forward then backward moves) then, for Start / Mark done / Mark delivered / Mark reached / progress payment Paid or Submitted, a date step (role="dialog": Today · As planned ‹date› · Pick a date; applies at once; invoices ask no date). Set date is a secondary compact button (a popover step must not add a primary-looking button); Pick toggles and carries aria-expanded. The desktop surface is Modal/AnchoredPanel: the "Now: ‹status›" header sits outside the inner role="menu" (a header inside a menu is invalid ARIA); only the date step gets role="dialog". The phone Sheet stays mounted (inert and hidden while closed, dialog role only while open) so it slides in and out like MoreSheet. The planned chip is hidden when absent, equal to today or in the future. Below 1024 px the surface is a Sheet, from 1024 px a Floating UI popover (instant, no entrance animation). List step keyboard follows OverflowMenu (Tab closes and returns to the trigger); date step traps Tab, Escape closes. The trigger's accessible name is its visible text (WCAG 2.5.3); "Change status" is its aria-describedby description. aria-haspopup is menu for chip and button, dialog for an action that opens the date step. Date chips add border-color: var(--color-border-focus) on focus (the 30% ring alone is under 3:1). Status colours for grants, funding sources and defects are Badge variants (useStatusBadgeVariants): grants and funding sources keep their previous token pairs; defects reuse the blocked (Open), in-progress (Being fixed) and completed (Fixed) pairs. Labels: funding source "Used up", defect "Open / Being fixed / Fixed", no emoji.
UndoToast. Success palette, message names the record, text button "Undo" (aria-keyshortcuts="Control+Z Meta+Z"). Visible 6000 ms (UNDO_TOAST_MS, always less than the 30 s server window UNDO_WINDOW_MS); pauses on hover, focus-within and while the tab is hidden; a second change on the same record replaces its toast. Undo posts the snapshot token only (never a reverse transition); outcomes: "Change undone." / "It is too late to undo this." (404, toast dismissed) / "This changed since, so it can't be undone." (409, toast dismissed). Any other failure (network, 5xx) keeps the toast, re-enables Undo and shows an error toast, because the token stays valid for the rest of the 30 s window. Never takes focus; Ctrl/Cmd+Z (outside editable fields) undoes the newest undo toast. The toast list keeps two persistent live regions (polite role="status" for success, info and undo; an aria-live="assertive" region without a role for errors); individual toasts carry no role. The container has no gap: the regions are spaced only when both hold toasts. A toast replaced by dedupeKey hands focus off like a dismissed one.
ConfirmDialog. role="alertdialog", title = the full question, optional lead line, optional "This also affects:" list of counts (zero counts omitted, counts always from the server), footer Cancel (or Keep ...) left of the action. Action label is a verb ("Delete", "Discard", "Revert submission"); The action always uses .btnDanger (tone="danger" is the only tone; see the #2257 Deviation Log below). Initial focus on the cancel button. Busy = aria-disabled and ignored Escape/backdrop; server error stays inside the dialog as FormError; counts load with Skeleton while the action stays aria-disabled. Always a centred dialog (never a sheet); footer stacks below 640 px at 44 px height.
DeleteConfirmDialog (#2257). components/ConfirmDialog/DeleteConfirmDialog.tsx is the one call shape for deleting a record: entityType, id, name, busy, error, blocked, irreversible (default true; false only when the DELETE answers with an Undo token, e.g. areas), onConfirm, onCancel, returnFocusRef, testIdPrefix. It composes ConfirmDialog with tone="danger", the title "Delete ‹name›?" (common:confirmDialog.deleteTitle) and the counts from useDeleteImpact (GET /api/delete-impact/:type/:id, the server's dry run of the DELETE, so the counts match what the server enforces); a 409 from the DELETE shows the blocked state. Mount it only while open (the counts load on mount). The list row ⋯ › Delete and the record page's header ⋯ › Delete pass the same name expression, so both show the same dialog. It sits in the ConfirmDialog/ folder on purpose: it is a wrapper, not a new shared component. Pages do not call useDeleteImpact themselves.
Modal variant="viewer" (#2257). Full-viewport media viewer (PhotoViewer): no header row, no close button and no padding or radius (the content paints its own); the title stays sr-only as the dialog's accessible name ("Photo viewer"). It gets Modal's focus trap, scroll lock, Escape and focus restore, and the dialog layer, so the viewer's own ConfirmDialogs, tag Modal and details Sheet stack above it and Escape closes only the topmost.
Focus rule (all three): a control removed by its own result hands focus to the initiating control, else the host's fallback (returnFocusRef, next row, previous row, list region), else the page h1; never <body>. Modal implements it as opener, then returnFocusRef, then focusPageHeading(); after a confirmed action the opener is skipped (it is usually what was just deleted, and the row is removed after the dialog closes), so ConfirmDialog goes straight to returnFocusRef (a stable, enabled section heading with tabIndex={-1}, never a create button, which can be disabled), else the page h1. Cancel, Escape, backdrop and the close button still return to the opener; a host whose opener survives the action opts back in with restoreToOpenerOnConfirm (PhotoViewer clear markup). Each step is verified by reading document.activeElement and re-checked once in a microtask after the commit (a host may remove the opener in the same commit). ConfirmDialog buttons are 44 px high at 1023 px and below (stacked full width below 640 px); Modal's close button shows a busy cue (aria-disabled, 0.5 opacity, hover override) when dismissible is false.
Deviation Log (found while specifying #2209, fixed in that story): ToastList returned null when empty (no persistent live region), every toast was role="alert" inside a role="status" container, slideIn used a literal 0.2s ease with no prefers-reduced-motion rule, and the dismiss button was 20 px; Modal does not restore focus on close and has no alertdialog role support.
Deviation Log (#2257, wiki corrected): this section said tone="primary" uses .btnPrimary. The implementation has no primary branch: ConfirmDialogProps.tone is 'danger' only and the action always composes .btnDanger (ConfirmDialog.module.css). Non-destructive confirms (e.g. the Bank report "Discard your edits?" and "Overwrite your edits?") therefore use the danger action too. A primary branch is not added, because it would put a primary class into every screen closure that mounts a ConfirmDialog and raise the pattern baseline.
Files: components/TopBar/ (new), OverflowMenu (extended: renderTrigger, header, separator, link, choice-group rows, aria-haspopup="menu", stronger item focus), Breadcrumbs (layout="bar"), .btnIcon in shared.module.css. Desktop children from 1024px; below it the same <header> hosts the compact children specified in Phone and tablet shell (#2207). The shell breakpoint is max-width: 1023px drawer / min-width: 1024px static sidebar and bar. Full per-element spec: comment on issue #2206.
Structure. <header> (the only banner) sits in AppShell between the sidebar and <main>, sticky, --topbar-height = calc(var(--spacing-12) + var(--spacing-2)) (56px), --color-bg-primary, border-bottom: 1px solid var(--color-border), padding-inline: var(--spacing-8), z-index: calc(var(--z-dropdown) + 1) (above page-level sticky headers at --z-dropdown, below modals). The bar is a sibling of the .mainContent wrapper inside a non-scrolling .shellColumn, because .mainContent never scrolls and a sticky child of it would not stick. Left slot (flex: 1 1 0; min-width: 0) hosts Back and the breadcrumb trail (Breadcrumbs layout="bar": no wrap, no bottom margin); an empty slot renders nothing. Right group: Search, New, bell, avatar (gap: var(--spacing-2)), pushed right with margin-inline-start: auto.
| Element | Recipe |
|---|---|
| Search, New |
.btnSecondary (neutral on purpose: the shell contributes no primary-styled button), min-height: var(--spacing-10); Search carries an aria-hidden kbd hint (⌘K on Apple platforms, Ctrl K elsewhere) |
| Bell |
.btnIcon: 40px square, --color-text-secondary, hover --color-bg-tertiary; accessible name "Needs attention" |
| Avatar | 40px --radius-full, --color-primary-bg fill, --color-primary-badge-text initials (--font-size-sm, semibold), 1px solid var(--color-border-strong); hover --color-primary-bg-hover + --color-primary border; open holds the hover look |
| Focus | every control: box-shadow: var(--shadow-focus) plus border-color: var(--color-border-focus) (the 30 % ring alone is below 3:1); menu rows: inset 0 0 0 2px var(--color-border-focus)
|
| Inert controls | while their stories are open (Search 1.5, New 1.6, bell 3.4): aria-disabled="true", opacity: 0.5, cursor: not-allowed, still focusable, no handler |
Menu panel. --color-bg-primary, 1px solid var(--color-border-strong), --radius-md, --shadow-md, min-width 272px, max-height: calc(100dvh - var(--topbar-height) - var(--spacing-4)) scrolling. Rows follow the OverflowMenu .item recipe at min-height: var(--spacing-10). Order: header (name, role; not a menu item, linked with aria-describedby) · Account · separator · Theme (Light/Dark/System) · Language (English/Deutsch) · separator · Keyboard shortcuts (desktop only; carries an aria-hidden ? key hint at the row end while single-key shortcuts are on) · Help · About (version, GitHub) · separator · Log out (default text colour, not danger).
Choice groups (role="group" with role="menuitemradio" buttons, aria-checked) toggle in place and keep the menu open. Option: min-height: var(--spacing-8), 1px solid var(--color-border-strong), hover --color-bg-hover + --color-primary border; selected: --color-primary-bg, --color-primary-badge-text, --color-primary border, semibold and a leading ✓ (aria-hidden), so selection is never colour alone. "English" and "Deutsch" are literal endonyms with lang. This is the second in-app "choose one of N" control after the AutoItemizePage radio group; it is deliberately a compact option row because the menu must stay short.
Keyboard (menu button pattern): Enter/Space/ArrowDown on the avatar opens at the first row, ArrowUp at the last; ArrowDown/Up move across every row (each radio option is a stop) with wrap, Home/End jump; Escape closes and returns focus to the avatar; Tab closes, moves focus to the avatar and continues from there (no trap); outside press and route change close. Keyboard shortcuts opens the shell's one KeyboardShortcutsHelp overlay (hosted by ShortcutsHelpProvider, see Keyboard shortcuts overlay (#2253)); on close focus returns to the avatar.
Floating menu button (below 1024px, signed off in #2206): neutral, not primary, so the shell contributes no primary-styled button: --color-bg-primary fill, --color-text-primary glyph, 1px solid var(--color-border-strong), --shadow-md; hover --color-bg-hover plus border-color: var(--color-primary); focus --shadow-focus plus border-color: var(--color-border-focus). Removed in #2207 (replaced by the bottom bar and More sheet).
Log out cannot fail visibly (AuthContext.logout() never rejects), so there is no error toast; the row shows "Logging out…" (aria-disabled) until the session guard navigates away.
Dark mode: Layer-2 tokens only, no override block. Motion: panel appears instantly; hover/focus transitions use --transition-button* and are off under prefers-reduced-motion. Print: bar hidden. Pages that size themselves to the viewport subtract the bar with calc(100dvh - var(--topbar-height)) from 1024px.
Contrast (light / dark): avatar and selected-option text 7.15 / 6.72, muted on panel 5.77 / 5.71, focus border on panel 5.17 / 5.75; all pairs belong in the #2200 contrast test.
Files: components/KeyboardShortcutsHelp/ (KeyboardShortcutsHelp.tsx, ShortcutsHelpProvider.tsx, keyCaps.ts), OverflowMenu (shortcutHint), hooks/shortcutRegistry.tsx, hooks/useGoToShortcuts.ts. Full spec: comment on issue #2253. No new token and no new shared component: the overlay is a default Modal, rendered once by the shell (never per page).
Structure. Modal titled "Keyboard shortcuts" (sentence case), three groups in this order, each an <h3> (.sectionHeading: --font-size-sm, semibold, --color-text-primary) followed by a <table aria-labelledby> with no <thead> and <colgroup> 30% / 70%:
-
On this page: rows the open page registered. With none, the heading stays and an
EmptyStatesays "This page has no shortcuts of its own." -
Everywhere (fixed order): ⌘K / Ctrl K,
/,n,?, Esc, ⌘Z / Ctrl Z. Omitted when empty. -
Go to:
g h/t/s/p/d/f/c/m, "Go to ‹destination›" using thenavigation.*labels; routes the role cannot open are not listed. Omitted when empty. Rows with an empty description (the Backspace twin) are hidden.
Key caps. <kbd> (.kbd: --color-bg-tertiary, --color-border-strong, --radius-sm, --shadow-kbd, monospace --font-size-xs). A sequence is one cap per step with the word "then" between (.then: --font-size-xs, --color-text-muted; never + or >). Platform caps: ⌘K / ⌘Z on Apple platforms, Ctrl K / Ctrl Z elsewhere. Symbol caps (?, /, Esc, ⌘K, ⌘Z) render the visible glyph aria-hidden plus a sharedStyles.srOnly spoken name ("Question mark", "Slash", "Escape", "Command K"); the Delete cap is translated text ("Delete" / "Entf") and needs no spoken name. Accepted decision: screen-reader-only text, not aria-label on <kbd> (a role-less element does not reliably announce its label).
Single-key switch (footer, via Modal's footer): <label class="switchLabel"><input type="checkbox" role="switch">Single-key shortcuts</label>. min-height: var(--touch-target-min), --font-size-sm, --color-text-secondary, same recipe as ObjectForm .addAnother. On by default, per browser (localStorage, like Theme and Locale), operable with Space. Accepted decision: a native checkbox with role="switch" rather than a custom track, because no switch component exists and the label states the setting (WCAG 2.1.4 off switch for character-key shortcuts). It turns off only single-character shortcuts (/, n, ?, e, g sequences); ⌘/Ctrl K, ⌘/Ctrl Z, Esc and Delete/Backspace stay on. Toggling keeps the dialog open.
"Turned off" marker. While the switch is off, each single-key row gets .rowOff (cells in --color-text-muted) plus a shared neutral Badge "Turned off" after the description (badgeStyles.neutral, .offBadge margin-inline-start: var(--spacing-2)). Meaning is the badge text, never the muted colour alone. Rows for Esc, ⌘K and Delete are not marked. Accepted decision. The ? hint on the avatar-menu row is hidden while the switch is off.
Avatar row hint. OverflowMenuItem.shortcutHint renders an aria-hidden <kbd> at the row end (composes the overlay kbd, margin-inline-start: auto); the row's accessible name stays "Keyboard shortcuts". The More sheet row has no hint.
Focus. Opening from the avatar menu or More sheet passes the opener ref, so close returns focus to the avatar or More button; opened with ? there is no ref and Modal's own restore applies (opener, then page heading). Esc closes (the Esc row is documentation only). g navigation moves focus to the destination page heading. ? while any modal is open or a text field has focus does nothing.
Reserved keys. Pages may not register g, ? or /; the registry drops them with a console.error (architect ruling), so the shell always owns them.
Status: implemented by #2207 (visual spec: comment on issue #2207, amended by the implementation spec below). One shell below 1024px (tablets 768-1023px included, no rail), one from 1024px. useMediaQuery('(min-width: 1024px)') switches what is mounted (never CSS display:none, which would duplicate test ids and aria-current): below 1024px the top bar, bottom bar and More sheet; from 1024px the sidebar and desktop top bar. One <header>, one <nav aria-label="Main navigation">, one <nav aria-label="You are here">, one aria-current="page" at every width.
Top bar (56px + env(safe-area-inset-top)): same <header> and --topbar-height. Left slot: compact Breadcrumbs (layout="compact", one link ‹ <origin or nearest parent>, name "Back to ‹label›", test ids breadcrumbs-back for an origin and breadcrumbs-parent for the nearest parent, the same ids at every width). Back rule: the link calls navigate(-1) only when history.state.idx > 0 and the previous in-app pathname equals the link's target pathname; otherwise it is a normal link to its href (so "‹ Tasks" never lands on the Schedule) or, on section roots, the house name (falls back to appName). Centre: the page title, aria-hidden, shown only after the h1 has scrolled above the bar (IntersectionObserver). Right: Search icon (inert, aria-disabled, until story 1.5). PageBreadcrumbs portals into the slot at every width; no inline breadcrumb row below 1024px.
Bottom bar (64px content row + env(safe-area-inset-bottom)): fixed, --color-bg-primary, border-top: 1px solid var(--color-border), z-index: calc(var(--z-dropdown) + 1). Five slots from NavConfig PHONE_BAR: Home (badge slot, story 3.4) · Site diary · New (+, neutral circle, opens the New sheet, which starts with the Log now tiles since #2222) · Photos · More (button, aria-haspopup="dialog", aria-expanded). Labels always visible, --font-size-xs, nowrap, overflow: visible, never shortened ("Bautagebuch" overhangs rather than truncates on a 320px phone). Rest --color-text-secondary (10.31 / 9.85); active --color-primary (5.17 / 5.75) + --font-weight-semibold + inset 0 3px 0 var(--color-primary) (three cues); focus inset 0 0 0 2px var(--color-border-focus); hover only under (hover: hover). Pressed (:active): --color-bg-tertiary, except on the active slot, which uses --color-bg-hover because --color-primary on --color-bg-tertiary is 4.07:1 in dark (AA needs 4.5:1); on --color-bg-hover it is 4.94 dark / 4.95 light. The More slot follows resolveNavActive exactly like the sidebar (one rule at every width): a page whose home is in More highlights it (aria-current="true"; the sheet row carries aria-current="page"). 404 and unknown routes highlight nothing; a member on an admin-only URL (No access) highlights Settings, so More is highlighted, as the desktop sidebar already highlights Settings. Tablet: slots capped at calc(var(--spacing-16) * 2), centred cluster. Published --shell-bottom-height on :root while mounted; content, full-height pages, sticky headers and Toast subtract or add it. The bar hides while an on-screen keyboard shrinks the visual viewport by 25% or more.
More sheet (new shared Sheet, in components/Modal/ with Modal and the shared useFocusTrap, because the pattern baseline counts every dialog role outside that folder): bottom-anchored, always mounted, inert while closed; role="dialog", aria-modal and aria-labelledby are set only while open, so a closed sheet never matches [role="dialog"] queries; slides with --transition-slow (instant under reduced motion), backdrop --color-overlay, panel --color-bg-primary with 1px solid var(--color-border-strong) top edge and --shadow-xl, max-height: calc(100dvh - var(--topbar-height)), 512px max width on tablets. Covers the bar; focus goes to the first row, traps, returns to More on Escape/backdrop/Close; rest of the shell is inert while open. Content: Tasks · Purchases · Money · Companies, Areas · History · Documents (Paperless only), Settings, then the user block (name and role, Account, Theme and Language as native-radio option rows in the #2206 recipe, Help, About with version and GitHub, Keyboard shortcuts only with a hardware keyboard ((any-pointer: fine), or a keydown seen this session whose target is not an editable field), which closes the sheet before opening the shell's shortcuts overlay (no stacked dialogs; focus returns to the More button; no ? hint in the sheet), Log out). Bar and sheet links are NavAnchor anchors (useHref + useLinkClickHandler), not react-router Link. Rows 44px (--touch-target-min: 2.75rem, new Layer 2 token). The user logic is shared with UserMenu through one hook.
View switching ("Tasks ▾"): on a section-or-view page with 2 or more visible views, the h1 is the menu button (PageLayout's PageTitle helper, also used by TimelinePage; OverflowMenu renderTrigger, link rows, current cue: ✓, weight, --color-primary-bg, aria-current="page"); the main view comes first; changes use replace. The trigger always carries padding-inline: var(--spacing-2) with margin-inline: calc(-1 * var(--spacing-2)), so hover and open only add the --color-bg-tertiary background and never shift the text. Detail pages keep a plain object-name h1. No tab row at any width.
Safe areas and zoom: the bars and the sheet use env(safe-area-inset-*, 0rem); .pageContent has no safe-area side padding (without viewport-fit=cover the side insets are 0, and a non-zero value would break TimelinePage's margin: -2rem escape); no viewport-fit=cover; no user-scalable/maximum-scale; touch-action: manipulation only. Dark mode: Layer 2 tokens only, no override block. Retired by #2207: ThemeToggle, .footerLegacy, .menuFab, the drawer and its overlay.
Page gutter (the space between the viewport edge and page content), per breakpoint. The gutter is the sum of the shell's .pageContent padding and PageLayout's .container padding. Phone (up to 767px): 16px in total, owned by the shell: .pageContent uses padding: var(--spacing-4) and PageLayout's .container adds 0 side padding, so pages that do not use PageLayout (detail pages, the Diary create, edit and detail pages, AutoItemize, the Paperless review) are not flush against the screen edge. A card is 343px wide in a 375px viewport. TimelinePage's full-bleed escape on phones is calc(-1 * var(--spacing-4)). Tablet and desktop (768px and up): unchanged, .pageContent var(--spacing-8) plus PageLayout var(--spacing-8) = 64px per side. Full-height pages (data-layout='full-height') still remove the shell padding. No page adds its own side padding to compensate, and PageLayout must not add phone side padding (it would double the gutter). A page with its own root container (detail, Diary and form pages) sets that container's padding to 0 at 767px and below; full-height pages that drop the shell padding (AutoItemize, the Paperless review) give their header and body padding-inline: var(--spacing-4) instead. responsive/page-gutter.spec.ts asserts the 16px content edge.
Status: specified for #2211 (full spec: comment on issue #2211). New shared component CommandSearch (in allowedAdditions); Modal gains variant="palette", Sheet gains variant="fullScreen" (+ hideTitle, headerStart), AreaBreadcrumb gains variant="path". Reuse: Badge via useStatusBadgeVariants, Skeleton (inside aria-hidden), Spinner, EmptyState, FormError, NavAnchor. Mechanics (open state, ⌘K and / handling, history, focus, 401): Architecture › Command search.
Surface. From 1024px a centred palette dialog (min(40rem, 100vw - 2rem), --radius-lg, --shadow-xl, upper third of the screen); below 1024px (tablets included) a full-screen Sheet with the input in its 56px header and the Close X at the end. The two are mounted conditionally, never hidden with CSS. The body is mounted only while open and the page behind is inert, so a screen has one search field (the top bar trigger is a button). No recent searches; the query clears on close unless a list field prefills it.
Combobox. <input type="text" role="combobox"> (16px, so iOS does not zoom) with aria-controls, aria-autocomplete="list", aria-activedescendant; role="listbox" > labelled role="group" > role="option" rows (a row never contains the Call button; the button is its sibling in a role="presentation" wrapper). One persistent role="status" live region ("n results", "No results for ‹query›"); never both role="status" and aria-live. Down/Up move across groups with wrap, Home/End stay with the caret, Enter opens, Shift+Enter calls a company, Escape always closes, Tab cycles input, Clear and Close (options are never tab stops). ⌘K / Ctrl K works from inside text fields (a capture-phase listener on window that always calls preventDefault on a match, because useKeyboardShortcuts ignores modifiers and the diary filter bar stops keydown propagation; both ⌘K and Ctrl K are accepted on every platform) and toggles; / focuses the page's data-page-search field or opens the palette. Focus returns to the opener (the list field for "Search everywhere"); after choosing a result focus goes to the destination h1.
Rows. min-height: var(--touch-target-min); line 1 label (--font-size-base, medium) plus a status chip or the Call button; line 2 --font-size-xs muted: sublabel · phone · date · full area path (ancestors --color-text-muted, last level semibold) · parent · "Found in ‹field›". Active = aria-selected: --color-primary-bg fill plus a 3px --color-primary start edge (pointer movement sets it, so there is no separate hover state). Match highlight = <mark> with semibold weight and a 2px --color-primary underline, never a fill; ranges are mapped through the German fold and dropped when they cannot be mapped exactly.
States. Empty: one hint line. One character: destinations only plus "Type at least 2 characters". Loading: skeleton after 200ms, old results stay with a spinner on refetch. No results: EmptyState. Documents unavailable: a warning-tinted note in the Documents group (not red). Failure: FormError plus "Try again". Debounce 250ms trailing; immediate for prefill, retry and Show more; AbortController per request; IME composition ignored. "Show n more" is an option row (limit 20, then a "Showing 20 of 37" note).
List-field row. "Search everywhere for ‹text›" (button, 44px, --color-primary) sits under a list's search input from 2 characters, also at 0 filtered results; DataTable takes searchEverywhere (default true; only Users turns it off; the diary filter bar renders the row too; the documents browser gets none, its search exists only inside pickers). The row's text truncates with CSS ellipsis (full text in the DOM and title), never cut in code.
Dark mode / contrast (light / dark): muted on panel 5.77 / 5.71, muted on the active row 4.73 / 4.73, muted on footer 5.52 / 4.89, focus border 5.17 / 5.75. Layer 2 tokens only. Motion: palette fade with translateY(-8px) over --transition-medium; instant under prefers-reduced-motion.
Status: specified for #2212 (full spec: comment on issue #2212). New shared components CreateMenu and ObjectForm (both in allowedAdditions). Reuse: OverflowMenu (desktop panel, link rows), Sheet (phone New sheet; full-screen variant from #2211 with a new footer slot), Modal, ConfirmDialog, FormError, Skeleton, .btnSecondary / .btnPrimary.
New menu. Order: Diary entry, Task, Purchase, Invoice, Offer, Company, Milestone; then, on Money pages only (absent elsewhere, not disabled), Funding source and Grant. No role or Paperless gating of rows. Rows are anchors with real hrefs. Desktop: the neutral "New ▾" button opens the UserMenu panel recipe (min-width: 14rem, rows --spacing-10, instant). Below 1024px: the bottom bar + slot is a button (aria-haspopup="dialog") opening a bottom Sheet titled "New" (rows 44px). Context pre-fill (areaId, companyId, date) is provided by pages through useCreateContext and carried as query parameters; a pre-filled field adds no chrome and does not make the form dirty. Programmatic opening: useCreateMenu().open(); the shell registers n as the fallback, a page's own n wins.
ObjectForm. Dialog state is the URL (/…/new, ?create=1); the previous page stays visible behind. Modal (min(40rem, 100vw - 2rem)) from 768px, full-screen Sheet below; form state lives above the container so resizing keeps input. Essential fields first, the rest under a collapsed "More details" (auto-expands for pre-fill, error or change). Required = visible "(required)" text plus aria-required. Footer: optional "Add another after saving", Cancel, Save (the only primary). Validation on Save: first invalid field focused, no summary banner, Save never natively disabled; busy = aria-disabled "Saving…". Server errors in a FormError banner. Dirty close (Close, Cancel, Escape, backdrop, Back) asks "Discard changes?" (Discard / Keep editing); pre-fill is not dirty. Save lands on the new object (focus its h1), or with "Add another" stays and shows a role="status" confirmation; created from a picker, the dialog shows the child form as a second step ("‹ Back to ‹parent›") and returns with the item selected, so dialogs never stack. Baseline: no literal dialog roles outside components/Modal; the shell adds no primary button; ObjectForm, rendered from the router root, has the only one: Save.
Status: specified for #2213 (full spec: comment on issue #2213; the implementation spec amends it, see the Deviation Log). New shared components CallButton and TradesManager (both in allowedAdditions); SearchPicker gains a create-row mode. Reuse: DataTable, FilterChipGroup, OverflowMenu, ConfirmDialog, Modal/Sheet, ObjectForm, TradePicker, Skeleton, EmptyState, FormError. The Trade header enum filter is replaced by chips (one filter, one control).
CallButton (components/CallButton/). One implementation of the Call recipe for the Companies list, the command search row and the Company page. An <a href="tel:…"> (the href keeps digits and +) styled as .btnSecondary (composes on the plain .button selector only) with the 14px phone glyph (aria-hidden) and the text "Call", or "Call ‹number›" in phone cards (showNumber). Height --spacing-8 with a fine pointer, --touch-target-min under (pointer: coarse), and always 44px with fullWidth (card variant: full card width, centred). Focus: box-shadow: var(--shadow-focus) plus border-color: var(--color-border-focus). The accessible name always starts with the visible text (WCAG 2.5.3): "Call" gives "Call ‹name› on ‹number›"; "Call ‹number›" gives "Call ‹number›, ‹name›". The number is also real text in the Phone cell so it can be read and copied. A company with no number anywhere shows "—" and no button. Dark mode: Layer 2 tokens only. Optional className is appended after the button's own classes so a host can position or stretch it (RelatedList's row Call). The 14px glyph is the shared PhoneIcon and the href the shared telHref(phone), both in components/CallButton/, so the ObjectHeader tel primary renders the same glyph and href.
Companies list. Columns: Name (link; default A–Z, no sort indicator until the user sorts), Trade (plain text), Phone (CallButton plus number; the company number, else the first contact person's), Contact persons (count, tabular numerals, 0 as "—"), Last on site, ⋯ (OverflowMenu, Delete). Hidden by default in column settings: Address, Notes, E-mail (mailto link), Date added, Last updated. Trade chips: FilterChipGroup with "All trades" first, 44px, scrolling horizontally, tradeId in the URL; a chip for a trade that no longer exists falls back to "All trades". One primary on the page: "New company" (the empty state shows its own and the header one hides). Below 768px: cards with the full-width Call button last; at 768-1023px the table, hiding Contact persons before Phone if it does not fit. A phone number is reached by More, Companies, Call (phone) or sidebar Companies, Call (desktop).
TradesManager (components/TradesManager/, hosted in Modal from 768px and a bottom Sheet below; opened by the "Trades" .btnSecondary and ?trades=1, which Back closes). Content: a "New trade" input (16px, maxLength 200 to match the server) with Add; an A–Z <ul aria-label="Trades"> whose rows (min-height: var(--touch-target-min)) show the name and a --font-size-xs --color-text-muted line "‹n› companies", each with a ⋯ menu: Rename (in place; Enter saves, Escape cancels to that row's ⋯; renaming a built-in trade replaces its translation and says so), Merge duplicates (a ConfirmDialog with a TradePicker "Keep this trade" and a server-counted line; the danger action is aria-disabled until a target is chosen; no Undo, and the dialog says so) and Delete (ConfirmDialog; blocked with "Merge instead" while companies use the trade). No primary button inside; the footer is one "Done" .btnSecondary. Busy = aria-disabled; one persistent role="status" announces changes. Focus after a merge goes to the kept trade's row; after a delete to the next row.
SearchPicker create row. createAction.show is 'always' (default, the old behaviour) or 'noExactMatch': the row "New company ‹text›" is last, only for a non-empty trimmed query, after loading and without an error, when no result equals the text (umlaut-folded on both sides); with zero results it replaces the "No results" line. min-height: var(--touch-target-min), --color-primary text, leading + (aria-hidden), the label truncates with CSS ellipsis and carries title. Choosing it opens the ObjectForm child step with the name prefilled (not dirty); it returns with the item selected and focus on the picker input.
Status: specified for #2215 (full spec: comment on issue #2215; the implementation spec amends it, see the Deviation Log). New shared component ReferenceList (components/ReferenceList/, already in allowedAdditions; the planned entry is consumed in the same PR). Reuse: PageLayout, shared .card, OverflowMenu, Modal/Sheet, ConfirmDialog, Skeleton, EmptyState, FormError, NavAnchor. No new token, no new dialog primitive.
Page layout. PageLayout maxWidth="narrow", h1 "Project setup" (NavConfig main view of Settings: no breadcrumbs, no Back). One column .sections (max-width: 40rem, gap: var(--spacing-6)), left aligned, the same look as Settings > Account. The phone gutter is the shell's 16px (the page adds none), so the column is 343px at 375px and 640px from 768px (912px of room at 1280px). Card padding --spacing-4 on phones, --spacing-6 from 768px. Section order, which is also tab order: House (#house), Cost categories (#cost-categories), Purchase categories (#purchase-categories), Photo orientations (#orientations), then the "Managed on other pages" card with the Trades (#trades) and Areas (#areas) pointer rows. Each card is a <section aria-labelledby> with one tabIndex={-1} h2; there is no tab row and no index column.
Section anchors. #house, #cost-categories, #purchase-categories, #orientations, #areas, #trades. The anchors are the targets the route map already uses (/settings/manage?tab=orientations goes to #orientations). Arriving on one, by hash or by an old ?tab= link, scrolls the section into view (instant under prefers-reduced-motion: reduce) and focuses its h2 (for #trades and #areas pointer rows, the row's anchor). scroll-margin-top: calc(var(--topbar-height) + var(--spacing-4)). A ?tab= link is replaced by its #section with a history replace, so Back is never trapped (D-10); loading the page writes nothing to the URL; ?tab=areas goes to /areas once it is served.
House. One form: House name, House address (textarea, 3 rows), "Language of your entries" (.select: Deutsch, English; default Deutsch in this instance). Each field has a --font-size-xs --color-text-muted hint; the language hint is a complete sentence and the pointer to the app language is a separate "Set the app language in Account" link below it. One Save (.btnPrimary), aria-disabled while unchanged or saving. Success .bannerSuccess (role="status"), error .bannerError (role="alert").
ReferenceList. One card per list, strings all from props (no feature namespace inside the component), parameterized by testIdPrefix and anchorId.
- Header: h2 left (
--font-size-xl, semibold) and New right (.btnSecondaryCompact, visible text "New", accessible name "New ‹item›";min-height: var(--touch-target-min)below 768px and on coarse pointers). One line of--font-size-smmuted description under it. New isaria-disabledwhile the list loads. - Row (
<li>in<ul aria-label>): grid handle, color dot, text, ⋯.min-height: calc(var(--touch-target-min) + var(--spacing-2))(52px),padding: var(--spacing-1) var(--spacing-2),1px solid var(--color-border),--radius-md,--color-bg-primary, hover--color-bg-secondary. Gap between rows--spacing-2.- Handle: a 44 x 44px
<button>with the grip glyph (aria-hidden),--color-text-muted,cursor: grab,touch-action: noneon the handle only,aria-label="Reorder ‹name›", focusbox-shadow: var(--shadow-focus). - Color dot: 12px circle (
--radius-circle,1px solid var(--color-border-strong)), decorative (aria-hidden), only in lists that have color. A row without color keeps an empty dot so names stay aligned. No "#N", no sort number, no "built-in" badge. - Text: name (
--font-size-sm, medium, ellipsis withtitle), optional description (--font-size-xs, muted, 2 lines at most). - ⋯:
OverflowMenu, 44 x 44px,aria-label="Actions for ‹name›". Items: Edit, Move up, Move down, separator, Delete (destructive). Move up isaria-disabledon the first row and Move down on the last, and both while a reorder is pending.
- Handle: a 44 x 44px
- States: loading is
Skeleton lines={3}under the header; a load error isFormErrorplus Retry (focus moves to the h2 first, so it never falls to<body>); empty isEmptyStatewith the message only ("No ‹items› yet."), because the header New is the action. - Sections: Cost categories (name, color, description), Purchase categories (name, color), Photo orientations (name, description).
New / Edit dialog. Modal from 768px (width: min(28rem, 100vw - 2rem) = 448px), bottom Sheet below, footer built once for both. Title "New ‹item›" / "Edit ‹item›". Name is required (visible "(required)" plus aria-required) and takes initial focus; Description (textarea, 3 rows) and Color are shown per list. Color is a native <input type="color"> (44px tall) plus a checkbox "No color": a new item starts with No color checked and the input disabled, an existing item with a color starts unchecked, and saving with it checked stores no color. Nothing is random or preset. Footer: Cancel (.btnSecondary) and Save (.btnPrimary), equal width in the Sheet and right-aligned in the Modal; Save is the dialog's only primary, aria-disabled "Saving…" while busy, never natively disabled. Validation on Save only: an empty name shows its message under the field and focuses it, with no summary banner. Server errors sit in a FormError at the top of the body (a duplicate name has its own sentence) and focus the name. Editing a translated built-in row adds the hint "This name is translated. If you change it, your text is shown in every language."; an unchanged name is not sent, so the translation survives. Closing with changes (Cancel, Escape, backdrop) opens a "Discard changes?" ConfirmDialog that stacks above in open order; the lower dialog is not dismissible while it is open, so one Escape closes only the top one. After Save, the dialog closes, the page's status region announces "‹name› added" or "‹name› saved", and focus goes to that row's ⋯.
Reorder. Three ways, all ending in one request with the full id list. Drag: from the handle, after 4px of movement; the row lifts (--shadow-md, --color-bg-secondary), a 2px --color-primary line marks the drop slot, and the page scrolls near the viewport edge; a plain click on the handle does nothing. Keyboard: Space or Enter on the handle picks up (aria-pressed), Arrow Up/Down move one slot, Space or Enter drops, Escape cancels, blur cancels; each step is announced as "‹name›, position 2 of 5." and focus stays on the handle. No drag: row ⋯ > Move up / Move down. While a request is pending every handle and Move item is aria-disabled. A failure rolls the list back and shows "Couldn't save the new order. Try again." in a .bannerError (role="alert") in the card. Lift and drop transitions use var(--transition-fast) on box-shadow and background only, and none under prefers-reduced-motion: reduce.
Delete. Row ⋯ > Delete opens a danger ConfirmDialog "Delete ‹name›?" with irreversible. Photo orientations show the server-counted consequences (photos using the orientation). Cost and purchase categories show no counts: the server hides the in-use details of a category conflict (the #315 hardening), so when a category is still in use the same dialog switches to its blocked state with one fixed sentence per list and no Delete button: cost categories "‹name› is still used by cost lines or grants, so it can't be deleted."; purchase categories "‹name› is still used by purchases, so it can't be deleted." No number, no list of records, in either state. After a delete, focus goes to the next row's ⋯, else the previous row's, else the section h2.
Pointer rows. One card "Managed on other pages" with a <ul> of full-row NavAnchors (52px minimum, 1px solid var(--color-border), --radius-md, gap --spacing-2): name (--font-size-sm, medium) over a muted --font-size-xs line, and a decorative › on the right. Trades "Managed on Companies" opens the Trades sheet (/companies?trades=1); Areas "Managed on the Areas page" is always shown (routeUrl('areas'), anchor #areas). Hover --color-bg-secondary, focus box-shadow: var(--shadow-focus).
Page-level announcements. One always-mounted, visually hidden role="status" announces added, saved, deleted and reorder positions (no aria-live beside the role).
Baseline. ManagePage primary buttons go from 9 to 2 (House Save and the ReferenceList dialog Save; the interim Areas card went with #2218). handRolledDialogs stays 5. No other count rises.
E2E sizes. Column 343 / 640 / 640px at 375 / 768 / 1280px; card padding 16 / 24 / 24px; card gap 24px; row at least 52px; handle and ⋯ 44 x 44px; dialog Sheet below 768px and a 448px Modal from 768px; no role="tablist"; no "#N" or "Sort order" in the three lists; no horizontal overflow down to 320px. Test ids: project-setup-house, -cost-categories, -purchase-categories, -photo-orientations, -areas, -pointers; per list ‹prefix›-new, -row-‹id›, -handle-‹id›, -menu-‹id›, -move-up-‹id›, -move-down-‹id›, -name, -no-color, -save.
Status: implemented in #2218 (full spec: comment on issue #2218; deviations in the Deviation Log). Route areas (NavConfig areas, Areas › Areas (index) › tree). New shared component TreeTable (components/TreeTable/, TreeTableGroup.tsx); the colour control is components/ObjectForm/ColorField.tsx (ObjectForm kind: 'color', also used by the ReferenceList dialog). No new token, no new dialog primitive.
Page. PageLayout default width, h1 "Areas", no breadcrumbs. Header action "New area" (.btnSecondaryCompact, 44px below 768px and on coarse pointers, aria-disabled while loading) is the only trigger of the form; the form's Save is the page's one primary button. Description under the h1 (--font-size-sm, --color-text-muted, 4px below the h1). Tab order: New area, filter, tree.
TreeTable. A card (--color-bg-primary, 1px solid var(--color-border), --radius-lg, overflow: hidden, no shadow) holding nested <ul aria-label> lists; every row is a <div> inside its <li>, and a collapsed child list is hidden, not unmounted, so aria-controls resolves. Not a treegrid (every row has interactive cells). Rows come from props (id, parentId, label, cells, quiet, muted); all strings are props; testIdPrefix parameterized. Layout is chosen twice from one 768px breakpoint (CSS grid and useMediaQuery, which reads synchronously, so nothing flashes); the dev-team-lead accepted the JS switch because the handle and header are not rendered on phones.
- From 768px:
44px handle | indent + toggle + dot + name | cells | 44px actions; header row (aria-hidden,--font-size-xs, semibold, muted,--color-bg-secondary) uses the same template; cells are fixed-basis (6.5rem;8remand Photos9remfrom 1024px); each cell has a visually hidden label. Rowmin-height52px, hover--color-bg-secondaryunder(hover: hover). - Phone: line 1
toggle | dot | name | ⋯, line 2 the cells with visible labels ("Tasks 3 of 7 open"),flex-wrap,--font-size-xs,--color-text-secondary; no handle or header. Reorder is ⋯ > Move up / Move down. - Indent per level
--spacing-6(--spacing-4on phone) on toggle, dot and name only, capped at depth 4 (phone 3) withmin(var(--depth), var(--tree-max-depth));--depthis set inline. - Toggle:
<button aria-expanded aria-controls aria-label="Sub-areas of ‹name›">, 1.5rem visible box with a 44px hit area (padding/negativemargin), chevron rotates 90deg with--transition-fast. Dot: 0.75rem,--radius-circle,--color-border-strongborder, fill from the one inline--tree-color; empty when the area has no color. Count cells: tabular numbers, "None" muted when the total is 0, no red/green. -
Quiet rows (items booked on the area itself and the area has children): first
<li>of the group, no toggle, handle or ⋯, muted text,min-height: 2.5rem, never reorderable, hidden while filtering. Labels by depth: "Whole building (no floor)", "Whole floor (no room)", "‹name› itself (no sub-area)". -
Reorder within one parent only, never across parents, by handle drag, keyboard (as ReferenceList) or the ⋯ menu; disabled with the hint "Clear the filter to reorder." while a filter is active. The drop slot is a 2px
--color-primaryline; the lifted row uses--shadow-mdand--color-bg-secondary. The line must be drawn in a layer above the row (a pseudo-element), not as aninset box-shadowon the<li>, because the row's border and hover background paint over a shadow on the parent. Motion: only the chevron and the lift, both--transition-fast, both off underprefers-reduced-motion: reduce; expand and collapse are instant.
Filter. type="search", 44px tall, 16px font (no iOS zoom), visually hidden label "Filter areas", data-page-search (the one page field, so the shell / focuses it), max-width: 24rem from 768px. Composes DataTable's .searchInput. It has its own 44px clear button, so the native ::-webkit-search-cancel-button must be hidden or two × show. Matching folds case and umlauts (searchHighlight); a match shows <mark> as semibold with a 2px --color-primary underline, no fill; ancestors of a match stay visible and muted; every ancestor is force-expanded. One always-mounted role="status" (never also aria-live) says "n areas match" / "No areas match ‹query›." and carries the added, saved, restored and reorder messages. No match: text and a secondary "Clear filter" in the card, focus stays in the field.
Form. Shared ObjectForm (Modal from 768px, full-screen Sheet below). Essentials Name (required) and Part of (AreaPicker, first option "Top level (no parent)", the area and its sub-areas excluded when editing, AreaBreadcrumb variant="path" under it); More details Color (ColorField: native <input type="color"> 44px tall plus a "No color" checkbox, starting on no color) and Description. Duplicate sibling names are checked on Save with the same fold and again from the server 409; the message is under Name with focus there. Opened by page state, with no /areas/new route and no New-menu entry; row ⋯ "Add sub-area" pre-fills Part of.
Delete. Row ⋯ > Delete opens the shared ConfirmDialog. Blocked (tasks or purchases in the area or a sub-area): no Delete button, one "Close", the counts, and 44px "Show these tasks" / "Show these purchases" links (NavAnchor + routeUrl with areaId, each only when its count is above 0; following one closes the dialog). Otherwise a danger confirm with the shared consequences list (sub-areas deleted with it, photos that lose their area). Every successful delete shows the Undo toast (shared UNDO_TOAST_MS; the server token lives 30 s). The toast is already a live region, so the page does not also announce the delete; Undo posts no toast, so the page announces "‹name› restored".
Focus. After Save: the row's ⋯ (the parent is expanded and the row scrolled into view, instantly under reduced motion). After delete: next sibling's ⋯, else the previous sibling's, else the parent's, else New area. After Undo: the restored row's ⋯. A load error focuses the h1. Dialogs inherit trap, Escape (topmost only) and focus return from Modal/Sheet/ConfirmDialog.
Baseline. AreasPage: primary buttons 1 (the form's Save), search fields 1, destinations 0 (NavAnchor is not counted). ManagePage primary buttons 4 to 2. sharedComponents +1 (TreeTable/TreeTable); ColorField is a file in the existing ObjectForm component folder.
E2E sizes. Row at least 52px; handle, toggle, ⋯, filter clear and New area 44 x 44px; no horizontal overflow at 320px with long names (names ellipsize, counts wrap); no role="treegrid".
Status: specified for #2217 (full spec: comment on issue #2217; the implementation spec amends it, see the Deviation Log). No new shared component and no new token. Reuse: PageLayout, shared .card, Badge through useStatusBadgeVariants, Skeleton, EmptyState, NavAnchor, .bannerWarning, .btnSecondaryCompact. New shared CSS: .factList, .factRow, .factLabel, .factValue in shared.module.css, moved from Account (ProfilePage), which now composes them.
Read-only. Every integration is set by environment variables when Cornerstone starts. The page shows status, says what to set, names the variables and links the setup guide; it cannot change anything. No form, no input, no primary button. The only buttons are "Check again" (Paperless, only while it can't be reached) and the load error's "Try again". Secrets never reach the browser, not even "a key is set"; addresses are shown as host only (the public address and the redirect and server addresses without user info). The environment variable names appear on this page only; the names come from the server's env arrays, never from client code.
Page layout. PageLayout maxWidth="narrow", h1 "Integrations" (NavConfig view of Settings, admin only: no breadcrumbs, no Back). A one-paragraph intro (--font-size-sm, --color-text-secondary) states the read-only rule, then one column .sections (max-width: 40rem, gap: var(--spacing-6)), left aligned: 343px at 375px and 640px from 768px (912px of room at 1280px), the same as Account and Project setup. Nine cards, in this order, which is also tab order: Paperless (#paperless), AI (#ai), Single sign-on (#single-sign-on), Calendar & contacts sync (#calendar-contacts), Automatic backups (#automatic-backups), History (#history), Currency & VAT (#currency-vat), Photo storage (#photos), Public address and proxy (#public-address). Each card is a <section aria-labelledby> with one tabIndex={-1} h2 (‹anchor›-heading); anchors behave as on Project setup (scroll into view, instant under prefers-reduced-motion: reduce, focus the h2, nothing written to the URL, an unknown hash does nothing). Card padding --spacing-4 on phones, --spacing-6 from 768px.
Card anatomy. Header row (h2 --font-size-xl semibold, status chip beside it, wrapping under it on a narrow phone) · purpose line (--font-size-sm, --color-text-muted) · optional .bannerWarning notice (static text, no live role) · facts <dl> (Account's recipe; label above value below 768px; none when the integration is not set up) · optional in-app NavAnchor row · setup block: border-top: 1px solid var(--color-border), h3 "How to set it up", a hint sentence, a "Required" / "Optional" <dl> of variable names, and the docs link. The setup block is not a tinted panel, so the link stays on --color-bg-primary (--color-primary on it is 5.17 / 5.75). Variable names, the redirect address and the server address are <code>: monospace as in DavAccessCard, --font-size-xs, --color-bg-secondary, 1px solid var(--color-border), --radius-sm, overflow-wrap: anywhere, user-select: all. A card with no variables says "No setup needed on the server."
Status chips (one vocabulary integrationStatus, colours only from statusBadgeVariants.tsx; labels under common:integrationStatus.*, not statusVocabulary, because they are system states and not record statuses): Connected and On = success; Can't connect = warning (an outside service, not a Cornerstone error); Off and Not set up = neutral. Text is always the label. AI and single sign-on are On/Off and never "Connected": Cornerstone does not call the AI provider or the login service to test them. Only Paperless is probed (its existing status endpoint, 5 s cap). The last-run chip of automatic backups is the second vocabulary backupRun (Succeeded = success, Failed = error), shared with the Backups page.
Paperless states. Not set up: chip and setup block only. Probe running: chip is a one-line Skeleton. Connected: facts Address (host) and Filter tag (name, or "None"). Can't connect: .bannerWarning with a fixed plain sentence (the raw server error is never shown) and "Check again" (.btnSecondaryCompact, 44px on phones and coarse pointers); busy is aria-disabled "Checking…", never natively disabled, focus stays on the button; the result is announced in the page role="status" ("Paperless is connected." / "Still can't connect to Paperless."); on success the button unmounts and focus goes to the Paperless h2. Filter tag not found: when PAPERLESS_FILTER_TAG is set, Paperless is reachable and the status returns no tag, a second .bannerWarning says no documents are shown until the tag exists (since #2210 a missing tag hides every document, so it is the most useful Paperless fact for an operator).
Load states. Each card renders its h2 at once with Skeleton lines={3} so anchors exist while loading. Whole-page load error: the cards are replaced by an EmptyState (messageAs="h2", focus moved to it, "Try again"), using the AuthCheckFailed recipe (button never disabled or unmounted while retrying, "Trying again…" and "Still not working" in the role="status"); on success focus goes to the Paperless h2. A member gets the "No access" page in place.
Cross-screen rules (AC2, AC5). With Paperless or AI not configured, no work screen shows an environment variable name or a disabled button. A Documents section with Paperless off and no links renders nothing; with links it shows the heading and count, read-only cards (no View, Unlink, Itemize or type control), and the sentence "Paperless is not connected. ‹n› links are kept." followed, for admins only, by the IntegrationsLink "See Integrations" (a member gets the sentence alone). The quotation dialog hides the Source document section when Paperless is off and the AI block when AI is off. The Backups page says "Automatic backups are off." with the admin link to #automatic-backups; its status chip is the shared On/Off chip. IntegrationsLink (navigation/) renders only for admins.
Dark mode / contrast (light / dark): variable names on --color-bg-secondary 16.98 / 11.45; muted on the card 5.77 / 5.71; muted on --color-bg-secondary 5.52 / 4.89; link on the card 5.17 / 5.75; info chip text 9.37 / 6.97. Layer 2 tokens only, no override block. The three pairs on --color-bg-secondary and the link belong in the #2200 contrast test. Motion: none added.
Accessibility. One h1, one h2 per card, one h3 "How to set it up" per card (identical by design). Docs links open in a new tab with aria-label "Read the setup guide for ‹card› (opens in a new tab)" (visible text is a prefix of the name) and an aria-hidden ↗. One always-mounted visually hidden role="status" (no aria-live beside the role). Focus is never left on <body>. Colour is never the only cue.
Baseline. IntegrationsPage enters at destinations: 0 (the analyzer counts only react-router Link/NavLink tags and array literals with to; NavAnchor does not count), primaryButtons: 0, searchFields: 0. ProfilePage and BackupsPage do not rise.
E2E sizes. Column 343 / 640 / 640px at 375 / 768 / 1280px; card padding 16 / 24 / 24px; card gap 24px; nine section cards in the order above; docs link, in-app links, Check again and Try again at least 44px on touch; no role="tablist", role="dialog", form, input or .btnPrimary; zero button elements when Paperless is reachable; no horizontal overflow down to 320px. Test ids: integrations-page, integrations-intro, integrations-status, integrations-retry; per card integration-‹anchor›, -status, -fact-‹name›, -env, -docs, -recheck (Paperless), -link (in-app link).
Status: implemented in #2221 (full spec: three comments on issue #2221, amended by the dev-team-lead spec; deviations in the Deviation Log). Route ids diaryEntryNew and diaryEntryEdit are served by one page, DiaryCapturePage, which renders components/diary/CaptureScreen/CaptureScreen.tsx. No new token. Retired: DiaryEntryForm, DiaryEntryTypeSwitcher, PhotoMetadataModal, PhotoUpload, DiaryEntryCreatePage, DiaryEntryEditPage.
New shared components (all strings are t() keys in diary and photos; testIdPrefix parameterized): photos/PhotoStrip (strip, PhotoTagSheet, PhotoAnnotateDialog, PhotosWaitingNotice), photos/TagChips (Area and Orientation chip rows), RapidCamera, DateChips, TimeChips, StickyActionBar, diary/CaptureScreen (with EntryTypeChips and SiteDetailsFields as helper files). AutosaveIndicator gained variant="text" and its own styles module. FilterChipGroup gained layout: 'scroll' | 'wrap', deselectable, labelledBy, tone: 'default' | 'onPhoto' and options[].action (see FilterChipGroup above). Uploads and the on-device store live in client/src/capture/ (CaptureUploadProvider, mounted once in App.tsx; wiki Architecture); new-area / new-orientation dialogs come from TagCreateProvider.
Page. PageLayout with h1 "New entry · ‹weekday date›" (U+00B7; "Edit entry · …" for a saved entry), derived from the date state in the same render as the date chip, and a ⋯ OverflowMenu ("Discard entry", drafts and new entries only). Three modes: new (nothing written until the first photo, or the first character of title or text), draft (autosave, type changeable) and saved-entry edit (no autosave, type shown as DiaryEntryTypeBadge, "Save changes", Cancel with "Discard changes?"). A signed or automatic entry shows EmptyState and no form. One column (343px at 375px; max-width: 40rem from 768px), two columns minmax(0, 3fr) / minmax(0, 2fr) with --spacing-8 gap from 1024px (photos and tags left, the rest right); DOM order is the tab order. Sections are flat on the page background, --spacing-5 apart.
Order. Photo controls ("Take photos", "Choose from library"; both .btnSecondary, 44px, side by side; from 1024px a dashed drop zone 2px dashed var(--color-border-strong) with the hint "or drop photos here") · waiting line · strip · "Tags apply to …" row (Select all / Clear selection) · Area and Orientation chips · Date · Title (chips, input) · Text · Entry type · Site details · More details · sticky bar. Group labels are <span id> + role="group" + aria-labelledby, never headings; the only h2 is "Site details".
Chips. FilterChipGroup everywhere (layout="wrap", deselectable); action chips (Other…, New area, New orientation, Pick, Other time, More) have a dashed border and no aria-pressed. A pressed chip inverts (--color-bg-inverse), so colour is never the only cue. Area: up to 4 recent areas, then Other…, New area. Orientation: all of the household's orientations, No orientation, New orientation (more than 8: the 6 most recent, then Other…). Recents are per user in localStorage, never carried into the next new entry. Sticky rule: a chip applies to photos added from then on and, with nothing selected, retroactively to photos that have no value for that dimension or whose value came from an earlier retroactive apply; with a selection it applies only to the selected photos; a tag set at capture time, in the photo sheet or by a subset keeps its value.
Strip. Grid repeat(auto-fill, minmax(5rem, 1fr)) (6rem from 768px), --spacing-2 gap, square tiles --radius-md. Each tile: open button (name "Photo 3 of 5, ‹area›, ‹orientation›, annotated, uploading 40%"), select checkbox and Remove (visible box small, 44x44 hit area by padding / negative margin or a pseudo-element), area tag overlay (--color-photo-overlay-caption), state pill ("Waiting", "Failed", "Can't be added"), a native <progress> bar while uploading, and Retry on a failed tile. States use the dark --color-photo-* tokens (they do not flip with the theme). Selected tile: 2px --color-primary border plus the check. Remove on an uploaded photo shows the Undo toast "Photo removed." (no confirm); on a waiting or failed tile it just drops the item. Focus after removal goes to the next tile's open button, else the previous, else "Choose from library".
Photo sheet. Tile open: bottom Sheet below 768px, Modal from 768px (useWideDialog); title "Photo n of m", Previous / Next 44px icon buttons in the header; preview (max-height: 40vh), Area and Orientation pickers (nullable), Caption, "Annotate" (.btnSecondary, aria-disabled with the reason until uploaded), "Remove photo", footer "Done" (.btnSecondary: the sheet adds no primary button). Changes apply at once (caption on blur or Done). "Annotate" opens PhotoAnnotateDialog (the existing PhotoAnnotator in a full-screen Sheet below 768px, Modal from 768px).
RapidCamera. Sheet variant="fullScreen" below 768px, a 40rem Modal with a 4:3 stage from 768px; off-theme chrome from --color-photo-* only (stage --color-photo-stage-bg, bars --color-photo-bar-bg, controls --color-photo-control-bg, text --color-photo-text, focus --color-photo-focus-ring). Top bar: "Use camera app", the shot counter (aria-hidden), "Remove last photo", Done. Stage: <video playsinline muted> (aria-hidden). Control row: decorative thumbnail tray, the 4.5rem shutter (aria-label "Take photo", initial focus, Enter / Space operate it), and Switch camera / Flash only when the device offers them. Live Area and Orientation chips (tone="onPhoto", same sticky values as the page) sit over the lower part of the stage. A shot is a JPEG at the stream's resolution, stored in IndexedDB at once, tagged with the live chips, and announced "Photo n taken." in a role="status" region; a 100 ms flash (opacity 0.35) and a haptic tick, both off under prefers-reduced-motion. Permission denied, unsupported or busy: the stage shows a message panel with "Use camera app" (a fresh tap, because iOS blocks an automatic input.click() after an await) and Done; a denial is remembered for the session, after which "Take photos" opens the native camera input directly. Without getUserMedia the button goes straight to the native input.
Date, title, text. DateChips: Today · Yesterday · Pick (an inline native date input, max = today); the date is always visible on a chip, as "Pick · 12 Oct", and in the h1; back-dating is at most 2 taps. Title chips: up to 6 recent distinct titles from the household's latest saved entries (a chip fills the input; deselectable); the input has a hidden label. Text is optional. Save needs a title, text or an uploaded photo (the reason is the button's description; "Wait until a photo has finished uploading." while only waiting photos exist).
Same title and day. Below the Title input, 500 ms after the last change of date or title: a quiet row per match (--color-bg-secondary, 1px solid var(--color-border), --radius-md, --spacing-3), "You already have an entry called ‹title› on ‹date›.", type and photo count, and .btnSecondaryCompact "Add to that entry instead" (44px on phones). Not an alert, no focus move, no dialog, 0 taps when ignored. The action moves the draft's photos (waiting files from the store, uploaded ones fetched back with GET /api/photos/:id/file, annotation re-applied) and text to the match, deletes the draft and opens the match; a failure leaves the draft and offers "Open that entry".
Entry type. Daily log · Site visit · Delivery chips and a "More" action chip opening an OverflowMenu choice group with Defect and Note (stored issue and general_note; labels from statusVocabularyDiaryType); when one of those is current, the fourth chip shows its name, solid and pressed-looking. Switching a draft's type whose filled details the new type drops asks the shared ConfirmDialog (tone="danger"): "Switch to ‹type›?", "‹Type› entries don't keep these details. They will be removed:" and the list; "Keep editing" / "Switch type"; no Undo. Nothing is asked when nothing would be lost. Cancel focuses the still-pressed chip (next frame, after the dialog's own focus return).
Site details. Daily log: Company (up to 4 ranked suggestions: companies used with the same title, then companies with tasks on the same floor; nothing pre-selected; "Other company…" opens the company picker with "New company ‹text›"), Workers 1 · 2 · 3 · 4+ (4+ reveals a number input that keeps focus while typing), Start and End TimeChips (recent times, Now, Other time) with "Duration: 6 h 30 min" and "End must be after start."; More details: Weather chips, Temperature, Add signature. Site visit: Inspector and Outcome (both required on Save), times; More details: signature. Delivery: Company, Materials, "Delivered as expected". Defect: Severity (required) and Status (Open · Being fixed · Fixed, new entries and drafts only). Note: none. The "More details" disclosure uses the ObjectForm recipe, closed by default, with a "· n set" count.
Sticky bar. StickyActionBar: position: fixed with an in-flow spacer, because the shell's main column is the scroller and never scrolls the page (a sticky bar would not pin). left / width are measured from the spacer; bottom: var(--shell-bottom-height, 0rem); the safe-area inset is added only when the shell bottom bar is not shown. Background --color-bg-primary, 1px solid var(--color-border) top, --shadow-md, --z-dropdown. It publishes its height as --sticky-action-bar-height, which the Toast container adds to its bottom offset so an Undo toast never covers Save. Left: the visible status text (aria-hidden: "Saved 14:32", "Couldn't save. Trying again." + Retry, "You're offline. …"); right: Cancel (saved-entry edit), Retry, and "Save entry" / "Save changes" (the page's one visible .btnPrimary, 44px). Below 480px the content stacks and the actions go full width. One always-mounted visually hidden role="status" (no aria-live, no aria-atomic, data-testid="capture-status") announces only the first save, failures, recoveries, uploads, tagging results, date and type changes and the same-title notice; individual autosaves are silent.
Persistence and uploads. Every photo (camera or library) is written to IndexedDB before upload; the draft is created on the first photo or character; uploads run app-wide (up to 3 at once, 3 automatic retries) and resume after a reload; "n photos waiting to upload" with "Retry now" shows above the strip and on the entry page. A write failure keeps the file in memory with the tile label "Not saved on this device" and a warning; the browser's beforeunload warning is the only leave guard, and only for memory-only photos and a dirty saved-entry edit (there is no in-app navigation blocker). Discard clears the stored files and the dialog counts waiting photos.
Accessibility. One h1. Every chip, tile control, Retry, Remove and ⋯ has a 44px target. Tab order follows the DOM order above. Dialogs follow Modal / Sheet focus rules; a control removed by its own result hands focus on. Pressed chips set aria-pressed; action chips name what they open. Failed uploads carry the word "Failed". No horizontal overflow at 320px. prefers-reduced-motion removes the flash, the shutter scale, the drop-zone transition and smooth scrolling.
Baseline. DiaryCapturePage: destinations 0, primaryButtons 3 (the analyzer sums .btnPrimary over the import closure: PhotoAnnotator, SignatureCapture and ObjectForm each count one; only "Save entry" is visible), searchFields 0. DiaryEntryCreatePage and DiaryEntryEditPage leave the screen list. Reserved names used: CaptureScreen, TagChips, RapidCamera.
Entry points (#2222). One +, one sheet: the phone New Sheet (CreateSheet) opens with a "Log now" group under its title, three tiles Photo · Note · Delivery (QuickLogTiles, a helper file in components/CreateMenu/), then a divider and the unchanged rows (Money-only rows still last and only on Money pages). Tiles are links (NavAnchor) in a 3-column grid, min-height: calc(var(--spacing-10) * 2) (80px), --radius-lg, 1px solid var(--color-border-strong) on --color-bg-secondary; the last used tile (per device, localStorage) moves first and takes 2px solid var(--color-primary) on --color-primary-bg (its name is "‹label›, last used"; the position is the second cue; tiles are not .btnPrimary). Hover only under (hover: hover), focus --shadow-focus; the first tile is focused on open. A tile opens /diary/new?start=photo|note|delivery, plus the page's areaId but never its date. The capture screen applies start once and strips it with replace: Photo opens RapidCamera when the live camera is usable, otherwise focus goes to "Take photos" (or "Choose from library" without a camera) and nothing opens by itself; Note and Delivery set the type and focus the Title field; nothing is written until content exists. /diary/new?areaId=‹id› presets the Area chip (contract for the Home "Where are you?" chips). "Log today" is the Diary page header's primary link (relabelled from "New Entry"); on a computer both it and New › Diary entry open the same capture page (two columns from 1024px). Baseline: no component or count change.
E2E sizes. Tile 80px at 375px (4 across), 96px minimum from 768px; shutter 72px; chips, Retry, Remove, select, Done, Save and ⋯ at least 44px; sticky bar bottom equals the shell bottom bar top below 1024px; no role="tablist"; test ids capture-screen, capture-take-photos, capture-choose-photos, capture-title-input, capture-save, capture-status, rapid-camera-shutter.
Status: implemented in #2223 (full spec: comments on issue #2223). New shared component FeedRow (components/FeedRow/, reserved in the pattern baseline's allowedAdditions) with the wrapper SystemEventFeedRow; wording lives only in lib/systemEventText.ts (renderSystemEvent, pure, t and formatters injected). New shared CSS .bannerInfo in shared.module.css (info banner: --color-primary-bg, 1px solid var(--color-border), --radius-md, --spacing-3; pair with .bannerRow and a text dismiss button).
Row. FeedRow is not a link and not a card: a plain <li> (or <div> on the entry page and the Dashboard card) with border-left: 3px solid var(--color-diary-automatic-border), --color-bg-secondary fill (not --color-diary-automatic-bg, whose muted-text contrast is lower), --radius-md, --spacing-3. Line 1 the type Badge (neutral), optional extra badges, the time at the end (--font-size-xs, muted, tabular numbers); line 2 the sentence (--font-size-sm, primary text; stored legacy English text is shown as written in --color-text-secondary); optional detail lines (--font-size-xs, secondary); then one link row (text link, --color-primary, medium weight, a trailing ›, 44px hit area, --shadow-focus) or a muted "No longer exists". Only the link row is interactive, so there are no nested links. The Dashboard card uses the compact variant (no link row); the entry page omits the time.
Wording. Plain words, glossary canon, status words only from the statusVocabulary key sets, dates with formatDate, amounts with formatCurrency (a detail line for "Invoice recorded", inside the sentence for payments). Templates: "‹name› went from ‹from› to ‹to›" (task, invoice, grant, with the object noun and number where there is one), "Progress payment of ‹amount› for invoice ‹number› went from ‹from› to ‹to›" (no ordinal: nothing stores it), "‹Milestone› is ‹n days late›. Projected ‹date›, target ‹date›.", "Invoice ‹number› recorded for ‹Company›". A missing name uses the existing "Untitled …" fallbacks; the name is the snapshot stored with the event. Type badge and History filter chip use the same words, from the glossary historyEventType group: Task status · Invoice status · Grant status · Invoice recorded · Milestone moved · Over budget (the Diary list's "Automatic" chip is now History).
Links. "Open task / invoice / offer / milestone / grant / progress payment / refund"; the accessible name starts with the visible text and adds the subject ("Open progress payment of ‹amount› for invoice ‹number›, ‹date›", unique per payment). A progress payment has no page: its link opens the invoice with ?payment=‹id›; the invoice page scrolls to the row (instant under prefers-reduced-motion), focuses it (tabIndex=-1), highlights it for 3 seconds (tint plus a 2px --color-primary ring), strips the param with replace, and shows a dismissible .bannerInfo in a role="status" region when the payment no longer exists. The shared hook is useQueryTargetHighlight.
Collapsed history. Exact repeats are one row with a neutral "×N" badge (aria-hidden) and the visible line "N times, ‹date› to ‹date›" (or "N times on ‹date›"); there is no occurrence list, because the server returns only the count and the first and last time. Delay events logged after a milestone was reached are hidden by default; one line above the feed ("n later delay notes are hidden." with a "Show hidden" button) reveals them: aria-pressed, 44px, a polite role="status" announcing the result; revealed rows carry the "After reached" badge and "Logged after the milestone was reached.". The line is one per feed (the total can exceed what infinite scroll has loaded) and is absent on the Dashboard card.
Integrations > History card. Always the "On" chip, the purpose "Records changes to your project automatically in History.", the hint "History is always on. It can't be turned off.", no variables ("No setup needed on the server.") and no docs link; the API object diaryEvents stays with enabled always true and the client ignores it.
Baseline. sharedComponents +1 (FeedRow/FeedRow); no count rises.
Status: implemented in #2225 (full spec: comments on issue #2225; deviations in the Deviation Log). No new token and no new sharedComponents entry: FeedGroup (components/FeedRow/FeedGroup.tsx) and the adapter DiaryEntryFeedRow (components/FeedRow/DiaryEntryFeedRow.tsx) sit beside FeedRow. Retired: DiaryDateGroup, DiaryEntryCard, DiaryEntryTypeBadge, DiaryFilterBar, DiaryMetadataSummary, and the outcome and severity badge components.
FeedRow variant="entry". A second branch of the same component (variant defaults to 'event'; the event markup is unchanged). A person's diary entry, photo first. The row (.entryRow) is an <li> (as="div" elsewhere): --color-bg-secondary fill, --radius-md, --spacing-3 padding, border-left: 3px solid var(--color-border) (neutral; the coloured left border stays with system events), hover changes the left border to --color-border-strong and adds --shadow-sm (the fill does not change: --color-bg-hover equals --color-bg-secondary); transition --transition-fast on border-color and box-shadow, only under prefers-reduced-motion: no-preference. Anatomy, top to bottom in the body column:
- Meta line: coloured type
Badge(variant mapdiaryType), optional extra badges (Draft), the date at the end (--font-size-xs, muted,formatDayMonth). - Title: the row's one link (
NavAnchor,--font-size-base, semibold,--color-text-primary, two-line clamp). Its::afteris stretched over the whole row (inset: 0), so the row is one click target and nothing interactive is nested in it. Accessible name: title plus date (diary:row.linkName). - One line of text (
--font-size-sm,--color-text-secondary, single line with ellipsis). - Facts (
--font-size-xs,--color-text-muted): company, worker count, then the signed mark (check glyph plus "Signed"), joined with " · ". - Area chips: text only (
AreaBreadcrumb variant="path"),--radius-full,--color-bg-tertiary,--font-size-xs; a capped number, then a "+n" chip. Chips are not links (the row is the link). - Visually hidden photo count (
diary:row.photos).
Thumbnail strip (decorative: aria-hidden, empty alt): up to 5 photos (DIARY_LIST_THUMBNAIL_LIMIT) plus a "+n" tile (photoCount - thumbnails.length; --font-size-sm, semibold, --color-bg-tertiary), --radius-sm, 1px --color-border outline. Below 768px the strip sits above the body as a 6-column grid (tiles at most 4rem); from 768px the row is a two-column grid (auto 1fr, gap --spacing-4) with the strip first as a row of 3.5rem tiles. Without photos (data-has-strip absent) the row is a single column at every width.
States: hover as above; active-filter chips and the entry page's area chips use --color-primary-hover text for AA contrast; focus is the row ring, box-shadow: var(--shadow-focus) on .entryRow:has(.titleLink:focus-visible) (the link's own outline is off; engines without :has() get the ring on the link's ::after). Rows stay <li> in a plain <ul> with no role="article" (see the Deviation Log). Dark mode: semantic tokens only, nothing to override.
FeedGroup. A dated group of feed rows: <section aria-labelledby>, an <h2> and a <ul> of <li> rows (the host passes the rows; testId is required, date-group-<key>). Heading: --font-size-lg (--font-size-base below 768px), semibold, --color-text-primary, border-bottom: 2px solid var(--color-border-strong), --spacing-4 below (--spacing-3 on phones). Optional muted detail after the heading (--font-size-sm, normal weight, --color-text-muted) and an optional visually hidden suffix (", 4 entries"), so the heading's accessible name carries the range and the count. Rows are --spacing-3 apart (--spacing-2 on phones); groups --spacing-8 (--spacing-6 on phones). Site diary groups are ISO weeks ("This week", "Last week", "Week of ‹day month›", detail = formatDayRange); History groups are days.
Diary Badge variant maps. Colour comes only from useStatusBadgeVariants() (components/Badge/statusBadgeVariants.tsx), never from a local map:
| Key | Values | Classes (Badge.module.css) |
Tokens |
|---|---|---|---|
diaryType |
daily_log, site_visit, delivery, issue, general_note
|
.diaryDailyLog, .diarySiteVisit, .diaryDelivery, .diaryIssue, .diaryGeneralNote
|
--color-diary-<type>-bg / -text; no border |
diaryType (automatic types) |
work_item_status, invoice_status, invoice_created, milestone_delay, budget_breach, auto_reschedule, subsidy_status
|
.diaryAutomatic |
--color-diary-automatic-bg / -text, 1px solid var(--color-diary-automatic-border)
|
diaryOutcome |
pass, fail, conditional
|
.pass, .fail, .conditional
|
existing outcome pairs |
diarySeverity |
low, medium, high, critical
|
.low, .medium, .high, .critical
|
existing severity pairs |
Labels come from the union key sets (manual types the canonical type words, automatic types the diary words via diaryEntryTypeLabelKey); no emoji, and the type is always text, never colour alone.
Photo viewer: Annotate and stacking. The Annotate control in the info bar is a text button (.textButton: pencil plus the word "Annotate", min-height: var(--touch-target-min), dark-surface tokens --color-photo-bar-bg / --color-photo-text, hover --color-photo-active-bg, focus 0 0 0 2px var(--color-photo-focus-ring)). When unavailable it is aria-disabled="true" (never disabled, so it stays focusable), opacity 0.5, a click does nothing, and the reason is visible text under it (.annotateReason, --color-photo-text-muted, --font-size-xs) tied by aria-describedby. Stacking rule: .mainViewer is its own stacking context (isolation: isolate); the prev/next arrows are z-index: var(--z-raised) and the details panel z-index: var(--z-dropdown), so an arrow can never paint over the panel. On phones the info bar reserves room for the fixed details toggle with padding-inline-end: calc(var(--touch-target-min) + var(--spacing-4) + var(--spacing-2)). Guarded by E2E bounding-box tests at 1280, 768 and 390px.
Status: implemented in #2226 (full spec: comments on issue #2226; deviations in the Deviation Log). New shared components: AreaLink (components/AreaLink/) and PhotoDetailsPanel (components/photos/), both approved allowedAdditions. Helpers, not counted: SpotSelectGrid (components/SpotThumbnail/), PhotoBulkTagSheet (components/photos/PhotoStrip/), the App-root PhotoDialogsProvider / usePhotoDialogs() (Annotate in the spot viewer and the bulk dialog open through it) and useImmersiveShell. Retired: PhotoMetadataSidepanel. No new token: every colour on the dark photo surface is a --color-photo-* token; the Photos page itself uses semantic tokens only.
AreaLink. The one link from a photo surface to an area: a NavAnchor to routeUrl('area', { id }) (the Area page, since #2251). Passes useOriginState(). Accessible name: the visible area name, then the visually hidden suffix ", open area" (photos:spots.areaLinkSuffix); for a plain-text name the link carries the joined name as aria-label ("‹name›, open area"), otherwise the suffix is an srOnly span. Default tone: inherits the text colour, underline --color-border-strong, hover --color-primary with a currentColor underline, focus --shadow-focus. tone="onPhoto": --color-photo-link, underline currentColor, no hover colour change. Used in the Photos page area headings and bands, the details panel and the entry-page viewer. Row and band hosts pass className for a 44px hit height (min-height: 2.75rem).
Spots matrix and the 'No area' group. Groups come from buildSpotGroups; the 'No area' group is a normal group, always last, with no banner, warning or Tidy-up. Table (from 768px): a band th scope="rowgroup" labelled "No area" (sticky label) with a quiet "Select photos" text button (44px, --color-primary text, underline on hover, --shadow-focus), and a row header showing "‹n› photos". Phones: the group chips (FilterChipGroup, "All" plus one chip per group) and cards; the 'No area' card heading carries the count and the same text button. Every cell of the 'No area' row links to the whole group at that cell's latest photo (see the Deviation Log). A live region announces the shown group when the chip changes.
Select mode (only in the 'No area' group). "Select photos" toggles to "Done"; the group's cells are replaced by SpotSelectGrid: a <ul role="group" aria-label="Photos with no area"> of selectable tiles, newest first, 3 columns (4 from 640px, 6 from 1024px), gap: var(--spacing-2). A tile is SpotThumbnail with select (a <label> around a visually hidden checkbox whose aria-label is "Photo from ‹date›, ‹orientation›"), 4:3, --radius-md, at least 44x44. Selected has three cues, none colour-only: a filled check badge (24px circle, --color-primary fill, --color-primary-text check; unselected: --color-bg-primary fill, --color-border-strong border), a --color-primary-bg overlay at 0.4 opacity, and an inset 3px --color-primary ring. Hover: thumb border --color-primary. Focus: --shadow-focus on the tile (:has(.checkInput:focus-visible)). Photos of a signed entry are not selectable: no checkbox, not focusable, 0.6 opacity and the muted "Signed entry" label. Loading: Skeleton with a label; error: FormError plus a btnSecondary "Try again". Badge transitions use --transition-fast and are off under prefers-reduced-motion.
Selection bar. With at least one tile selected, StickyActionBar (status "‹n› photos selected", announced through its role="status") holds, in order: "Select all" (btnSecondaryCompact; selects the unsigned photos), "Clear" (btnSecondaryCompact), "Set tags" (btnPrimary, the page's one primary). Finishing or leaving select mode clears the selection.
PhotoBulkTagSheet. "Set tags for ‹n› photos": a Modal from 768px, a bottom Sheet below (useWideDialog). Two fields, both defaulting to "Leave as is" (SearchPicker specialOptions): Area (AreaPicker) and Orientation (OrientationPicker, which also offers "No orientation" to clear). A hint line (--color-text-secondary) says photos move to their spot when saved. Footer: Cancel (btnSecondary) and Save (btnPrimary, aria-describedby the hint; disabled while both fields are "Leave as is" or busy), both 44px high. The dialog is not dismissible while busy, errors show in FormError, and nothing is half saved (one request). Initial focus is the Area input; focus returns to "Set tags". After a save: the selection clears, the Undo toast reads "‹n› photos moved to ‹area path› · ‹orientation›" (or "Orientation set on ‹n› photos"), the list refreshes, and focus goes to the "Select photos"/"Done" toggle (the page heading when no photo is left and select mode ends). Undo refreshes the list again.
Spot viewer (SpotViewer). Dark stage (--color-photo-stage-bg) plus a details column (--color-photo-panel-bg): below the photo on phones, a 20rem column from 768px, 25rem from 1024px (scrolls on its own). Top bar: row 1 the Back link (chevron and "Photos" or "Back to ‹origin›", 44px, --color-photo-text) and "n of N" right-aligned (--color-photo-text-secondary, 1 = newest); row 2 the visible h1 (--font-size-lg, semibold, tabIndex={-1}, the focus fallback). From 1024px all three share one row. The title is "‹area path› · ‹orientation›", "No area · ‹orientation›", or "No area" for the whole group. Photo row: previous/next 48px round buttons (--color-photo-control-bg, white chevron, disabled at the ends at 0.4 opacity; a button that becomes disabled hands focus to its opposite, else the heading); Left, Right and Escape work unless a dialog or text field has focus. Toolbar under the photo (wraps): "Annotate" (pencil and text), "View original" / "View annotated" (eye icon, only when the photo has markup) and, on phones, "Details" (right-aligned, opens a bottom Sheet with the panel). All are 44px text buttons on the dark surface: --color-photo-text, hover --color-photo-item-hover-bg, focus 0 0 0 2px var(--color-photo-focus-ring). A disabled Annotate (signed entry, or missing image dimensions) is aria-disabled with aria-describedby a visible reason line (--color-photo-text-muted, --font-size-xs), reusing annotateDisabledSigned / annotateDisabledMissingDimensions. A polite live region announces "Photo n of N, ‹date›" on change.
Immersive phone viewer (below 768px, spot viewer only). useImmersiveShell(enabled) registers with AppShell, which then does not render the phone TopBar and BottomBar (unmounted, so they leave the tab order and the accessibility tree), sets --topbar-height: 0rem, and --shell-bottom-height falls to 0 (toasts sit at the screen bottom). The viewer's own top bar and toolbar become absolute overlays on --color-photo-bar-bg (safe-area insets respected) and the photo fills the screen. Tapping the photo toggles the chrome. Hidden chrome is opacity: 0; pointer-events: none (never display or visibility), so it stays focusable and readable by screen readers; any focus inside it shows it again. The fade uses --transition-normal and is off under prefers-reduced-motion. When a tag save moves the photo away, the page asks for the heading: the chrome is shown first, then the heading is focused.
PhotoDetailsPanel. An <aside aria-label="Details"> on the dark surface, shared by the spot viewer and the entry-page PhotoViewer (side column from 768px there too; a "Details" button in the info bar opens a bottom Sheet below). Top to bottom: "Diary date" (--font-size-lg, semibold; the retired sidepanel's "Upload date" is gone); a Details block with an "Edit tags" button and a dl of Area (colour dot and AreaLink on the photo tone, or muted "No area"), Orientation (or muted "No orientation") and Caption (or muted "No caption"); the optional "From diary entry" card (diary type Badge, title, date, a 44px "Open diary entry" NavAnchor; omitted on the entry page); then the host's children (the "Same spot over time" or "Photos with no area" heading and SpotHistoryList). Text uses --color-photo-text, labels --color-photo-text-muted, the entry card --color-photo-stage-bg with a --color-photo-panel-border border.
Edit tags (view/edit toggle; the label also covers the caption, see the Deviation Log). The 44px outlined button swaps the dl for a form with three fields: Area (AreaPicker, nullable "No area"), Orientation (OrientationPicker, nullable) and Caption (shared .textarea, 3 rows), then Save tags (btnPrimary) and Cancel (btnSecondary), both 44px. The form sits on a themed surface inside the dark panel: --color-bg-primary background, --color-text-primary text, --radius-lg, --spacing-4 padding, so the shared pickers, textarea and buttons keep their normal light and dark styling and contrast (none of them is built for the always-dark photo tokens). Escape (when no picker consumed it) cancels, and the host's arrow-key shortcuts pause while it is open. Save sends one PATCH with only the changed fields; on success the editor closes, focus returns to "Edit tags" and a role="status" line says "Tags saved". On a signed entry the button is aria-disabled with a visible reason (--color-photo-text-muted). Changing photo discards the editor.
Dark mode. Nothing to override: the photo surfaces are theme-invariant by design, and the themed Edit tags surface and the Photos page use semantic tokens that flip.
Accessibility summary. Select tiles are native checkboxes in a labelled group; the selection count is a polite status; the bulk dialog and the details sheet use the shared dialog focus chain; hidden phone chrome never leaves the tab order; all targets are at least 44px; focus rings are --shadow-focus on themed surfaces and --color-photo-focus-ring on the dark photo surface.
Status: implemented in #2230 (full spec: comment on issue #2230; deviations in the Deviation Log). New shared components: AttentionList / AttentionRowView (components/AttentionList/, the rows of Needs attention, Tidy up and the catch-up dialog, later the bell) and StatTile (components/StatTile/). Extended, not forked: FeedRow (variant="object"), FeedGroup (headingLevel, collapse), PageLayout (maxWidth="column", subtitle), FilterChipGroup (variant="navigate"), Badge (maps attentionTier, criticalLine, budgetVerdict, criticalSignal). Retired: DashboardPage and every Dashboard card. Placement Home › Home › page.
Page frame. PageLayout maxWidth="column": one 880px reading column (calc(55rem + 2 * var(--spacing-8))), left aligned, so the h1, the sub-line, the page ⋯ and the sections share one edge. subtitle is a muted --font-size-sm line (‹house› · ‹long date›) in a title column; with a subtitle the page ⋯ stays a compact control beside the title on phones. Sections are --spacing-6 apart (--spacing-8 from 768px). The page ⋯ (OverflowMenu, accessible name "Page actions") holds Customize… and What moved where (external, new tab, sr-only "(opens in a new tab)"). Order: phone and tablet "Where are you?" and last log, the one-time moved notice, then the set-up card or Needs attention · Tidy up · This week · Pulse · Latest from the site, then the footer link. Each section is a FeedGroup (<section aria-labelledby>, one h2, aria-busy while loading); a failing section shows FormError plus "Try again" and never blanks the page.
FeedRow variant="object". A record that needs a look (attention rows, This week items). Row: --color-bg-secondary, --radius-md, --spacing-3 padding (--spacing-4 from 768px), border-left: 3px solid --color-border (none), --color-danger (red) or --color-warning (amber). The border only reinforces: the tier is always a Badge with an icon and a word. Top to bottom: meta line (badges; the key figure at the end, --font-size-base semibold tabular-nums, preceded by an sr-only "Amount:"), title line (muted kind word, then the title as the row's one link: --font-size-base semibold, two-line clamp, data-row-focus; a group row has a plain-text title with tabIndex={-1}; then muted context: area path, company), sentence (--font-size-sm, --color-text-secondary), note lines (holds up, waits for, back on), action row (flex, wraps, --spacing-2 gap; full width below 480px) and nested content. The row is not one click target.
Needs attention. Heading "Needs attention (n)" (n = the server count, never rows.length; the same n as the bell). Rows in server order (red, amber, holds up, then date); the first 8, then btnSecondary "Show all (n)" / "Show fewer" (aria-expanded, aria-controls, a persistent role="status" announces "Showing all n items"). The section is never hideable (capability PLT-049). A catch-up strip (.noticeStrip: --color-bg-secondary, 1px solid var(--color-border), --radius-md) "n tasks are late · Review all" opens the catch-up dialog (Modal from 768px, full-screen Sheet below; one row per late task; the last row leaving moves focus to Close). Empty: EmptyState "Nothing needs you right now." Snoozed rows: a muted "n hidden for now" line with a text button, and "Back on ‹date›" plus "Show again" on a shown row. Focus after a row leaves: the row now at its place, else the previous, else the section heading; never <body>. Actions are at most two inline (StatusMenu action, or btnSecondaryCompact links) then Not now (a text button; hides 7 days; hint through title and aria-describedby; toast "Hidden for 7 days." with Undo). Status changes go through useUndoableStatusChange; Discard goes through ConfirmDialog with delete-impact consequences and, when photos are still waiting, one extra lead line.
Tidy up. The same rows under FeedGroup collapse: the whole heading is one toggle button (aria-expanded, aria-controls, 44px, caret ▸ rotated 90deg when open, --transition-fast only under prefers-reduced-motion: no-preference). It is the only collapsible section, mounted only while there is something to tidy, and hideable in Customize. State is stored per account (home.collapsedSections).
Badge maps (colour only from useStatusBadgeVariants(); each badge has an icon and the word):
| Map | Values | Class (Badge.module.css) |
Tokens |
|---|---|---|---|
attentionTier |
late, overdue
|
.attentionRed |
--color-status-blocked-bg / -text
|
due, ready, follow_up
|
.attentionAmber |
--color-warning-badge-bg / --color-warning-badge-text (see the Deviation Log) |
|
tidy |
.attentionTidy |
--color-status-not-started-bg / -text
|
|
criticalLine |
on_track / warning / critical, overdue
|
.criticalOnTrack / .attentionAmber / .attentionRed
|
completed pair / amber / blocked pair |
budgetVerdict |
on_budget, over_budget
|
.verdictOnBudget, .verdictOverBudget
|
success badge pair / blocked pair; "Tight" is never shown |
criticalSignal |
critical |
.scheduleCritical |
blocked pair |
This week. The critical line (.noticeStrip: level badge, "Critical path:" and the task link, area, "must end by ‹date› · n days left" or "should have ended …", "n tasks on the critical path"), then the next 7 days as day groups (FeedGroup headingLevel={3}, lighter heading --font-size-base with a 1px --color-border rule; "Today" and "Tomorrow" carry the date as detail), items as FeedRow variant="object" severity="none" (kind badge, schedule and critical chips, amount, title link, area, company, "Waits for ‹task›"). Anything already in Needs attention is dropped. A btnSecondary "Next 14 days" disclosure opens the following days (session state); "Open schedule ›" is a text link in the same footer row (stacked on phones).
StatTile and Pulse. StatTile: the whole tile is one NavAnchor (--color-bg-secondary, 1px solid var(--color-border), --radius-md, --spacing-4 padding; hover --color-border-strong plus --shadow-sm under (hover: hover); focus --color-border-focus plus --shadow-focus), with an h3 label (--font-size-sm, --color-text-secondary, trailing aria-hidden ›), a figure (--font-size-3xl bold tabular-nums; --font-size-2xl below 480px; figureSize="medium" is --font-size-xl) and a detail line (--font-size-sm, --color-text-muted). Its accessible name is its text; a non-text figure (the en dash) is role="img" with figureLabel. Pulse is a <ul> of three tiles, 3 columns from 640px, 1 below: Left to spend (figure, verdict Badge, "Range ‹from› to ‹to›" with signs in the text; without a funding source and a cost: en dash "No figure yet" and the setup hint), Still to pay (figure, "n open invoices"), Progress ("n of m tasks done", "n in progress" and a decorative bar: --spacing-2 high, track --color-bg-tertiary, fill --color-primary through currentcolor, 4.70:1 light and 4.07:1 dark, aria-hidden).
Where are you? (below 1024px). Small h2 plus FilterChipGroup variant="navigate" layout="scroll": up to 5 recently photographed areas and "Other area", each a link chip (no aria-pressed; 44px; max-width: 14rem, ellipsis, full path in title) to quickLogHref('photo', …), then the last log as a 44px link. The chip's accessible name is its visible path (the repo rule is that a name starts with its visible text), inside a group named by the heading.
Set up your build. Shown instead of the sections until the basics exist or the user skips. FeedGroup with "(n of m done)" and an <ol>: each step a --color-bg-secondary card, a 24px glyph (done: --color-success fill with a check in --color-bg-primary; to do: 1px solid var(--color-border-strong); unknown: dashed), an sr-only prefix ("Done:", "To do:", "Not checked:"), the step as a 44px link or button (semibold, trailing ›), a muted purpose line. "Couldn't check" plus "Try again" for an unreadable step. Footer: btnSecondaryCompact "Skip setup" and a muted hint.
Customize and the moved notice. Customize: Modal from 768px, bottom Sheet below; a <fieldset> with <legend> and one native checkbox row per hideable section (44px rows, accent-color: var(--color-primary)), changes save at once and a persistent role="status" announces "Pulse hidden"; the footer holds the one btnPrimary, "Done". The one-time moved notice is bannerInfo with a neutral dismiss button (44px) and a link to the help page.
Toasts above dialogs. --z-toast (1200) puts the Toast region above every dialog layer and popover, and useFocusTrap adds the toast region's buttons ([data-toast-container]) to the topmost dialog's Tab cycle, so Undo can be reached and clicked without closing the dialog.
Accessibility summary. Section headings carry their counts; tier and critical level are text plus icon; amounts read "Amount: ‹figure›"; the row link is the title; actions are real buttons and links of 44px; one persistent role="status" (never also aria-live) per list or dialog; no horizontal scroll at 320px (sentences wrap, paths ellipsise). Dark mode: semantic tokens only.
Status: implemented in #2233 (full spec: comment on issue #2233; deviations in the Deviation Log). New shared components, each in client/src/components/<Name>/: ObjectHeader, SummaryStrip, ObjectTabs (with useObjectTabs), SectionCard (with SectionCardScope), DocumentsPanel (with useDocumentsPanel; DocumentsPanelButton is the host for surfaces without a strip, today only the Financing cards). Extended, not forked: Sheet (variant="side", focusTitleOnOpen), StatusMenu (className on the action trigger), OverflowMenu, PageTitle (lang). New helpers: .userText in shared.module.css and userTextProps(lang, extraClassName) in lib/userText.ts. New token: --side-sheet-width: 30rem. Retired: SubNav consumers, EditableField. Placement Object page › header / summary / tabs / section › Documents panel.
Page recipe (top to bottom, one column): ObjectHeader (breadcrumbs portal into the top bar) → SummaryStrip → ObjectTabs → panel of SectionCards. Header + strip end within about 450px on desktop and one 844px phone screen.
ObjectHeader. One <header> row: h1 (PageTitle, --font-size-2xl, bold, --color-text-primary), the one status slot, at most one secondary, exactly one primary, then the ⋯ menu. DOM order is visual and tab order (title, status, secondary, primary, ⋯); the h1 is plain text, never click-to-edit. The primary is ObjectHeaderPrimary: status (StatusMenu action, the first forward transition of the shared map, via forwardActionTo), link (NavAnchor, e.g. Log, Convert to invoice) or button; all three receive the same .primary class (composes: btnPrimary) as a className prop, so the pattern baseline counts exactly one primary per header. StatusMenu has no primary class of its own. A busy primary is aria-disabled (never native disabled). Extra badges (the schedule signal) are never in the header; they are a strip fact. ⋯ is OverflowMenu with a 44px trigger, accessible name "Page actions": Copy link (absolute URL, only ?tab= kept; info toast "Link copied.", error toast on failure), Print (window.print() one frame later so the closed menu is not printed), page extras, a separator and Delete (destructive; present only when the host passes onDelete, and the host owns the ConfirmDialog). A fourth primary kind, tel (#2244), is an <a href="tel:…"> with PhoneIcon and the label (accessible name starting with the visible text, title = the number); it takes the same single .primary class as the other kinds.
| Width | Layout |
|---|---|
| >= 768px | Grid: the title takes the free width (minmax(0,1fr)), the rest are auto columns in one row, column-gap: var(--spacing-3). Controls min-height: var(--touch-target-min), var(--spacing-10) from 1024px (the ⋯ trigger stays 44px). |
| < 768px | Row 1: title (columns 1-2) and ⋯ (column 3); row 2: status chip; row 3: secondary; row 4: primary, each full width. From 480px with a secondary, secondary and primary share row 3. DOM order is never reversed. |
SummaryStrip. <section aria-label="‹Type› summary"> holding a <dl>; 4 to 7 facts (the 8th and later are not rendered). Each fact is a <div> with <dt> (--font-size-xs, medium, --color-text-muted) and a <dd> holding the one target: link (NavAnchor, another page, carries origin state), tab (a real <a href="?tab=…">; a plain left click runs onActivate, which selects the tab with replace and moves focus to the panel's h2) or button (Documents, aria-haspopup="dialog", aria-expanded). Target: --font-size-base, semibold, --color-text-primary, tabular-nums, one line with ellipsis (the full text stays in the DOM); its accessible name is aria-labelledby label then value; the whole cell is the hit area (::after { inset: 0 }), at least 44px below 1024px. An empty value is an aria-hidden en dash plus an sr-only "Not set" and stays a link. Values carry data-figure when the host passes a figureKind (figure registry, #2232). Surface: --color-bg-secondary, 1px solid var(--color-border), --radius-md, overflow: hidden; separators come from gap: 1px over a --color-border grid background. 2 columns below 768px, 4 from 768px (5 to 7 facts are exactly two lines). Hover ((hover: hover)): cell --color-bg-tertiary and the value underlines (--color-bg-hover equals --color-bg-secondary in light mode and would show nothing). Focus: box-shadow: inset 0 0 0 2px var(--color-border-focus) on the ::after, not --shadow-focus, because the strip clips overflow (see the Deviation Log). Strip values are never .userText (ellipsis and hyphens conflict). trailing slot (#2248): a fact may pass trailing (e.g. the Call button beside the Who value): a span with position: relative; z-index: var(--z-raised) above the stretched link, its own 44px target and focus ring (--shadow-focus), outside the fact's accessible name; the value ellipsises first, the trailing control never shrinks.
ObjectTabs. ARIA tabs, not links: role="tablist" named "‹Type› sections", role="tab" buttons with aria-selected, aria-controls and roving tabIndex, automatic activation (Left/Right wrap, Home/End), panels role="tabpanel" aria-labelledby the tab. Vocabulary and order are fixed: Overview · Timing · Work · Cost · Payments · Site diary · History (the page passes the subset; orderObjectTabs sorts). URL ids: overview, timing, work, cost, payments, diary, history. ?tab= rules (useObjectTabs): every write is a replace and other params are kept; the first applicable tab is the "no param" state (an absent param shows it without rewriting the URL, an unknown or inapplicable value is removed with replace, selecting the first tab removes the param). Counts "(n)" appear only on Cost, Payments and Site diary (Cost (3), hidden while loading). A single applicable tab renders no tablist, only a bare panel. Panels mount on first visit and stay mounted (hidden) afterwards; a panel with nothing focusable in it is a tab stop (tabindex=0). Tab: min-height: var(--touch-target-min), --font-size-sm, medium, --color-text-secondary; hover --color-text-primary on --color-bg-secondary; selected: --color-text-primary, semibold, border-bottom: 3px solid var(--color-primary) (--color-primary text is 4.07:1 in dark mode, so the bar carries the state, not the text colour). Row: border-bottom: 1px solid var(--color-border), margin-bottom: var(--spacing-6). Phone: the row scrolls horizontally (hidden scrollbar) and the selected tab scrolls into view (smooth only after mount and with reduced motion off). Not sticky.
SectionCard. <section aria-labelledby="‹id›-title"> with an h2 (--font-size-lg, semibold) and, in read mode, one Edit (btnSecondaryCompact; accessible name "Edit ‹section›", which starts with its visible text). Surface: --color-bg-primary, 1px solid var(--color-border), --radius-md, padding --spacing-4 (--spacing-6 from 768px); edit mode raises the border to --color-border-focus (the Cancel / Save footer is the non-colour cue). Edit mode is a <form noValidate>: a body (FormError banner first, then the fields) and a footer (border-top, right aligned) with Cancel (btnSecondaryCompact) before Save (btnPrimaryCompact). Keys: Enter in a single-line field saves; Ctrl/⌘+Enter saves from a textarea and the footer shows "Ctrl+Enter to save" / "⌘+Enter to save" only when the form contains a textarea; Esc cancels (only for keys from inside the form; an open popover handles its own Esc first through markEscapeHandled). A dirty card asks through ConfirmDialog "Discard changes?" (lead "Your changes to ‹section› are not saved.", "Keep editing" / "Discard", danger). Save is aria-disabled while unchanged or saving (label "Saving…"); a failed save keeps edit mode and shows the banner. Focus: Edit opens on the first field; Save, Cancel and Discard return focus to Edit; Keep editing returns to the field. SectionCardScope keeps one card per page in edit mode (a clean neighbour closes silently, a dirty one asks first) and owns the page's single role="status" announcing "‹Section› saved." (a card outside a scope renders its own). A dirty card registers beforeunload; edits survive an in-app tab switch (hidden panel). Footer below 480px: stacked, full width, Cancel above Save. Loading shows Skeleton and no Edit. The optional controllerRef exposes SectionCardController.startEdit() (#2244) so a host can open a card from elsewhere (a header button): it behaves like the Edit button (through the scope, so a dirty neighbour asks first), focuses the first field when the card is already editing, and does nothing without edit or while loading.
RelatedList row call (#2244). A row with call: { phone, name } shows a CallButton between the amount and Edit, raised above the stretched title link (--z-raised). Measured on the list's own width (container query, not the viewport): from 640px it stays compact next to Edit and the ⋯ menu; below 640px it is a full-width, --touch-target-min high line at the bottom of the row.
DocumentsPanel. Gate (useDocumentsPanel): Paperless status pending → no fact value yet; configured and reachable → full; configured but not reachable → unreachable; not configured (or status failed) with links kept → read-only notice ("Paperless is not connected — n links kept"; admins get IntegrationsLink; a failed status offers Try again); not configured and no links → nothing (no fact, no panel, no disabled control). The fact is "Documents (n)". Surface: Sheet variant="side" from 768px (right edge, width: var(--side-sheet-width), max-width: 100vw, full height, border-left: 1px solid var(--color-border), slides with --transition-slow, no transform under prefers-reduced-motion: reduce), variant="fullScreen" below 768px. The title "Documents (n)" takes focus on open (focusTitleOnOpen); closing returns focus to the fact. List view: LinkedDocumentCards (preview, Open in Paperless, Itemize for invoices, document type select for invoices, Unlink); Unlink removes the row at once and shows the Undo toast (no confirm), then focus goes to the next card's ⋯, else the previous, else Link document. Footer: Link document (btnSecondary, never primary) and Browse all (btnText, rendered only while the documents route is served, carries origin state, closes the sheet). Picker view (same sheet, "‹ Back" in headerStart, title changes): DocumentBrowser (search, tag chips, hide already linked, batch loading), with the invoice-only document type select first; choosing a document returns to the list, announces "Linked ‹title›." and focuses the new card; Esc in the picker returns to the list, Esc in the list closes the sheet. One role="status" for announcements.
lang and hyphens (.userText). hyphens: auto; -webkit-hyphens: auto; overflow-wrap: break-word; word-break: normal. userTextProps(entriesLanguage, extraClassName) returns lang (from useEntriesLanguage(), the "Language of your entries" setting under Settings › Project setup › House) and the class. Only the user's own wrapping text gets it (titles that wrap, descriptions, notes, names, document titles, preview text). Never on translated or fallback strings ("Untitled task", "Document #12"), formatted dates and amounts, or single-line ellipsised text (strip values, tab labels, crumbs). ObjectHeader takes titleIsUserText={false} for a fallback title.
Print. Every template component carries @media print rules: color-scheme: light on the header, strip and cards; text CanvasText; the secondary, primary and ⋯ controls, the tab row, a card's Edit and footer, the side sheet and its backdrop, and the strip's Documents fact are hidden; strip and card borders are CanvasText; facts and cards break-inside: avoid. The printout is the header, the strip and the active tab panel (inactive panels are hidden).
Tokens. No new colours. New: --side-sheet-width: 30rem. Reused: --color-bg-primary/-secondary/-tertiary, --color-border, --color-border-focus, --color-primary, --color-text-primary/-secondary/-muted, --shadow-focus, --radius-sm/-md, --spacing-*, --font-size-xs/sm/base/lg/2xl, --touch-target-min, --z-raised, --transition-fast/-slow. Dark mode: Layer-2 tokens only, no overrides.
Accessibility summary. One h1; the strip landmark is named "‹Type› summary"; one tablist; panels and cards are labelled by their heading; the h1 is not a tab stop; focus order is status → secondary → primary → ⋯ → facts → selected tab → panel; every control is 44px below 1024px; one persistent role="status" per page (cards) and one per sheet (documents); prefers-reduced-motion: reduce removes the tab and card colour transitions and the side-sheet slide.
Status: implemented in #2248 on the Detail template (full spec: comment on issue #2248; deviations in the Deviation Log). Placement Object page › Task. No new colours or tokens; reused components only. Retired: DependencySentenceBuilder and the sentence display, the old dependency list, milestone chips and selects, inline title/description edit, autosave indicators on the task page, the old subsidy select block.
Header. Breadcrumb "Tasks" (back link "Back to ‹origin›" when opened from elsewhere), h1 = task name as plain text, StatusMenu chip, one primary: Start (Not started) or Mark done (In progress). Both run the StatusMenu date step (Today · As planned · Pick a date) and then show a Toast with Undo. Once the task is done the primary is Log (link to the diary entry form, area and company pre-filled). ⋯ holds Delete (ConfirmDialog, danger, counts from useDeleteImpact, zero counts omitted).
Strip (seven facts, in order). When · Where · Who · Expected cost · Waits for · Holds up · Documents (only when the Documents gate allows it).
-
When is
wideand carries the Late / Held up badge (a text label, never colour only) beside the dates; actual dates win over planned. Links to the Timing tab. -
Where links to the Area page (
routeUrl('area', { id }), the area path as a compactAreaBreadcrumb), carrying origin state. Without an area it is an empty fact (en dash plus sr-only "Not set") that opens the Who and where card in edit mode; Who with nothing set does the same. -
Expected cost is a plain tab fact (no
figureKind; only Holds up has one). A covering grant's name is a.remark(--font-size-sm,--color-text-secondary, inline-block so the hover underline skips it) after the figure, "+n more" when several grants cover it. The grant is a remark, not a separate fact. -
Waits for shows the first unfinished predecessor's title plus a
.remark"+n more", or "Nothing" (the same reading as the Tasks list column); Holds up is a count ("2 tasks") or "Nothing". Both link to Timing; Holds up carriesdata-figure="holds-up"only when it has a count. -
Documents is a
buttonfact (label "Documents", value the count) opening the side sheet (full screen below 768px).
SummaryStrip trailing slot (also recorded in the Detail template's SummaryStrip spec). A fact may pass trailing (a ReactNode). It renders inside the <dd> beside the value in a span with position: relative; z-index: var(--z-raised), above the stretched ::after link, so it is its own hit area. Task page: the Call button (CallButton, accessible name "Call ‹name›") beside the Who value, which is wide (two columns on phones) whenever Call shows so the name keeps room. It keeps its own focus ring (box-shadow: var(--shadow-focus)); CallButton is --spacing-8 high with a fine pointer and --touch-target-min (44px) with a coarse pointer, and every strip fact is at least 44px high at 1023px and below. The fact's accessible name is unchanged (label then value). The value ellipsises first; the trailing control never shrinks.
Shared card fields. SectionCardFields (FieldShell, DetailRow) in components/SectionCard, used by the Company page and the Task page. DetailRow is a label/value row (label --font-size-xs medium muted, value --font-size-base); FieldShell wraps a labelled edit control with its error text. Do not rebuild these per page.
Overview. Card order: Details (description first, .userText; one Edit, Ctrl/⌘+Enter saves), Who and where (Who: one EntityPicker, company or household member; Where: area EntityPicker; Clear first), Checklist, Notes. Checklist and Notes appear only once they have content; otherwise a single Add ▾ menu button, placed after Who and where and before the Checklist/Notes cards (btnSecondaryCompact, 44px high at 1023px and below like every compact button on the page, aria-haspopup="menu", aria-expanded) offers "Checklist item" and "Note"; choosing one reveals the card with its field focused. Checklist rows: checkbox (44px target, label = item text) and a ⋯ menu with Rename, Move up, Move down, Delete (Move up/down disabled at the ends; the move is announced through a polite status region, as on the Areas page). Note rows: "author · date" in muted text above the user text, ⋯ with Edit and Delete. Deleting a checklist item or a note asks a ConfirmDialog whose returnFocusRef is the card's stable add control (the add field, or "Add note"); deleting the last one hides the card and focus goes to Add ▾, else the h1.
Timing. Cards in order: Dates and Constraints (each a SectionCard with read and edit modes; Dates shows Start, End, Started, Finished and Duration as DetailRows, then the planned line, e.g. "Planned: 12 Oct – 18 Oct", in muted --font-size-xs text below them, then "Reschedule…"); Reschedule (section heading, then ReschedulePanel with timeline and onUndone; the preview callback is a no-op; a load error shows FormError with a Retry button); then four RelatedLists (heading level 2): Waits for, Waiting for this task, Milestones, Purchases waiting for this task. Dependency rows: status Badge, facts as the Schedule's relation sentence plus lag ("‹sentence› · 2 days later" or "· 2 days earlier"; nothing for lag 0), Edit icon, ⋯ Remove with Undo. Milestone rows: title, relation as text ("Waits for" / "Counts toward") and the target date as facts; the Link action opens the Link milestone dialog. Purchases waiting is read-only (no Add, no Remove).
Dialogs. Dependency (Modal): How they connect is a select whose options read as schedule sentences relative to the task, Lag in days a number input with a hint ("A negative number lets them overlap.") and an inline error; focus returns to the row's Edit icon on close. Link milestone (Modal): Relation select ("This task waits for the milestone" / "This task counts toward the milestone") plus an EntityPicker; a missing milestone is a field error on Save (the button is not disabled).
EntityPicker option rows. Milestone: title with the target date muted on a second line. Grant: the name only.
Cost. CostLinesSection (table grouped by offer or invoice, estimates first, Add cost line and New invoice) then a Grants RelatedList: rows show the grant name, the reduction (percentage or fixed amount, as the Grant link section) and an application-status Badge (text label); Add opens the picker, row ⋯ Remove shows a Toast with Undo.
Site diary. Block 1: entries naming the task's company first, as FeedRows. Block 2 is not rendered when it is empty; otherwise it is a native <details> collapsed by default, summary "Other entries · from photo tags and dates (n)", at least 44px high; the chevron rotates with --transition-fast, and the transition is removed under prefers-reduced-motion: reduce. Log for this task (btnSecondaryCompact link beside the h2) opens the diary form pre-filled with area and company. Empty: EmptyState with the Log action.
History. ObjectHistorySection, preceded by a muted line "Created by ‹name› on ‹date› · Last updated ‹date›" (--font-size-sm, --color-text-muted).
States. Loading: Skeleton with a loading label, h1 is the fallback label. Not found: "Task not found" with Back to Tasks. Error: card role="alert" with Back to Tasks and Retry.
Phone (below 768px). Header stacks (title and ⋯, status chip, primary full width); strip 2 columns with When wide; header, strip and tab row fit one 844px screen; Documents opens full screen; modals are full-width sheets; RelatedList call rows stack below 640px of list width; every control at least 44px.
Dark mode and accessibility. Layer-2 tokens only, no overrides. One h1, strip landmark "Task summary", one tablist (Overview · Timing · Cost · Site diary · History; counts on Cost and Site diary only), panels labelled by their h2. Lateness, held-up state, relation and application status are always text. Reduced motion removes card, tab and disclosure transitions.
Status: implemented in #2249 on the Detail template, composing the same shared pieces as the Task page (full spec: comment on issue #2249; deviations in the Deviation Log). Placement Object page › Purchase. No new colours or tokens; no new shared component.
Shared object-page styles. client/src/styles/objectPage.module.css now holds what the Task and Purchase pages have in common: panel (16px gap, 24px from 768px), errorCard, errorActions, compactButton (44px high at 1023px and below), remark, details, muted, fields, historyLine, userTextBlock. Page modules pull them in with composes: X from '../../styles/objectPage.module.css' (class names stay local, so the TSX does not change). A new object page composes from it; do not copy these rules. The same extraction shares useCardDraft, useObjectRecord, useObjectDiary / ObjectDiaryPanel, GrantLinksList and the EntityPicker kind taskOrMilestone.
Header and primary (D4). StatusMenu chip (Planned / Ordered / Delivery scheduled / Delivered) and one primary: Mark ordered (Planned, sets the order date) or Mark delivered (Ordered or Delivery scheduled, sets the delivery date). The primary names its own target status (never "Mark delivery scheduled"). Both run the StatusMenu date step (Today · As planned · Pick a date) and then a Toast with Undo; Undo restores the status and the order date. Once Delivered the primary is Log (diary entry link, area and company pre-filled), as on the Task page; ObjectHeader.primary is required, so the primary is never omitted. ⋯ holds Delete (ConfirmDialog, danger, impact counts).
Strip (seven facts, D6). Delivery · Where · Company · Expected cost · Invoiced · Waits for · Documents (only when the Documents gate allows it).
-
Delivery is a tab fact to Timing,
widewhile late. Wording:Delivered ‹date›(status Delivered with an actual date), elseTarget ‹date›, elseWindow ‹earliest› – ‹latest›, else the single bound that is set, else the empty fact. "Target" is the word the list and the Timing "Target delivery" row use; "Expected" is reserved for money. -
Late (D3). When late and not Delivered, the fact carries the shared schedule-signal
Badge"Late · n d" (the same badge as the Schedule panel; text, never colour only). -
Company links to the company page with origin state; with a phone the fact is
wideand the Call button sits in thetrailingslot (rules as on the Task page). Where links to the Areas list (interim). Either fact, when empty, is an empty fact (en dash plus sr-only "Not set") that opens the Details card in edit mode. -
Expected cost and Invoiced are plain tab facts to Cost, no
figureKind(the purchase page has none). A covering grant is a.remarkafter the figure ("‹name› and n more"). Invoiced with nothing invoiced is the empty fact with sr-only "None yet" (SummaryFact.emptyText), never a bare dash. -
Waits for shows the first unfinished predecessor (task or milestone) plus a
.remark"+n", or "Nothing"; links to Timing.
Overview. One Details card: description first (user text), Category, Quantity (only when above 1), Company link, Product link, Area. Empty rows are omitted; with nothing optional set a muted "Nothing added yet" precedes Category. The product link is an external <a target="_blank" rel="noopener noreferrer"> (text = host, sr-only "(opens in a new tab)") only for http:/https:; any other value is shown as plain text, never a link. Edit mode holds every field (name, description, category, quantity, company, product link, area); labels reuse the New purchase form keys ("Company", "Ordered on", "Product link"). /household-items/:id/edit and /project/household-items/:id/edit redirect to the page with Details in edit mode and focus on Name; the edit parameter is consumed once.
Timing (D11). A Delivery SectionCard (read and edit): DetailRows Ordered on, Earliest delivery, Latest delivery, Target delivery (computed, read-only), Delivered on. There is no "Planned" line: on a purchase the Earliest and Latest rows are the plan. Edit validates latest ≥ earliest and delivered ≥ ordered as text field errors. Below the rows, only while late, the late row (--color-status-blocked-bg / --color-status-blocked-text, --spacing-2 / --spacing-3 padding, --radius-md): the "Late · n d" Badge plus a sentence, a static <p> (never role="status"), always text:
- latest date passed: "The latest delivery date (‹date›) has passed and nothing has arrived.";
- no latest date, target passed: the same sentence for the target date;
- otherwise (a predecessor pushed the delivery): "Late: the delivery is now expected after its planned window."
There is no input: the schema has no stored late reason. Then Waits for RelatedList (h2): rows are tasks (status Badge) or milestones (no badge) with a kind word and date as facts; Add opens an EntityPicker of kind taskOrMilestone; ⋯ Remove with Undo. Purchases cannot wait for purchases (they are terminal nodes in the dependency model). No "waiting for this purchase" list.
Cost. CostLinesSection in a card, then the shared Grants list (GrantLinksList, same rows as the Task page). The old overview totals and the grant select block are retired.
Site diary. As the Task page, through ObjectDiaryPanel; Log for this purchase pre-fills area and company. The diary window runs from the order date (else earliest delivery) to the delivered (else latest, else target) date.
History (D14). The tab is the h2 "History" and one muted line "Created by ‹name› on ‹date› · Last updated ‹date›" (--font-size-sm, --color-text-muted). No ObjectHistorySection: no history events name a purchase yet.
Phone bottom bar (D20). The last list of the Timing and Cost panels (the one whose picker opens downward) gets the class pageEndClearance: under :root[data-shell-bar='shown'] its last child has padding-bottom: calc(var(--shell-bottom-height) + var(--spacing-16)), so the picker listbox clears the phone/tablet bottom bar (the Task page .addRow precedent). Any object page whose last block opens a popover downward needs the same rule.
States, accessibility, dark mode. Loading Skeleton; not found "Purchase not found" with Back to Purchases; error role="alert" card with Back and Retry. One h1, strip landmark "Purchase summary", one tablist (Overview · Timing · Cost · Site diary · History; counts on Cost and Site diary only). Lateness, relation and status are always text. Layer-2 tokens only, no dark overrides; focus rings are box-shadow: var(--shadow-focus).
Status: implemented in #2234 (full spec: comment on issue #2234; deviations in the Deviation Log). New shared component ObjectList (components/ObjectList/, the planned allowedAdditions entry consumed in the same PR) with parts ObjectListHeader, ObjectListToolbar, ObjectListGroup, ObjectListRow, ObjectListFiltersPanel, and the hooks useObjectList, useContainerWide, useListAnnouncer, useSearchDraft. Built on DataTable's primitives, not beside them (useColumnPreferences, ColumnSettingsList, dataTableTestId); DataTable stays for flat tables. Extended: OverflowMenu (choice entries with ariaDisabled + description), PageTitle (suffix), SelectionActionBar (announce, testId), TriStateCheckbox, useInfiniteScroll. Extracted: the Site diary Filters surface became ObjectListFiltersPanel; DiaryFilters is now a consumer. Pages adopt ObjectList in later stories (the template is build-only). No new token. Placement All lists › header / toolbar / group / row.
Header. PageLayout header slot: one row, h1 = plural object name with the count as a muted suffix inside the h1 (Tasks (47); filtered Tasks (12 of 47); absent while loading; the tab title never carries the count), one primary New ‹object› (.primary composes btnPrimary; the only primary the list owns, always present, also when the list is empty), then the ⋯ menu "Page actions" (list entries, Columns…, Print). No secondary in the header. Grid and breakpoints as ObjectHeader: below 768px row 1 is the title and ⋯, row 2 the primary at full width.
Toolbar (role="search"; DOM order = visual order = tab order): own search (type="search", data-page-search, 300 ms debounce, Enter commits, SearchEverywhereRow below), FilterChipGroup of 2 to 4 chips plus "All" (pick-one; wrap from 768px list width, one scrolling line below), Filters (ObjectListFiltersPanel), Group by, Sort, then the note row.
-
Default chip and search. The household's starting chip is the absent
statusparameter; choosing it explicitly writes it, "All" writesstatus=all. A non-emptyqwith no explicit chip searches every chip: no chip is pressed and the note row readsSearching all · ‹n› more in ‹Chip›(Searching allwhen n is 0). A chip pressed during a search is respected and the note disappears. -
Filters is a
btnSecondaryCompactwith(n)when n sheet filters are active (the count badge is.filtersToggleCount, primary coloured; the static analyzer counts it, accepted). Surface:AnchoredPanelfrom 768px viewport width (width: min(22.5rem, 100vw - 2 * var(--spacing-4)),--color-bg-primary,1px solid var(--color-border),--radius-md,--shadow-lg), bottomSheetbelow with a footer of a text Clear and a secondary Done. One<fieldset>/<legend>per filter; changes apply at once; focus opens on the first field and returns to the button. Neither Done nor Clear is ever primary (the Site diary Done changed from primary to secondary). -
Group by / Sort are
btnSecondaryCompactbuttons that show the current choice ("Group: Area", "Sort: Due date") and open anOverflowMenuwithchoiceentries (menuitemradio,aria-checked); Sort has a secondchoiceentry for direction. An unavailable group option isaria-disabledwith its reason as description. Desktop header sort stays in sync. - Note row: select-all (narrow layout only), the searching-all text, the grouping-unavailable reason, and the text button Clear filters (clears search, filters and chips to default; keeps sort and group; focus returns to the search field).
- Never a segment control, tab row or second search.
Surfaces and container width. .root is container-type: inline-size; the table surface shows at a list width of at least 48rem (768px), the card surface below (@container (max-width: 47.999rem)), because the sidebar, side sheets and tablet shells shrink the content area. Both surfaces are mounted (DataTable dual mount); ids come from dataTableTestId(prefix, id, surface).
Groups. Table: one <table> with a heading <tbody> (<tr><th scope="rowgroup" colSpan>) and a body <tbody hidden> per group; cards: <section aria-labelledby> with a <ul>. Heading: optional group TriStateCheckbox (a sibling of the toggle), then an h2 holding one disclosure button (whole row, 44px, aria-expanded, aria-controls, optional Badge, label, muted count Late (3) or 3 of 8 while rows are not all loaded, caret ▸ rotated 90deg when open; the rotation transitions only under prefers-reduced-motion: no-preference). Heading cell --color-bg-secondary, border-bottom: 1px solid var(--color-border), title --font-size-base semibold. Open state is session state, not in the URL; the toggle is never unmounted so focus stays on it.
Row. Table row min-height calc(var(--touch-target-min) + var(--spacing-2)), border-bottom: 1px solid var(--color-border), cells in this order: checkbox (only with bulk actions), expand (only with child rows), title cell, columns, status, row command, ⋯. The title is a real <a href> (NavAnchor with the origin state, no target; Ctrl/middle click opens a new tab, a plain click keeps Back-to-origin), --color-text-primary, medium, and it is the row's one stretched link (::after { inset: 0 } on the positioned row). Every sibling control (checkbox, secondary chips, status chip, command, ⋯, expand) is lifted above it with position: relative; z-index: var(--z-raised) and is never nested in the link. Secondary line under the title (table surface only): --font-size-xs, --color-text-muted, area chip with the full path and company chip. Row command = a StatusMenu action styled secondary compact, never primary. Hover ((hover: hover)) --color-bg-secondary; selected --color-primary-bg (with the checked box, never colour alone; text stays --color-text-body). Focus: an inset ring on the title link's ::after — box-shadow: inset 0 0 0 2px var(--color-border-focus) — not a ring on the <tr> (the table surface scrolls horizontally and clips overflow, and box-shadow on a collapsed-border table row is not reliably painted); the same inset ring is used on cards for one rule. Checkboxes sit in a 44 x 44px hit area (a label or padding box around the 20px control) at every width, group and select-all included.
Narrow rows: two lines. Line 1: checkbox, title (the stretched link, one line with ellipsis, full text in its accessible name), status chip, ⋯ (the command moves into ⋯). Line 2: exactly three facts, --font-size-sm, --color-text-muted, · separators aria-hidden, flex-wrap: nowrap, each fact min-width: 0 with ellipsis; the fact marked keep (the area path) shrinks last. renderSecondary is table-only; card chips go in the facts.
States. First load Skeleton (toolbar stays mounted afterwards); error FormError + Retry with focus on the heading; empty EmptyState (message and description only, the header primary is the action); filtered-empty adds Clear filters. Up to 100 matching rows load all; beyond that useInfiniteScroll + InfiniteScrollFooter + useInfiniteScrollAnnouncements, with "Showing n of m". The numbered pager and the page-size select are retired.
URL state. Every change is replace; existing names are kept (q, sortBy, sortOrder, filters, group, status); absent means default for status, group and sort; unknown values are removed with replace; page/pageSize are read and dropped; group open state, selection and the Filters sheet are not in the URL.
Selection. Row, group (tri-state) and select-all checkboxes; SelectionActionBar (position: fixed above the shell bottom bar via --shell-bottom-height, with an in-flow spacer whose left and width it copies, the StickyActionBar mechanism; it publishes --sticky-action-bar-height while mounted so toasts stack above it; placement: 'fixed' | 'inline', default fixed, which ObjectList uses; hosts with their own action row after the list, ReportInvoiceList (report wizard Next row) and AutoItemizeLines (totals card and Save row), use inline: the bar stays in flow, with no spacer sync and no --sticky-action-bar-height; count + Clear selection + at most three non-primary actions, delete via ConfirmDialog); only visible rows stay selected when search or filters change; Esc clears the selection when focus is inside the list and no popover handled the key (markEscapeHandled); focus after a bulk action goes to the next remaining row's title link, else the h1. The list owns one persistent role="status" with aria-atomic="true" (no aria-live), always mounted and visually hidden, for result counts, group collapse, selection count and the searching-all text; the action bar passes announce={false} so the count is not announced twice.
ReferenceList search (Project setup). A search field (.search composes .input, 44px, focus --shadow-focus) appears at 8 or more rows (REFERENCE_LIST_SEARCH_MIN_ROWS) and stays while a query is typed; the count is a muted suffix in the h2; no match shows EmptyState with a Clear search action; reorder (handles, Move up/down) is aria-disabled while a query is active, with the reason as the handles' description. No chips, group or sort: the user's order is the order.
Print. Header and toolbar are hidden except the h1; the table surface prints with every group open and every child row shown; checkboxes, expand toggles, commands, ⋯, the group checkbox, the caret and the "Showing" line are hidden; color-scheme: light; rows break-inside: avoid, group heading break-after: avoid.
Tokens and dark mode. No new tokens. Used: --color-bg-primary/-secondary, --color-primary-bg, --color-border, --color-border-strong, --color-border-focus, --color-text-primary/-body/-muted, --shadow-focus, --shadow-lg, --radius-sm/-md/-lg, --spacing-*, --font-size-xs/sm/base/2xl, --touch-target-min, --z-raised, --transition-fast. Layer-2 tokens only; --color-primary-bg flips to a translucent blue in dark mode. Add the pairs --color-text-body on --color-primary-bg and --color-text-muted on --color-bg-secondary to the #2200 contrast test.
Accessibility summary. One h1 (with count); a search landmark; chips named "Filter by status"; groups are labelled sections or row groups with an h2 button; per-row tab order is checkbox, title, chips, status, command, ⋯; every control is 44px below 1024px and at least 24px with a pointer; names start with their visible text; no information by colour alone; reduced motion removes the caret and hover transitions.
Status: implemented in #2236 (row call added in #2244, see the Detail template section). Placement Object page › tab › related list. Source: client/src/components/RelatedList/, client/src/components/EntityPicker/. Every list of simple one-line relations on an object page uses RelatedList; every "choose a thing" field uses EntityPicker. Hosts today: dependencies, milestones and purchases of a task, Waits for of a purchase, the milestone's two Work lists, offers and invoices and contact persons of a company, payments of an offer or invoice, covered items of a grant, the Documents page's Linked to list, and the Grants list in Cost.
RelatedList parts. A <section aria-labelledby> card (--color-bg-primary, 1px solid var(--color-border), --radius-md) with RelatedListHeader (the h2 or h3 glossary title, "(n)" count, an optional term hint and the one secondary action, Add or Link), then a <ul> of rows. A row holds an optional aria-hidden leading mark, the title (one stretched link to the related object's page through routeUrl(), ::after covering the row, carrying origin state; plain text without to), status Badges, a muted fact line (--font-size-sm, --color-text-muted), a right-aligned amount (tabular, the host adds data-figure when it is a registry figure), the optional Call button, an Edit icon button (only when the relation has attributes; accessible name "Edit ‹title›") and the row ⋯ (OverflowMenu, host items, a separator, then Remove). Controls above the stretched link use --z-raised. More than 10 rows collapse behind "Show all (n)" (btnText, aria-expanded).
RelatedList states. Loading: Skeleton (3 lines), no count. Load error: FormError plus Retry. Empty: EmptyState with the one sentence and the action repeated as its button (the header action is then not rendered). An action can be a button or an inline picker (kind: 'picker', aria-expanded); a disabled action is aria-disabled with aria-describedby naming the reason. Remove applies at once with an Undo toast (no confirm); focus goes to the next row's ⋯, else the previous, else the action, never to the body (useRelatedListFocus); after Undo it returns to the restored row. Hover: row --color-bg-hover, --transition-fast (only without reduced motion). Focus: --shadow-focus.
RelatedList layout. Measured on the list's own width (container queries, not the viewport): from 768px one line; below 768px two lines (title, Edit, ⋯; then badges, facts and amount). Every control is at least --touch-target-min.
EntityPicker. A layer on SearchPicker that owns the per-kind search, the option rows and the inline "New ‹kind› ‹text›" row. Kinds (ENTITY_PICKER_KINDS): company, who (company or household member, grouped), area (root-first path), orientation, trade, category, task, taskOrPurchase (kind word on each row), taskOrMilestone, document, milestone, grant. Company-like kinds search the server; trades and categories filter on the client because their defaults are translated. create="auto" offers the provider's "New ‹kind›" dialog for company, who, area, orientation, trade and category. A special empty option ("No area", "Top level") is opt-in. EntityMultiPicker adds removable chips (--color-bg-secondary, 1px solid var(--color-border), --radius-md, --font-size-sm; Remove is a 44px icon button with --shadow-focus) and keeps focus in the input after a pick. EntityPickerDialog puts a picker in a Modal from 768px and a bottom Sheet below. Option rows: --font-size-sm text, secondary text and paths in --color-text-muted --font-size-xs. Accessibility is SearchPicker's combobox contract (listbox, aria-activedescendant, Escape closes the list and is marked handled, the list closes when focus leaves, #2241).
Status: shared component since before EPIC-21, extended by #2207 (renderTrigger, current), #2233 (className on the trigger, page actions), #2247 (checkbox items) and #2253 (controlRef). Source: client/src/components/OverflowMenu/. The one ⋯ menu: page actions in ObjectHeader, row menus in RelatedList, ObjectList and CostLineTable, the view-switching title menu ("Tasks ▾") and the Schedule's Show menu.
Parts. A trigger <button> (aria-haspopup="menu", aria-expanded, accessible name from triggerAriaLabel; 44px, --touch-target-min) or a host trigger through renderTrigger. The panel is role="menu" (--color-bg-primary, 1px solid var(--color-border), --radius-md, --shadow-md, z-index: var(--z-dropdown); portalled to body with usePortal, then flipped above the trigger when it does not fit below and closed on scroll and resize). Entries: menuitem buttons and links (a link item can carry current, rendered as aria-current="page" with --color-primary-bg), menuitemcheckbox toggles (aria-checked), menuitemradio choice groups (role="group" with a label), role="separator", and labelled groups. A destructive item uses --color-danger-text-on-light on hover --color-danger-bg. An optional header sits above the list and is linked with aria-describedby.
States and keyboard. ArrowDown, Enter or Space on the trigger opens on the first row, ArrowUp on the last; inside, ArrowDown/ArrowUp move with wrap-around and Home/End jump; Escape and Tab close and return focus to the trigger (or the caller's returnTo); Escape is marked handled so a surrounding dialog stays open. A disabled item is aria-disabled with its reason linked through aria-describedby. closeSignal (for example location.key) closes the menu on navigation. Hover --color-bg-hover; focus --shadow-focus; transitions --transition-button (none under reduced motion).
Status: implemented in #2237 (story 4.5). Placement Money › Overview (h1 "Money"). Page client/src/pages/BudgetOverviewPage/; new shared components MoneyFigure and CostBreakdownTable; reused SummaryStrip (5 columns), BudgetBar, FilterChipGroup, OverflowMenu (page ⋯: Print and the bank-overview preset, which opens the bank report). ADR-039 defines every figure.
Page recipe (top to bottom): MoneyFigure headline (Left to spend) → SummaryStrip with Funding total · Expected cost · Expected grants · Paid · Still to pay (Paid and Still to pay carry data-figure) → Funding section (one row per funding source, "Allocated x of y" with a BudgetBar; only an over-allocation gets its own amount, shown as it is; rows are not links) → CostBreakdownTable.
MoneyFigure. A headline card: <section aria-labelledby> with an h2 (or h3) label (--font-size-sm, medium, --color-text-secondary; an optional muted suffix such as "Whole project" while breakdown settings are active), the figure alone in its element (--font-size-3xl, bold, tabular-nums; --font-size-2xl below 480px; data-figure from figureKind; negative figures --color-danger-text-on-light), an optional verdict (Badge, "Over budget" whenever the figure is below zero), the range line directly under the figure and an optional detail line (--font-size-sm, --color-text-secondary), then the "How is this calculated?" disclosure (a text button, --color-primary, 44px, aria-expanded / aria-controls; the panel is --color-bg-secondary, --radius-md). With no figure the element is an en dash with role="img" and the "no figure" label. Card: --color-bg-primary, 1px solid var(--color-border), --radius-lg, --shadow-sm, padding --spacing-5 (--spacing-4 below 480px). Print: no shadow, no disclosure button.
StatTile (Home Pulse, #2230) is the linked variant of a headline figure; see the Home section.
BudgetBar. A horizontal stacked bar (role="img" with an aria-label listing every non-zero segment; segments aria-hidden), heights sm 16px, md 24px, lg 32px, track --color-budget-track, --radius-full, segment colours passed as tokens (--color-budget-allocated, --color-budget-paid, --color-budget-claimed), an over-allocation drawn as a striped --color-budget-overflow segment that stays visible. Used by the Money funding rows, the Financing cards and the funding source page.
CostBreakdownTable. One card (<section aria-labelledby>, aria-busy while refetching) with a toolbar and the tree down to cost lines. Toolbar (FilterChipGroups): View (By area, the default · By type · By category · By funding source), Payment (All · Paid · Not yet paid; ?paymentStatus= kept), "Show estimates at" Low · Expected · High, "Show" Grants (adds Grants and After grants, only with All), and the funding-source filter chip "Funding source: n of N" with a checkbox list (the last selected source is aria-disabled with the reason "Keep at least one funding source selected"). Settings live in the URL; only the source filter is a server request, and its result is announced through one sr-only role="status". Table surface (from 768px of the card's own width, container query): a role="region" labelled by its caption, depth-first rows with a disclosure button (aria-expanded, accessible name "Show ‹row›" / its collapse counterpart) and indentation by depth, collapsed children kept in the DOM with hidden, and a total row; Not yet split is one row in every view. Drill list (below 768px): one level at a time, a row with children drills in, a "‹ Back" button and the level heading. Rows are parts of a figure and carry no data-figure. Print expands every row and prints a one-line summary of the settings. Tokens: --color-bg-primary/-secondary/-hover, --color-bg-inverse / --color-text-inverse (the selected source count chip), --color-border/-strong, --color-text-primary/-secondary/-muted, --color-primary, --font-size-xs/sm/base/lg, --spacing-1 to --spacing-5, --radius-sm/-md, --shadow-focus, --touch-target-min, --transition-fast (none under reduced motion).
States. Loading: Skeleton blocks for headline, strip, funding and breakdown. Error: a role="alert" card with an h2, the message and Retry. A failed breakdown refetch shows a role="alert" banner with Dismiss; a failed first breakdown load shows the card's own error with Retry.
Status: implemented in #2235 (story 4.3); adopted by the offer and invoice page (#2239), the task and purchase pages (#2248, #2249), the area page (#2251, CostLineTable only) and the Convert page (#2240, ConvertLinesTable). Placement Object page › Cost tab. Source: client/src/components/CostLineTable/, client/src/components/CostLineForm/.
CostLinesSection. The cost lines of one record for every host, with the RelatedListHeader (title, count, Add cost line and, on tasks and purchases, New invoice). Item hosts (task, purchase) group their lines into Estimates and one group per offer or invoice; document hosts (offer, invoice) list their lines with the task or purchase each belongs to, plus the Not yet split row with its Split button. It owns add, edit, duplicate, assign, link, unlink, remove and delete, one dialog at a time.
CostLineTable (read-only). Both surfaces are mounted and switched by the list's own width (container query at 48rem), like ObjectList: a <table> with an sr-only caption from 768px, a <ul> of cards (with an accessible list name) below. Columns: description, CostLineStateChip (Estimate · Offered · Invoiced · Paid · Submitted, derived from the linked document's status; an Estimate adds its Basis and margin as muted text, so the state never relies on colour), quantity × unit price in the basis it was entered (marked net or gross), the gross amount through NetAmountTip (a real button opening a tooltip with net and VAT on hover, focus and tap; Escape closes it), and the row ⋯. Group headings show the offer or invoice with company and totals. Tokens: --color-bg-primary/-secondary/-hover, --color-border/-strong, --color-text-primary/-body/-secondary/-muted, --color-warning-bg (Not yet split), --color-danger-bg, --color-primary, --font-size-xs/sm/base/lg, --radius-sm/-md/-lg, --spacing-0-5 to --spacing-3, --shadow-focus, --touch-target-min.
CostLineForm. The one form for a single cost line (create on a task, a purchase or a document; edit; assign). It is an ObjectForm (Modal from 768px, full-screen Sheet below) with the essentials first and "More details" for category, Basis, funding source and company. Pickers are EntityPickers.
Grid entry (CostLineGridDialog, CostLineGrid). The many-lines path: a dialog around a native <table> of ordinary inputs (not role="grid", so Tab and typing work), with an sr-only caption and a labelled scroll region. One blank row is always kept at the end. Keys (gridKeyboard.ts): Enter moves down the column (Shift+Enter up), the vertical arrows move only in single-line inputs, Ctrl/⌘+D duplicates a row, Ctrl/⌘+Backspace removes an empty row, Ctrl/⌘+S and Ctrl/⌘+Enter save. Spreadsheet paste (pasteRows.ts, at most 200 rows) opens PastePreviewDialog to map columns; numbers are parsed for the app locale and ambiguous values are flagged. Document hosts save every row in one transaction through the batch endpoint; task and purchase hosts add estimates. With Paperless on and a linked document, the document preview sits beside the grid from 1024px or in a side sheet. Below 768px of the grid's width each row is a stacked card with the same inputs in the same order (CSS only). Dialog: --shadow-2xl, --radius-lg. Every control is at least --touch-target-min; focus --shadow-focus. AutoItemizeLines reuses the grid for both Split with AI pages (Include toggles, merge selection, the Merge bar and the total with its variance against the invoice amount).
Status: Invoices list #2238 (story 4.6), offer and invoice page #2239 (4.7), Convert page #2240 (4.8), New invoice and New offer dialog #2241 (4.9). Placement Money › Invoices and Money › Invoices › ‹record›.
Invoices list. The shared ObjectList (see Object list): h1 "Invoices (n)" ("n of m" only while a search or filter is active), status chips To pay (preselected; also lists progress payments to pay on offers) · Offers · Paid · Submitted · All with counts from chipCounts, further chips Not fully split, Without document, Refunds due (only when one is due) and Due, no group by default (Group by Status or Company). The Offers chip adds an Offers SummaryStrip (total, paid, remaining on offer) and the offer columns. Row command "Mark paid" applies at once with Undo; multi-select uses SelectionActionBar ("Mark paid (n)"). The footer sum is labelled "Still to pay" and carries data-figure="still-to-pay". No stat cards, no numbered paging.
Offer and invoice page. The detail template (see Detail template): h1 "‹company› · ‹number›" with the description under it; breadcrumb "Money › Invoices", Back to origin when opened from a company or task. An invoice has a StatusMenu, an offer none; the primary follows the state (Mark paid, Add progress payment, Prepare bank report) and the secondary is Convert to final invoice (offer). Strip: Amount · Paid · Still to pay (invoice) or Remaining on offer (offer) · Due · Split % (with "x not yet split") · Funding source · Documents (n); Paid and Still to pay carry data-figure. Tabs Cost (CostLinesSection, document host) · Payments (RelatedList of progress payments and refunds with their StatusMenu and date chips, Add progress payment, Add refund and the final-payment row) · History (ObjectHistorySection). Edit details opens the same ObjectForm as New invoice.
Convert page (/budget/invoices/:id/convert). One page with a StickyActionBar: ConvertLinesTable, a dense cost-line table grouped by task (Offered · Proposed · Keep), the final amount and, when progress payments exceed it, a proposed Refund due with a one-click Add refund. With Paperless and AI on, a document pre-fills the proposal. The record keeps its id and URL. Tokens: --color-bg-secondary, --color-border/-strong, --color-text-primary/-body/-secondary/-muted, --color-danger, --font-size-xs/sm/base, --radius-lg, --spacing-1 to --spacing-5, --shadow-focus, --touch-target-min.
New invoice / New offer dialog. An ObjectForm with company (inline create), number, amount, date, due date, status (To pay by default for invoices), notes, "For task / purchase" (creates one cost line for the full amount in the same request) and "Add another". "Start from a document" (Paperless on) is an EntityPicker of kind document that fills only empty or default fields (company by exact folded correspondent name, date, notes) and announces "Filled from ‹title›"; with AI on it also links to the review page. Opened from the New menu, the Invoices list, the company page and task or purchase cost lines, each with its context pre-filled.
Status: implemented in #2242 (story 4.10) and #2243 (4.11). Placement Money › Financing, Money › Financing › ‹funding source / grant›, Money › Financing › Bank report.
Financing page (/budget/financing, h1 "Financing"). The one primary is Prepare bank report (a link to the bank report with type=claim); the page ⋯ holds Print. Add funding source and Add grant are secondary buttons in the page toolbar and New menu entries (FinancingCreateProvider); each returns focus to its opener. Group "Loans & own funds": one card per source (FinancingSourceCard) with type, status, rate, Amount · Allocated · Paid · Submitted · Unallocated (or the over-allocated amount, shown as it is), a BudgetBar with a visible overflow, "Ready to submit n · x" and the Documents button (DocumentsPanelButton, the only host without a strip). "Own funds" is the renamed system source: no Delete, never ready to submit. Group "Grants": one card per grant (FinancingGrantCard) with status, rate, eligible-costs cap, the calculated expected grant, covered items and deadline. Tokens: --color-border, --color-budget-allocated/-paid/-claimed, --color-danger-text-on-light (over-allocation), --color-text-primary/-secondary/-muted, --color-primary, --font-size-xs/sm/lg, --font-weight-normal/-medium/-semibold, --radius-sm, --spacing-1 to --spacing-6, --shadow-focus, --touch-target-min.
Funding source page. The detail template: strip Amount · Allocated · Paid · Submitted · Unallocated · Rate · Status · Documents (n) (Paid carries data-figure="paid", Ready to submit ready-to-submit); tabs Overview (SectionCards) · Cost (area › item › line through SourceBudgetLinePanel, multi-select with SelectionActionBar "Move to another source") · History (incl. bank-report events). Primary: Prepare bank report.
Grant page. Strip Status · Rate · Cap · Expected · Deadline · Documents (n); tabs Overview · Work (RelatedList of covered tasks and purchases with the kind word, "Link tasks / purchases" through an EntityMultiPicker, row Edit for the amount covered, Remove with Undo that only disconnects) · History. A grant chip (name and rate) marks covered rows in the Tasks and Purchases lists.
Bank report. ReportWizardPage keeps its five steps (WizardStepper). Types Draw-down request · Budget overview · Proof of funds; every in-app entry presets the type and, when it carries one, the source, and then opens on step 3. Step 3 groups invoices by company and pages them (ReportInvoiceList with SelectionActionBar). Step 5 keeps Download apart from "Mark ‹n› as submitted", which opens a ConfirmDialog with count and sum. A submission's History row offers "Revert submission" (modal). The sender links to Project setup › House. Tokens: Layer-2 only (--color-bg-*, --color-border/-focus, --color-text-*, --color-primary/-bg, --color-success-badge-*, --color-warning-*, --color-status-blocked-*, --shadow-sm, --shadow-focus/-focus-danger).
Status: implemented in #2244 (story 4.12). Placement Companies › ‹company› (breadcrumb "Companies"; the sidebar stays on Companies). Source client/src/pages/VendorDetailPage/. The detail template with: one primary Call at every width when a number exists (the tel primary kind, company phone first, else the first contact person's), otherwise Add phone (opens the phone card through SectionCardController.startEdit()); strip Trade (opens the Trades sheet or the filtered list) · Still to pay (data-figure; submitted never counts) · Offers (amount, paid) · Tasks (open) · On site (count, last date); tabs Overview (contact persons first as a RelatedList with Call rows, then phone, e-mail and address SectionCards, each with Edit) · Work (CompanyWorkPanel: tasks assigned, purchases supplied, cost lines naming the company, each a RelatedList) · Payments (RelatedList of offers and invoices with paid so far and still open, plus New invoice with the company pre-filled; Paid carries data-figure) · Site diary (ObjectDiaryPanel) · History (ObjectHistorySection, entityType=vendor). Tokens: --color-primary/-hover, --color-text-primary/-secondary/-muted, --font-size-sm, --font-weight-semibold, --radius-sm, --spacing-2 to --spacing-4, --shadow-focus, --touch-target-min.
Status: Tasks #2245 (story 5.1); Purchases, Companies and Milestones #2246 (5.2). All four are ObjectList (see Object list): h1 with count ("n of m" only while a search or filter is active), at most one primary "New ‹object›", status chips, ObjectListFiltersPanel, row links that navigate in place (Ctrl or middle click opens a new tab), SelectionActionBar for multi-select, no numbered paging.
| List | Default grouping | Status chips | Columns and extras |
|---|---|---|---|
| Tasks | Time window: Late · This week · Next 2 weeks · Later · Done (Done collapsed while other groups have rows), server-grouped with groupCounts ("n of total" while partial) |
Not started · In progress · Done (none preselected) | Task (title link and full-path area chip, grant chip), Status (chip plus Late / Held up / Critical), Dates (planned), Who, Expected cost, Waits for / Holds up (data-figure="holds-up"), row command (Start / Mark done), ⋯; Group by Time, Area, Company or Status |
| Purchases | Status: Planned · Ordered · Delivery scheduled · Delivered (Delivered collapsed) | the four statuses | Name, Status, Area, Company, Delivery, Expected cost, Invoiced; footer Expected · Invoiced · Paid; chips Category, Area, Company |
| Companies | none: flat A–Z (optional Group by trade) | — | Trade chips (top 4 and More trades), Still to pay and Offers columns; one primary "New company"; Trades is an entry in the header ⋯ that opens the Trades sheet (?trades=1) |
| Milestones | none | Upcoming · Reached | Title, Target, Projected, Status (Upcoming / Early · n d / Late · n d / Reached), Waits for and Holds up counts with the task words; the target-date filter |
Page tokens are limited to --color-text-secondary/-muted, --font-size-sm, --font-weight-medium, --spacing-1 to --spacing-3, --touch-target-min and --z-raised (controls above the stretched row link); everything else comes from ObjectList.
Status: implemented in #2250 (story 5.6). Placement Tasks › Milestones › ‹milestone›. Source client/src/pages/MilestoneDetailPage/. The detail template with the title shown once (h1); primary Mark reached (a StatusMenu action with date chips Today · target · Pick) and secondary Change target (opens the Details card through SectionCardController.startEdit()); once reached, the primary is Reopen; strip Target · Projected · Late or Early · Tasks counting toward it (n open); tabs Overview · Work · History. Work holds two separate RelatedLists, "Counts toward this milestone" and "Waiting for this milestone", each with status and dates and an EntityPicker for linking. History lists the de-duplicated delay events (ObjectHistorySection, entityType=milestone). Phone: the template's stacked header and 2-column strip.
Status: implemented in #2251 (story 5.7). Placement Areas › ‹ancestors› › ‹area› (PageBreadcrumbs extraParents, each ancestor links to its Area page). Source client/src/pages/AreaDetailPage/; component details in Architecture › Area page. ObjectHeader with AreaColorDot as titleLeading, the description as user text, no status, and the one primary Log here (a link to the capture screen with the area pre-filled); the page ⋯ has Copy link and Print only (areas are deleted on the Areas index). The create context { areaId } makes the New menu pre-fill the area too. Sub-area chips under the header (FilterChipGroup variant="navigate" layout="scroll", one link chip per child with its colour dot). Strip (4 facts, over the subtree): Tasks (n open · n late, link to the Tasks list) · Expected cost (with "· Paid ‹amount›", where only the Paid amount carries data-figure="paid"; jumps to Cost) · Photos (total and latest date, link to Photos) · Companies (jumps to Companies here). A tab fact scrolls its section into view (instant under reduced motion) and focuses its h2.
Sections (one column, no tabs and no History tab), each with a stable anchor: Now & next here (up to 5 open tasks and purchases as FeedRow variant="object", "All tasks here (n) →" links, and the context rows "Whole floor (no room) · …" for items booked on an ancestor, never added to the counts) · Latest from the site (the 3 newest saved entries, "All diary entries here →" and "Photos of ‹area› →", no second spot grid) · Companies here (read-only RelatedList with Call) · Rooms or Sub-areas (read-only RelatedList with colour dot, photo count and "n open"; only with children) · Cost (read-only CostLineTable mode="item", gross amounts with the net in the tooltip, then "Open Money →"). Sections use SectionCardFrame (no Edit). Each section links into the matching filtered list or page and duplicates no list. States: Skeleton while loading; a failed load shows the role="alert" error card with Retry. Tokens: --color-bg-secondary, --color-primary, --color-text-muted, --font-size-sm, --font-weight-medium, --radius-sm/-md, --spacing-1 to --spacing-16, --shadow-focus, --touch-target-min.
Status: implemented in #2252 (story 5.8). Placement Documents (sidebar secondary group, rendered only when Paperless is configured; /documents redirects to Home otherwise and no documents UI appears anywhere). Source client/src/pages/DocumentsPage/. An ObjectList of Paperless documents (no primary; Paperless owns uploads): search, Type and Tags filters, "Hide already linked" (exact full pages and count), sort by date added, document date, last modified, title or archive number, and the ObjectList batch loading. The Documents panel's Browse all opens this page. A row opens the details panel (DocumentSheet with DocumentDetailPanel in the shared SidePanel: docked beside the list on wide screens, an overlay sheet otherwise, focus returned to the row on close; URL ?doc=<id>, which the command search uses): metadata, content preview, Open in Paperless, and Linked to (DocumentLinkedToList, a RelatedList with Unlink and Undo, plus "Link to…" through an EntityPicker). The page handles the Paperless status itself: checking, not connected, and unreachable (a role="alert" card with an h2, --color-danger-bg, 1px solid var(--color-danger-border), --radius-lg). Tokens: --color-bg-secondary, --color-border, --color-text-primary/-body/-secondary/-muted, --font-size-xs/sm/lg, --font-weight-semibold/-bold, --radius-lg, --spacing-1 to --spacing-8, --touch-target-min.
tokens.css :root {
--color-bg-primary: #ffffff; /* Layer 1 + 2: palette alias */
}
tokens.css [data-theme="dark"] {
--color-bg-primary: #1a1a2e; /* Layer 3: dark override */
}
MyComponent.module.css {
.card { background: var(--color-bg-primary); } /* no change needed */
}
When document.documentElement.dataset.theme = "dark", the browser's CSS cascade automatically picks up the [data-theme="dark"] overrides. No JavaScript or class toggling in components.
Location: client/src/contexts/ThemeContext.tsx
import { useTheme } from '../../contexts/ThemeContext.js';
function MyComponent() {
const { theme, resolvedTheme, setTheme } = useTheme();
// theme: 'light' | 'dark' | 'system' (user preference)
// resolvedTheme: 'light' | 'dark' (actual applied theme)
}Types exported:
ThemePreference = 'light' | 'dark' | 'system'ResolvedTheme = 'light' | 'dark'-
ThemeContextValue— shape of the context value
Provider setup (already in App.tsx):
<BrowserRouter>
<ThemeProvider>
<AuthProvider>{/* app content */}</AuthProvider>
</ThemeProvider>
</BrowserRouter>ThemeToggle was deleted in #2207. Theme is chosen as Light / Dark / System in the user menu (from 1024px) and in the More sheet's user block (below 1024px); both read and write ThemeContext, so the cycle semantics live in the context, not in a component.
The theme preference is stored under the key 'theme' in localStorage. Valid values: 'light', 'dark', 'system'. Defaults to 'system' if not set or invalid.
When theme === 'system', ThemeContext reads window.matchMedia('(prefers-color-scheme: dark)') and subscribes to change events. The resolved theme updates automatically when the OS switches between light and dark mode.
When adding a new semantic token that needs a dark mode override:
-
Layer 2 — Add the token in
:rootwith a light-mode value referencing a palette token::root { --color-my-new-token: var(--color-blue-100); }
-
Layer 3 — Add the override in
[data-theme="dark"]:[data-theme='dark'] { --color-my-new-token: rgba(59, 130, 246, 0.15); }
-
Use in components as normal:
.element { background: var(--color-my-new-token); }
jsdom (used by Jest) does not implement window.matchMedia. The test setup at client/src/test/setupTests.ts provides a polyfill. When writing components that call useTheme(), tests must either:
- Wrap in
<ThemeProvider>(integration-style), or - Mock the
ThemeContextmodule withjest.unstable_mockModule()
Source files live in logo/ at the project root. Each asset has a light variant (black strokes, for light backgrounds) and a dark variant (white strokes, for dark backgrounds):
| File | Type | Use Case |
|---|---|---|
logo/icon_light.svg |
Icon only | Favicon, sidebar logo, docs navbar — light mode |
logo/icon_dark.svg |
Icon only | Sidebar logo, docs navbar — dark mode |
logo/logo_light.svg |
Full logo + text | README hero, docs intro — light mode |
logo/logo_dark.svg |
Full logo + text | README hero, docs intro — dark mode |
All variants share rgb(59,130,246) (blue-500) as the accent color and rgb(209,213,219) gray fills. The difference between light and dark variants is stroke color: black strokes for light backgrounds, white strokes for dark backgrounds.
Component: client/src/components/Logo/Logo.tsx
The Cornerstone logo is a keystone / arch motif — the central wedge stone of an arch, flanked by two column blocks on a shared base. It represents the product's role as the foundational element of a home-building project.
The component is theme-aware: it uses useTheme() from ThemeContext to select the correct image source (/logo.svg for light mode, /logo-dark.svg for dark mode).
Files served:
-
client/public/logo.svg— light variant (copy oficon_light.svg) -
client/public/logo-dark.svg— dark variant (copy oficon_dark.svg)
Usage:
import { Logo } from '../../components/Logo/Logo.js';
// Automatically selects light/dark variant based on theme
<Logo size={32} className={styles.logo} />;Sizes: The logo renders cleanly from 16px (very small) to 200px+. Default size prop is 32.
File: client/public/favicon.svg
The favicon uses the light variant (icon_light.svg) — black strokes are visible on most browser chrome backgrounds. The CopyWebpackPlugin in client/webpack.config.cjs copies client/public/ into the dist/ output directory so the favicon is served correctly in both development and production.
The Docusaurus docs site uses theme-aware logos via the srcDark config option:
-
Navbar logo:
docs/static/img/logo.svg(light) +docs/static/img/logo-dark.svg(dark) -
Intro hero:
docs/static/img/logo-full.svg(light) +docs/static/img/logo-full-dark.svg(dark), rendered via DocusaurusThemedImagecomponent -
Favicon:
docs/static/img/favicon.svg(light variant)
The README uses a <picture> element with prefers-color-scheme media queries (GitHub renders these natively) to swap between logo/logo_light.svg and logo/logo_dark.svg.
The brand primary color is blue-500 (rgb(59,130,246) / #3b82f6). This appears in:
- The cornerstone block fill in all logo variants
- Primary action buttons
- Active nav item in the sidebar
- Focus borders on form inputs
- The
--color-primarysemantic token (light mode)
Status: implemented in #2227 (spec: comment on issue #2227; deviation in the Deviation Log). No new component and no new token: every colour is a --color-photo-* token. RapidCamera is a Sheet (variant="fullScreen") below 768px and a Modal (min(92vw, 40rem), 4:3 viewfinder) from 768px.
Permanently dark stage. The viewfinder, bars and hint are the same in light and dark themes by design (they sit over a live video frame), so they use only --color-photo-* tokens, never theme colours. Secondary text (--color-photo-text-secondary, gray-300) on --color-photo-bar-bg stays at about 5.7:1 even over a white frame (AA).
Top bar (phone). Exactly two items, never wrapping (flex-wrap: nowrap, down to 360px in German): left a text button "Use camera app" (may shrink), right the exit button (margin-left: auto, white-space: nowrap, --color-photo-active-bg). The exit button reads "Review (n)" once at least one shot of this camera session exists (n counts shots that are stored or still saving) and "Close" with none. There is no separate count pill, and "Done" is not used (a task status word). The visible text is the accessible name. "Use camera app" carries a visually hidden description (aria-describedby): photos from the camera app are full size and kept in the camera roll.
Waiting line. Under the top bar, only while photos of the draft wait to upload: one static line "n photos waiting to upload" (--font-size-sm, --color-photo-text-secondary, --spacing-1/--spacing-2 padding, --color-photo-bar-bg). Plain text, not a live region. Retry stays on the capture page.
Low-resolution hint. A strip below the waiting line (--color-photo-bar-bg, --spacing-3 padding, --radius-md, --color-photo-text, --font-size-sm) with the text, a "Use camera app" panel button and a "Not now" text button (both 44px). Shown when the live track (only without ImageCapture) or the first captured still is below 8 MP (FULL_RESOLUTION_MIN_PIXELS in resolution.ts). "Not now" remembers the dismissal for the browser session (sessionStorage) and moves focus to the shutter. It never blocks the shutter. No animation.
Controls. Grid 1fr auto 1fr: tray and a "Remove last photo" text button under it (left, only when a shot exists; wraps to two lines on narrow phones, still 44px high), shutter (centre), switch camera and flash (right). The chips strip (TagChips tone="onPhoto") sits at the bottom of the viewfinder. The starting state adds the line "If your browser asks, choose Allow."
Focus and states. Initial focus is the shutter. Tab order: Use camera app, exit button, hint buttons, chips, Remove last, shutter, switch, flash. The focus ring on this surface is outline: 2px solid var(--color-photo-focus-ring) with a 2px offset, not --shadow-focus (too little contrast on black). The shutter is aria-disabled until the video has its first frame (or a 1.5s fallback) and while closing. Under prefers-reduced-motion the shutter flash, haptic and button transitions are skipped.
Closing and saving. The exit button, Escape and the backdrop all wait for shots still being encoded or written to IndexedDB (capped at 10s). While waiting, the exit button reads "Saving photos…" with aria-busy.
Announcements (one role="status" region, no extra aria-live): "Photo n taken." (n counts this session's shots), the Remove-last message, flash and camera-switch messages, the low-res hint text once, and "Saving photos…" once per close, whichever path started it. The waiting line is not live.
The PhotoAnnotator component (in client/src/components/photos/PhotoAnnotator/) is an in-modal drawing editor that layers an SVG overlay on top of a photo and exposes a ToolPalette for shape drawing. It opens within the existing PhotoViewer modal shell.
Three vertical zones within the annotator:
-
ToolPalette —
min-height: 56px(NOTheight: 56px— usemin-heightso the bar expands when items wrap onto a second row);background: var(--color-bg-primary);border-bottom: 1px solid var(--color-border). The palette usesflex-wrap: wrapso items reflow at narrow viewports when the font-size group is visible. -
Photo + SVG canvas —
flex: 1; dark background (var(--color-overlay)); photo isobject-fit: contain; SVG overlay isposition: absolute; inset: 0; touch-action: none -
Action bar —
min-height: 56px; same style asPhotoViewerinfo bar (rgba(0,0,0,0.7)background); contains Cancel (shared.btnSecondary) and Save (shared.btnPrimary)
A reusable icon button class for both the ToolPalette and the PhotoViewer info-bar additions. Two surface variants:
-
Dark surface (info bar, over
rgba(0,0,0,0.7)): transparent background, white icon (var(--color-text-inverse)),rgba(255,255,255,0.15)hover background,box-shadow: 0 0 0 2px rgba(255,255,255,0.6)focus ring -
Light surface (ToolPalette): transparent background,
var(--color-text-secondary)icon,var(--color-bg-tertiary)hover,var(--shadow-focus)focus ring (standard blue)
Minimum touch target: 44×44px on all breakpoints (min-width: 44px; min-height: 44px).
Active tool state (light surface): background: var(--color-primary-bg); color: var(--color-primary); border: 2px solid var(--color-primary-active). Use var(--color-primary-active) (#1d4ed8) for the active border — not var(--color-primary) — because --color-primary (#3b82f6) against the tinted --color-primary-bg background only achieves 2.25:1 contrast, below the WCAG 1.4.11 minimum of 3:1. --color-primary-active achieves 6.67:1 against white.
Color swatch buttons are visually 24×24px circles but must have a 44×44px tap area. Achieve this with padding on the button while keeping box-sizing: content-box:
.swatchButton {
width: 24px;
height: 24px;
padding: 10px; /* 24 + 20 = 44px tap area */
box-sizing: content-box;
border-radius: var(--radius-circle);
border: 2px solid var(--color-border);
cursor: pointer;
background: none;
}The swatchButtonActive state adds border-color: var(--color-text-primary) and box-shadow: 0 0 0 2px var(--color-bg-primary) for the selection ring — a non-color indicator (ring shape) in addition to the border color change.
Three icon buttons added to the right side of the info bar, visible conditionally:
| Button | Visibility | Icon |
|---|---|---|
| Annotate | Always (authenticated) | Pencil SVG |
| View Original toggle | Only when photo.annotatedAt != null
|
Eye / Eye-slash SVG |
| Clear Annotations | Only when photo.annotatedAt != null
|
Trash SVG |
Clear Annotations opens a Modal confirmation dialog (not window.confirm()).
Annotation colors are fixed content values — they must not be design tokens and must not change with dark mode. Define them as TypeScript constants:
export const ANNOTATION_COLORS = {
red: '#dc2626',
yellow: '#facc15',
green: '#22c55e',
blue: '#3b82f6',
black: '#000000',
white: '#ffffff',
} as const;Color swatches use background-color set via style prop (inlined fixed hex). This is the sole exception to the no-hardcoded-hex rule in component CSS — these are user-visible content colors, not theming.
| State | Treatment |
|---|---|
| Draft (dragging) | Current color stroke, stroke-dasharray: 6 4, opacity: 0.8, pointer-events: none
|
| Committed (Rectangle) | Solid stroke, fill: none, opacity: 1
|
| Committed (Highlight) | No stroke, fill at fill-opacity="0.4"
|
| Selected | Shape + bounding box (stroke: var(--color-primary), dashed 4 2) + resize handles (8×8px <rect>, fill var(--color-bg-primary), stroke var(--color-primary), strokeWidth="1.5") |
Selection handle counts by shape type: rect/highlight/callout = 8 handles (corners + edge midpoints); arrow/line/measurement = 2 endpoint handles; ellipse = 4 cardinal handles (N/S/E/W); text = 4 corner handles (move only); freehand = dashed bounding box only (no handles).
All shape operations must be announced via the aria-live="polite" aria-atomic="true" live region. Required announcements:
| Operation | i18n key | Notes |
|---|---|---|
| Rectangle added | shapeAddedRectangle |
After COMMIT_DRAFT |
| Highlight added | shapeAddedHighlight |
After COMMIT_DRAFT |
| Arrow added | shapeAddedArrow |
After COMMIT_DRAFT |
| Line added | shapeAddedLine |
After COMMIT_DRAFT |
| Ellipse added | shapeAddedEllipse |
After COMMIT_DRAFT |
| Text added | shapeAddedText |
After inline input commit |
| Callout added | shapeAddedCallout |
After inline input commit |
| Measurement added | shapeAddedMeasurement |
After inline input commit |
| Freehand added | shapeAddedFreehand |
After COMMIT_DRAFT |
| Shape deleted | shapeDeleted |
After DELETE_SELECTED |
| Undo performed | undoPerformed |
After undoStack.undo() |
| Redo performed | redoPerformed |
After undoStack.redo() |
| Callout tail phase | calloutTailPositioning |
When phase transitions box→tail |
| Saving | saving |
On save start |
| Saved | saved |
On save success |
| Save error | saveError |
On save failure |
-
Escape: Cancels current operation. PhotoViewer handles Escape at the outer level (
windowlistener) and callshandleAnnotationCancel. PhotoAnnotator should NOT register a duplicate Escape handler to avoid double-execution. -
Arrow keys: When a shape is selected (
state.selectedShapeId != null), arrow keys nudge the shape 1px (or 10px with Shift). When no shape is selected, arrow keys are not intercepted. - Delete / Backspace: Deletes the selected shape.
- Cmd+Z / Ctrl+Z: Undo; Ctrl+Shift+Z / Ctrl+Y: Redo.
-
Toolbar tab order: The
role="toolbar"container should implement roving tabindex (only the active tool button in the tab order; Left/Right arrows move between tools). The color, stroke, and font-size sub-groups userole="radiogroup"+role="radio"which already have their own arrow-key navigation per ARIA spec.
No local [data-theme="dark"] blocks needed in the annotator CSS. All surfaces use semantic tokens that switch automatically. The info bar and action bar are theme-invariant dark overlays — their rgba(0,0,0,0.7) background is intentional and does not change with theme. Inline text input uses color: var(--color-text-inverse) (not the literal keyword white) on its dark overlay background.
Wrap all transform and transition rules in @media (prefers-reduced-motion: no-preference) blocks (positive guard). This applies to swatch hover scale, all icon button background-color transitions, and any animation added in the future.
Status: implemented by #2219 (full spec: comment on issue #2219; implementation reviewed in PR #2306). No new component, class or token.
-
Account chip. The
userAccountvocabulary inuseStatusBadgeVariants(built bybuildUserAccountStatusVariants, labels from theuserAccountStatuskey set incommon): Active (.userActive), Locked (the existing.warningpair), Deactivated (.userDeactivated). Deactivated wins over Locked. The page has no local status colour map. -
Unlock time. A second line under the chip,
--font-size-xs/--color-text-muted: "Until 14:30" on the day the list loaded, else "Until 21 Oct, 14:30". Absolute, never relative (the list does not tick). -
Row menu. The row ⋯ is the shared
OverflowMenu(usePortal, trigger name "Actions for ‹name›"): Edit, Unlock (only while locked), Deactivate (destructive). Unlock has no confirmation (non-destructive); success is a toast, and focus returns to the row's trigger, or to thedata-page-searchfield when the row leaves a Status filter that no longer matches it. - Status filter. Active, Locked, Deactivated; Active excludes locked accounts. The filter is multi-select (values arrive comma-joined).
-
One primary button per page (Phase 1 exit check). Demoted to
.btnSecondary: "Add deposit" on Invoice detail (the primary is "+ Add Budget Line") and "Generate token" on Settings > Account (the primary is the display-name "Save")..btnSecondaryhas a 1px border, so it is 2px taller than.btnPrimary; accepted. -
No access. One
RoleGuardlayout route withNoAccessPageserves Users, Backups and Integrations; the member E2E covers every admin URL from the route map.
Status: implemented in #2247 (full spec: comment on issue #2247). The Schedule replaces the Timeline page: title "Schedule", opens scrolled to today and to the first current row, Done hidden, Critical path on (Show, zoom, Group and the area chip are remembered per user). Toolbar: zoom Day / Week / Month (shared .segmented), Show ▾ (OverflowMenu, six checkbox items: Tasks, Milestones, Purchases, Dependency arrows, Critical path, Done), Group, area chip, Today, ⋯ (Subscribe in calendar app), Legend. No primary button.
Bars (Gantt tokens). Light-theme fills changed so every bar meets 3:1 against the row background (dark unchanged, already above 3:1): --color-gantt-bar-not-started gray-400 → gray-500, --color-gantt-bar-completed green-500 → green-600, --color-gantt-arrow-critical and --color-gantt-bar-critical-border orange-400 → orange-700 (dark keeps orange-300). New tokens: --color-gantt-bar-late-hatch (light white, dark slate-600), --color-gantt-bar-ghost-stroke (--color-text-muted), --color-gantt-bar-preview-stroke (--color-primary). The pairs are in the #2200 contrast test.
Late task. The bar keeps its status fill and gets a 45° hatch overlay (--color-gantt-bar-late-hatch), a 2px --color-danger outline, a Late (or Held up) chip in the row label, and a dashed ghost outline at the planned dates (--color-gantt-bar-ghost-stroke). Late is never colour-only. Blocked stays solid red, un-hatched. Schedule rows are 44px (--touch-target-min); the label is title plus "Area · Company".
Side panel. SidePanel (components/Modal) has three modes: docked (non-modal, width: var(--side-panel-width) = 22rem, from 1440px), side sheet (overlay, keeps --side-sheet-width: 30rem, modal) and bottom sheet (phone). Sections: When, Who with CallButton, status (StatusMenu), Waits for, Holds up (the sentence carries data-figure="holds-up"), Reschedule…. Reschedule swaps the panel body to end date / duration fields and shows an impact preview (role="status") with dashed preview ghosts (--color-gantt-bar-preview-stroke) before Save. New token: --side-panel-width: 22rem. The Reschedule body is the shared ReschedulePanel (components/ReschedulePanel/, also on the task page's Timing tab): end date and duration fields that follow each other after a short pause, the "what moves" list (a few rows, then Show all), Save with Undo and Cancel; nothing is saved until Save. Its tokens: --color-bg-primary/-secondary, --color-border, --color-text-primary/-secondary, --font-size-sm, --radius-md, --spacing-1 to --spacing-6, --touch-target-min. Toasts clear the docked panel (#2247): while the docked aside is open, SidePanel publishes --docked-panel-width: var(--side-panel-width) on :root (removed on close, unmount and when the viewport drops below 1440px), and the Toast container's right becomes calc(var(--spacing-6) + var(--docked-panel-width, 0rem)), the same mechanism as --sticky-action-bar-height. Overlay modes (side sheet, bottom sheet) publish nothing.
Breakpoint. 1440px is not a token and not a CSS literal: the docked/overlay switch is the JS constant SIDE_PANEL_DOCKED_QUERY = '(min-width: 1440px)' read through useMediaQuery. tokens.css still has no breakpoint tokens.
Shared segmented control. .segmented, .segmentedButton, .segmentedButtonActive in shared.module.css (promoted from the Timeline zoom toggle; aria-pressed buttons). Used by zoom and by the phone Agenda | Gantt toggle.
Phone. Agenda (sticky week headers, rows with mini bars in the same status tokens and hatch) is the default; Gantt is one toggle away with a sticky name column; both open the bottom sheet.
Accepted deviations from the visual spec on issue #2161, requested by the dev-team-lead:
-
Limit field is
<input type="text" inputMode="decimal">with live validation, nottype="number". Rationale:type=numbergives locale-inconsistent decimal handling (comma vs. point) and silently swallows invalid input, so the 1-decimal/min-1 rules cannot be reported. Requirements preserved: visible<label>,aria-describedbyto helper andFormError variant="field",aria-invalid, text (not color-only) errors, 44px min height on mobile. Applies as a pattern for any future decimal field that needs locale-aware validation messages. -
Sizing failure card has an extra "Continue without them" action alongside Retry and Back (DOM order: Retry
btnPrimary, ContinuebtnSecondary, BackbtnSecondary). It lets the user export without attachments that cannot be fetched; those documents are excluded from the sizing. The failure is aFormError variant="banner"plus a list of failed documents. Focus: on failure it moves to Retry; "Continue without them" advances to step 5 and the generic step-change effect focuses the step-5 heading (no dedicated target); Back/Cancel returns to step 4 and focuses the step-4 heading. -
Stale-files state with an "Update files" button. When settings change after parts were generated, the
FileListstays visible with its per-row actions disabled, and a notice is passed aschildren: a plain<p>(no live role, no banner; it is static text, not an announcement) in a.partsStaleflex row (--font-size-sm,--color-text-secondary, wrap,--spacing-2gap) next to abtnSecondaryCompact"Update files" button. It is not abannerWarning. There is no dedicated focus move after "Update files": the button stays where it was while the parts regenerate. The 44px mobile touch-target minimum applies to the compact button (and to the preview part select). Focus management exists only for the upload round, which returns focus to theFileListheading (headingRef,tabIndex={-1}) when it finishes, whether it succeeded or partly failed.
| Date | Was | Now | Reason |
|---|---|---|---|
| 2026-10-02 |
var(--color-slate-300) #64748b |
var(--color-slate-250) #8392aa |
Old value was 3.58:1 / 3.34:1 / 3.07:1 on bg-primary / bg-secondary / bg-tertiary, failing WCAG AA 4.5:1 for normal text. New palette step --color-slate-250: #8392aa (between slate-300 and slate-200) gives 5.41:1 / 5.04:1 / 4.64:1 and stays below --color-text-subtle/--color-text-body (slate-200 #94a3b8: 6.65 / 6.20 / 5.71:1). Light-mode muted (gray-500 #6b7280) is 4.83:1 on bg-primary and 4.63:1 on bg-secondary (pass), but only 4.39:1 on bg-tertiary #f3f4f6, which failed AA (fixed in the light-mode row below). |
| 2026-10-02 |
var(--color-gray-500) #6b7280 (light muted and light quoted) |
var(--color-gray-550) #656c7a |
Old value was 4.83 / 4.63 / 4.39:1 on bg-primary #fff / bg-secondary #f9fafb / bg-tertiary #f3f4f6, failing on tertiary. New palette step --color-gray-550: #656c7a (between gray-500 and gray-600) gives 5.28 / 5.05 / 4.80:1. Gray-600 was rejected because it is --color-text-subtle (7.56 / 7.23 / 6.87:1); gray-550 stays visibly lighter than subtle and than secondary/body (gray-700 #374151, 10.31 / 9.86 / 9.37:1). --color-text-quoted light moves with it. |
Note: --color-source-0-dot still uses slate-300; it is a non-text indicator (3:1 threshold) and is unchanged.
| Date | Change | Reason |
|---|---|---|
| 2026-10-10 | Light primary moved from blue-500 to the blue-600 family (hover 700, active 800, focus border 600); light success to green-650; light danger to red-600 family (hover 700, active 800). | White text on the old fills was below 4.5:1 (blue-500 3.68:1). blue-600 gives 5.17:1, green-650 5.48:1. |
| 2026-10-10 | Dark surfaces re-tuned: page slate-950 (new --color-bg-page), cards slate-600, secondary/hover slate-550 (new), tertiary slate-500; borders slate-400 / slate-300; muted, subtle, body, placeholder and quoted text slate-200; danger red-350 (new) with red-300 hover. |
Dark cards were nearly invisible against the page; borders and muted text failed AA. Cards now 1.26:1 against the page. |
| 2026-10-10 | New palette: slate-950, slate-550, green-650, red-350, red-800. --color-gray-550 changed #656c7a to #5f6674. Removed slate-800, slate-700, slate-250, --color-sidebar-active. |
AA on bg-page and tertiary for muted text; unused tokens deleted. |
| 2026-10-10 |
--color-text-placeholder is text-only (light gray-550, dark slate-200); --color-text-disabled is non-text-only (light gray-400, dark slate-400). |
Placeholders are readable content and need 4.5:1; disabled is exempt. |
| 2026-10-10 | Active nav item uses --color-nav-active-bg/-text (blue-600 / white, both themes), weight 600. Pagination hover: --color-bg-hover plus primary border. |
Spec deviation: --color-border-strong is already the resting border, so it showed no hover change. |
| 2026-10-10 | Not-found h1 reads "Task not found" / "Purchase not found" (new glossary keys), not the existing "Work Item Not Found" text. | Visual spec R2 said "keeps the existing text", but that text uses banned words; the h1 is page identity (#2202). |
Superseded: the 2026-10-02 --color-text-muted rows above (slate-250 #8392aa, gray-550 #656c7a) describe values that no longer exist.
Where the shipped behaviour differs from the first spec text:
- (D3) The "Search everywhere" row is off only for Users. Funding sources (Budget sources) and Grants (Subsidy programs) are not
DataTablepages and carry no row; the diary filter bar does. The documents browser gets no row. - (D7) Results without a label reuse the names the object's own page uses: an invoice or offer without a number is labelled "Invoice" / "Offer" and a diary entry without a title uses the untitled diary name with its type word and short date.
- (D8) The row text truncates with CSS ellipsis, not at 40 characters.
- (D10) ⌘K / Ctrl K is a capture-phase
windowlistener (not adocumentlistener) that always callspreventDefaulton a match, because the diary filter bar stops keydown propagation. Both ⌘K and Ctrl K work on every platform.
Where the shipped behaviour differs from the first spec text:
- (a) The shell adds no primary button.
ObjectForm, rendered from the router root, has the only one: Save. - (b) The discard confirm keeps the shared danger action (not
tone="primary"). - (c) A pointer open of the New menu keeps focus on the trigger; only a keyboard open moves focus to the first row.
- (d) The page behind the dialog is hidden from assistive technology by
aria-modal, not byinert. - (e) The Gantt view pre-fills no date for the New menu.
Where the implementation spec differs from the first visual spec:
- (S5) The trade name input allows 200 characters (the server limit), not 100.
- (S6) The Call button's accessible name always starts with its visible text. The first spec claimed "Call ‹number›" is a prefix of "Call ‹name› on ‹number›"; it is not, so that variant is named "Call ‹number›, ‹name›".
- (S7) A hidden-by-default E-mail column keeps the mailto links the old Contact column carried (MNY-136 "Call or e-mail").
- (S8) The default Name sort shows no
aria-sortindicator:DataTablehas no default-sort concept, and every list shows none until the user sorts. - (E1) The company fields of the invoice create modal and the purchase form become search pickers with the create row, so AC5 holds there; other native company selects (task assignment, filters, detail pages) stay selects.
- (E2) Creating a company from the invoice edit modal stacks one dialog over it (the first spec said dialogs never stack). Accepted with a guard: the lower dialog is not dismissible while the company form is open, so one Escape closes only the top dialog and Tab stays inside it; focus returns to the picker input.
Where the implementation spec differs from the first visual spec (comment on issue #2214), all accepted:
- (A1) The Regenerate
ConfirmDialoguses the default danger tone, nottone="primary".ConfirmDialogsupports onlydanger; a primary branch would put a primary-class button into the shared component and raiseprimaryButtonson every screen that imports it. Invalidating the old token is destructive for the connected apps, so danger fits, and it matches Revoke. Wording is unchanged ("Create a new token?" / "Create new token"). - (A2) The Copy and Hide token buttons sit outside the token's
role="status" aria-atomic="true"region, which wraps only the warning and the<code>. A separate, always-mounted, visually hiddenrole="status"(noaria-atomic) announces "Token copied", so the "Copy" to "Copied" label swap never re-reads the secret. - (A3) Busy buttons use
aria-disabled="true"and stay focusable; fields arereadOnlywhile busy, neverdisabled. Focus after Generate or Regenerate goes to Copy, after Hide token to Regenerate, after Revoke to the section heading (tabIndex={-1}), never<body>. - (A4) The first section heading is "Your details", not "Profile": "Profile" is a former name of Account in the glossary (
formerly), so it may not be a label. Capmap placement strings that sayAccount > Profilename the surface and should be updated toAccount > Your detailsin the same PR so the capmap and the page agree. - (A5) The password form shows for
authProvider === 'local', including a local account linked to single sign-on (it still has a password). The SSO note replaces the form only for SSO-only accounts. The Sign-in method row shows whenoidcEnabled || authProvider === 'oidc' || oidcLinked.
The live E2E run found 48px side gutters at 767px and below (.pageContent 32px plus PageLayout 16px), against the intended 16px. The shell CSS is fixed so the phone gutter is 16px for every page, owned by the shell (.pageContent var(--spacing-4) at 767px and below, PageLayout .container adds 0 on phones, because many pages do not use PageLayout); tablet and desktop are unchanged at 64px per side. The first Account spec (section 10) also assumed a single 32px container padding at 768px and above, so its "available width" figures (704px and 976px) were too large (the true values are 640px and 912px at 768px and 1280px); the 640px column cap and the 343px phone width are unaffected.
Where the implementation spec differs from the first visual spec (comment on issue #2215), all accepted:
- (P1) Reorder sends one request with the full id list per finished move, not one PATCH per moved row (architect contract, owner decision 7).
- (P2, decision E1) Category deletes show no counts. The first spec asked for
useDeleteImpactcounts on all three lists. The server suppresses the details ofCATEGORY_IN_USE(#315), so cost and purchase categories use the dialog's blocked state with a fixed sentence per list and no Delete button; photo orientations keep the server-counted consequences. - (P3) The Areas URL is built with
navHref('areas')while the route is unserved, becauserouteUrl('areas')does not compile for aplannedroute. The pointer row and the interim card swap onisRouteServed('areas'). - (P4) The Photo orientations anchor is
#orientations, not#photo-orientations: the route map already targets?tab=orientationsto#orientations. Test ids keepproject-setup-photo-orientations. - (P5, decision E2)
ManagePageprimary buttons go 9 to 4, not 9 to 1. The first spec assumed the shared dialog's Save did not count; the baseline sums every file in the page's import closure, so the ReferenceList dialog Save counts, and the interim Areas card (kept unchanged) adds two. 2 after #2218. - (P6) US spelling: "Color" and "No color" (the English locale is US English throughout); the first spec wrote "Colour".
- (P7) Per-list string templates ("New {{item}}", "No {{items}} yet.") with the glossary noun as the value, so a money-label baseline count does not rise. The purchase-categories description is "Group your purchases by type." ("Household" is a banned word).
- (P8) The language hint is a complete sentence followed by a separate "Set the app language in Account" link, not an inline link inside the sentence; fragments do not translate.
- (P9) Browser Back is not intercepted by the dirty-close discard confirm (the dialog is not URL-backed and the router has no blocker). Cancel, Escape and the backdrop are.
- (P10) Route-map stages:
/budget/categoriesbecomesdone, and the six/settings/manage?tab=query maps becomeinterim(the page now serves them).
- (A1) The colour control lives in
components/ObjectForm/ColorField.tsx(not inObjectFormField.tsx); the Project setup New/Edit dialogs (ObjectForm,kind: 'color') render it (ReferenceListDialogwas retired in #2256). The spec's premise that the baseline counts only new file names was wrong; the recipe is unchanged. - (A2) The delete dialog uses the shared
ConfirmDialogconsequences list and the common delete title instead of the spec's sentences; the blocked texts and links stay area-specific. - (A3) The Undo toast follows the shared
UNDO_TOAST_MS(6 s); the server token still lives 30 s. - (A4)
AreasPagedestinationsis 0, not up to 3, becauseNavAnchoris not counted. - (A5) The spec asked the page status region to announce a delete; the Undo toast already is a live region, so the delete is announced once (by the toast). The restore is still announced by the page.
Where the implementation spec differs from the first visual spec (comment on issue #2217), all accepted:
- (I1) The card the visual spec called "Diary events" is headed History (anchor
#history), the glossary canon: "Automatic diary entries" is aformerlyname of History. Its purpose line must say what it does in History's words ("Records changes to your project automatically in History."), not "adds entries to the Site diary". The server key staysdiaryEvents; the settingDIARY_AUTO_EVENTSis listed as the literal variable until #2223 removes it. - (I2) Card 4 is headed Calendar & contacts sync (glossary canon, verbatim); the anchor stays
#calendar-contacts. - (I3) The SSO fact is Sign-in service, not "Login service", to match "Sign-in method".
- (I4) Chip labels live under
common:integrationStatus.*andcommon:backupRun.*, notstatusVocabulary, becauseglossary.test.tsrequires everystatusVocabularyleaf to be a glossary term; the colours still come only fromstatusBadgeVariants.tsxand the keys go throughI18N_UNION_KEYS. - (I5) The Backups page's local Enabled/Disabled colour map is replaced by the shared On/Off chips (the chip now reads "On"/"Off"), because local status colour maps are not allowed. The visual spec had moved only the last-run map.
- (I6) The admin "See Integrations" link is
navigation/IntegrationsLink.tsx, not acomponents/entry, so the pattern baseline gains no shared component. The visual spec's claim that the page'sdestinationsare itsNavAnchors was wrong (they are not counted); the page enters at 0. - (I7) The Paperless "filter tag not found" notice is kept (see the Paperless states above).
- (I8)
EmptyStategainsmessageAs="h2"and an optionalmessageRef(the message takestabIndex={-1}only when a ref is passed, and shows--shadow-focuson:focus-visible); default output for existing callers is unchanged. - (I9) The displayed redirect, server and Paperless addresses have user info removed, and the photo limit shown is the effective upload limit (
min(setting, 50)MiB), not the raw setting. - (I10) The visual spec's "Documents section" rule is made concrete: nothing when Paperless is off and no links exist; a read-only notice (plain text, not a warning banner) when links exist, with the admin-only link. The quotation dialog hides the Source document section and the AI block when those integrations are off.
Where the implementation differs from the visual spec (three comments on issue #2221), all accepted:
- (C1) Names:
CameraCaptureisRapidCamera, the chip rows arephotos/TagChips, the form body isdiary/CaptureScreen(names reserved in the pattern baseline);EntryTypeChipsandSiteDetailsFieldsare helper files, not counted components. - (C2) The annotate button reads "Annotate" (glossary canon), not "Mark up".
- (C3)
StickyActionBarisposition: fixedwith an in-flow spacer, notsticky, because the shell's main column never scrolls; it uses the existing--shell-bottom-height(no new--bottombar-height) and publishes--sticky-action-bar-heightfor the Toast. - (C4) There is no in-app leave blocker (
BrowserRouterhas nouseBlocker); uploads continue app-wide and persist, so nothing is lost.beforeunloadcovers memory-only photos and a dirty saved-entry edit; a saved-entry edit has Cancel with "Discard changes?". - (C5) Photo Remove uses a new Undo toast ("Photo removed.") from the photo-trash restore snapshot, with no confirm dialog on drafts or saved entries.
- (C6)
DiaryCapturePagecounts 3 primary buttons in the pattern baseline (import closure), one visible. - (C7) Stored types are
issueandgeneral_note; the site visit needs Inspector and Outcome; the fake camera runs in Chromium only (WebKit gets a stub); "The camera can't be used" replaces "The camera isn't available" (the old wording read as a money label). - (C8) An annotation moves with a photo as the baked image (
GET .../filethenPUT .../annotation), not as vector data.
Dated 2026-10-19. Where the implementation differs from the visual spec (comments on issue #2225), all accepted:
- (D1) The week detail uses
formatDayRange("October 12 – 18, 2026"), not a hand-built "12–18 Oct": the existing formatter is locale-correct. - (D2) Rows carry no
role="article": an<li>with a non-listitem role inside a<ul>fails axe'slistrule. They stay<li>in therole="feed"container. - (D3) A filter change shows the first-batch skeleton instead of keeping the old list at reduced opacity:
useInfiniteScrollclears its items on everyresetKeychange, and changing the hook is out of scope. - (D4) The viewer button reads "Annotate" (key
photoViewer:annotateLabel; "Annotate photo" stays forPhotoCard), and its disabled reasons reuse the existingannotateDisabledSigned/annotateDisabledMissingDimensionswords instead of new copy. - (D5) The manual diary type badges have no border: the spec named
--color-diary-*-bordertokens, but only-bgand-textexist (the automatic type keeps--color-diary-automatic-border). - (D6)
FeedGroupandDiaryEntryFeedRoware notallowedAdditionsentries: the baseline counts onlyX/X.tsxfiles. - (D7) Round-1 review fix: the row hover is a border and shadow change, not a fill change, because
--color-bg-hoveris identical to--color-bg-secondary; active-filter chips and entry-page area chips use--color-primary-hovertext to reach AA contrast.
Dated 2026-10-19. Where the implementation differs from the visual spec (comments on issue #2226), all accepted:
- (D1) The load-error "Try again" buttons (Photos page, spot viewer, select-mode error) are
btnSecondary, notbtnPrimary: the pattern baseline counts primary buttons per screen, and the page's one primary is "Set tags" (selection bar) or "Save tags" (details editor). A retry beside an error message reads fine as secondary. - (D2) Every cell of the 'No area' row opens the whole 'No area' group (at that cell's latest photo), not a per-orientation series: the no-area bucket is not a spot, and one rule avoids a cell whose count disagrees with the viewer's N.
/photos/spot/none/<orientationId>stays valid for old links. - (D3) The Edit tags button (label kept from the acceptance criteria) also covers the caption: the editor has Area, Orientation and Caption. The retired sidepanel's "Upload date" became "Diary date".
- (D4) The tag save in the entry-page
PhotoViewershows no Undo toast, only the inline "Tags saved" status; the spot viewer and the bulk dialog do show Undo. Judged acceptable, not a finding: on the entry page the photo stays where it is, so the result is visible in place and one more Edit tags reverses it, whereas in the spot viewer and the bulk move the photo (or many) leaves the current view, which is the case the Undo toast exists for. The server still returns a token and the panel passesundotoonSaved, so a later story can add the toast without a panel change. - (D5) Annotate (spot viewer) and the bulk Set tags dialog open through the App-root
PhotoDialogsProvider, soPhotoAnnotator's and the dialog's primary buttons stay out of the page closures (pattern baseline).AreaLinkand "Open diary entry" areNavAnchors for the same reason. - (D6) The phone viewer hides the shell bars by not rendering them (
useImmersiveShell), not with adata-layoutvalue: a CSS-only switch would leavehtml[data-shell-bar]and the bar padding in place. The viewer's own chrome is hidden withopacityandpointer-eventsso focus can reveal it. - (D7)
AreaLinklinks to the Areas index (routeUrl('areas')) until routeareais served (P5.7), with a marker comment; the spec'sisRouteServed('area')switch was dropped because the interim pattern elsewhere is the marker comment.-
Resolved (2026-11-25, #2262): #2251 served
area;AreaLinklinks torouteUrl('area', { id })and the marker comment is gone.
-
Resolved (2026-11-25, #2262): #2251 served
Dated 2026-10-22. Where the implementation differs from the visual spec (comment on issue #2230), all accepted:
- (H1) The attention row variant is
FeedRow variant="object"(renamed fromattention) because This week items use it too. - (H2) Needs attention is not hideable (capability PLT-049); only Tidy up collapses, and Customize says so.
- (H3) The "Holds up" term hint is not built: the line is a plain fact. Not now keeps its hint (
titleplusaria-describedby) and is followed by the Undo toast. - (H4) The Discard confirmation lead is the delete-impact consequences plus one line for photos still waiting to upload.
- (H5) Money wording follows the pattern baseline: "Add your first funding source" and "n open invoices" (the Still to pay tile links to the open invoices).
- (H6) The Pulse progress fill is
color: var(--color-primary)withbackground-color: currentcolor: same colour, and it stays visible in forced-colors mode. - (H7) Links whose final home is not built yet are interim and carry marker comments (Left to spend without a source, Still to pay, Reschedule).
-
Resolved (2026-11-25, #2262): all three were switched by their stories (Left to spend without a verdict →
financing, #2242; Still to pay →invoices, #2238; Reschedule → the task page's Timing tab, #2248). No interim marker comment is left inclient/src/(grep -rn -i interim client/src --include=*.tsxfinds onlyDocumentsPanelButton's docblock).
-
Resolved (2026-11-25, #2262): all three were switched by their stories (Left to spend without a verdict →
- (H8) Where-chip accessible names are the visible area path, not "Log in ‹path›": the repo rule is that an accessible name starts with its visible text.
- (H9) Round-1 review fixes, verified against
tokens.cssandshared.module.css:-
New tokens. Primitive
--color-orange-800(#9a3412) and semantic--color-warning-badge-text(light--color-orange-800, dark--color-orange-300), used only by the amber attention badge (Badge.attentionAmber, over--color-warning-badge-bg). Orange-700 on the light badge over a--color-bg-secondaryrow was 4.40:1 and failed AA. Measured text on the composited badge fill: light 6.21:1 on a--color-bg-secondaryrow (6.49:1 on--color-bg-primary); dark 5.32:1 on a--color-bg-secondaryrow (6.09:1 on--color-bg-primary). All at least 4.5:1. -
Shared
.btnText(shared.module.css): the one text-style button (no border or fill,--color-text-secondary,--font-size-sm, medium weight,--radius-md,min-height: var(--touch-target-min)so a 44px target,--shadow-focuson:focus-visible). Hover turns text to--color-text-primaryand underlines it, but not whilearia-disabled="true"; the disabled state isopacity: 0.5withcursor: not-allowed. Used byAttentionRowView(Not now, Show again),AttentionSectionandSetupChecklist. No local text-button recipes. -
Set-up step glyph.
.stepGlyphDoneis--color-bg-primaryon--color-successwith a--color-successborder: 5.48:1 light, 7.61:1 dark (white on emerald-400 was 1.92:1 in dark). -
Moved-notice dismiss.
.noticeClosecomposes the shared.btnIcon(neutral, not danger red), 44px minimum. - An unreadable set-up step is announced "Not checked:", not "To do:".
-
New tokens. Primitive
Dated 2026-10-19. Where the implementation differs from the visual spec (comment on issue #2227), accepted:
- (R1) There is no in-app "Leave anyway?"
ConfirmDialogand nocamera.leave.*keys: the router cannot block navigation (BrowserRouterhas nouseBlocker, see C4), and the loss window is only the encode and IndexedDB write (milliseconds). Insteadbeforeunloadalso covers shots still saving, the exit button, Escape and the backdrop wait for pending writes (max 10s), and a shot stored after the screen was left still joins its draft without navigating the user back. - (R2) The low-resolution dismissal is remembered for the browser session, not only for the camera session.
Dated 2026-10-22. Where the implementation differs from the visual spec (comment on issue #2233), decided by the dev-team-lead and product owner, accepted:
- (T1) No
?tab=rewrite when the parameter is absent: the first applicable tab shows without a parameter. An unknown or inapplicable value is removed withreplace, and selecting the first tab removes the parameter (the spec normalised an absent value to the first tab's id). Shared links to a bare object URL stay clean. - (T2) The SummaryStrip focus ring is an inset 2px
box-shadowin--color-border-focus, not the repo's outer--shadow-focus, because the strip clips overflow (rounded corners and 1px separators). - (T3) The ⋯ trigger uses
OverflowMenu's default 44px target at every width (the spec had the header controls at 40px from 1024px). - (T4) SectionCard's Discard prompt is a
ConfirmDialogfor Cancel/Esc and for a neighbouring card's Edit; the save hint ("Ctrl+Enter to save") shows only when the form has a textarea. - (T5) Tag chips are not shown on the Documents panel rows (they stay in Details).
- (T6) Browse all is hidden until the
documentsroute is served.
Found while specifying (fixed by the new components, not deviations): SubNav used --shadow-focus-subtle (10% alpha, under 3:1) for its focus ring and --color-primary text for the active tab (4.07:1 in dark mode); ObjectTabs uses the tab bar plus text-primary instead. The detail pages' click-to-edit <h1 onClick> was not keyboard reachable.
Dated 2026-10-22. Where the implementation differs from the visual spec (comment on issue #2234), decided by the dev-team-lead and product owner, accepted:
- (L1) Build-only:
ObjectListships as a template with no page adopting it; the list pages migrate in P4.6, P5.1 and P5.2. - (L2) Group by and Sort use the existing
OverflowMenu(choiceentries) instead of a new anchored panel / bottom sheet; the Filters surface keeps the panel / sheet split. - (L3) The list's live region keeps
aria-atomic="true"(the spec said noaria-atomic); announcements are single short sentences, so a whole-region read is correct. - (L4) The Site diary Filters sheet's Done became secondary and Clear a text button (it was primary).
- (L5) Select-all appears in the note row on the card (narrow) layout only and in the table header on the wide layout.
- (L6) Cards are strictly two lines;
renderSecondaryis table-only and card chips go into the three facts. - (L7) Chips wrap or scroll by the list's container width, not the viewport.
- (L8) The Filters count badge stays primary coloured (
.filtersToggleCount), so the analyzer counts a second primary on pages that show it. - (L9) The wide Filters panel has no Done or Clear footer (Esc and outside press close it; Clear filters is in the note row); the footer exists on the bottom sheet only.
- (L10) (#2238)
SelectionActionBarisposition: fixedabove the shell bottom bar (--shell-bottom-height) with an in-flow spacer, and publishes--sticky-action-bar-heightwhile mounted, instead ofposition: stickybottom. Sticky could not pin inside the shell's non-scrolling.mainContent, so on phones the bar sat under the bottom bar. This is the defaultplacement: 'fixed', used by ObjectList. ReportInvoiceList and AutoItemizeLines useplacement: 'inline'(the bar stays in flow, no spacer sync, no--sticky-action-bar-height), because a fixed bar covered the report wizard's Next button on phones (CI).
Where the implementation differs from the visual spec (comment on issue #2247), accepted:
- (D4) The overlay side panel keeps
--side-sheet-width: 30rem(the spec saidmin(24rem, 100vw - gutter)); only the docked panel uses the new--side-panel-width: 22rem. - (D5) No
--breakpoint-2xltoken (the spec asked for one): 1440px lives only in the JS constantSIDE_PANEL_DOCKED_QUERY, matching the rule thattokens.csshas no breakpoint tokens and no CSS literal. - (D6) The late chip reads "Late" or "Held up" depending on whether the task slipped itself or is held by a predecessor (spec: always "Late").
Last updated: Schedule (#2247)
Managed by the ux-designer agent
Deviations from the visual spec posted on issue #2248:
-
Documents is the 7th strip fact (not moved to the ⋯ menu); the grant is a muted
.remarkon Expected cost ("+n more" for several), not its own fact. - Call only for companies (household members have no phone on record).
- The second dependency list is titled "Waiting for this task", not "Holds up".
- Constraints is its own card on Timing, outside the Reschedule section.
- ⋯ Move up / Move down reorder checklist items instead of drag.
- Deleting a checklist item or a note uses a
ConfirmDialoginstead of Undo. - Add ▾ sits after Details and Who and where (it offers only what is missing).
- One Milestones list with a relation dialog replaces separate waits-for/counts-toward lists.
- Site diary block 2 is hidden while empty.
- The date step belongs to
StatusMenu; after completion the primary is Log (a link).
Deviations from the visual spec posted on issue #2249 (each rests on a code fact; the Late badge follows the product-owner ruling):
- Late badge reads "Late · n d", not plain "Late": the one schedule-signal badge used app-wide (Schedule panel, glossary chip).
-
Waits for takes tasks or milestones, not purchases: dependency predecessors are
work_item | milestone; purchases are terminal nodes. The milestone option stays (new EntityPicker kindtaskOrMilestone). -
Delivered primary is Log, not omitted:
ObjectHeader.primaryis required; Log fits (Delivery is a diary entry type). - Strip Delivery says "Target ‹date›", not "Expected ‹target›": "Expected" is the money-scenario word.
- No "Planned: ‹window›" line on the Delivery card: the Earliest and Latest rows are the plan.
-
History is the created/updated line only: no
ObjectHistorySection, because history events do not name purchases. - Mark ordered has a date step (Today · As planned · Pick); the planned date offered is the existing order date.
- The product link is a link only for http(s); other values are plain text.
-
/editredirects through the route map (one hop,?edit=overview), not a state flag.
Decisions made in the implementation spec, accepted by the ux-designer:
-
Switch is a native
<input type="checkbox" role="switch">in the footer label, not a custom track: no switch component exists; the label carries the meaning. -
"Turned off" marker is a shared neutral
Badgeon a muted row, not colour alone. -
Symbol key caps use sr-only spoken names, not
aria-labelon<kbd>(the spec'saria-labelis not reliably announced on a role-less element). -
The avatar-row
?hint is hidden while the switch is off (the key does nothing then). - The Delete cap is translated ("Entf" in German).
-
Finding for the frontend (Low, fix-in-session):
.switchInput:focus-visiblesetsoutline: noneand relies on--shadow-focus(30% alpha, below 3:1 on a 13px native control). Keep the native outline or useoutline: 2px solid var(--color-border-focus); outline-offset: 2px.
- (product-architect, wiki accuracy) The Areas index log (A1) and the Project setup section name
ReferenceListDialog. #2256 retired it: the Project setup New/Edit dialogs are ObjectForms over the reference schemas (costCategoryForm,purchaseCategoryForm,orientationForm), rendered throughReferenceList.renderForm; Description and Colour sit under "More details". The Project setup New / Edit dialog and E2E sizes paragraphs (bottomSheetbelow 768px, all fields in one view) are superseded by ObjectForm's container and layout (full-screenSheetbelow 768px,Modalfrom 768px, non-essential fields behind "More details"); the ux-designer owns any rewording of those paragraphs. The Project setup New/Edit dialog is now the ObjectFormModal,width: min(40rem, 100vw - 2rem)= 640px at 768px and 1280px, which replaces the 448px in E2E sizes. The (A1) entry is reworded; the Project setup Baseline sentence still holds (ManagePagestays at 2: ObjectForm's Save replaces the dialog's Save). Source of truth: Architecture › Dialog routes › One schema per object.
- (product-architect, wiki accuracy) The token tables above still show the old values. Shipped in #2261:
-
Focus ring shape.
--shadow-focusis now0 0 0 2px var(--color-bg-primary), 0 0 0 4px var(--color-border-focus)and--shadow-focus-dangeris0 0 0 2px var(--color-bg-primary), 0 0 0 4px var(--color-danger), with the same var-based value in the light and dark blocks. The old 30–40% (and 10–15% danger) alpha rings were below 3:1 (WCAG 1.4.11).--shadow-focus-subtleis unchanged but is only valid together with a border-color of at least 3:1 in the same rule. -
New control-border token. Layer 1 adds
--color-gray-450: #868c96and--color-slate-275: #7f8ca1. Layer 2 adds--color-border-control(lightvar(--color-gray-450), darkvar(--color-slate-275)) for form-control borders. The table row for--color-border-strong("input outlines") is out of date: inputs now use--color-border-control, and--color-border-strongkeeps its values for decorative borders. -
Deleted focus tokens.
--shadow-focus-primary-alt,--color-focus-ring,--color-focus-ring-subtle,--color-focus-ring-dangerand--color-focus-ring-primary-altare removed from both blocks. The "Focus Rings (Color values)" table rows and the--shadow-focus-primary-altrow no longer exist intokens.css. - The ux-designer owns any rewording of the tables above. Source of truth:
client/src/styles/tokens.cssand Architecture › Frontend Conventions › Accessibility (#2261).
-
Focus ring shape.
Dated 2026-11-25. Statements corrected so the guide describes the shipped code; no design decision changed and no token was added.
- (W1) Sidebar › "Interim Money views" described the Funding sources, Grants and Bank report views as current. #2242 deleted them; the paragraph is now in past tense and keeps the rules for a future interim view.
- (W2) Phone and tablet shell › Bottom bar said the + opens
/diary/new"until 2.3". Since #2222 it opens the New sheet with the Log now tiles first. - (W3) Detail template called
DocumentsPanelButtonthe interim host "for pages that do not show the strip yet". The task, purchase and offer/invoice pages use the strip fact; the button's only hosts are the Financing cards. (Its code docblock still uses the word "interim"; the clean-repo sweep #2263 owns code comments.) - (W4) Home (H7) and Photos (D7) interim links: resolution lines added under each entry.
- (W5) Template coverage: the guide had no section for
RelatedList,EntityPicker,OverflowMenu,MoneyFigure,BudgetBar,CostBreakdownTable, the cost-line components, or the pages built in #2237–#2252. Sections added from the component sources and the stories' acceptance criteria: Related lists and the entity picker, Overflow menu, Money overview, Cost lines, Money › Invoices and the offer and invoice page, Money › Financing and the bank report, Company page, Lists on the object list, Milestone page, Area page, Documents page. The Schedule section now namesReschedulePanel. The Table of Contents now lists every component section.
Added 2026-11-27 (re-audit after #2251 and #2261 landed on beta):
- (W6) AreaLink paragraph said it links to
routeUrl('areas')"for now", that a P5.7 switch would follow, and that its hidden suffix is ", open in Areas". It links torouteUrl('area', { id })since #2251, and the suffix is ", open area" (client/src/components/AreaLink/AreaLink.tsx,en/photos.jsonspots.areaLinkSuffix). The historical (D7) entry is kept as written. - (W7) Task page › Where said it links to the Areas list as an interim
AreaLink. It links to the Area page (useTaskSummaryFacts.tsx,routeUrl('area', { id })). - (W8) Touch Target Sizes showed a literal
min-height: 44pxundermax-width: 1024pxfor mobile and tablet. #2261 states the rule for phone widths withvar(--touch-target-min)and defines the overlay rule and exemptions in Architecture; the snippet now uses the token and points there.