Cross-app design consistency audit: toolbars, ⋯ menus, bottom bars, shared components #892

Open
opened 2026-11-03 06:31:36 +00:00 by kayg · 4 comments
Owner

kayg 2026-11-03: "I see that in contacts we have two buttons share + ... instead of both being in a single toolbar like we prototyped in notes. let's dig where our design differs and why! in that audit we will probably find many opportunities for code modularity, extensibility and reuse!"

Scope: every app in the shared mockup (apps/mockup on review/calendar-2) and in apps/web: Notes, Tasks, Contacts, Calendar, Mail, AI, Files/Photos, Settings, Sharing, Search/Composer. Compare these patterns across apps:

  • top-right toolbar;
  • the contextual bottom bar and how it morphs;
  • ⋯ menus (what goes in them);
  • sheets;
  • properties/key-value rows;
  • lists, rows and row actions;
  • selection;
  • toasts with Undo;
  • empty, error and loading states;
  • headers and titles;
  • pickers;
  • segmented controls;
  • copy feedback;
  • motion.

The deliverable is a table: pattern → per-app implementation (file) → differences → why (decided, or drift) → the proposed shared component and API. Plus a ranked list of reuse and modularity opportunities.
Agreed design direction (kayg 11-03):

  • The top right is one toolbar pill with Share + ⋯ in every app.
  • ⋯ holds the less-needed actions.
  • A contextual bottom toolbar appears when an item is selected or open, and the composer morphs out of it.
kayg 2026-11-03: "I see that in contacts we have two buttons share + ... instead of both being in a single toolbar like we prototyped in notes. let's dig where our design differs and why! in that audit we will probably find many opportunities for code modularity, extensibility and reuse!" Scope: every app in the shared mockup (apps/mockup on review/calendar-2) and in apps/web: Notes, Tasks, Contacts, Calendar, Mail, AI, Files/Photos, Settings, Sharing, Search/Composer. Compare these patterns across apps: - top-right toolbar; - the contextual bottom bar and how it morphs; - ⋯ menus (what goes in them); - sheets; - properties/key-value rows; - lists, rows and row actions; - selection; - toasts with Undo; - empty, error and loading states; - headers and titles; - pickers; - segmented controls; - copy feedback; - motion. The deliverable is a table: pattern → per-app implementation (file) → differences → why (decided, or drift) → the proposed shared component and API. Plus a ranked list of reuse and modularity opportunities. Agreed design direction (kayg 11-03): - The top right is one toolbar pill with Share + ⋯ in every app. - ⋯ holds the less-needed actions. - A contextual bottom toolbar appears when an item is selected or open, and the composer morphs out of it.
Author
Owner

Audit: cross-app design consistency (code read only, nothing changed)

Basis. Mockup = review/calendar-2 @ 3adda3af (411 commits ahead of dev, 1178 behind). Web = origin/dev @ 41f2efa3. Paths: M/ = apps/mockup/src, W/ = apps/web/src, UI/ = packages/ui/src. I read the code only; no screenshots. Counts are from grep and are approximate.

Five findings that shape everything below

  1. Toolbar and Pill (UI/components, LK6) are used by Mail only (8 files). Notes, Tasks, Contacts, Calendar and AI all hand-roll their pills. 18 files define their own .pill/.grp/.pgb/.apill CSS.
  2. AI has a copy of Toolbar. M/ai/PillGroup.svelte (75 lines) has the same comment and CSS as UI/components/Toolbar.svelte.
  3. Notes' own top-right pill is hand-rolled. The desktop one is M/chrome/DeskPills.svelte. The phone one is a .pill.grp inside M/chrome/TopPills.svelte, with about 100 CSS lines for .grp/.hl/.check.
  4. Mockup and web are two forks of the same components. They share 28 .svelte file names and most have diverged. Examples by diff lines: TopPills 336, PropRow 89, BottomBar 558, Editor 2293. Nothing forces a port to reuse the mockup file.
  5. Dev web ships Notes + Settings/Admin only. W/lib/apps.ts has Tasks and Contacts as built: false. They are on port/tasks-3 and port/contacts-card; Sharing is on feat/sharing-s1-pr3. Mail, Calendar and AI have no web code. Files/Photos have no code anywhere (only a "Files comes later" stub in M/tasks/TasksApp.svelte).

(a) Pattern table

Status key: D = decided (memory note cited). Drift = no decision behind the difference. Gap = a decided thing not built yet.

# Pattern Per-app implementation (file) Differences Status
1 Top-right toolbar See (b) 6 different builds, 1 shared component used by 1 app Drift. Direction D (calternal-decisions-sharing SH10; calternal-decisions-mail round 9; calternal-decisions-ai 11-02)
2 Pill / toolbar primitive Shared: UI/components/Toolbar.svelte and Pill.svelte (Mail only). Copy: M/ai/PillGroup.svelte. Hand-rolled: M/chrome/{TopPills,DeskPills,BottomDock,PhoneFoot,SharedBadge}, M/contacts/ContactTop, M/tasks/{PhoneTop,LayoutMenu,TaskActions}, M/calendar/EventSheet, M/ai/{Header,Composer,Confirm,Tapback} Radius, --ih, glyph size and press highlight are each re-implemented Drift. "Toolbar = pills inside one pill; separate actions = separate pills" is D (feedback-pills-separate-actions). One icon size is D (feedback-icon-size-and-details). LK6 said unify and reuse
3 Phone top row (back · title capsule · actions) Notes M/chrome/TopPills.svelte (610) and W/chrome/TopPills.svelte. Tasks M/tasks/PhoneTop (62). Contacts M/contacts/ContactTop (81). Calendar M/calendar/PhoneStrip. Mail M/mail/MailScreen.svelte (<Pill alone h=44>). AI M/ai/Header (241) Only Notes has the large-title collapse capsule, the data-chrome-title source and the selection morph (Select all → "N selected" → Done). Others have back and ⋯ only The collapse capsule and "one phone top" are D (calternal-design-notes-ui 10-22). Other apps = Drift
4 3-pane desktop frame Notes + Calendar M/components/Shell.svelte (707, already takes panes={{side,middle,main,bar}}). Tasks M/tasks/TasksApp.svelte (644; own panes, own resize, 208 CSS lines). Contacts M/contacts/ContactsApp.svelte (447; own frame, no resize). Mail M/mail/MailShell (99). AI M/ai/AiShell (134) Pane resize exists in Shell and again in TasksApp (26 refs), nowhere else. Frame, glass and Focus are duplicated Panes resizable everywhere is D (calternal-design-notes-ui 10-19). The copies are Drift
5 Sidebar bottom row (avatar · app tabs · search) M/components/SideDock (219), M/chrome/PhoneFoot (211), M/tasks/SideFoot (83). Web: W/chrome/PhoneFoot + AppFoot.svelte on port/contacts (80) Same row built 3 times in the mockup and 2 in web "Phone and desktop consistent" is D (calternal-design-notes-ui 10-20). The copies are Drift
6 Phone push stack Notes M/components/PhoneStack (568). Tasks TasksApp (phone block). Contacts ContactsApp (.screen translate). Mail MailScreen (.phone). Calendar CalendarScreen (.level) Each re-implements push/pop transforms and the edge-swipe Stack order is D. The code copies are Drift
7 Bottom bar See (c)
8 Selection + bulk bar M/rows/{select.svelte,bulk,BulkBar}. Bulk actions registered for note, trash and mail only. Selection pills live in the notes TopPills Tasks and Contacts have rows with swipes but no multi-select or bulk actions Pills carry the count and the bar holds only actions is D (#470). Tasks and Contacts = Gap
9 Row actions, swipes, long-press One shared M/rows/RowActions.svelte. Kinds registered: note, trash, search, tag/view (rows/plugins), task, contact, mail Consistent. Calendar registers only a press preview (calendar/rows.ts), no RowActions kind D (calternal-design-notes-ui 10-22 "one shared component for every app"). Good example to copy
10 ⋯ menus One surface: UI/components/ContextMenu.svelte via openMenu. Content: Notes through the page-actions registry (M/chrome/pages.ts + plugins/{note,list,places}.ts). Mail inline array in ThreadBar. Contacts M/contacts/menus.ts. Tasks LayoutMenu (layout only). AI ⋯ opens a settings sheet, not a menu. Calendar has no ⋯ except the event bar (desktop only) Surface is shared. Only Notes has a registry One shared morph for EVERY overflow menu is D (calternal-design-notes-ui 10-20). The registry being Notes-only is Drift
11 Sheets Bar morph sheets: SheetBody (UI). Share-sheet style: M/chrome/ShareSheet (660), M/ai/AiSheet (245). growFromToolbar is shared by those two (M/lib/morph-bar.ts). Own frame: M/contacts/SheetShell (97; used by 3 sheets), Import/Merge/PhotoCrop (own morphIn), InviteSheet, AddDeviceSheet. M/calendar/EventSheet (Float popover) 5 frames that each do dim, close, header, phone inset and morph Share sheet = toolbar morph is D (calternal-decisions-sharing 11-02). "Every inset sheet slides up from the bottom" is D (calternal-design-notes-ui 10-21). The two rules collide on phone, see Q5. One glass is D (feedback-one-glass)
12 Key/value rows PropRow (M/components, used by InfoSheet + Mail MsgCard/ShowOriginal). Contacts M/contacts/FieldRow: same copy-on-tap and edit-on-double-click, own code. Tasks PropsRow: pills, different thing. Calendar EventSheet: chips PropRow lives in the app, not UI, and the web copy differs Reuse PropRow is D (feedback-reuse-components 11-03). FieldRow = Drift (stacked label-over-value is a layout, not a new component)
13 Settings rows .row in M/components/Settings, .line in M/mail/MailSettings, .srow in M/tasks/SettingsView, .row in M/ai/SettingsSheet 4 label+hint+control layouts Drift ("sentence-case heading, 44 pt rows, no fills" is the AI sheet's own rule, matching the share sheet)
14 Lists and rows ListShell/ListRow/ListGroup (M/components) used by Notes, Agenda; Mail uses ListShell only. Tasks TaskRow/TaskList, Contacts ContactRow/ContactList, Mail MailRow ListRow says "one component so the sizes can never drift (C8)", but only 2 of 5 lists use it. Tasks and Contacts hand-roll the 22 px title Rapid-nav and "one list look" are D (calternal-design-notes-ui 10-21). Drift
15 Headers / titles data-chrome-title source: Notes, Settings, ListShell, TrashList. Tasks Middle h2, Contacts ContactList h2, Calendar h1, AI none Large title + collapse only where data-chrome-title exists D (10-22). Tasks/Contacts = Drift
16 Toasts + Undo Shared primitive UI/primitives/toast. Two entry points: controls/toast.svelte (15 imports) and primitives/toast (23). Mail has its own undoable() (M/mail/state.svelte.ts:57) and calls notify with 8 near-identical blocks. TasksApp mounts its own <Toasts> One system, uneven use Toast only when there is an action: D (T1). Local mounts and helpers = Drift
17 Empty / error / loading UI/components/EmptyState used in 7 files (Notes, Trash, Shell, Editor, Mail list and thread, Search). Hand-rolled .none/.empty in about 12 sites (Tasks, Contacts, admin, NotePicker, InsertSheet, ListPreview…). Error: Mail .calm + Retry (2 copies), AI none. Loading: no spinners or skeletons by design One-line empty states are D (calternal-design-notes-ui 10-13). No machinery in UI is D (feedback-no-machinery-ui). Hand-rolled = Drift
18 Pickers Tasks DatePicker/Calendar/RepeatPicker/MorePicker; Calendar Month; NotePicker, contacts/MergePicker, links/InlinePicker (622), UI/ColorPicker Mini-month exists twice (Tasks Calendar, Calendar Month). 3 list-with-search pickers share nothing Not covered by a decision. Drift, low priority
19 Segmented controls UI/primitives/selector (15 importers) and a 17-line adapter UI/controls/Selector (4 importers). Hand-rolled: M/components/embeds/MiniBar .seg, M/links/InlinePicker .mode Calendar's Today/Week/Month are three bar-kind buttons, not a Selector Pill-in-pill shared Selector is D (calternal-decisions-inspector 11-02). Hand-rolled = Drift
20 Copy feedback confirmCopied (UI/lib/copied.ts) in 26 files. M/ai/ActionRow.svelte has its own copied state Nearly all shared D (10-21 "ONE copy feedback"). AI = Drift
21 Avatars M/contacts/Avatar (62), M/ai/Avatar (73), M/mail/Initials (35), M/chrome/SharedBadge (95) 4 initials/photo circles Not decided. Drift
22 Date helpers addDays/toIso/parseIso: M/tasks/dates.ts, M/calendar/sample.ts, M/contacts/logic.ts (all copies); about 20 Intl.DateTimeFormat constructions Drift (also a correctness risk)
23 Motion Helpers: lib/morph-in (166), lib/motion (121), tasks/fly (112), calendar/motion, tasks/motion, rows/spring-to, lib/rise, lib/morph-bar. 62 cubic-bezier literals (17 distinct) against 349 var(--ease…) uses; about 9 distinct spring(d, r) pairs Animation rules are D (feedback-animation-rules-emil, kayg-motion-taste). Literals = Drift
24 Share One ShareSheet for notes, Views and contacts (openShare({ noteId | contactId | view })) Good. No Share on Tasks, Calendar, Mail or AI D for notes/contacts (SH-series)
25 Search / Composer One M/composer + M/search. Tasks, Contacts, Notes use ComposerBody. AI chat field is its own contenteditable (M/ai/Composer.svelte) AI chat field = "a small version of the block editor, same code" is D (calternal-decisions-ai). Gap
26 Files / Photos No code in mockup or web Not built

(b) Top-right toolbars

Agreed: one toolbar pill, Share + ⋯, in every app. The less-needed actions go in ⋯.

App Mockup today Web today (dev; branch) Gap
Notes desktop [Share ⋯] one glass pill, hand-rolled (DeskPills.svelte, 72×32). The owner's avatar replaces Share on shared notes (D) None on dev. [Share ⋯] is in feat/sharing-s1-pr3 (DeskPills, copy of the mockup) Matches the agreement, but not built on Toolbar/Pill
Notes phone [Share ⋯] group on the right of TopPills; becomes round accent Done while selecting. Lists also get Share (except "shared") TopPills with pageShare(page): [Share ⋯], or round ⋯ alone while nothing is shareable OK. Hand-rolled
Tasks desktop Middle-pane header: layout Selector (List/Board/Matrix) + a + button. Task pane: nothing port/tasks-3 Middle.svelte: + only No Share, no ⋯. Layout switcher is not in a ⋯
Tasks phone PhoneTop: back + one layout pill that grows into a menu not ported No Share/⋯
Contacts card (phone and desktop) Two separate round pills, Share and ⋯ (ContactTop.svelte; 38 px on desktop). List screen: ⋯ alone port/contacts-card ContactTop: ⋯ only, no Share Exactly what you saw. Fix = one [Share ⋯] toolbar. SH10 is explicit
Calendar Desktop header: month title + prev/next chevron buttons (.ib). Phone: PhoneStrip (back + month). Event bar has ⋯ on desktop only none No Share, no ⋯
Mail thread Toolbar: Archive · Delete · Snooze · Tags · ⋯ (ThreadBar.svelte). List: a lone ⋯ pill. No Share none Round 9 not built: Archive/Delete move to the bottom bar, Snooze/Tags have no home yet (Q2). No Share
AI Desktop: PillGroup (Pane, ⋯) beside the Cal and title pills. Phone: the same two in a hand-rolled .pill.grp. The ⋯ opens a settings sheet, not a menu none No Share. Built on a copy of Toolbar. ⋯ is a sheet (Q3)
Settings none (title only) none Fine: nothing to share
Files / Photos not built not built Decide when built

Reading: only Notes follows the agreement, and only by hand-rolling. Contacts is the visible deviation. Tasks, Calendar, Mail and AI have no Share.


(c) Bottom bars

Agreed: a contextual bottom toolbar appears when an item is open or selected, and the composer morphs out of it.

App Mockup today Web today vs the agreement
Notes Shared UI/bar/Bar. M/components/BottomBar.svelte (466 lines, monolithic) switches key: tabs, tools (rest bar), text, block, sheet-* , attach. BulkBar rises for a selection W/components/BottomBar.svelte is split into mode plugins under W/components/bar/ (Tabs, Tools, TextBar, BlockBar, Sheet, Toast, Ask, CommandBar). Toasts show inside the bar Matches. Web's plugin split is ahead of the mockup; the mockup has more modes
Tasks TasksBar: rest = the open task's properties as pills; tapping one morphs the bar into its picker; typing → typing bar; on phone browsing, search morphs into the Composer port/tasks-3 has no Bar yet (PhoneFoot + ListDock) Matches the pattern (Bar + composer morph)
Contacts ContactsBar (shared Bar): sidebar screen = avatar/tabs/search; list = search field that morphs into the Composer; card = nothing. The call/message/email/directions buttons live in the card (Actions.svelte) port/contacts: AppFoot only Open card has no contextual toolbar (Q4)
Calendar EventBar (shared Bar): rest = Today/Week/Month; tapped event = title, time, → note, ⋯ (desktop only). No composer none Matches for an open event. No composer; view switch is not a Selector
Mail Desktop: none. Phone: BottomDock (search + compose; oncompose is a no-op, there is no mail composer). The actions are in the top ThreadBar; Reply/Reply all/Forward are three pills under the message none Furthest. Round 9: bottom [Reply · Reply all · Forward] [Archive · Delete], composer morphs from it, no reply row
AI No bar. The chat field (ai/Composer.svelte) is the composer; model/level/Send pills sit inside it none The field is the composer already. No contextual bar for an open chat
Settings Notes' BottomDock/tabs same n/a

Cross-cutting: Tasks, Contacts and Calendar already use the shared Bar, but each re-wires the same things (key, scrim, onsize, composer key). Notes' composer path is Palette. Mail uses a different component (BottomDock).


(d) Shared-component opportunities, ranked

Ranked by value for kayg's ask (one look, less code) over risk. Line savings are estimates.

  1. Enabler: move reusable components into packages/ui before each port. Toolbar, Pill, PropRow, the page-toolbar and the bar scaffolding stay in M/, so web ports copy them (28 same-name files already diverge). Rule: "extract to UI/ in the mockup branch first; mockup and web import the same file." Risk: low (path changes). This makes everything below stick.

  2. PageToolbar (Share + ⋯, the answer to the Contacts question).

    • API sketch: <PageToolbar share={{ onclick, badge? }} actions={items | () => items} extra?: Snippet selecting?: {done} glass h />. Built on Toolbar + Pill. Share is hidden (⋯ becomes a round pill) when share is undefined. Page-actions come from the existing pages.ts registry.
    • Replaces: DeskPills (58), the TopPills right group (about 130 incl. CSS), ContactTop right side (about 40), AI Header toolbar + PillGroup (about 120), Mail ThreadBar shell (about 30).
    • Saves about 350 lines and fixes Contacts. Risk: low to medium. The Done morph and the press highlight must be kept (one screenshot per app).
  3. Retire hand-rolled pills: Toolbar/Pill only.

    • Delete ai/PillGroup. Move BottomDock, PhoneFoot pills, TaskActions, EventSheet actions, ai/Composer groups, LayoutMenu/PhoneTop pills onto Pill alone.
    • Saves about 400 lines of CSS. Risk: low, but it needs the icon-size and tint-radius checks (feedback-icon-size-and-details). Add a lint: no .pill { in *.svelte.
  4. ContextBar: the contextual bottom toolbar on the shared Bar.

    • API sketch: registerBarActions(kind, (ctx) => ({ groups: [Pill[], Pill[]], more?: MenuItem[] })) (same shape as registerBulkAction/registerPageActions), plus <ContextBar kind id composer={…}/> that owns the bar key, scrim and the search → composer morph that TasksBar and ContactsBar each wire up.
    • Replaces: Mail ThreadBar buttons and the reply row, the Bar wiring in TasksBar/ContactsBar/EventBar, BottomDock.
    • Saves about 250 lines and makes Mail/Contacts/Calendar uniform. Risk: medium (morph timing and frame cost, so it needs the Mac VM gate).
  5. SheetFrame (extracted from ShareSheet/AiSheet: header with back and close, anchor morph, dim rule, phone inset, height follows content).

    • Replaces: contacts/SheetShell (97) and the scaffolding in ShareSheet, AiSheet, InviteSheet, AddDeviceSheet, ImportSheet, MergeSheet, PhotoCrop (about 60 lines each).
    • Saves about 450 lines. Risk: medium. It touches glass and backdrop roots (feedback-one-glass); the phone entry rule needs Q5 first.
  6. AppShell: finish Shell.svelte's panes API and the pane resize.

    • Props: { side, middle, main, bar, widths, narrow, phoneStack }. Move TasksApp's resize into it.
    • Replaces: the frame, glass and resize in TasksApp (208 CSS + 26 resize refs), ContactsApp (114 CSS), MailShell, AiShell.
    • Saves about 600 lines. Risk: high (backdrop roots, Focus, perf); go app by app behind the existing e2e.
  7. PropRow in UI + layout="stacked" and an actions snippet; SettingRow.

    • Replaces: contacts/FieldRow copy/edit code (about 150 of 330 lines) and the four settings-row layouts in Settings, MailSettings, tasks SettingsView and ai/SettingsSheet (about 150 lines).
    • Risk: medium. FieldRow has phone press and menus, so keep them as slots.
  8. AppDock (avatar · app tabs · search): SideDock, PhoneFoot, tasks/SideFoot, web AppFoot.

    • Props: { phone, current }. Saves about 250 lines. Risk: medium (the phone version is approved and perf-sensitive).
  9. One Avatar ({ name, photo?, gradient?, size }): contacts/Avatar, ai/Avatar, mail/Initials, SharedBadge. Saves about 120 lines. Risk: low.

  10. EmptyState + InlineError adoption (a calm line with Retry): about 12 empty sites and 2 copies of the Mail error line. Saves about 80 lines. Risk: low.

  11. Selector cleanup: move the 4 controls/Selector importers to the primitive, delete the adapter; replace MiniBar .seg and InlinePicker .mode with Selector; make Calendar's Today/Week/Month a Selector. Saves about 100 lines. Risk: low.

  12. Shared dates in UI/lib: one addDays/toIso/parseIso/fmtDay and cached Intl formatters, replacing 3 copies. Saves about 60 lines. Risk: low, and it removes timezone drift.

  13. Toast helpers: toast.undo({op, message, undo}) for the 8 notify blocks in Mail; one controls entry point; remove TasksApp's own <Toasts>. Saves about 80 lines. Risk: low.

  14. Generic PhoneStack: notes' 568-line stack as a layout used by Tasks, Contacts, Mail, Calendar. Saves about 400 lines. Risk: high; do after 5.

  15. SearchPicker (field + filtered rows + roving): NotePicker, MergePicker, tag picker, parts of InlinePicker. Saves about 200 lines. Risk: medium. Also merge the mini-month (Tasks Calendar) with Calendar Month.

  16. Motion presets: springs.ts with named presets and a lint on cubic-bezier( literals (62 today). Risk: low, value is consistency only.

Suggested order: 0 → 1 → 2 → 3 → 4, then 8–12 as small PRs, then 5, 6, 7, 13.


(e) Questions for kayg (only where the notes do not decide)

  1. Where Share does not exist yet (Tasks, Calendar, Mail, AI): show ⋯ alone as a round pill, or add Share there? My recommendation: Tasks (task pane and lists/Views) and Contacts get Share; Calendar gets Share for a day only once day-sharing exists; Mail and AI show ⋯ alone for now. This matches dev's pageShare today: no disabled Share button.
  2. Mail thread: where do Snooze and Tags go? Round 9 puts Archive/Delete at the bottom, Reply group next to them, and "Send as new" in ⋯. Recommendation: Snooze and Tags in ⋯ (keys E, H, T stay).
  3. AI header: is the ⋯ a menu or the settings sheet, and where does the Pane toggle go? Recommendation: [Share ⋯]; the ⋯ menu holds "Chat settings…", "Session details", "Show pane". If you want the Pane toggle visible, it is a third pill only when a pane exists (like the owner avatar replacing Share).
  4. Open contact: should Call · Message · Email move from under the name to the contextual bottom toolbar? The card screen has no bottom toolbar today, which breaks the agreement. Recommendation: move them (Directions goes to ⋯ and the address field) on phone and desktop, and mock it up first (approve before merge).
  5. Sheet entry on phone: 10-21 said every inset sheet slides up from the bottom and none grows out of its button. 11-02 said the Share/AI sheets grow out of the top-right toolbar (desktop). Recommendation: desktop = grows from the toolbar or button, phone = slides up. Is that right for Share, AI, Invite, Import and Merge?
  6. Process: may agents extract shared components into packages/ui in the mockup branch first (item 0), so mockup and web import the same file? Recommendation: yes, one small PR per component before its port lane.

Not asked (small, reversible, the notes cover them): one Avatar, one date helper, one toast entry point, Selector cleanup, EmptyState adoption.

Method note: code and git only; no screenshots taken, nothing committed or changed. The audit worktree is ~/Developer/Worktrees/audit-892-dev (detached at origin/dev, read-only).

## Audit: cross-app design consistency (code read only, nothing changed) **Basis.** Mockup = `review/calendar-2` @ `3adda3af` (411 commits ahead of dev, 1178 behind). Web = `origin/dev` @ `41f2efa3`. Paths: `M/` = `apps/mockup/src`, `W/` = `apps/web/src`, `UI/` = `packages/ui/src`. I read the code only; no screenshots. Counts are from grep and are approximate. **Five findings that shape everything below** 1. **`Toolbar` and `Pill` (`UI/components`, LK6) are used by Mail only** (8 files). Notes, Tasks, Contacts, Calendar and AI all hand-roll their pills. 18 files define their own `.pill`/`.grp`/`.pgb`/`.apill` CSS. 2. **AI has a copy of Toolbar.** `M/ai/PillGroup.svelte` (75 lines) has the same comment and CSS as `UI/components/Toolbar.svelte`. 3. **Notes' own top-right pill is hand-rolled.** The desktop one is `M/chrome/DeskPills.svelte`. The phone one is a `.pill.grp` inside `M/chrome/TopPills.svelte`, with about 100 CSS lines for `.grp/.hl/.check`. 4. **Mockup and web are two forks of the same components.** They share 28 `.svelte` file names and most have diverged. Examples by diff lines: `TopPills` 336, `PropRow` 89, `BottomBar` 558, `Editor` 2293. Nothing forces a port to reuse the mockup file. 5. **Dev web ships Notes + Settings/Admin only.** `W/lib/apps.ts` has Tasks and Contacts as `built: false`. They are on `port/tasks-3` and `port/contacts-card`; Sharing is on `feat/sharing-s1-pr3`. Mail, Calendar and AI have no web code. Files/Photos have no code anywhere (only a "Files comes later" stub in `M/tasks/TasksApp.svelte`). --- ## (a) Pattern table Status key: **D** = decided (memory note cited). **Drift** = no decision behind the difference. **Gap** = a decided thing not built yet. | # | Pattern | Per-app implementation (file) | Differences | Status | |---|---|---|---|---| | 1 | **Top-right toolbar** | See (b) | 6 different builds, 1 shared component used by 1 app | **Drift.** Direction D (`calternal-decisions-sharing` SH10; `calternal-decisions-mail` round 9; `calternal-decisions-ai` 11-02) | | 2 | **Pill / toolbar primitive** | Shared: `UI/components/Toolbar.svelte` and `Pill.svelte` (Mail only). Copy: `M/ai/PillGroup.svelte`. Hand-rolled: `M/chrome/{TopPills,DeskPills,BottomDock,PhoneFoot,SharedBadge}`, `M/contacts/ContactTop`, `M/tasks/{PhoneTop,LayoutMenu,TaskActions}`, `M/calendar/EventSheet`, `M/ai/{Header,Composer,Confirm,Tapback}` | Radius, `--ih`, glyph size and press highlight are each re-implemented | **Drift.** "Toolbar = pills inside one pill; separate actions = separate pills" is D (`feedback-pills-separate-actions`). One icon size is D (`feedback-icon-size-and-details`). LK6 said unify and reuse | | 3 | **Phone top row** (back · title capsule · actions) | Notes `M/chrome/TopPills.svelte` (610) and `W/chrome/TopPills.svelte`. Tasks `M/tasks/PhoneTop` (62). Contacts `M/contacts/ContactTop` (81). Calendar `M/calendar/PhoneStrip`. Mail `M/mail/MailScreen.svelte` (`<Pill alone h=44>`). AI `M/ai/Header` (241) | Only Notes has the large-title collapse capsule, the `data-chrome-title` source and the selection morph (Select all → "N selected" → Done). Others have back and ⋯ only | The collapse capsule and "one phone top" are D (`calternal-design-notes-ui` 10-22). Other apps = **Drift** | | 4 | **3-pane desktop frame** | Notes + Calendar `M/components/Shell.svelte` (707, already takes `panes={{side,middle,main,bar}}`). Tasks `M/tasks/TasksApp.svelte` (644; own panes, own resize, 208 CSS lines). Contacts `M/contacts/ContactsApp.svelte` (447; own frame, no resize). Mail `M/mail/MailShell` (99). AI `M/ai/AiShell` (134) | Pane resize exists in `Shell` and again in `TasksApp` (26 refs), nowhere else. Frame, glass and Focus are duplicated | Panes resizable everywhere is D (`calternal-design-notes-ui` 10-19). The copies are **Drift** | | 5 | **Sidebar bottom row** (avatar · app tabs · search) | `M/components/SideDock` (219), `M/chrome/PhoneFoot` (211), `M/tasks/SideFoot` (83). Web: `W/chrome/PhoneFoot` + `AppFoot.svelte` on `port/contacts` (80) | Same row built 3 times in the mockup and 2 in web | "Phone and desktop consistent" is D (`calternal-design-notes-ui` 10-20). The copies are **Drift** | | 6 | **Phone push stack** | Notes `M/components/PhoneStack` (568). Tasks `TasksApp` (phone block). Contacts `ContactsApp` (`.screen` translate). Mail `MailScreen` (`.phone`). Calendar `CalendarScreen` (`.level`) | Each re-implements push/pop transforms and the edge-swipe | Stack order is D. The code copies are **Drift** | | 7 | **Bottom bar** | See (c) | | | | 8 | **Selection + bulk bar** | `M/rows/{select.svelte,bulk,BulkBar}`. Bulk actions registered for `note`, `trash` and `mail` only. Selection pills live in the notes `TopPills` | Tasks and Contacts have rows with swipes but no multi-select or bulk actions | Pills carry the count and the bar holds only actions is D (#470). Tasks and Contacts = **Gap** | | 9 | **Row actions, swipes, long-press** | One shared `M/rows/RowActions.svelte`. Kinds registered: note, trash, search, tag/view (`rows/plugins`), task, contact, mail | Consistent. Calendar registers only a press preview (`calendar/rows.ts`), no RowActions kind | D (`calternal-design-notes-ui` 10-22 "one shared component for every app"). **Good example to copy** | | 10 | **⋯ menus** | One surface: `UI/components/ContextMenu.svelte` via `openMenu`. Content: Notes through the page-actions registry (`M/chrome/pages.ts` + `plugins/{note,list,places}.ts`). Mail inline array in `ThreadBar`. Contacts `M/contacts/menus.ts`. Tasks `LayoutMenu` (layout only). AI ⋯ opens a settings sheet, not a menu. Calendar has no ⋯ except the event bar (desktop only) | Surface is shared. Only Notes has a registry | One shared morph for EVERY overflow menu is D (`calternal-design-notes-ui` 10-20). The registry being Notes-only is **Drift** | | 11 | **Sheets** | Bar morph sheets: `SheetBody` (`UI`). Share-sheet style: `M/chrome/ShareSheet` (660), `M/ai/AiSheet` (245). `growFromToolbar` is shared by those two (`M/lib/morph-bar.ts`). Own frame: `M/contacts/SheetShell` (97; used by 3 sheets), `Import/Merge/PhotoCrop` (own `morphIn`), `InviteSheet`, `AddDeviceSheet`. `M/calendar/EventSheet` (Float popover) | 5 frames that each do dim, close, header, phone inset and morph | Share sheet = toolbar morph is D (`calternal-decisions-sharing` 11-02). "Every inset sheet slides up from the bottom" is D (`calternal-design-notes-ui` 10-21). The two rules collide on phone, see Q5. One glass is D (`feedback-one-glass`) | | 12 | **Key/value rows** | `PropRow` (`M/components`, used by InfoSheet + Mail `MsgCard`/`ShowOriginal`). Contacts `M/contacts/FieldRow`: same copy-on-tap and edit-on-double-click, own code. Tasks `PropsRow`: pills, different thing. Calendar `EventSheet`: chips | `PropRow` lives in the app, not `UI`, and the web copy differs | Reuse PropRow is D (`feedback-reuse-components` 11-03). FieldRow = **Drift** (stacked label-over-value is a layout, not a new component) | | 13 | **Settings rows** | `.row` in `M/components/Settings`, `.line` in `M/mail/MailSettings`, `.srow` in `M/tasks/SettingsView`, `.row` in `M/ai/SettingsSheet` | 4 label+hint+control layouts | **Drift** ("sentence-case heading, 44 pt rows, no fills" is the AI sheet's own rule, matching the share sheet) | | 14 | **Lists and rows** | `ListShell`/`ListRow`/`ListGroup` (`M/components`) used by Notes, Agenda; Mail uses `ListShell` only. Tasks `TaskRow`/`TaskList`, Contacts `ContactRow`/`ContactList`, Mail `MailRow` | `ListRow` says "one component so the sizes can never drift (C8)", but only 2 of 5 lists use it. Tasks and Contacts hand-roll the 22 px title | Rapid-nav and "one list look" are D (`calternal-design-notes-ui` 10-21). **Drift** | | 15 | **Headers / titles** | `data-chrome-title` source: Notes, Settings, `ListShell`, `TrashList`. Tasks `Middle` `h2`, Contacts `ContactList` `h2`, Calendar `h1`, AI none | Large title + collapse only where `data-chrome-title` exists | D (10-22). Tasks/Contacts = **Drift** | | 16 | **Toasts + Undo** | Shared primitive `UI/primitives/toast`. Two entry points: `controls/toast.svelte` (15 imports) and `primitives/toast` (23). Mail has its own `undoable()` (`M/mail/state.svelte.ts:57`) and calls `notify` with 8 near-identical blocks. `TasksApp` mounts its own `<Toasts>` | One system, uneven use | Toast only when there is an action: D (T1). Local mounts and helpers = **Drift** | | 17 | **Empty / error / loading** | `UI/components/EmptyState` used in 7 files (Notes, Trash, Shell, Editor, Mail list and thread, Search). Hand-rolled `.none`/`.empty` in about 12 sites (Tasks, Contacts, admin, NotePicker, InsertSheet, ListPreview…). Error: Mail `.calm` + Retry (2 copies), AI none. Loading: no spinners or skeletons by design | | One-line empty states are D (`calternal-design-notes-ui` 10-13). No machinery in UI is D (`feedback-no-machinery-ui`). Hand-rolled = **Drift** | | 18 | **Pickers** | Tasks `DatePicker`/`Calendar`/`RepeatPicker`/`MorePicker`; Calendar `Month`; `NotePicker`, `contacts/MergePicker`, `links/InlinePicker` (622), `UI/ColorPicker` | Mini-month exists twice (Tasks `Calendar`, Calendar `Month`). 3 list-with-search pickers share nothing | Not covered by a decision. **Drift**, low priority | | 19 | **Segmented controls** | `UI/primitives/selector` (15 importers) and a 17-line adapter `UI/controls/Selector` (4 importers). Hand-rolled: `M/components/embeds/MiniBar` `.seg`, `M/links/InlinePicker` `.mode` | Calendar's Today/Week/Month are three `bar-kind` buttons, not a Selector | Pill-in-pill shared Selector is D (`calternal-decisions-inspector` 11-02). Hand-rolled = **Drift** | | 20 | **Copy feedback** | `confirmCopied` (`UI/lib/copied.ts`) in 26 files. `M/ai/ActionRow.svelte` has its own `copied` state | Nearly all shared | D (10-21 "ONE copy feedback"). AI = **Drift** | | 21 | **Avatars** | `M/contacts/Avatar` (62), `M/ai/Avatar` (73), `M/mail/Initials` (35), `M/chrome/SharedBadge` (95) | 4 initials/photo circles | Not decided. **Drift** | | 22 | **Date helpers** | `addDays`/`toIso`/`parseIso`: `M/tasks/dates.ts`, `M/calendar/sample.ts`, `M/contacts/logic.ts` (all copies); about 20 `Intl.DateTimeFormat` constructions | | **Drift** (also a correctness risk) | | 23 | **Motion** | Helpers: `lib/morph-in` (166), `lib/motion` (121), `tasks/fly` (112), `calendar/motion`, `tasks/motion`, `rows/spring-to`, `lib/rise`, `lib/morph-bar`. 62 `cubic-bezier` literals (17 distinct) against 349 `var(--ease…)` uses; about 9 distinct `spring(d, r)` pairs | | Animation rules are D (`feedback-animation-rules-emil`, `kayg-motion-taste`). Literals = **Drift** | | 24 | **Share** | One `ShareSheet` for notes, Views and contacts (`openShare({ noteId \| contactId \| view })`) | Good. No Share on Tasks, Calendar, Mail or AI | D for notes/contacts (SH-series) | | 25 | **Search / Composer** | One `M/composer` + `M/search`. Tasks, Contacts, Notes use `ComposerBody`. AI chat field is its own `contenteditable` (`M/ai/Composer.svelte`) | | AI chat field = "a small version of the block editor, same code" is D (`calternal-decisions-ai`). **Gap** | | 26 | **Files / Photos** | No code in mockup or web | | Not built | --- ## (b) Top-right toolbars **Agreed:** one toolbar pill, **Share + ⋯**, in every app. The less-needed actions go in ⋯. | App | Mockup today | Web today (dev; branch) | Gap | |---|---|---|---| | **Notes** desktop | `[Share ⋯]` one glass pill, hand-rolled (`DeskPills.svelte`, 72×32). The owner's avatar replaces Share on shared notes (D) | None on dev. `[Share ⋯]` is in `feat/sharing-s1-pr3` (`DeskPills`, copy of the mockup) | Matches the agreement, but not built on `Toolbar`/`Pill` | | **Notes** phone | `[Share ⋯]` group on the right of `TopPills`; becomes round accent Done while selecting. Lists also get Share (except "shared") | `TopPills` with `pageShare(page)`: `[Share ⋯]`, or round `⋯` alone while nothing is shareable | OK. Hand-rolled | | **Tasks** desktop | Middle-pane header: layout `Selector` (List/Board/Matrix) + a `+` button. Task pane: nothing | `port/tasks-3` `Middle.svelte`: `+` only | No Share, no ⋯. Layout switcher is not in a ⋯ | | **Tasks** phone | `PhoneTop`: back + one layout pill that grows into a menu | not ported | No Share/⋯ | | **Contacts** card (phone and desktop) | **Two separate round pills**, `Share` and `⋯` (`ContactTop.svelte`; 38 px on desktop). List screen: `⋯` alone | `port/contacts-card` `ContactTop`: `⋯` only, no Share | **Exactly what you saw.** Fix = one `[Share ⋯]` toolbar. SH10 is explicit | | **Calendar** | Desktop header: month title + prev/next chevron buttons (`.ib`). Phone: `PhoneStrip` (back + month). Event bar has `⋯` on desktop only | none | No Share, no ⋯ | | **Mail** thread | `Toolbar`: **Archive · Delete · Snooze · Tags · ⋯** (`ThreadBar.svelte`). List: a lone `⋯` pill. No Share | none | Round 9 not built: Archive/Delete move to the bottom bar, Snooze/Tags have no home yet (Q2). No Share | | **AI** | Desktop: `PillGroup` (`Pane`, `⋯`) beside the Cal and title pills. Phone: the same two in a hand-rolled `.pill.grp`. The `⋯` opens a settings **sheet**, not a menu | none | No Share. Built on a copy of Toolbar. ⋯ is a sheet (Q3) | | **Settings** | none (title only) | none | Fine: nothing to share | | **Files / Photos** | not built | not built | Decide when built | Reading: only Notes follows the agreement, and only by hand-rolling. Contacts is the visible deviation. Tasks, Calendar, Mail and AI have no Share. --- ## (c) Bottom bars **Agreed:** a contextual bottom toolbar appears when an item is open or selected, and the composer morphs out of it. | App | Mockup today | Web today | vs the agreement | |---|---|---|---| | **Notes** | Shared `UI/bar/Bar`. `M/components/BottomBar.svelte` (466 lines, monolithic) switches key: tabs, tools (rest bar), text, block, sheet-* , attach. `BulkBar` rises for a selection | `W/components/BottomBar.svelte` is split into mode plugins under `W/components/bar/` (Tabs, Tools, TextBar, BlockBar, Sheet, Toast, Ask, CommandBar). Toasts show inside the bar | Matches. **Web's plugin split is ahead of the mockup**; the mockup has more modes | | **Tasks** | `TasksBar`: rest = the open task's properties as pills; tapping one morphs the bar into its picker; typing → typing bar; on phone browsing, search morphs into the Composer | `port/tasks-3` has no `Bar` yet (`PhoneFoot` + `ListDock`) | Matches the pattern (Bar + composer morph) | | **Contacts** | `ContactsBar` (shared `Bar`): sidebar screen = avatar/tabs/search; list = search field that morphs into the Composer; **card = nothing**. The call/message/email/directions buttons live in the card (`Actions.svelte`) | `port/contacts`: `AppFoot` only | Open card has no contextual toolbar (Q4) | | **Calendar** | `EventBar` (shared `Bar`): rest = Today/Week/Month; tapped event = title, time, → note, ⋯ (desktop only). No composer | none | Matches for an open event. No composer; view switch is not a Selector | | **Mail** | Desktop: none. Phone: `BottomDock` (search + compose; `oncompose` is a no-op, there is no mail composer). The actions are in the top `ThreadBar`; Reply/Reply all/Forward are three pills under the message | none | **Furthest.** Round 9: bottom `[Reply · Reply all · Forward] [Archive · Delete]`, composer morphs from it, no reply row | | **AI** | No bar. The chat field (`ai/Composer.svelte`) is the composer; model/level/Send pills sit inside it | none | The field is the composer already. No contextual bar for an open chat | | **Settings** | Notes' `BottomDock`/tabs | same | n/a | Cross-cutting: Tasks, Contacts and Calendar already use the shared `Bar`, but each re-wires the same things (key, scrim, `onsize`, composer key). Notes' composer path is `Palette`. Mail uses a different component (`BottomDock`). --- ## (d) Shared-component opportunities, ranked Ranked by value for kayg's ask (one look, less code) over risk. Line savings are estimates. 0. **Enabler: move reusable components into `packages/ui` before each port.** `Toolbar`, `Pill`, `PropRow`, the page-toolbar and the bar scaffolding stay in `M/`, so web ports copy them (28 same-name files already diverge). Rule: "extract to `UI/` in the mockup branch first; mockup and web import the same file." Risk: low (path changes). This makes everything below stick. 1. **`PageToolbar`** (Share + ⋯, the answer to the Contacts question). - API sketch: `<PageToolbar share={{ onclick, badge? }} actions={items | () => items} extra?: Snippet selecting?: {done} glass h />`. Built on `Toolbar` + `Pill`. Share is hidden (⋯ becomes a round pill) when `share` is undefined. Page-actions come from the existing `pages.ts` registry. - Replaces: `DeskPills` (58), the `TopPills` right group (about 130 incl. CSS), `ContactTop` right side (about 40), AI `Header` toolbar + `PillGroup` (about 120), Mail `ThreadBar` shell (about 30). - Saves about 350 lines and fixes Contacts. Risk: low to medium. The Done morph and the press highlight must be kept (one screenshot per app). 2. **Retire hand-rolled pills: `Toolbar`/`Pill` only.** - Delete `ai/PillGroup`. Move `BottomDock`, `PhoneFoot` pills, `TaskActions`, `EventSheet` actions, `ai/Composer` groups, `LayoutMenu`/`PhoneTop` pills onto `Pill alone`. - Saves about 400 lines of CSS. Risk: low, but it needs the icon-size and tint-radius checks (`feedback-icon-size-and-details`). Add a lint: no `.pill {` in `*.svelte`. 3. **`ContextBar`: the contextual bottom toolbar on the shared `Bar`.** - API sketch: `registerBarActions(kind, (ctx) => ({ groups: [Pill[], Pill[]], more?: MenuItem[] }))` (same shape as `registerBulkAction`/`registerPageActions`), plus `<ContextBar kind id composer={…}/>` that owns the bar key, scrim and the `search → composer` morph that `TasksBar` and `ContactsBar` each wire up. - Replaces: Mail `ThreadBar` buttons and the reply row, the `Bar` wiring in `TasksBar`/`ContactsBar`/`EventBar`, `BottomDock`. - Saves about 250 lines and makes Mail/Contacts/Calendar uniform. Risk: medium (morph timing and frame cost, so it needs the Mac VM gate). 4. **`SheetFrame`** (extracted from `ShareSheet`/`AiSheet`: header with back and close, anchor morph, dim rule, phone inset, height follows content). - Replaces: `contacts/SheetShell` (97) and the scaffolding in `ShareSheet`, `AiSheet`, `InviteSheet`, `AddDeviceSheet`, `ImportSheet`, `MergeSheet`, `PhotoCrop` (about 60 lines each). - Saves about 450 lines. Risk: medium. It touches glass and backdrop roots (`feedback-one-glass`); the phone entry rule needs Q5 first. 5. **`AppShell`**: finish `Shell.svelte`'s `panes` API and the pane resize. - Props: `{ side, middle, main, bar, widths, narrow, phoneStack }`. Move `TasksApp`'s resize into it. - Replaces: the frame, glass and resize in `TasksApp` (208 CSS + 26 resize refs), `ContactsApp` (114 CSS), `MailShell`, `AiShell`. - Saves about 600 lines. Risk: **high** (backdrop roots, Focus, perf); go app by app behind the existing e2e. 6. **`PropRow` in `UI` + `layout="stacked"` and an `actions` snippet; `SettingRow`.** - Replaces: `contacts/FieldRow` copy/edit code (about 150 of 330 lines) and the four settings-row layouts in Settings, MailSettings, tasks `SettingsView` and `ai/SettingsSheet` (about 150 lines). - Risk: medium. FieldRow has phone press and menus, so keep them as slots. 7. **`AppDock`** (avatar · app tabs · search): `SideDock`, `PhoneFoot`, `tasks/SideFoot`, web `AppFoot`. - Props: `{ phone, current }`. Saves about 250 lines. Risk: medium (the phone version is approved and perf-sensitive). 8. **One `Avatar`** (`{ name, photo?, gradient?, size }`): `contacts/Avatar`, `ai/Avatar`, `mail/Initials`, `SharedBadge`. Saves about 120 lines. Risk: low. 9. **`EmptyState` + `InlineError` adoption** (a calm line with Retry): about 12 empty sites and 2 copies of the Mail error line. Saves about 80 lines. Risk: low. 10. **`Selector` cleanup:** move the 4 `controls/Selector` importers to the primitive, delete the adapter; replace `MiniBar .seg` and `InlinePicker .mode` with `Selector`; make Calendar's Today/Week/Month a `Selector`. Saves about 100 lines. Risk: low. 11. **Shared `dates` in `UI/lib`:** one `addDays/toIso/parseIso/fmtDay` and cached `Intl` formatters, replacing 3 copies. Saves about 60 lines. Risk: low, and it removes timezone drift. 12. **Toast helpers:** `toast.undo({op, message, undo})` for the 8 `notify` blocks in Mail; one `controls` entry point; remove `TasksApp`'s own `<Toasts>`. Saves about 80 lines. Risk: low. 13. **Generic `PhoneStack`:** notes' 568-line stack as a layout used by Tasks, Contacts, Mail, Calendar. Saves about 400 lines. Risk: high; do after 5. 14. **`SearchPicker`** (field + filtered rows + roving): `NotePicker`, `MergePicker`, tag picker, parts of `InlinePicker`. Saves about 200 lines. Risk: medium. Also merge the mini-month (Tasks `Calendar`) with Calendar `Month`. 15. **Motion presets:** `springs.ts` with named presets and a lint on `cubic-bezier(` literals (62 today). Risk: low, value is consistency only. **Suggested order:** 0 → 1 → 2 → 3 → 4, then 8–12 as small PRs, then 5, 6, 7, 13. --- ## (e) Questions for kayg (only where the notes do not decide) 1. **Where Share does not exist yet (Tasks, Calendar, Mail, AI): show ⋯ alone as a round pill, or add Share there?** My recommendation: Tasks (task pane and lists/Views) and Contacts get Share; Calendar gets Share for a day only once day-sharing exists; Mail and AI show ⋯ alone for now. This matches dev's `pageShare` today: no disabled Share button. 2. **Mail thread: where do Snooze and Tags go?** Round 9 puts Archive/Delete at the bottom, Reply group next to them, and "Send as new" in ⋯. Recommendation: Snooze and Tags in ⋯ (keys E, H, T stay). 3. **AI header: is the ⋯ a menu or the settings sheet, and where does the Pane toggle go?** Recommendation: `[Share ⋯]`; the ⋯ menu holds "Chat settings…", "Session details", "Show pane". If you want the Pane toggle visible, it is a third pill only when a pane exists (like the owner avatar replacing Share). 4. **Open contact: should Call · Message · Email move from under the name to the contextual bottom toolbar?** The card screen has no bottom toolbar today, which breaks the agreement. Recommendation: move them (Directions goes to ⋯ and the address field) on phone and desktop, and mock it up first (approve before merge). 5. **Sheet entry on phone:** 10-21 said every inset sheet slides up from the bottom and none grows out of its button. 11-02 said the Share/AI sheets grow out of the top-right toolbar (desktop). Recommendation: desktop = grows from the toolbar or button, phone = slides up. Is that right for Share, AI, Invite, Import and Merge? 6. **Process:** may agents extract shared components into `packages/ui` in the mockup branch first (item 0), so mockup and web import the same file? Recommendation: yes, one small PR per component before its port lane. Not asked (small, reversible, the notes cover them): one `Avatar`, one date helper, one toast entry point, `Selector` cleanup, `EmptyState` adoption. _Method note: code and git only; no screenshots taken, nothing committed or changed. The audit worktree is `~/Developer/Worktrees/audit-892-dev` (detached at `origin/dev`, read-only)._
Author
Owner

Toolbar refactor: hand-rolled pills moved onto Toolbar / Pill

Branch review/calendar-2 @ cb0a1a2d (3 commits on top of 671e4e07), preview: http://calternal-dev-02-std.vpn.kayg.org/calendar-2/ (deployed at cb0a1a2d). Shots are Chromium, light, 1440×900 and 390×844, 2× scale. Baseline = 671e4e07 (the tip before my commits), same machine, same run. Files are also in ~/Developer/Worktrees/mockup-capture/shots/toolbar-refactor/final/ on code.

What moved

ai/PillGroup is deleted (75 lines). Moved onto Toolbar/Pill: ai/Header (desktop toolbar, phone group, back), ai/PaneBody, ai/Composer (add + model/thinking groups), ai/Level, ai/AiSidebar (new chat), contacts/ContactTop (back, Share, ⋯ stay three round pills), tasks/PhoneTop, tasks/LayoutMenu, tasks/TaskActions, calendar/EventSheet, chrome/BottomDock (the +), chrome/PhoneFoot (profile + search). Contents and arrangement are unchanged.

packages/ui/src/components/Pill.svelte got what the moves needed, as props: style (added to the size, never replacing it), class (a spread class used to replace pill; now joined), dense glass, h as a CSS length ("var(--ctl-h, 40px)"), and pointer-events: auto on a pill alone. editor.css: the margin-pill rule .page .pill is now .page .margin-controls .pill so a Pill on a page is not restyled.

Net: 310 lines removed, 218 added (99 of them the guard).

The guard

apps/mockup/scripts/no-handmade-pills.mjs (bun run check in apps/mockup, and tests/no-handmade-pills.spec.ts runs it with the specs). It fails on: a PillGroup, a padding: 3px + gap: 2px + full-radius rule (Toolbar's recipe), a <button> whose first child is <Glass />, and the old names .pgb / .apill. The places left on purpose are listed in the script with a reason each (counted per file, so a new one in the same file still fails).

Left on purpose (not moved)

  • Notes' TopPills (phone), DeskPills (desktop) and SharedBadge: the Share + ⋯ group is flush halves (92×44 and 72×32), with a whole-pill press highlight and a width spring into Done. A Toolbar of inner pills is 84 wide with 3 px insets, so moving it would be a visible change. They go with PageToolbar (#892 opportunity 1) once the Share + ⋯ layout is answered.
  • The search field in BottomDock, the Cal chip in ai/Header, the Tasks/Contacts +/mic dock (tasks.css), the AI scroll-to-latest pill and the floating mic (Voice): fixed-position, own-spring or text-field things, not toolbar pills.
  • Trash / Confirm text chips, .grp section headings, Tapback .tb, the editor's block handle pill: different components with the same words in their class names.
  • Mail: nothing to move (its toolbars are already Toolbar/Pill); rebased on the latest Mail commits before pushing.

Pixel comparison (before vs after)

Noise floor: before vs a second before capture differs only on notes-first (an animated page), nothing else. Zero differing pixels: contacts card + list, tasks today / task / lists (desktop), tasks-note-actions (phone), notes list, and ai-sidebar, ai-chat / ai-pane-doc desktop, tasks-lists phone (the foot's profile pill needed justify-content: center to match).

Differences that remain, with the reason:

  1. Calendar event sheet (desktop and phone): the action toolbar's tint is the toolbar's 6.5 % ink (was 8 %), and the icons are the one bar-icon size (--glyph-bar: 20 px desktop, 22 px phone) instead of the hard-coded 18. Documented drift. Same for the Delete pill (it is now a round pill 42 px, as before).
  2. Mail settings, Remove account: this is a bug fix. <Pill class="danger"> lost its pill class (a spread class replaced it), so the button had no shape and plain ink. It now has the flat pill and the red text the Mail CSS asks for. Mail's own files are untouched.
  3. AI phone header (ai-chat, ai-pane-doc, phone): the Pane / ⋯ glass differs by at most 9–15 of 255 on 16 % of the pill's pixels (the glass is a little darker, 1–2 levels on average). Boxes, sizes, icon positions and colours are identical in the DOM probe. Not visible in the crop below; I could not find the cause (a different stacking of the same Glass).
  4. tasks-note-actions desktop: anti-aliasing only on the chips under the open task (max 58, 41 k of 5.2 M px; chips' boxes, colours and positions are identical in the probe; the magnified crop below shows no difference). It follows the code version, not the capture order, so it is not noise.
  5. notes-first: noisy without any change (before vs before) because the page animates; not usable as a comparison. The foot's own pixels are compared in ai-sidebar and tasks-lists instead (zero differing).

Not compared: hover and pressed states (a Pill hover is 9 % ink, the old .press hover was --hover, about 5 %), dark theme, WebKit.

Magnified crops (before above, after below)

ai phone header before over after (before above, after below, x4)

calendar delete before over after (before above, after below, x4)

calendar tools before over after (before above, after below, x4)

mail remove account before over after (before above, after below, x4)

tasks chip before over after (before above, after below, x4)

Specs

bunx playwright test (chromium, CI=1 --retries=0 --workers=2, through ~/bin/slot on dev-02) over 19 spec files that touch the moved parts (517 tests): before 494 passed, 16 failed, 6 skipped; after 495 passed, 16 failed, 6 skipped. The 16 failures are the same set before and after (chrome.spec 92 ×8, m9a 53, pills-glass 8, round9c-foot 83, tasks-menu 102 + 213 ×2, tasks-tiers 245 ×2), all already failing at 671e4e07. The extra pass is the new guard spec. I updated four selectors that followed the old class names (.pill.round, .pill.field, .b). The guard script also fails on a probe file with a hand-rolled pill (checked).

Every before / after pair

AI chat: header toolbar, composer tools, model + thinking · desktop-1440
before after

(no pixel differs)

AI chat: header toolbar, composer tools, model + thinking · phone-390
before after

diff

AI with the note pane: pane toolbar · desktop-1440
before after

(no pixel differs)

AI with the note pane: pane toolbar · phone-390
before after

diff

AI sidebar: new chat pill (phone), foot · desktop-1440
before after

(no pixel differs)

AI sidebar: new chat pill (phone), foot · phone-390
before after

(no pixel differs)

Contacts card: back / Share / ⋯ · desktop-1440
before after

(no pixel differs)

Contacts card: back / Share / ⋯ · phone-390
before after

(no pixel differs)

Contacts list · desktop-1440
before after

(no pixel differs)

Contacts list · phone-390
before after

(no pixel differs)

Tasks list: back + layout pill · desktop-1440
before after

(no pixel differs)

Tasks list: back + layout pill · phone-390
before after

(no pixel differs)

Tasks: open task · desktop-1440
before after

(no pixel differs)

Tasks: open task · phone-390
before after

(no pixel differs)

Tasks lists screen: phone foot · desktop-1440
before after

(no pixel differs)

Tasks lists screen: phone foot · phone-390
before after

(no pixel differs)

A tracked task open in a note: Open note / Make plain · desktop-1440
before after

diff

A tracked task open in a note: Open note / Make plain · phone-390
before after

(no pixel differs)

Calendar event sheet: action pills, Delete · desktop-1440
before after

diff

Calendar event sheet: action pills, Delete · phone-390
before after

diff

Notes first screen (animated page: noisy by itself, see below) · desktop-1440
before after

diff

Notes first screen (animated page: noisy by itself, see below) · phone-390
before after

diff

Notes list: dock · desktop-1440
before after

(no pixel differs)

Notes list: dock · phone-390
before after

(no pixel differs)

Mail settings: Remove account (a `class` on Pill) · desktop-1440
before after

diff

Mail settings: Remove account (a `class` on Pill) · phone-390
before after

diff

## Toolbar refactor: hand-rolled pills moved onto `Toolbar` / `Pill` Branch `review/calendar-2` @ `cb0a1a2d` (3 commits on top of `671e4e07`), preview: http://calternal-dev-02-std.vpn.kayg.org/calendar-2/ (deployed at `cb0a1a2d`). Shots are Chromium, light, 1440×900 and 390×844, 2× scale. Baseline = `671e4e07` (the tip before my commits), same machine, same run. Files are also in `~/Developer/Worktrees/mockup-capture/shots/toolbar-refactor/final/` on `code`. ### What moved `ai/PillGroup` is deleted (75 lines). Moved onto `Toolbar`/`Pill`: `ai/Header` (desktop toolbar, phone group, back), `ai/PaneBody`, `ai/Composer` (add + model/thinking groups), `ai/Level`, `ai/AiSidebar` (new chat), `contacts/ContactTop` (back, Share, ⋯ stay three round pills), `tasks/PhoneTop`, `tasks/LayoutMenu`, `tasks/TaskActions`, `calendar/EventSheet`, `chrome/BottomDock` (the +), `chrome/PhoneFoot` (profile + search). Contents and arrangement are unchanged. `packages/ui/src/components/Pill.svelte` got what the moves needed, as props: `style` (added to the size, never replacing it), `class` (a spread `class` used to replace `pill`; now joined), `dense` glass, `h` as a CSS length (`"var(--ctl-h, 40px)"`), and `pointer-events: auto` on a pill alone. `editor.css`: the margin-pill rule `.page .pill` is now `.page .margin-controls .pill` so a `Pill` on a page is not restyled. Net: 310 lines removed, 218 added (99 of them the guard). ### The guard `apps/mockup/scripts/no-handmade-pills.mjs` (`bun run check` in `apps/mockup`, and `tests/no-handmade-pills.spec.ts` runs it with the specs). It fails on: a `PillGroup`, a `padding: 3px` + `gap: 2px` + full-radius rule (Toolbar's recipe), a `<button>` whose first child is `<Glass />`, and the old names `.pgb` / `.apill`. The places left on purpose are listed in the script with a reason each (counted per file, so a new one in the same file still fails). ### Left on purpose (not moved) - Notes' `TopPills` (phone), `DeskPills` (desktop) and `SharedBadge`: the Share + ⋯ group is flush halves (92×44 and 72×32), with a whole-pill press highlight and a width spring into Done. A `Toolbar` of inner pills is 84 wide with 3 px insets, so moving it would be a visible change. They go with `PageToolbar` (#892 opportunity 1) once the Share + ⋯ layout is answered. - The search *field* in `BottomDock`, the Cal chip in `ai/Header`, the Tasks/Contacts +/mic dock (`tasks.css`), the AI scroll-to-latest pill and the floating mic (`Voice`): fixed-position, own-spring or text-field things, not toolbar pills. - Trash / Confirm text chips, `.grp` section headings, Tapback `.tb`, the editor's block handle pill: different components with the same words in their class names. - Mail: nothing to move (its toolbars are already `Toolbar`/`Pill`); rebased on the latest Mail commits before pushing. ### Pixel comparison (before vs after) Noise floor: before vs a second before capture differs only on `notes-first` (an animated page), nothing else. Zero differing pixels: contacts card + list, tasks today / task / lists (desktop), tasks-note-actions (phone), notes list, and `ai-sidebar`, `ai-chat` / `ai-pane-doc` **desktop**, tasks-lists **phone** (the foot's profile pill needed `justify-content: center` to match). Differences that remain, with the reason: 1. **Calendar event sheet** (desktop and phone): the action toolbar's tint is the toolbar's 6.5 % ink (was 8 %), and the icons are the one bar-icon size (`--glyph-bar`: 20 px desktop, 22 px phone) instead of the hard-coded 18. Documented drift. Same for the Delete pill (it is now a round pill 42 px, as before). 2. **Mail settings, Remove account**: this is a bug fix. `<Pill class="danger">` lost its `pill` class (a spread `class` replaced it), so the button had no shape and plain ink. It now has the flat pill and the red text the Mail CSS asks for. Mail's own files are untouched. 3. **AI phone header** (`ai-chat`, `ai-pane-doc`, phone): the Pane / ⋯ glass differs by at most 9–15 of 255 on 16 % of the pill's pixels (the glass is a little darker, 1–2 levels on average). Boxes, sizes, icon positions and colours are identical in the DOM probe. Not visible in the crop below; I could not find the cause (a different stacking of the same `Glass`). 4. **`tasks-note-actions` desktop**: anti-aliasing only on the chips under the open task (max 58, 41 k of 5.2 M px; chips' boxes, colours and positions are identical in the probe; the magnified crop below shows no difference). It follows the code version, not the capture order, so it is not noise. 5. **`notes-first`**: noisy without any change (before vs before) because the page animates; not usable as a comparison. The foot's own pixels are compared in `ai-sidebar` and `tasks-lists` instead (zero differing). Not compared: hover and pressed states (a `Pill` hover is 9 % ink, the old `.press` hover was `--hover`, about 5 %), dark theme, WebKit. ### Magnified crops (before above, after below) **ai phone header before over after** (before above, after below, x4) ![](https://git.kayg.org/attachments/cd738c6e-362f-478f-aa03-5d71af57d267) **calendar delete before over after** (before above, after below, x4) ![](https://git.kayg.org/attachments/2ad72a40-47ad-452b-aa0d-a8997888fb39) **calendar tools before over after** (before above, after below, x4) ![](https://git.kayg.org/attachments/9fc3d135-745d-45d7-9efa-6c6a18fdddbd) **mail remove account before over after** (before above, after below, x4) ![](https://git.kayg.org/attachments/acfe7a92-ce0e-4937-a8a7-a0b2e611457f) **tasks chip before over after** (before above, after below, x4) ![](https://git.kayg.org/attachments/5c05c28d-3a3d-4e24-b27e-5c04dbf4ed67) ### Specs `bunx playwright test` (chromium, `CI=1 --retries=0 --workers=2`, through `~/bin/slot` on dev-02) over 19 spec files that touch the moved parts (517 tests): before `494 passed, 16 failed, 6 skipped`; after `495 passed, 16 failed, 6 skipped`. The 16 failures are the same set before and after (chrome.spec 92 ×8, m9a 53, pills-glass 8, round9c-foot 83, tasks-menu 102 + 213 ×2, tasks-tiers 245 ×2), all already failing at `671e4e07`. The extra pass is the new guard spec. I updated four selectors that followed the old class names (`.pill.round`, `.pill.field`, `.b`). The guard script also fails on a probe file with a hand-rolled pill (checked). ### Every before / after pair <details><summary>AI chat: header toolbar, composer tools, model + thinking · desktop-1440</summary> | before | after | |---|---| | ![](https://git.kayg.org/attachments/055772c3-fd1f-416e-bf97-4a02bc2fb5f2) | ![](https://git.kayg.org/attachments/8a362134-ea35-42e9-918e-fb723a68ab99) | (no pixel differs) </details> <details><summary>AI chat: header toolbar, composer tools, model + thinking · phone-390</summary> | before | after | |---|---| | ![](https://git.kayg.org/attachments/73d29ddb-2e97-4c73-a0f2-c54b861ea894) | ![](https://git.kayg.org/attachments/a4f630a2-29d0-418a-bc2a-3447c6be0f3f) | ![diff](https://git.kayg.org/attachments/a3b527e8-bdc7-4763-b4a6-838ce6abf631) </details> <details><summary>AI with the note pane: pane toolbar · desktop-1440</summary> | before | after | |---|---| | ![](https://git.kayg.org/attachments/5239e864-779c-4ae0-92b4-cf2407175894) | ![](https://git.kayg.org/attachments/2a5e7cff-71c0-4b3f-82b2-c198a4e78709) | (no pixel differs) </details> <details><summary>AI with the note pane: pane toolbar · phone-390</summary> | before | after | |---|---| | ![](https://git.kayg.org/attachments/84180ad7-a0fa-4b26-9b8f-8794d91ede91) | ![](https://git.kayg.org/attachments/0c9f9c3a-d347-4ce1-a912-ee2995a568d2) | ![diff](https://git.kayg.org/attachments/9cd55b41-78f9-4c16-bdf3-4fb806cbc6b8) </details> <details><summary>AI sidebar: new chat pill (phone), foot · desktop-1440</summary> | before | after | |---|---| | ![](https://git.kayg.org/attachments/88f65e7a-dd2f-48a1-9ec4-ad3bd37dee06) | ![](https://git.kayg.org/attachments/33bdfeda-3f01-4fd2-ab30-cea87114c9d5) | (no pixel differs) </details> <details><summary>AI sidebar: new chat pill (phone), foot · phone-390</summary> | before | after | |---|---| | ![](https://git.kayg.org/attachments/bd6661fc-4039-4d2f-9e83-24931ed580d1) | ![](https://git.kayg.org/attachments/04a82351-9601-45f6-a80b-fd6b68ee7a89) | (no pixel differs) </details> <details><summary>Contacts card: back / Share / ⋯ · desktop-1440</summary> | before | after | |---|---| | ![](https://git.kayg.org/attachments/0f51f51c-a472-49b3-8c0e-9c28e72388a0) | ![](https://git.kayg.org/attachments/8a8fb854-1028-4cef-a3e4-33448498b465) | (no pixel differs) </details> <details><summary>Contacts card: back / Share / ⋯ · phone-390</summary> | before | after | |---|---| | ![](https://git.kayg.org/attachments/52ed1588-d7ce-4de1-9a89-854aed0c411e) | ![](https://git.kayg.org/attachments/4e9ac9e2-9ad5-482f-9cf9-7444278fad44) | (no pixel differs) </details> <details><summary>Contacts list · desktop-1440</summary> | before | after | |---|---| | ![](https://git.kayg.org/attachments/099f6068-8338-45b3-a972-0fc21d227834) | ![](https://git.kayg.org/attachments/b48d9bc2-d0ed-404a-8977-b69f93369e6c) | (no pixel differs) </details> <details><summary>Contacts list · phone-390</summary> | before | after | |---|---| | ![](https://git.kayg.org/attachments/2391a298-e79a-4756-aa68-e807e83a06c8) | ![](https://git.kayg.org/attachments/ac04f45f-2dfa-49c5-b1f6-0c13ecc7fa7b) | (no pixel differs) </details> <details><summary>Tasks list: back + layout pill · desktop-1440</summary> | before | after | |---|---| | ![](https://git.kayg.org/attachments/b138b676-0034-450a-8bfd-5e3cca91d51b) | ![](https://git.kayg.org/attachments/8a11c0a2-f6b1-4795-a718-a30272f16abc) | (no pixel differs) </details> <details><summary>Tasks list: back + layout pill · phone-390</summary> | before | after | |---|---| | ![](https://git.kayg.org/attachments/1b06b4bb-d3e6-4926-86e9-f30844387a34) | ![](https://git.kayg.org/attachments/1496e181-c578-4fe5-a8ff-485ccdb718aa) | (no pixel differs) </details> <details><summary>Tasks: open task · desktop-1440</summary> | before | after | |---|---| | ![](https://git.kayg.org/attachments/4533a9ea-eb9d-413f-83e4-01f3bd7c217b) | ![](https://git.kayg.org/attachments/8944a5f9-9f6b-4684-8c70-55d48002a92a) | (no pixel differs) </details> <details><summary>Tasks: open task · phone-390</summary> | before | after | |---|---| | ![](https://git.kayg.org/attachments/eb1a90bb-afdb-44b9-a5d0-62f8f17ea43f) | ![](https://git.kayg.org/attachments/151fd58f-c2f1-4470-a9f6-0d6bb4d71bb6) | (no pixel differs) </details> <details><summary>Tasks lists screen: phone foot · desktop-1440</summary> | before | after | |---|---| | ![](https://git.kayg.org/attachments/6333fbc8-caed-49a3-a017-bb61156f8e5e) | ![](https://git.kayg.org/attachments/af90e087-7ede-43aa-bde6-fdfebf38faf9) | (no pixel differs) </details> <details><summary>Tasks lists screen: phone foot · phone-390</summary> | before | after | |---|---| | ![](https://git.kayg.org/attachments/212738ad-17a8-4d50-9162-da1d033811ff) | ![](https://git.kayg.org/attachments/470d472d-4285-4776-98a9-d9e2c9247ed4) | (no pixel differs) </details> <details><summary>A tracked task open in a note: Open note / Make plain · desktop-1440</summary> | before | after | |---|---| | ![](https://git.kayg.org/attachments/3c3377fa-aebd-4f63-8d4b-cf9fb61ea650) | ![](https://git.kayg.org/attachments/dc1ce29e-58dc-4a03-8d63-78d7617010c9) | ![diff](https://git.kayg.org/attachments/72f4e29d-5386-431d-8edd-a2db697912cd) </details> <details><summary>A tracked task open in a note: Open note / Make plain · phone-390</summary> | before | after | |---|---| | ![](https://git.kayg.org/attachments/612871f9-48c0-4d7a-b02c-d07e508125ec) | ![](https://git.kayg.org/attachments/e28299f9-f06c-470c-b218-4e73337b0714) | (no pixel differs) </details> <details><summary>Calendar event sheet: action pills, Delete · desktop-1440</summary> | before | after | |---|---| | ![](https://git.kayg.org/attachments/7133c17f-1a6d-4ce3-9814-9595553ccaa0) | ![](https://git.kayg.org/attachments/ac7e4401-5b1b-49b9-b5cf-06724b979005) | ![diff](https://git.kayg.org/attachments/b87cde34-8614-4c6f-bf33-1f5cdce8aa34) </details> <details><summary>Calendar event sheet: action pills, Delete · phone-390</summary> | before | after | |---|---| | ![](https://git.kayg.org/attachments/9055778e-1d2c-435b-b5ff-8e856732106b) | ![](https://git.kayg.org/attachments/a6b67c16-683b-473f-8c8e-288191aa4d1c) | ![diff](https://git.kayg.org/attachments/4181f756-0417-45ba-a046-7891750fc905) </details> <details><summary>Notes first screen (animated page: noisy by itself, see below) · desktop-1440</summary> | before | after | |---|---| | ![](https://git.kayg.org/attachments/695bb27f-a14c-46ad-a27b-3932e127204f) | ![](https://git.kayg.org/attachments/6afe8493-83c2-4c0a-9b2c-f30665f91cd6) | ![diff](https://git.kayg.org/attachments/13565231-aea0-42f2-ad14-796abafbfbde) </details> <details><summary>Notes first screen (animated page: noisy by itself, see below) · phone-390</summary> | before | after | |---|---| | ![](https://git.kayg.org/attachments/f9a14b06-c45e-43c7-bbd8-389899588114) | ![](https://git.kayg.org/attachments/fe1d6993-5656-4392-8882-721563d46c1b) | ![diff](https://git.kayg.org/attachments/1334a983-180a-478f-ae4e-71d7fd946085) </details> <details><summary>Notes list: dock · desktop-1440</summary> | before | after | |---|---| | ![](https://git.kayg.org/attachments/32419795-56be-4f6a-924b-d7d78b337669) | ![](https://git.kayg.org/attachments/9620b92e-43bf-479a-863f-1fe35b73e144) | (no pixel differs) </details> <details><summary>Notes list: dock · phone-390</summary> | before | after | |---|---| | ![](https://git.kayg.org/attachments/fd364a67-f77b-4dbf-9c8d-af3f87b945a3) | ![](https://git.kayg.org/attachments/5d4165dc-b7a2-4b99-9353-318fff16d868) | (no pixel differs) </details> <details><summary>Mail settings: Remove account (a `class` on Pill) · desktop-1440</summary> | before | after | |---|---| | ![](https://git.kayg.org/attachments/01987797-a8c5-41ae-ab71-a44e2c8c1b82) | ![](https://git.kayg.org/attachments/d300c391-5105-4ac0-b1e8-37bc96d19be0) | ![diff](https://git.kayg.org/attachments/b4b3600b-6910-43ed-bdeb-aee742c5ddde) </details> <details><summary>Mail settings: Remove account (a `class` on Pill) · phone-390</summary> | before | after | |---|---| | ![](https://git.kayg.org/attachments/faa0233b-0375-4163-88c7-b3f481c784f5) | ![](https://git.kayg.org/attachments/ece9ce27-873b-4964-8f04-5495fa1bd581) | ![diff](https://git.kayg.org/attachments/29f1d756-844b-4303-a842-10cb9a275840) </details>
Author
Owner

Corner-radius audit of the mockup (apps/mockup/src, head ea30041f). Reference: the sidebar selection tint, --r-select = --r-frame (22) − 10 = 12 px, concentric with its pane. Counts are the declarations in the style blocks, before → after the sweep (6 atomic commits 14170c2a … ea30041f).

Surface Radius (before) Token (after) Verdict
Pills, chips with round ends, buttons that are pills 999px (104), --r-pill (19), 99px var(--r-pill) (129) INTENTIONAL (a pill is round); the raw 999px/99px were DRIFT in spelling only, now the token
Circles: avatars, dots, ticks, round icon buttons, switches 50% (115) 50% (117) INTENTIONAL (a circle)
Row, selection and hover tints; fields; search fields; list tiles; menu items; count pills 12px (59), 10px (44), 11px (9), 9px (16), --r-select (23) var(--r-select) (153) DRIFT fixed: four near-equal values (9, 10, 11, 12) for the same thing; all now the sidebar tint's 12 px
Cards, popovers, list blocks, grouped sections, QR frames, previews 14px (36), 16px (25), 20px (4), 17px, 18px (non-bubble), --r-card (7) var(--r-card) 14 px (82) DRIFT fixed: 14 / 16 / 17 / 18 / 20 for the same surface
Chat bubbles 18px (2), --bub-r, 19px (6) var(--bub-r, 19px) (10) 18 was DRIFT; bubbles have their own token on purpose (INTENTIONAL: the tail and the stack follow it)
Dialogs, palette, voice card, gallery rows 22px (5), --r-sheet (3) var(--r-sheet) (9) same value, now the token
Panes (the sidebar, the list, the page frame) --r-frame 22 (9), 18px on .list-pane (side hidden) and .drawer, 18px 0 0 18px on .side, .side-pane var(--r-frame) (11 + 4 one-sided) DRIFT fixed: panes were 18 in three places and 22 elsewhere
Floating panels: the share sheet, AI sheet, the shared sheet, composer, bulk bar, event sheet, the guest "ask" card 24px (4), 26px (4), 28px (4) var(--r-panel) 26 px (10; new token) DRIFT fixed: three radii for one kind of surface; 26 is the share sheet's, which its clip reveal (morph-bar.ts, morph-glass.ts) is built on
Phone inset sheets --sheet-corners (6) unchanged INTENTIONAL: the bottom corners follow the iPhone's display (47 pt), the top ones (40 pt) are the sheet's own; larger than everything else on purpose
Small controls: icon boxes, thumbnails, clear buttons, story chips, reset 8px (21), 7px (18), --r-control (3) var(--r-control) 8 px (42) DRIFT fixed (7 vs 8)
Key caps, grips, tiny chips 6px (15) var(--r-chip) 6 px (15; new token) INTENTIONAL (small print); now a token
Import bento tiles 24px var(--r-sheet) DRIFT fixed (a card inside a sheet)
A field inside the dock 24px var(--r-pill) DRIFT fixed (the field is one pill high)
Carets, marks, code spans, grabbers, hit marks 2px (25), 3px (11), 4px (3), 5px (7) unchanged INTENTIONAL (typographic details; a token would hide that they are tied to the text size)
Inherit / zero inherit (31), 0 (11) unchanged INTENTIONAL (the child follows its parent's clip; flush edges on a phone)
Page, embed, link, print, resize radii --page-radius, --embed-radius, --lk-r, --print-r, --rad, --card-r unchanged INTENTIONAL: the note's own content radii, set per note style or per embed
Pill by construction calc(var(--tier-cap) / 2) etc. unchanged INTENTIONAL (half the bar's height)
Blob avatars 28%, 54% 46% 52% 48% / 50% 54% 46% 50% unchanged INTENTIONAL (the avatar shapes)
Strip floor, one-sided cards 8px 8px 0 0, var(--card-r) var(--card-r) 0 0, var(--embed-radius) halves unchanged INTENTIONAL (the shape of what it sits on)

Totals: 388 declarations moved to tokens (105 pill, 129 select, 90 card/sheet/bubble/pane, 10 panel, 54 control/chip). New tokens (packages/ui/src/styles/tokens.css): --r-chip: 6px, --r-panel: 26px. Two JS constants follow (morph-glass.ts RADIUS 26). Not touched: packages/ui components' own radii and anything set inline in markup.

Checked in Chromium (desktop light and dark, phone dark) on notes, tasks, contacts, mail, AI, calendar, automations and Settings after the sweep: no screen looks broken; the one visible change is that 9 to 11 px tints are now 12 and the 24 to 28 px panels are 26. I did not look at every state (menus, sheets in all apps), so a quick pass over the sheets is worth it.

**Corner-radius audit of the mockup** (`apps/mockup/src`, head `ea30041f`). Reference: the sidebar selection tint, `--r-select` = `--r-frame` (22) − 10 = **12 px**, concentric with its pane. Counts are the declarations in the style blocks, before → after the sweep (6 atomic commits `14170c2a` … `ea30041f`). | Surface | Radius (before) | Token (after) | Verdict | |---|---|---|---| | Pills, chips with round ends, buttons that are pills | `999px` (104), `--r-pill` (19), `99px` | `var(--r-pill)` (129) | INTENTIONAL (a pill is round); the raw 999px/99px were DRIFT in spelling only, now the token | | Circles: avatars, dots, ticks, round icon buttons, switches | `50%` (115) | `50%` (117) | INTENTIONAL (a circle) | | **Row, selection and hover tints; fields; search fields; list tiles; menu items; count pills** | `12px` (59), `10px` (44), `11px` (9), `9px` (16), `--r-select` (23) | `var(--r-select)` (153) | **DRIFT fixed**: four near-equal values (9, 10, 11, 12) for the same thing; all now the sidebar tint's 12 px | | Cards, popovers, list blocks, grouped sections, QR frames, previews | `14px` (36), `16px` (25), `20px` (4), `17px`, `18px` (non-bubble), `--r-card` (7) | `var(--r-card)` 14 px (82) | **DRIFT fixed**: 14 / 16 / 17 / 18 / 20 for the same surface | | Chat bubbles | `18px` (2), `--bub-r, 19px` (6) | `var(--bub-r, 19px)` (10) | 18 was DRIFT; bubbles have their own token on purpose (INTENTIONAL: the tail and the stack follow it) | | Dialogs, palette, voice card, gallery rows | `22px` (5), `--r-sheet` (3) | `var(--r-sheet)` (9) | same value, now the token | | Panes (the sidebar, the list, the page frame) | `--r-frame` 22 (9), `18px` on `.list-pane` (side hidden) and `.drawer`, `18px 0 0 18px` on `.side`, `.side-pane` | `var(--r-frame)` (11 + 4 one-sided) | **DRIFT fixed**: panes were 18 in three places and 22 elsewhere | | Floating panels: the share sheet, AI sheet, the shared sheet, composer, bulk bar, event sheet, the guest "ask" card | `24px` (4), `26px` (4), `28px` (4) | `var(--r-panel)` 26 px (10; new token) | **DRIFT fixed**: three radii for one kind of surface; 26 is the share sheet's, which its clip reveal (`morph-bar.ts`, `morph-glass.ts`) is built on | | Phone inset sheets | `--sheet-corners` (6) | unchanged | INTENTIONAL: the bottom corners follow the iPhone's display (47 pt), the top ones (40 pt) are the sheet's own; larger than everything else on purpose | | Small controls: icon boxes, thumbnails, clear buttons, story chips, reset | `8px` (21), `7px` (18), `--r-control` (3) | `var(--r-control)` 8 px (42) | **DRIFT fixed** (7 vs 8) | | Key caps, grips, tiny chips | `6px` (15) | `var(--r-chip)` 6 px (15; new token) | INTENTIONAL (small print); now a token | | Import bento tiles | `24px` | `var(--r-sheet)` | DRIFT fixed (a card inside a sheet) | | A field inside the dock | `24px` | `var(--r-pill)` | DRIFT fixed (the field is one pill high) | | Carets, marks, code spans, grabbers, hit marks | `2px` (25), `3px` (11), `4px` (3), `5px` (7) | unchanged | INTENTIONAL (typographic details; a token would hide that they are tied to the text size) | | Inherit / zero | `inherit` (31), `0` (11) | unchanged | INTENTIONAL (the child follows its parent's clip; flush edges on a phone) | | Page, embed, link, print, resize radii | `--page-radius`, `--embed-radius`, `--lk-r`, `--print-r`, `--rad`, `--card-r` | unchanged | INTENTIONAL: the note's own content radii, set per note style or per embed | | Pill by construction | `calc(var(--tier-cap) / 2)` etc. | unchanged | INTENTIONAL (half the bar's height) | | Blob avatars | `28%`, `54% 46% 52% 48% / 50% 54% 46% 50%` | unchanged | INTENTIONAL (the avatar shapes) | | Strip floor, one-sided cards | `8px 8px 0 0`, `var(--card-r) var(--card-r) 0 0`, `var(--embed-radius)` halves | unchanged | INTENTIONAL (the shape of what it sits on) | Totals: 388 declarations moved to tokens (105 pill, 129 select, 90 card/sheet/bubble/pane, 10 panel, 54 control/chip). New tokens (`packages/ui/src/styles/tokens.css`): `--r-chip: 6px`, `--r-panel: 26px`. Two JS constants follow (`morph-glass.ts` RADIUS 26). Not touched: `packages/ui` components' own radii and anything set inline in markup. Checked in Chromium (desktop light and dark, phone dark) on notes, tasks, contacts, mail, AI, calendar, automations and Settings after the sweep: no screen looks broken; the one visible change is that 9 to 11 px tints are now 12 and the 24 to 28 px panels are 26. I did not look at every state (menus, sheets in all apps), so a quick pass over the sheets is worth it.
Author
Owner

#892 item 1: PageToolbar, the one top-right pill (head a3efb87c)

Preview: http://calternal-dev-02-std.vpn.kayg.org/calendar-2/ (the review.html entry "Top right: one toolbar, [Share ⋯]").

What changed. One PageToolbar (apps/mockup/src/chrome/PageToolbar.svelte) on the shared Toolbar (new flush prop, class, style, a CSS-length height) and Pill. It takes the Share slot (a button, or the owner's avatar), the ⋯ items, one optional extra pill, and a Done state that springs the width. Notes' desktop and phone groups, the contact card's two round pills, Mail's thread toolbar, the AI header, Tasks, Automations and Calendar now use it. Settings keeps Notes' TopPills (already on it; it shows ⋯ on a phone and nothing on a desktop).

  • AU1: Notes, Tasks, Contacts, Mail, AI show [Share ⋯]; Calendar and Settings show only ⋯; a shared note shows the owner's avatar in Share's place.
  • AU2: Mail's ⋯ holds Snooze and Tags (it already did).
  • AU3: AI is [Share ⋯]; ⋯ holds Chat settings…, Session details and Show/Hide pane; the pane pill joins the toolbar only while a pane is open.
  • Tasks: on a task, ⋯ is the task menu; on a phone's list, ⋯ holds the layouts (the old one-icon layout pill is gone). Share on tasks, lists and chats opens a small Copy link / Share a link… / QR menu, because the share sheet does not take those yet.

Notes, before vs after (same viewports, same routes, baseline = eecf4230). Dark: 0 pixels differ. Light: the pill's glass and icon strokes differ by at most 7 to 9 of 255 levels (desktop 1124 px of 500x130, phone 3349 px of 390x120 at 2x); position, size and shape are identical. I did not find the cause of that light-only grain. The hover tint (the shared Pill's) is new in Notes; it only shows on hover. Test specs updated for the new class (.pt) and Tasks' layouts in ⋯; not run here.

Sizes. Phone 44 (--tier-top) everywhere, Notes' 92 wide with Share. Desktop 32 (Notes' 72 wide) in Notes, Tasks, Contacts, Mail and Calendar; AI is 40 high to sit level with the Cal and title pills; Automations 32 with Test beside ⋯. Contacts moved 38 to 32 and Mail 36 to 32 on desktop.

Shots: montage per device and theme, every app's top right (tiles: notes, shared note, tasks, task open, contacts, mail, ai, automations, calendar, settings).

## #892 item 1: PageToolbar, the one top-right pill (head a3efb87c) Preview: http://calternal-dev-02-std.vpn.kayg.org/calendar-2/ (the review.html entry "Top right: one toolbar, [Share ⋯]"). **What changed.** One `PageToolbar` (`apps/mockup/src/chrome/PageToolbar.svelte`) on the shared `Toolbar` (new `flush` prop, `class`, `style`, a CSS-length height) and `Pill`. It takes the Share slot (a button, or the owner's avatar), the ⋯ items, one optional extra pill, and a Done state that springs the width. Notes' desktop and phone groups, the contact card's two round pills, Mail's thread toolbar, the AI header, Tasks, Automations and Calendar now use it. Settings keeps Notes' TopPills (already on it; it shows ⋯ on a phone and nothing on a desktop). - AU1: Notes, Tasks, Contacts, Mail, AI show [Share ⋯]; Calendar and Settings show only ⋯; a shared note shows the owner's avatar in Share's place. - AU2: Mail's ⋯ holds Snooze and Tags (it already did). - AU3: AI is [Share ⋯]; ⋯ holds Chat settings…, Session details and Show/Hide pane; the pane pill joins the toolbar only while a pane is open. - Tasks: on a task, ⋯ is the task menu; on a phone's list, ⋯ holds the layouts (the old one-icon layout pill is gone). Share on tasks, lists and chats opens a small Copy link / Share a link… / QR menu, because the share sheet does not take those yet. **Notes, before vs after** (same viewports, same routes, baseline = eecf4230). Dark: 0 pixels differ. Light: the pill's glass and icon strokes differ by at most 7 to 9 of 255 levels (desktop 1124 px of 500x130, phone 3349 px of 390x120 at 2x); position, size and shape are identical. I did not find the cause of that light-only grain. The hover tint (the shared Pill's) is new in Notes; it only shows on hover. Test specs updated for the new class (`.pt`) and Tasks' layouts in ⋯; not run here. **Sizes.** Phone 44 (`--tier-top`) everywhere, Notes' 92 wide with Share. Desktop 32 (Notes' 72 wide) in Notes, Tasks, Contacts, Mail and Calendar; AI is 40 high to sit level with the Cal and title pills; Automations 32 with Test beside ⋯. Contacts moved 38 to 32 and Mail 36 to 32 on desktop. Shots: montage per device and theme, every app's top right (tiles: notes, shared note, tasks, task open, contacts, mail, ai, automations, calendar, settings).
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
kayg/calternal#892
No description provided.