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
No Branch/Tag specified
main
port/tasks-float-2
fix/train-1116-2
fix/train-1116-3
fix/train-1116-1
fix/flake-1134
fix/server-1182
dev
port/notes-float-3c
docs/auto-update-ig
feat/dav-transport
port/tasks-float-1
wip/mail1011-sv-order-1116
fix/flake-1179
fix/flake-1178
fix/guards-1153-fsio-split
fix/guards-1153-notes-split-we
fix/guards-1153-notes-lib
fix/guards-1153-notes-home
fix/guards-1153-ui-primitives
fix/guards-1153-primitives-e2e
fix/guards-1153-visibility-doc
feat/paper-grey-1116
fix/flake-1165
fix/flake-1119
docs/imap-766-plan-v2
fix/e2e-unique-ports
t3/paged-search-reconcile-final
wip/mail1011-final-1115
docs/tasks-float-port
perf/editor-first-paint-1c
feat/imap-notes-fetch
feat/imap-notes-projection
feat/imap-notes-readonly
feat/imap-notes-auth
feat/imap-notes-server-foundation
wip/mail1011-txn-ownvocab-1115
wip/mail1011-txn-novocab-1115
perf/p1117-final-harness
perf/single-shot-repeats
port/tasks-matrix
wip/mail1011-txn-1115
fix/static-gates-1155
feat/files-s1-identity-r7
fix/files-r7-idle-loop
fix/daily-train-1152
port/notes-float
fix/editor-tables-test-types
port/notes-float-listscript
feat/tasks-actions
port/notes-float-phone-preload
perf/sound-comparator
port/notes-float-listscroll
port/notes-float-budgets
port/notes-float-suite-fix-b
port/notes-float-sidebar-fix
port/notes-float-trim
port/notes-float-3-lists
fix/attachments-meta-capability
docs/carddav-writes-v2-plan
feat/contacts-companion-pure
issue/carddav-read-perf-fix-r2
issue/carddav-read-r2
port/notes-float-devsync2
review/calendar-2
review/switcher-a-pills
port/notes-float-switcher-a
port/port-tables-2
review/switcher-ends
wip/whiteboard-s1-1114
port/port-tables
wip/mail1011-perfneutral
review/photo-tint
port/notes-float-shell
wip/local/collections-db
wip/local/mail-p1
wip/local/cold-growth-on-tiering
wip/local/tiering-v3-s1
wip/local/wal1051-cap
wip/local/tiering-v3-s1-resume
wip/local/index-position-startup-scan
port/notes-float-flat
port/notes-float-promote
wip/handover/mail1011-candidate
wip/handover/files-s1-candidate
port/notes-float-shell-only
port/notes-float-perf
feat/whiteboard-s1
feat/tiering-v5
fix/app-switch-hitch
wip/local/files-s1-dev-v4-final
feat/files-s1-dev-v4
fix/c2-glass-shared
feat/flat-lists
wip/handover/whiteboard-s1-resume
wip/att-lazy-861
feat/switcher-browse
wip/att-lazy-860
feat/tasks-float
recovered/flat-backup-candidate
perf/stalls-1054-kc
land/ai-toolbar
feat/collections-db
feat/collections-db-fixes
codex/mail-1011-redesign-20261111
fix/ai-toolbar
backup/macos-vm/st3-head
perf/trim-candidate-phonestack
feat/switcher-three
fix/1051-index-idle-checkpoint
perf/stalls-1054-kb
perf/stalls-1054-k
perf/stalls-1054-r3
fix/c2-contrast-tail
perf/stalls-1054-r3-preview
feat/collections-before
feat/tiering-v4
fix/timelog-caret
wip/local/tasks-actions
docs/tasks-writes-v2-plan
st3-r3
feat/pass8
review/calendar-2-before-1111
wip/tiering-v3-cold4
perf/stalls-1054-r2
fix/suite-A4
fix/suite-A5-probe
fix/suite-A6
fix/suite-A3
fix/suite-A2
fix/suite-A5
fix/suite-A1
wip/local/attachments-861-fix
feat/contrast
wip/local/ports-861
storage/wal-checkpoint-off-save-1051
wip/local/mail-1011-reconcile-20261110
feat/style-sheet-fixes
feat/money-round
perf/stalls-1054
wip/tiering-v3-cold5
t3/mail-1011-liveness
feat/iphone-fixes
feat/notes-approve
wip/local/shrow-work
feat/files-s1-identity
feat/quickfix
wip/tiering-v3-cold
wip/local/shared-row-swipes
backup/macos-vm/pfx-B
backup/macos-vm/pfx-C
backup/macos-vm/pfx-D
feat/contrast-r1
feat/tiering-v3-s2-tags
feat/folder-drop
t3/photos-s1
feat/tiering-v3-s1-namespace
wip/local/photos-s1
t3/photos-plan-slice-one
recovered/backup/p1b-61505
t3/paged-search-reconcile
t3/smooth-pane-transitions
t3/index-position-startup-scan
fix/private-staging-759b-r2
backup/macos-vm/hk/hk1009/pr877
backup/macos-vm/hk/hk1009/pr878
docs/undo-block-ids-plan
fix/undo-768
backup/macos-vm/hk/hk1009/pr875
backup/macos-vm/hk/hk1009/pr904
proto/block-identity-v7d
backup/macos-vm/hk/hk1009/pr846
backup/macos-vm/hk/hk1009/pr860
backup/macos-vm/hk/hk1009/pr861
backup/macos-vm/hk/hk1009/pr849
backup/macos-vm/hk/hk1009/pr848
backup/macos-vm/hk/hk1009/pr853
backup/macos-vm/hk/hk1009/pr957
backup/macos-vm/hk/hk1009/pr893
backup/macos-vm/hk/hk1009/pr889
backup/macos-vm/hk/hk1009/pr902
docs/imap-notes-plan
docs/quota-plan-2
fix/parallel-test-flakes
docs/calendar-backend-v2-plan
feat/calendar-ical-converter
backup/macos-vm/hk/hk1009/pr808
docs/contacts-import-v2-plan
issue/610-pm-midnight
feat/calendar-v2-s1-containment
backup/macos-vm/hk/hk1009/pr854
backup/macos-vm/hk/hk1009/pr845
backup/macos-vm/hk/hk1009/pr917
docs/dav-recorder-v2-plan
plan/previews-865
plan/save-log-durable-entry
backup/macos-vm/hk/hk1009/pr934
fix/e2e-data-on-ram
backup/macos-vm/hk/hk1009/pr888
feat/appwindow3
feat/appwindow2
feat/appwindow
feat/money-p1
feat/keys-sheet
review/calendar-2-themes
feat/smooth-cursor
fix/float-style
review/calendar-2-float
release/2026-11-06-hotfix
archive/port/rows-drop-code
archive/port/rows-actions
archive/port/rows
scratch/tasks-894-ui-gates
review/calendar-2-night-wip
recovered/flaky/toast-reduced
release/2026-11-05
archive/flaky/rows-drop-fixed
archive/flaky/rows-actions
archive/flaky/rows
sim/bm15-final
sim/bm15-bis-932
sim/bm15-bis-909
sim/bm15
sim/bm15-bis-887
perf/tiering-option-b
fix/sw-lazy-precache
archive/plan/save-log-durable-entry
mock/money-fix2
archive/fix/e2e-data-on-ram
mock/appearance-all
mock/pill-press
mock/pill-press-mac
backup/macos-vm/appearance-after
mock/auto-swipes
mock/mail-actions
backup/macos-vm/mock/mail-actions
mock/money-static
archive/review/standards-917
perf/tiering-761-fix
mock/type-audit
mock/third-pane
feat/contacts-import-v2-s1
perf/executor-hot-path
archive/port/hidden-blocks
archive/port/devices
scratch/executor-on-894
scratch/executor-spans2
scratch/executor-spans
archive/port/rows-drop
feat/tiering-761-d-scale
feat/tiering-761-c-index
feat/tiering-761-b-reader
archive/review/sharing-pr3-review-9fec3d1f
perf/ports-lazy-budgets
feat/tiering-761-a-migration
archive/review/sharing-pr3-review
archive/review/sharing-pr3-review-code
archive/plan/previews-865
archive/port/port-attachments-3
archive/port/contacts-merge
fix/motion-audit-859
fix/motion-audit-859-mac
archive/port/port-pickers
archive/port/port-tables-2
archive/port/port-tables
recovered/local/sharing-s1-pr2-room-snapshot-candidate
archive/fix/parallel-test-flakes-code-minipc01
docs/imap-766-readonly-slice
feat/dav-recorder-v3
research/788-diagnosis
archive/fix/parallel-test-flakes
archive/perf/pr792-cold-index-edit
docs/sharing-slice-1
recovered/feat/dav-recorder-v2
recovered/feat/dav-recorder-v2-edd7bbb
spike/imap-766-s0-cases
archive/fix/undo-768
recovered/feat/dav-recorder
recovered/feat/dav-recorder-901acd4
feat/contacts-import
perf/cold-growth-on-764
perf/cold-growth-on-tiering
recovered/feat/tasks-set-status
feat/tasks-move-reorder
feat/tasks-delete-promote-duplicate
feat/carddav-writes
perf/quota-on-tiering
perf/quota-simple
perf/cold-growth-on-quota-stack
recovered/perf/cold-growth-on-tiering
feat/calendar-identity
feat/calendar-event-parser
feat/calendar-props-maps
port/glass-when-ring
recovered/feat/tiering-761-s1-wip-8132a84
recovered/feat/tiering-761-s1-wip-9da4094
recovered/feat/tiering-761-s1-wip-724512c
recovered/feat/tiering-761-s1-wip-66e667e
recovered/feat/tiering-761-s1
wip/6by32-01-tier-761-s1-pause-20261030
spike/imap-766-s0
wip/6by32-02-calternal-pause-20261030
wip/8by64-01-review-688-pause-20261030
wip/6by32-01-verify-744-pause-20261030
wip/6by32-01-verify-742-pause-20261030
fix/private-staging-759b
wip/6by32-01-review-748-pause-20261030
wip/6by32-01-review-733c-pause-20261030
wip/6by32-01-review-733b-pause-20261030
review/calendar-month
wip/local/bm15-trash
plan/759b-staging
review/767b-tests
review/preview-2026-10-29
docs/tiering-731-plan
wip/c6b02-review-733d
wip/c6b02-bm1-full-a
docs/deploy-plan
fix/storage-owner-liveness-642
fix/storage-fix-7
feat/tiering-731
wip/tiering-731-first-attempt
perf/idle-honest-2
fix/storage-private-tmp-642-dev
fix/storage-exact-file-quarantine-642
perf/one-flush-save
review/calendar-static
review/indexing-ring
review/when-field-2
proto/block-identity-2-review
proto/block-identity-review
review/when-field
issue/tasks-create-ids
issue/tasks-create
review/combined
review/task-polish
review/top-buttons
review/q1-q5
archive/integ325-293
archive/integ325-ci
issue/calendar-adr
archive/old/train/2026-10-23bk2
archive/old/train/2026-10-23bk
issue/469-mockup-9a
issue/smart-tasks-mockup
issue/469-menus
issue/652-signout-flake
issue/652-history-fix7
issue/652-history-fix6
archive/old/issue/spring-check-perf
issue/spring-check-perf
issue/659-rename-fast
archive/old/train/2026-10-21ar
issue/search-hardening-3
issue/652-history-fix5
issue/660-port-sheets-glass
issue/652-history-fix4
issue/652-history-fix3
issue/652-history-fix2
issue/652-history-flake
train/2026-10-21an
issue/settings-admin-port
issue/search-port
train/2026-10-20am
issue/storage-split-fix2
issue/storage-split
archive/old/issue/folder-ids-fix
train/2026-10-20al
archive/old/issue/folder-ids
train/2026-10-20ak
issue/tables-mockup
train/2026-10-19aj
train/2026-10-19ai
issue/469-merge-fixes
issue/sidebar-band
archive/old/issue/608-settings-spec
train/2026-10-19ah
issue/swipe-offscreen
train/2026-10-19ag
archive/old/issue/590-nlp-adr
archive/old/issue/587-event-after-write-2
train/2026-10-19af
archive/old/issue/587-event-after-write
issue/469-pill-room-c
issue/469-pill-room
train/2026-10-19ae
issue/469-narrow-handle
issue/397-ios-swipe-2
issue/469-desk-fixes
archive/old/issue/auto-update-adr
issue/469-filter-gap
issue/469-port-1b
issue/442-opacity-flake
issue/327-web-fast-3
archive/old/issue/469-port-1
issue/469-port-1
issue/327-web-fast-2
archive/old/issue/327-web-fast
archive/old/issue/425-stt-bench-vq1
archive/old/issue/445-no-bleed
archive/old/issue/400-swipe-mockup-2
issue/426-client-review
issue/426-client-2
issue/426-client
archive/old/issue/476-safe-area-lab
archive/old/issue/445-top-light
issue/471-blocks-mockup
archive/old/issue/448-links-app-2
archive/old/issue/448-links-app
archive/old/issue/398-cold-links
issue/434-442-small-2
issue/434-442-small
archive/old/issue/398-unload
archive/old/issue/445-bottom-band
issue/445-bottom-band
issue/351-rem-3
issue/351-rem-2
issue/351-rem
archive/old/issue/327-first-note
issue/395-width-phone
archive/old/issue/327-typing
issue/396-ios-edges
issue/397-ios-swipe
archive/old/issue/327-notes-index
issue/345-347-contrast-empty-2
archive/old/issue/44-arenas
issue/44-arenas
archive/integ325
archive/old/issue/327-perf-harness
archive/old/issue/44-thp
issue/44-thp
archive/old/issue/285-sticky-pills
archive/old/issue/44-trim-3
issue/44-trim-3
archive/old/issue/165-cards
archive/old/issue/165-picker-2
archive/old/issue/212-multi-select
No results found.
Labels
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
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
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
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:
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):
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
ToolbarandPill(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/.apillCSS.M/ai/PillGroup.svelte(75 lines) has the same comment and CSS asUI/components/Toolbar.svelte.M/chrome/DeskPills.svelte. The phone one is a.pill.grpinsideM/chrome/TopPills.svelte, with about 100 CSS lines for.grp/.hl/.check..sveltefile names and most have diverged. Examples by diff lines:TopPills336,PropRow89,BottomBar558,Editor2293. Nothing forces a port to reuse the mockup file.W/lib/apps.tshas Tasks and Contacts asbuilt: false. They are onport/tasks-3andport/contacts-card; Sharing is onfeat/sharing-s1-pr3. Mail, Calendar and AI have no web code. Files/Photos have no code anywhere (only a "Files comes later" stub inM/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.
calternal-decisions-sharingSH10;calternal-decisions-mailround 9;calternal-decisions-ai11-02)UI/components/Toolbar.svelteandPill.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}--ih, glyph size and press highlight are each re-implementedfeedback-pills-separate-actions). One icon size is D (feedback-icon-size-and-details). LK6 said unify and reuseM/chrome/TopPills.svelte(610) andW/chrome/TopPills.svelte. TasksM/tasks/PhoneTop(62). ContactsM/contacts/ContactTop(81). CalendarM/calendar/PhoneStrip. MailM/mail/MailScreen.svelte(<Pill alone h=44>). AIM/ai/Header(241)data-chrome-titlesource and the selection morph (Select all → "N selected" → Done). Others have back and ⋯ onlycalternal-design-notes-ui10-22). Other apps = DriftM/components/Shell.svelte(707, already takespanes={{side,middle,main,bar}}). TasksM/tasks/TasksApp.svelte(644; own panes, own resize, 208 CSS lines). ContactsM/contacts/ContactsApp.svelte(447; own frame, no resize). MailM/mail/MailShell(99). AIM/ai/AiShell(134)Shelland again inTasksApp(26 refs), nowhere else. Frame, glass and Focus are duplicatedcalternal-design-notes-ui10-19). The copies are DriftM/components/SideDock(219),M/chrome/PhoneFoot(211),M/tasks/SideFoot(83). Web:W/chrome/PhoneFoot+AppFoot.svelteonport/contacts(80)calternal-design-notes-ui10-20). The copies are DriftM/components/PhoneStack(568). TasksTasksApp(phone block). ContactsContactsApp(.screentranslate). MailMailScreen(.phone). CalendarCalendarScreen(.level)M/rows/{select.svelte,bulk,BulkBar}. Bulk actions registered fornote,trashandmailonly. Selection pills live in the notesTopPillsM/rows/RowActions.svelte. Kinds registered: note, trash, search, tag/view (rows/plugins), task, contact, mailcalendar/rows.ts), no RowActions kindcalternal-design-notes-ui10-22 "one shared component for every app"). Good example to copyUI/components/ContextMenu.svelteviaopenMenu. Content: Notes through the page-actions registry (M/chrome/pages.ts+plugins/{note,list,places}.ts). Mail inline array inThreadBar. ContactsM/contacts/menus.ts. TasksLayoutMenu(layout only). AI ⋯ opens a settings sheet, not a menu. Calendar has no ⋯ except the event bar (desktop only)calternal-design-notes-ui10-20). The registry being Notes-only is DriftSheetBody(UI). Share-sheet style:M/chrome/ShareSheet(660),M/ai/AiSheet(245).growFromToolbaris shared by those two (M/lib/morph-bar.ts). Own frame:M/contacts/SheetShell(97; used by 3 sheets),Import/Merge/PhotoCrop(ownmorphIn),InviteSheet,AddDeviceSheet.M/calendar/EventSheet(Float popover)calternal-decisions-sharing11-02). "Every inset sheet slides up from the bottom" is D (calternal-design-notes-ui10-21). The two rules collide on phone, see Q5. One glass is D (feedback-one-glass)PropRow(M/components, used by InfoSheet + MailMsgCard/ShowOriginal). ContactsM/contacts/FieldRow: same copy-on-tap and edit-on-double-click, own code. TasksPropsRow: pills, different thing. CalendarEventSheet: chipsPropRowlives in the app, notUI, and the web copy differsfeedback-reuse-components11-03). FieldRow = Drift (stacked label-over-value is a layout, not a new component).rowinM/components/Settings,.lineinM/mail/MailSettings,.srowinM/tasks/SettingsView,.rowinM/ai/SettingsSheetListShell/ListRow/ListGroup(M/components) used by Notes, Agenda; Mail usesListShellonly. TasksTaskRow/TaskList, ContactsContactRow/ContactList, MailMailRowListRowsays "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 titlecalternal-design-notes-ui10-21). Driftdata-chrome-titlesource: Notes, Settings,ListShell,TrashList. TasksMiddleh2, ContactsContactListh2, Calendarh1, AI nonedata-chrome-titleexistsUI/primitives/toast. Two entry points:controls/toast.svelte(15 imports) andprimitives/toast(23). Mail has its ownundoable()(M/mail/state.svelte.ts:57) and callsnotifywith 8 near-identical blocks.TasksAppmounts its own<Toasts>UI/components/EmptyStateused in 7 files (Notes, Trash, Shell, Editor, Mail list and thread, Search). Hand-rolled.none/.emptyin about 12 sites (Tasks, Contacts, admin, NotePicker, InsertSheet, ListPreview…). Error: Mail.calm+ Retry (2 copies), AI none. Loading: no spinners or skeletons by designcalternal-design-notes-ui10-13). No machinery in UI is D (feedback-no-machinery-ui). Hand-rolled = DriftDatePicker/Calendar/RepeatPicker/MorePicker; CalendarMonth;NotePicker,contacts/MergePicker,links/InlinePicker(622),UI/ColorPickerCalendar, CalendarMonth). 3 list-with-search pickers share nothingUI/primitives/selector(15 importers) and a 17-line adapterUI/controls/Selector(4 importers). Hand-rolled:M/components/embeds/MiniBar.seg,M/links/InlinePicker.modebar-kindbuttons, not a Selectorcalternal-decisions-inspector11-02). Hand-rolled = DriftconfirmCopied(UI/lib/copied.ts) in 26 files.M/ai/ActionRow.sveltehas its owncopiedstateM/contacts/Avatar(62),M/ai/Avatar(73),M/mail/Initials(35),M/chrome/SharedBadge(95)addDays/toIso/parseIso:M/tasks/dates.ts,M/calendar/sample.ts,M/contacts/logic.ts(all copies); about 20Intl.DateTimeFormatconstructionslib/morph-in(166),lib/motion(121),tasks/fly(112),calendar/motion,tasks/motion,rows/spring-to,lib/rise,lib/morph-bar. 62cubic-bezierliterals (17 distinct) against 349var(--ease…)uses; about 9 distinctspring(d, r)pairsfeedback-animation-rules-emil,kayg-motion-taste). Literals = DriftShareSheetfor notes, Views and contacts (openShare({ noteId | contactId | view }))M/composer+M/search. Tasks, Contacts, Notes useComposerBody. AI chat field is its owncontenteditable(M/ai/Composer.svelte)calternal-decisions-ai). Gap(b) Top-right toolbars
Agreed: one toolbar pill, Share + ⋯, in every app. The less-needed actions go in ⋯.
[Share ⋯]one glass pill, hand-rolled (DeskPills.svelte, 72×32). The owner's avatar replaces Share on shared notes (D)[Share ⋯]is infeat/sharing-s1-pr3(DeskPills, copy of the mockup)Toolbar/Pill[Share ⋯]group on the right ofTopPills; becomes round accent Done while selecting. Lists also get Share (except "shared")TopPillswithpageShare(page):[Share ⋯], or round⋯alone while nothing is shareableSelector(List/Board/Matrix) + a+button. Task pane: nothingport/tasks-3Middle.svelte:+onlyPhoneTop: back + one layout pill that grows into a menuShareand⋯(ContactTop.svelte; 38 px on desktop). List screen:⋯aloneport/contacts-cardContactTop:⋯only, no Share[Share ⋯]toolbar. SH10 is explicit.ib). Phone:PhoneStrip(back + month). Event bar has⋯on desktop onlyToolbar: Archive · Delete · Snooze · Tags · ⋯ (ThreadBar.svelte). List: a lone⋯pill. No SharePillGroup(Pane,⋯) beside the Cal and title pills. Phone: the same two in a hand-rolled.pill.grp. The⋯opens a settings sheet, not a menuReading: 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.
UI/bar/Bar.M/components/BottomBar.svelte(466 lines, monolithic) switches key: tabs, tools (rest bar), text, block, sheet-* , attach.BulkBarrises for a selectionW/components/BottomBar.svelteis split into mode plugins underW/components/bar/(Tabs, Tools, TextBar, BlockBar, Sheet, Toast, Ask, CommandBar). Toasts show inside the barTasksBar: 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 Composerport/tasks-3has noBaryet (PhoneFoot+ListDock)ContactsBar(sharedBar): 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:AppFootonlyEventBar(sharedBar): rest = Today/Week/Month; tapped event = title, time, → note, ⋯ (desktop only). No composerBottomDock(search + compose;oncomposeis a no-op, there is no mail composer). The actions are in the topThreadBar; Reply/Reply all/Forward are three pills under the message[Reply · Reply all · Forward] [Archive · Delete], composer morphs from it, no reply rowai/Composer.svelte) is the composer; model/level/Send pills sit inside itBottomDock/tabsCross-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 isPalette. 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.
Enabler: move reusable components into
packages/uibefore each port.Toolbar,Pill,PropRow, the page-toolbar and the bar scaffolding stay inM/, so web ports copy them (28 same-name files already diverge). Rule: "extract toUI/in the mockup branch first; mockup and web import the same file." Risk: low (path changes). This makes everything below stick.PageToolbar(Share + ⋯, the answer to the Contacts question).<PageToolbar share={{ onclick, badge? }} actions={items | () => items} extra?: Snippet selecting?: {done} glass h />. Built onToolbar+Pill. Share is hidden (⋯ becomes a round pill) whenshareis undefined. Page-actions come from the existingpages.tsregistry.DeskPills(58), theTopPillsright group (about 130 incl. CSS),ContactTopright side (about 40), AIHeadertoolbar +PillGroup(about 120), MailThreadBarshell (about 30).Retire hand-rolled pills:
Toolbar/Pillonly.ai/PillGroup. MoveBottomDock,PhoneFootpills,TaskActions,EventSheetactions,ai/Composergroups,LayoutMenu/PhoneToppills ontoPill alone.feedback-icon-size-and-details). Add a lint: no.pill {in*.svelte.ContextBar: the contextual bottom toolbar on the sharedBar.registerBarActions(kind, (ctx) => ({ groups: [Pill[], Pill[]], more?: MenuItem[] }))(same shape asregisterBulkAction/registerPageActions), plus<ContextBar kind id composer={…}/>that owns the bar key, scrim and thesearch → composermorph thatTasksBarandContactsBareach wire up.ThreadBarbuttons and the reply row, theBarwiring inTasksBar/ContactsBar/EventBar,BottomDock.SheetFrame(extracted fromShareSheet/AiSheet: header with back and close, anchor morph, dim rule, phone inset, height follows content).contacts/SheetShell(97) and the scaffolding inShareSheet,AiSheet,InviteSheet,AddDeviceSheet,ImportSheet,MergeSheet,PhotoCrop(about 60 lines each).feedback-one-glass); the phone entry rule needs Q5 first.AppShell: finishShell.svelte'spanesAPI and the pane resize.{ side, middle, main, bar, widths, narrow, phoneStack }. MoveTasksApp's resize into it.TasksApp(208 CSS + 26 resize refs),ContactsApp(114 CSS),MailShell,AiShell.PropRowinUI+layout="stacked"and anactionssnippet;SettingRow.contacts/FieldRowcopy/edit code (about 150 of 330 lines) and the four settings-row layouts in Settings, MailSettings, tasksSettingsViewandai/SettingsSheet(about 150 lines).AppDock(avatar · app tabs · search):SideDock,PhoneFoot,tasks/SideFoot, webAppFoot.{ phone, current }. Saves about 250 lines. Risk: medium (the phone version is approved and perf-sensitive).One
Avatar({ name, photo?, gradient?, size }):contacts/Avatar,ai/Avatar,mail/Initials,SharedBadge. Saves about 120 lines. Risk: low.EmptyState+InlineErroradoption (a calm line with Retry): about 12 empty sites and 2 copies of the Mail error line. Saves about 80 lines. Risk: low.Selectorcleanup: move the 4controls/Selectorimporters to the primitive, delete the adapter; replaceMiniBar .segandInlinePicker .modewithSelector; make Calendar's Today/Week/Month aSelector. Saves about 100 lines. Risk: low.Shared
datesinUI/lib: oneaddDays/toIso/parseIso/fmtDayand cachedIntlformatters, replacing 3 copies. Saves about 60 lines. Risk: low, and it removes timezone drift.Toast helpers:
toast.undo({op, message, undo})for the 8notifyblocks in Mail; onecontrolsentry point; removeTasksApp's own<Toasts>. Saves about 80 lines. Risk: low.Generic
PhoneStack: notes' 568-line stack as a layout used by Tasks, Contacts, Mail, Calendar. Saves about 400 lines. Risk: high; do after 5.SearchPicker(field + filtered rows + roving):NotePicker,MergePicker, tag picker, parts ofInlinePicker. Saves about 200 lines. Risk: medium. Also merge the mini-month (TasksCalendar) with CalendarMonth.Motion presets:
springs.tswith named presets and a lint oncubic-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)
pageSharetoday: no disabled Share button.[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).packages/uiin 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,Selectorcleanup,EmptyStateadoption.Method note: code and git only; no screenshots taken, nothing committed or changed. The audit worktree is
~/Developer/Worktrees/audit-892-dev(detached atorigin/dev, read-only).Toolbar refactor: hand-rolled pills moved onto
Toolbar/PillBranch
review/calendar-2@cb0a1a2d(3 commits on top of671e4e07), preview: http://calternal-dev-02-std.vpn.kayg.org/calendar-2/ (deployed atcb0a1a2d). 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/oncode.What moved
ai/PillGroupis deleted (75 lines). Moved ontoToolbar/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.sveltegot what the moves needed, as props:style(added to the size, never replacing it),class(a spreadclassused to replacepill; now joined),denseglass,has a CSS length ("var(--ctl-h, 40px)"), andpointer-events: autoon a pill alone.editor.css: the margin-pill rule.page .pillis now.page .margin-controls .pillso aPillon 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 checkinapps/mockup, andtests/no-handmade-pills.spec.tsruns it with the specs). It fails on: aPillGroup, apadding: 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)
TopPills(phone),DeskPills(desktop) andSharedBadge: the Share + ⋯ group is flush halves (92×44 and 72×32), with a whole-pill press highlight and a width spring into Done. AToolbarof inner pills is 84 wide with 3 px insets, so moving it would be a visible change. They go withPageToolbar(#892 opportunity 1) once the Share + ⋯ layout is answered.BottomDock, the Cal chip inai/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..grpsection headings, Tapback.tb, the editor's block handle pill: different components with the same words in their class names.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, andai-sidebar,ai-chat/ai-pane-docdesktop, tasks-lists phone (the foot's profile pill neededjustify-content: centerto match).Differences that remain, with the reason:
--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).<Pill class="danger">lost itspillclass (a spreadclassreplaced 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.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 sameGlass).tasks-note-actionsdesktop: 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.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 inai-sidebarandtasks-listsinstead (zero differing).Not compared: hover and pressed states (a
Pillhover is 9 % ink, the old.presshover 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/sloton dev-02) over 19 spec files that touch the moved parts (517 tests): before494 passed, 16 failed, 6 skipped; after495 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 at671e4e07. 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
(no pixel differs)
AI chat: header toolbar, composer tools, model + thinking · phone-390
AI with the note pane: pane toolbar · desktop-1440
(no pixel differs)
AI with the note pane: pane toolbar · phone-390
AI sidebar: new chat pill (phone), foot · desktop-1440
(no pixel differs)
AI sidebar: new chat pill (phone), foot · phone-390
(no pixel differs)
Contacts card: back / Share / ⋯ · desktop-1440
(no pixel differs)
Contacts card: back / Share / ⋯ · phone-390
(no pixel differs)
Contacts list · desktop-1440
(no pixel differs)
Contacts list · phone-390
(no pixel differs)
Tasks list: back + layout pill · desktop-1440
(no pixel differs)
Tasks list: back + layout pill · phone-390
(no pixel differs)
Tasks: open task · desktop-1440
(no pixel differs)
Tasks: open task · phone-390
(no pixel differs)
Tasks lists screen: phone foot · desktop-1440
(no pixel differs)
Tasks lists screen: phone foot · phone-390
(no pixel differs)
A tracked task open in a note: Open note / Make plain · desktop-1440
A tracked task open in a note: Open note / Make plain · phone-390
(no pixel differs)
Calendar event sheet: action pills, Delete · desktop-1440
Calendar event sheet: action pills, Delete · phone-390
Notes first screen (animated page: noisy by itself, see below) · desktop-1440
Notes first screen (animated page: noisy by itself, see below) · phone-390
Notes list: dock · desktop-1440
(no pixel differs)
Notes list: dock · phone-390
(no pixel differs)
Mail settings: Remove account (a `class` on Pill) · desktop-1440
Mail settings: Remove account (a `class` on Pill) · phone-390
Corner-radius audit of the mockup (
apps/mockup/src, headea30041f). 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 commits14170c2a…ea30041f).999px(104),--r-pill(19),99pxvar(--r-pill)(129)50%(115)50%(117)12px(59),10px(44),11px(9),9px(16),--r-select(23)var(--r-select)(153)14px(36),16px(25),20px(4),17px,18px(non-bubble),--r-card(7)var(--r-card)14 px (82)18px(2),--bub-r, 19px(6)var(--bub-r, 19px)(10)22px(5),--r-sheet(3)var(--r-sheet)(9)--r-frame22 (9),18pxon.list-pane(side hidden) and.drawer,18px 0 0 18pxon.side,.side-panevar(--r-frame)(11 + 4 one-sided)24px(4),26px(4),28px(4)var(--r-panel)26 px (10; new token)morph-bar.ts,morph-glass.ts) is built on--sheet-corners(6)8px(21),7px(18),--r-control(3)var(--r-control)8 px (42)6px(15)var(--r-chip)6 px (15; new token)24pxvar(--r-sheet)24pxvar(--r-pill)2px(25),3px(11),4px(3),5px(7)inherit(31),0(11)--page-radius,--embed-radius,--lk-r,--print-r,--rad,--card-rcalc(var(--tier-cap) / 2)etc.28%,54% 46% 52% 48% / 50% 54% 46% 50%8px 8px 0 0,var(--card-r) var(--card-r) 0 0,var(--embed-radius)halvesTotals: 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.tsRADIUS 26). Not touched:packages/uicomponents' 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.
#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 sharedToolbar(newflushprop,class,style, a CSS-length height) andPill. 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).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).
kayg referenced this issue2026-11-05 23:21:11 +00:00