Unify UI primitives in production (audit + plan) #912
Open
opened 2026-11-04 08:01:56 +00:00 by kayg
·
1 comment
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#912
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?
Request (kayg 11-04): "look for other areas like that, especially in production, and fix all of them by unifying, so the code is modular, extensible and reusable."
Basis:
origin/dev@41f2efa3(apps/web, packages/ui, packages/editor; 92 Svelte files in web), compared with the mockup onreview/calendar-2@cfbca1cf(282 Svelte files). Counts are fromgrepon the style blocks and markup; no code was built or run (control host). Byte savings below are estimates, not measurements.Overlap found (build on these, do not redo): #892 (cross-app audit, mockup side), #911 (mockup type + spacing scale), #693 (port colours/corners, Q3), PR #875 (port rows + shared press engine, open), the mockup's
no-handmade-pills.mjsguard (mockup only). This issue is the production half: dev has noPill,ToolbarorPageToolbaryet (they exist only in the mockup branch), so step 0 is porting them.Summary
Pill,Toolbarfrom mockup intopackages/uiscaleon:active)scale:rules: 26 in 20 files are:activepresses (+ 4 enter/exit anims, 8 in cm/editor handles/ticks).press(base.css, 72 uses) bypassed; add--press-scale: .97token +.pressvariants.round,.back,.close,.act,.btn,.ra-act…)Pill(round),.ib(28px square, 30 uses)var(--hover)/--press; 70+10 uses; radii: 9px ×20, 10px ×20, 12px ×12, 11px ×4, 8px ×10 for the same "row/tint/field" job--r-control 7 / tile 9 / card 10unused by most--r-select(mockup: 12 = frame − 10, 155 uses) +--r-card 14; port #693 tokens.row/.linein 10 files (NoteList, TrashList, Settings, Sidebar, InstallHint, InviteSheet, KindLine, TopPills, BackdropGrid, bar/Sheet)PropRow(1 user in prod), mockupListRow/SettingRow/ListGroup→packages/ui<input>rule sets: CommandBar, PropRow ×2, TagPicker, BackdropPicker, SignIn, NotePicker, InsertSheet, ListSearch, ComposerBody ×2, ListDock, InlineRename, ListFilterListFilter(2 users) + aFieldToggle(squish switch) has 0 imports in web; hand-rolled: Settings.svelte:745.toggle, Inspector.svelte:215.sw, ColorPicker.swToggle/SquishSwitchSelectorused 3×;.segrules in chrome.css (2 users)Selector13*type-px, 32×12.5*, 16×13.5*, 11× each 11.5/15/16, 7×14*, + 13 raw px next to the 7--text-*tokens (used ~50×)--text-*scale from #911 +.h-*classesgap8/10/6/2/4/12/16/3/7/5/14 px; rowpadding12 kinds--space-*tokens from #911<Glass>×27 (good); butbackdrop-filterhand-written in 13 files: blur 2/5/9/18/20/24px,--glass-blur,--page-blur,--glass-float-filter.glass(base.css),Glass, tokens--glass-blur/satvar(--ease-out)117, bareease57, bareease-out52, 12 literal cubic-béziers--dur-fast/med/slow,--ease-out/-in-out/-drawer/-springtokensContextMenu×1;KindLineownrole=menu; 7 dialog/sheet shells (Palette, Morph, SheetBody, ListSearch, LinkCard, InviteSheet, TagPicker)SheetBody(1 user) + share-sheet parts +FloatEmptyState5 users; hand-made in NoteList ×5, TrashList ×3, TagPicker, NotePicker, InsertSheet, ListSearch, InviteSheet, AdminInvitesEmptyStatetoast()primitive (used 2×), hand-rolled none found<Icon>×106 (good);--glyphtoken; only 2 inline<svg>(Backdrop)IconDetails
1. Press feedback (the original bug)
:active { scale }rules in prod (file:line): Inspector:224 (.9), TrashList:291 (.96), BackdropGrid:170 (.97), LinkCard:290 (.97), CopyLink:70 (.97), SignIn:275 (.96) / :298 (.98) / :335 (.97), Settings:711 (.92), TrashPreview:152 (.97), TopPills:351 (.97) :393/:399/:447/:459 (.9) :532 (.92), editor.css:183 (.92), cm.css:309 (.86) :708 (.96), BulkBar:138 (.97), RowActions:237 (.94), ColorPicker:78 (.9), EmptyState:74 (.96), chrome.css:15/97/149 (.94/.96/.96), base.css:219 (.97, the shared.press), ToastRow:140, Selector:345, Morph:220 (.96).Already shared and bypassed:
.pressinpackages/ui/src/styles/base.css:213(72 uses) and.ibinchrome.css(30 uses) — both carry their own number, neither reads a token. In the mockup--press-scale: 0.97exists (tokens.css:299, 16 uses) but 65 rules still hard-code 0.9–0.985.Target:
--press-scaletoken (+--press-scale-small: .9for ≤24 px glyphs, if kayg wants the two-level rule; decide in the PR: default one value .97, small ticks keep their own documented value). All:activescale rules go through.press(orPill, which has it).prefers-reduced-motionhandled once.2. Round / icon buttons
Hand-built round buttons: TrashPreview:138 (44 px, 50%), InviteSheet:230 (.back 44), AppCard:93 (30), TopPills:353/366/408 (.round/.back 44), ListDock:101, PullHint:59, ListSearch:371; rect buttons: Settings:852 and PasskeySection:234 (.btn, 34 px / 10 radius), InfoSheet:453 (.act, 32 / 9), BulkBar:106 (56 × 14), RowActions:188 (56 × 14), NoteList:443 (.pick-act, 999). Sizes 28–56, 5 radii.
Target:
Pill(round, incl.aloneglass form) for floating/bar buttons;.ibfor in-row tool buttons;Button(new, thin:variant=solid|quiet|danger,size) for the text buttons in Settings/PasskeySection/InfoSheet/InviteSheet (they share one look today by copy). BulkBar/RowActions action tiles become oneActionTile.3. Tints and radii
Prod radii:
999px×36,50%×36,9px×20,10px×20,12px×12,14px×11,8px×10,5px×8,3px×8,18px×5,16px×5,11px×4, plus 8 token forms. Prod tokens (tokens.css:122):--r-control 7, --r-tile 9, --r-card 10, --r-sheet 18, --r-frame 20— different numbers from the approved mockup (--r-card 14, --r-frame 22, --r-select = frame − 10 = 12). The mockup sweep (comment on #892, 6 commits) already made the mockup 153×--r-select. Port = #693 (token values) and then replace raw 8/9/10/11/12 px with--r-select, raw 14/16/18 with--r-card/--r-sheet.Rule for the guard: a selection/hover tint's radius is
calc(container radius − inset);--r-selectis the default; anything else needs a comment/* radius: why */.4–5. Rows and fields
Rows: NoteList:468, TrashList:223, Settings:460, Sidebar:437, InstallHint:122, InviteSheet:268, KindLine:78, TopPills:508, BackdropGrid:129, bar/Sheet:54.
PropRow(apps/web/src/components/PropRow.svelte) is imported by 1 file. Mockup hasListRow,ListGroup,SettingRow,PropRow— port the first three topackages/ui(rows get radius--r-select, hover--hover, press via.press).Fields: 13 input rule sets listed in the table;
ListFilterandInlineRenameinpackages/uialready do most of it.6–7. Toggle, Selector
Toggle(packages/ui/controls) wrapsSquishSwitchbut nothing in web imports it; Settings and Inspector draw their own.Selector(3 users) vs.segin chrome.css (2 users); the mockup hasMiniBarstill waiting to become a Selector.8–9. Type and spacing
Prod defines
--text-title/subtitle/heading/body/ui/label/section(tokens.css:93–99) but 150+ declarations usecalc(N*var(--type-px))with N ∈ {10.5, 11, 11.5, 12, 12.5, 13, 13.5, 14, 15, 16, 17, 18, 21, 28, 34}. #911 designs the new scale in the mockup; prod port should follow #911 once approved, not invent another.10–13. Glass, motion, sheets, empty states
see table. Motion tokens (
--ease-out,--ease-in-out,--ease-drawer) exist; 109 bareease/ease-outand 12 literal béziers bypass them. No duration tokens exist at all.Plan: one PR per row, into dev
Order = most-copied and most-visible first. Every PR has the same four parts:
ci/check-ui-primitives.mjs(node, no deps; runs inbun run lintand the web CI job, nocontinue-on-error). It extends the mockup'sno-handmade-pills.mjsidea with one rule per row: noscale:in:activeoutside.press/Pill; noborder-radius: 8|9|10|11|12pxoutside tokens; nofont-size: calc(N*var(--type-px))outside tokens.css; nobackdrop-filteroutside glass.css; no bareease/ease-out; no<inputrule sets outsideField; aLEFT_ALONEmap with a reason per allowed place (as in the mockup guard). Count may only go down.apps/web/scripts/bundle-size.mjs) must be ≤ dev; typing latency and rAF frame deltas flat on the Mac VM for any PR touching bar/pills/editor chrome. Report all deltas.TASTE.mdline if a rule changed.Pill+Toolbar+PageToolbarfromreview/calendar-2; move TopPills, PhoneFoot, ListDock, BulkBar, TrashPreview onto them--press-scale, all 26:activepresses via.press/Pill; guardButton/ActionTile;.ibas the in-row icon button--r-select,--r-card)ListRow/ListGroup/SettingRow;PropRoweverywhereField+ListFilterToggle,Selectoradoptionglass, motion tokens, sheet shells,EmptyStateTotal expected: about −8 KB gz across CSS/JS, no first-paint growth (PR 1's new code loads with the chrome that already ships). These are guesses from rule counts; each PR reports the real number from
bundle-size.mjs.Decisions I made (flagging for review)
Pill/Toolbarport is PR 1 because 8 other PRs depend on it.--press-scale-smallfor those pending kayg's call.Open risks
packages/ui; PR 2 must land after it or rebase on it.Prod findings from the consistency audit (#933), measured on
origin/dev@6be86ba0(13 routes x 2 viewports + trigger clicks; thin data). Which PR of this plan covers each:h2.sec), phone 16; no--fs-*scale.ib28, rows 32-34, fields 32, tabs 30 / 34Also: the mockup branch now has
packages/uiusing--text-ui/--text-labelinstead of 13.5 / 12.5 / 11.5 literals (de7ef933); when prod takes the package those sizes become 14 / 12 / 12, so add that to PR 9's "what changes" list.docs/design/consistency.md(PR into dev) is the table PRs 3, 4, 9, 10 and 11 should check against.kayg referenced this issue2026-11-05 23:21:11 +00:00