port: tables, resizing, markdown in cells, carry, motion (stacked on #845) #854
Closed
kayg
wants to merge 29 commits from
port/port-tables-2 into port/port-tables
pull from: port/port-tables-2
merge into: kayg:port/port-tables
kayg:main
kayg:port/tasks-float-2
kayg:fix/train-1116-2
kayg:fix/train-1116-3
kayg:fix/train-1116-1
kayg:fix/flake-1134
kayg:fix/server-1182
kayg:dev
kayg:port/notes-float-3c
kayg:docs/auto-update-ig
kayg:feat/dav-transport
kayg:port/tasks-float-1
kayg:wip/mail1011-sv-order-1116
kayg:fix/flake-1179
kayg:fix/flake-1178
kayg:fix/guards-1153-fsio-split
kayg:fix/guards-1153-notes-split-we
kayg:fix/guards-1153-notes-lib
kayg:fix/guards-1153-notes-home
kayg:fix/guards-1153-ui-primitives
kayg:fix/guards-1153-primitives-e2e
kayg:fix/guards-1153-visibility-doc
kayg:feat/paper-grey-1116
kayg:fix/flake-1165
kayg:fix/flake-1119
kayg:docs/imap-766-plan-v2
kayg:fix/e2e-unique-ports
kayg:t3/paged-search-reconcile-final
kayg:wip/mail1011-final-1115
kayg:docs/tasks-float-port
kayg:perf/editor-first-paint-1c
kayg:feat/imap-notes-fetch
kayg:feat/imap-notes-projection
kayg:feat/imap-notes-readonly
kayg:feat/imap-notes-auth
kayg:feat/imap-notes-server-foundation
kayg:wip/mail1011-txn-ownvocab-1115
kayg:wip/mail1011-txn-novocab-1115
kayg:perf/p1117-final-harness
kayg:perf/single-shot-repeats
kayg:port/tasks-matrix
kayg:wip/mail1011-txn-1115
kayg:fix/static-gates-1155
kayg:feat/files-s1-identity-r7
kayg:fix/files-r7-idle-loop
kayg:fix/daily-train-1152
kayg:port/notes-float
kayg:fix/editor-tables-test-types
kayg:port/notes-float-listscript
kayg:feat/tasks-actions
kayg:port/notes-float-phone-preload
kayg:perf/sound-comparator
kayg:port/notes-float-listscroll
kayg:port/notes-float-budgets
kayg:port/notes-float-suite-fix-b
kayg:port/notes-float-sidebar-fix
kayg:port/notes-float-trim
kayg:port/notes-float-3-lists
kayg:fix/attachments-meta-capability
kayg:docs/carddav-writes-v2-plan
kayg:feat/contacts-companion-pure
kayg:issue/carddav-read-perf-fix-r2
kayg:issue/carddav-read-r2
kayg:port/notes-float-devsync2
kayg:review/calendar-2
kayg:review/switcher-a-pills
kayg:port/notes-float-switcher-a
kayg:review/switcher-ends
kayg:wip/whiteboard-s1-1114
kayg:port/port-tables
kayg:wip/mail1011-perfneutral
kayg:review/photo-tint
kayg:port/notes-float-shell
kayg:wip/local/collections-db
kayg:wip/local/mail-p1
kayg:wip/local/cold-growth-on-tiering
kayg:wip/local/tiering-v3-s1
kayg:wip/local/wal1051-cap
kayg:wip/local/tiering-v3-s1-resume
kayg:wip/local/index-position-startup-scan
kayg:port/notes-float-flat
kayg:port/notes-float-promote
kayg:wip/handover/mail1011-candidate
kayg:wip/handover/files-s1-candidate
kayg:port/notes-float-shell-only
kayg:port/notes-float-perf
kayg:feat/whiteboard-s1
kayg:feat/tiering-v5
kayg:fix/app-switch-hitch
kayg:wip/local/files-s1-dev-v4-final
kayg:feat/files-s1-dev-v4
kayg:fix/c2-glass-shared
kayg:feat/flat-lists
kayg:wip/handover/whiteboard-s1-resume
kayg:wip/att-lazy-861
kayg:feat/switcher-browse
kayg:wip/att-lazy-860
kayg:feat/tasks-float
kayg:recovered/flat-backup-candidate
kayg:perf/stalls-1054-kc
kayg:land/ai-toolbar
kayg:feat/collections-db
kayg:feat/collections-db-fixes
kayg:codex/mail-1011-redesign-20261111
kayg:fix/ai-toolbar
kayg:backup/macos-vm/st3-head
kayg:perf/trim-candidate-phonestack
kayg:feat/switcher-three
kayg:fix/1051-index-idle-checkpoint
kayg:perf/stalls-1054-kb
kayg:perf/stalls-1054-k
kayg:perf/stalls-1054-r3
kayg:fix/c2-contrast-tail
kayg:perf/stalls-1054-r3-preview
kayg:feat/collections-before
kayg:feat/tiering-v4
kayg:fix/timelog-caret
kayg:wip/local/tasks-actions
kayg:docs/tasks-writes-v2-plan
kayg:st3-r3
kayg:feat/pass8
kayg:review/calendar-2-before-1111
kayg:wip/tiering-v3-cold4
kayg:perf/stalls-1054-r2
kayg:fix/suite-A4
kayg:fix/suite-A5-probe
kayg:fix/suite-A6
kayg:fix/suite-A3
kayg:fix/suite-A2
kayg:fix/suite-A5
kayg:fix/suite-A1
kayg:wip/local/attachments-861-fix
kayg:feat/contrast
kayg:wip/local/ports-861
kayg:storage/wal-checkpoint-off-save-1051
kayg:wip/local/mail-1011-reconcile-20261110
kayg:feat/style-sheet-fixes
kayg:feat/money-round
kayg:perf/stalls-1054
kayg:wip/tiering-v3-cold5
kayg:t3/mail-1011-liveness
kayg:feat/iphone-fixes
kayg:feat/notes-approve
kayg:wip/local/shrow-work
kayg:feat/files-s1-identity
kayg:feat/quickfix
kayg:wip/tiering-v3-cold
kayg:wip/local/shared-row-swipes
kayg:backup/macos-vm/pfx-B
kayg:backup/macos-vm/pfx-C
kayg:backup/macos-vm/pfx-D
kayg:feat/contrast-r1
kayg:feat/tiering-v3-s2-tags
kayg:feat/folder-drop
kayg:t3/photos-s1
kayg:feat/tiering-v3-s1-namespace
kayg:wip/local/photos-s1
kayg:t3/photos-plan-slice-one
kayg:recovered/backup/p1b-61505
kayg:t3/paged-search-reconcile
kayg:t3/smooth-pane-transitions
kayg:t3/index-position-startup-scan
kayg:fix/private-staging-759b-r2
kayg:backup/macos-vm/hk/hk1009/pr877
kayg:backup/macos-vm/hk/hk1009/pr878
kayg:docs/undo-block-ids-plan
kayg:fix/undo-768
kayg:backup/macos-vm/hk/hk1009/pr875
kayg:backup/macos-vm/hk/hk1009/pr904
kayg:proto/block-identity-v7d
kayg:backup/macos-vm/hk/hk1009/pr846
kayg:backup/macos-vm/hk/hk1009/pr860
kayg:backup/macos-vm/hk/hk1009/pr861
kayg:backup/macos-vm/hk/hk1009/pr849
kayg:backup/macos-vm/hk/hk1009/pr848
kayg:backup/macos-vm/hk/hk1009/pr853
kayg:backup/macos-vm/hk/hk1009/pr957
kayg:backup/macos-vm/hk/hk1009/pr893
kayg:backup/macos-vm/hk/hk1009/pr889
kayg:backup/macos-vm/hk/hk1009/pr902
kayg:docs/imap-notes-plan
kayg:docs/quota-plan-2
kayg:fix/parallel-test-flakes
kayg:docs/calendar-backend-v2-plan
kayg:feat/calendar-ical-converter
kayg:backup/macos-vm/hk/hk1009/pr808
kayg:docs/contacts-import-v2-plan
kayg:issue/610-pm-midnight
kayg:feat/calendar-v2-s1-containment
kayg:backup/macos-vm/hk/hk1009/pr854
kayg:backup/macos-vm/hk/hk1009/pr845
kayg:backup/macos-vm/hk/hk1009/pr917
kayg:docs/dav-recorder-v2-plan
kayg:plan/previews-865
kayg:plan/save-log-durable-entry
kayg:backup/macos-vm/hk/hk1009/pr934
kayg:fix/e2e-data-on-ram
kayg:backup/macos-vm/hk/hk1009/pr888
kayg:feat/appwindow3
kayg:feat/appwindow2
kayg:feat/appwindow
kayg:feat/money-p1
kayg:feat/keys-sheet
kayg:review/calendar-2-themes
kayg:feat/smooth-cursor
kayg:fix/float-style
kayg:review/calendar-2-float
kayg:release/2026-11-06-hotfix
kayg:archive/port/rows-drop-code
kayg:archive/port/rows-actions
kayg:archive/port/rows
kayg:scratch/tasks-894-ui-gates
kayg:review/calendar-2-night-wip
kayg:recovered/flaky/toast-reduced
kayg:release/2026-11-05
kayg:archive/flaky/rows-drop-fixed
kayg:archive/flaky/rows-actions
kayg:archive/flaky/rows
kayg:sim/bm15-final
kayg:sim/bm15-bis-932
kayg:sim/bm15-bis-909
kayg:sim/bm15
kayg:sim/bm15-bis-887
kayg:perf/tiering-option-b
kayg:fix/sw-lazy-precache
kayg:archive/plan/save-log-durable-entry
kayg:mock/money-fix2
kayg:archive/fix/e2e-data-on-ram
kayg:mock/appearance-all
kayg:mock/pill-press
kayg:mock/pill-press-mac
kayg:backup/macos-vm/appearance-after
kayg:mock/auto-swipes
kayg:mock/mail-actions
kayg:backup/macos-vm/mock/mail-actions
kayg:mock/money-static
kayg:archive/review/standards-917
kayg:perf/tiering-761-fix
kayg:mock/type-audit
kayg:mock/third-pane
kayg:feat/contacts-import-v2-s1
kayg:perf/executor-hot-path
kayg:archive/port/hidden-blocks
kayg:archive/port/devices
kayg:scratch/executor-on-894
kayg:scratch/executor-spans2
kayg:scratch/executor-spans
kayg:archive/port/rows-drop
kayg:feat/tiering-761-d-scale
kayg:feat/tiering-761-c-index
kayg:feat/tiering-761-b-reader
kayg:archive/review/sharing-pr3-review-9fec3d1f
kayg:perf/ports-lazy-budgets
kayg:feat/tiering-761-a-migration
kayg:archive/review/sharing-pr3-review
kayg:archive/review/sharing-pr3-review-code
kayg:archive/plan/previews-865
kayg:archive/port/port-attachments-3
kayg:archive/port/contacts-merge
kayg:fix/motion-audit-859
kayg:fix/motion-audit-859-mac
kayg:archive/port/port-pickers
kayg:archive/port/port-tables-2
kayg:archive/port/port-tables
kayg:recovered/local/sharing-s1-pr2-room-snapshot-candidate
kayg:archive/fix/parallel-test-flakes-code-minipc01
kayg:docs/imap-766-readonly-slice
kayg:feat/dav-recorder-v3
kayg:research/788-diagnosis
kayg:archive/fix/parallel-test-flakes
kayg:archive/perf/pr792-cold-index-edit
kayg:docs/sharing-slice-1
kayg:recovered/feat/dav-recorder-v2
kayg:recovered/feat/dav-recorder-v2-edd7bbb
kayg:spike/imap-766-s0-cases
kayg:archive/fix/undo-768
kayg:recovered/feat/dav-recorder
kayg:recovered/feat/dav-recorder-901acd4
kayg:feat/contacts-import
kayg:perf/cold-growth-on-764
kayg:perf/cold-growth-on-tiering
kayg:recovered/feat/tasks-set-status
kayg:feat/tasks-move-reorder
kayg:feat/tasks-delete-promote-duplicate
kayg:feat/carddav-writes
kayg:perf/quota-on-tiering
kayg:perf/quota-simple
kayg:perf/cold-growth-on-quota-stack
kayg:recovered/perf/cold-growth-on-tiering
kayg:feat/calendar-identity
kayg:feat/calendar-event-parser
kayg:feat/calendar-props-maps
kayg:port/glass-when-ring
kayg:recovered/feat/tiering-761-s1-wip-8132a84
kayg:recovered/feat/tiering-761-s1-wip-9da4094
kayg:recovered/feat/tiering-761-s1-wip-724512c
kayg:recovered/feat/tiering-761-s1-wip-66e667e
kayg:recovered/feat/tiering-761-s1
kayg:wip/6by32-01-tier-761-s1-pause-20261030
kayg:spike/imap-766-s0
kayg:wip/6by32-02-calternal-pause-20261030
kayg:wip/8by64-01-review-688-pause-20261030
kayg:wip/6by32-01-verify-744-pause-20261030
kayg:wip/6by32-01-verify-742-pause-20261030
kayg:fix/private-staging-759b
kayg:wip/6by32-01-review-748-pause-20261030
kayg:wip/6by32-01-review-733c-pause-20261030
kayg:wip/6by32-01-review-733b-pause-20261030
kayg:review/calendar-month
kayg:wip/local/bm15-trash
kayg:plan/759b-staging
kayg:review/767b-tests
kayg:review/preview-2026-10-29
kayg:docs/tiering-731-plan
kayg:wip/c6b02-review-733d
kayg:wip/c6b02-bm1-full-a
kayg:docs/deploy-plan
kayg:fix/storage-owner-liveness-642
kayg:fix/storage-fix-7
kayg:feat/tiering-731
kayg:wip/tiering-731-first-attempt
kayg:perf/idle-honest-2
kayg:fix/storage-private-tmp-642-dev
kayg:fix/storage-exact-file-quarantine-642
kayg:perf/one-flush-save
kayg:review/calendar-static
kayg:review/indexing-ring
kayg:review/when-field-2
kayg:proto/block-identity-2-review
kayg:proto/block-identity-review
kayg:review/when-field
kayg:issue/tasks-create-ids
kayg:issue/tasks-create
kayg:review/combined
kayg:review/task-polish
kayg:review/top-buttons
kayg:review/q1-q5
kayg:archive/integ325-293
kayg:archive/integ325-ci
kayg:issue/calendar-adr
kayg:archive/old/train/2026-10-23bk2
kayg:archive/old/train/2026-10-23bk
kayg:issue/469-mockup-9a
kayg:issue/smart-tasks-mockup
kayg:issue/469-menus
kayg:issue/652-signout-flake
kayg:issue/652-history-fix7
kayg:issue/652-history-fix6
kayg:archive/old/issue/spring-check-perf
kayg:issue/spring-check-perf
kayg:issue/659-rename-fast
kayg:archive/old/train/2026-10-21ar
kayg:issue/search-hardening-3
kayg:issue/652-history-fix5
kayg:issue/660-port-sheets-glass
kayg:issue/652-history-fix4
kayg:issue/652-history-fix3
kayg:issue/652-history-fix2
kayg:issue/652-history-flake
kayg:train/2026-10-21an
kayg:issue/settings-admin-port
kayg:issue/search-port
kayg:train/2026-10-20am
kayg:issue/storage-split-fix2
kayg:issue/storage-split
kayg:archive/old/issue/folder-ids-fix
kayg:train/2026-10-20al
kayg:archive/old/issue/folder-ids
kayg:train/2026-10-20ak
kayg:issue/tables-mockup
kayg:train/2026-10-19aj
kayg:train/2026-10-19ai
kayg:issue/469-merge-fixes
kayg:issue/sidebar-band
kayg:archive/old/issue/608-settings-spec
kayg:train/2026-10-19ah
kayg:issue/swipe-offscreen
kayg:train/2026-10-19ag
kayg:archive/old/issue/590-nlp-adr
kayg:archive/old/issue/587-event-after-write-2
kayg:train/2026-10-19af
kayg:archive/old/issue/587-event-after-write
kayg:issue/469-pill-room-c
kayg:issue/469-pill-room
kayg:train/2026-10-19ae
kayg:issue/469-narrow-handle
kayg:issue/397-ios-swipe-2
kayg:issue/469-desk-fixes
kayg:archive/old/issue/auto-update-adr
kayg:issue/469-filter-gap
kayg:issue/469-port-1b
kayg:issue/442-opacity-flake
kayg:issue/327-web-fast-3
kayg:archive/old/issue/469-port-1
kayg:issue/469-port-1
kayg:issue/327-web-fast-2
kayg:archive/old/issue/327-web-fast
kayg:archive/old/issue/425-stt-bench-vq1
kayg:archive/old/issue/445-no-bleed
kayg:archive/old/issue/400-swipe-mockup-2
kayg:issue/426-client-review
kayg:issue/426-client-2
kayg:issue/426-client
kayg:archive/old/issue/476-safe-area-lab
kayg:archive/old/issue/445-top-light
kayg:issue/471-blocks-mockup
kayg:archive/old/issue/448-links-app-2
kayg:archive/old/issue/448-links-app
kayg:archive/old/issue/398-cold-links
kayg:issue/434-442-small-2
kayg:issue/434-442-small
kayg:archive/old/issue/398-unload
kayg:archive/old/issue/445-bottom-band
kayg:issue/445-bottom-band
kayg:issue/351-rem-3
kayg:issue/351-rem-2
kayg:issue/351-rem
kayg:archive/old/issue/327-first-note
kayg:issue/395-width-phone
kayg:archive/old/issue/327-typing
kayg:issue/396-ios-edges
kayg:issue/397-ios-swipe
kayg:archive/old/issue/327-notes-index
kayg:issue/345-347-contrast-empty-2
kayg:archive/old/issue/44-arenas
kayg:issue/44-arenas
kayg:archive/integ325
kayg:archive/old/issue/327-perf-harness
kayg:archive/old/issue/44-thp
kayg:issue/44-thp
kayg:archive/old/issue/285-sticky-pills
kayg:archive/old/issue/44-trim-3
kayg:issue/44-trim-3
kayg:archive/old/issue/165-cards
kayg:archive/old/issue/165-picker-2
kayg:archive/old/issue/212-multi-select
No reviewers
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!854
Loading…
Reference in a new issue
No description provided.
Delete branch "port/port-tables-2"
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?
Stacked on #845 (base
port/port-tables). The rest of the approved table behaviour.What it does
table-widths: [[14, null, 4, 5]], characters, one list per table in document order,nullfor a column that sizes itself. The table's own pipes are never touched. Widths follow their column when columns are added, removed or moved. Row heights are UI state, never saved (as in the mockup).**bold**,*italic*,~~strike~~,==mark==,`code`and links are drawn at rest; with the caret in a cell it shows the file's markdown, so what is typed is exactly what is saved (the caret goes to the end of a cell that has formatting). Built from DOM nodes, never HTML strings.scale(0); keys and reduced motion play nothing. Tested.[[,@,#in cells): the grid dispatchestable-cell-inputon the editor's DOM (detail.cell,detail.value) on each cell edit; a link the picker writes is[title](<path>)in the cell's text, which is already drawn. Following a cell link is not wired (links are drawn and styled; clicking goes into the cell).Gates
table-widthsread/write/remove incl. whole-block removal, motion index maps); tsc clean; svelte-check 0 errors; web 78, ui 46.e2e/tables.spec.ts+e2e/tables-more.spec.ts: chromium 1440+390 43 passed; webkit 1440+390 43 passed; with the neighbours 356 passed.Bundle (brotli bytes): first paint JS 245,664 (budget 245,760), first paint CSS 21,483, all JS 332,598 (budget 322,560: over by 10,038 B; see #845, needs kayg's decision).
How a table cell maps onto the note (no layer in between)
The note's text is the only copy of a table: plain pipe lines in the note document. The grid on screen is a drawing of those lines. Nothing is stored anywhere else.
inputevent, the grid replaces that one row's line in the note document with a single ordinary transaction (input.table.cell), keeping every other byte of the row and of the note. There is no timer, no wait for a frame, no queue, no draft: when the event handler returns, the note document already holds the key. (An earlier version of this PR waited 160 ms before writing; that is removed.)tables/parser.ts) leaves cells without inline nodes, since the grid draws cell Markdown itself. Column widths are not measured on keys (fitruns on load, resize, structure change and leaving a cell).tbodyeach) that the browser skips while off screen (content-visibilityper group; per row, the browser's check of every skipped row grew with the table); the first column is pinned (position: sticky, one layer per row) only when the table is wider than its card (data-wide, read when columns are measured, never per key); ordinary cells are not positioned; and only header cells are scroll-snap areas (one per column; per cell, the browser re-read every cell's snap area after each layout).Tests:
tables-live.test.ts(the note holds each key at once; undo/redo round-trips through the note and the cell follows; other rows byte-for-byte),tables-parser.test.ts(same table ranges as the stock parser; no inline work inside tables; a cell edit's inline-parse count is the same for 10 and 400 rows, with a stock-parser control), e2eeach key in a cell is in the note document the moment it is typed.kayg referenced this pull request2026-11-05 23:21:11 +00:00
housekeeping #1009: rebased+failing, left open for review.
restacked table follow-up on #845.
head:
b4e67da4aff4bb7a42d678935900dfb447b5ab01; based on devcd7f84432febfc63b788fbb9b9f9950452982d74, pushed with the original exact force-with-lease.frontend frozen install, check, lint, build and unit tests passed. bundle gate failed. first-paint brotli vs dev: JS 231054 B (+277 B), CSS 18533 B (+147 B).
targeted Chromium and WebKit specs at 1440 and 390 never started. the audit waited more than three hours behind the live daily-train-1107 locks (first queue at 23:45 IST, 7 November; final queue cleanup after 02:46 IST, 8 November). browser validation and UI captures are unrun. only this audit’s exact queued units were stopped; the train locks and owners were left intact. hot-path perf qualification is unrun.
all executed gates used the VM Nix environment, shared Mac lock and slot. exact commands, source heads, logs and dev baseline. frontend inputs are identical to the tested frontend tree when a Rust-only repair changed the head.
original-head cherry/patch inventory,
pr-854.md; unmatched entries are missing-patch candidates, with semantic overlap/replacements noted above.final queue, cleanup and source-verification evidence.
Final-port test pass (issue #1009), READY: no: fixed 2 real failures, specs now pass; bundle gate fails; first paint is bigger than dev.
head
e817319cd1ec37c43078c4eb204ce2ee53f21888Targeted specs,
CI=1 --retries=0 --workers=1, dev-01 Chromium and dev-02 WebKit (through~/bin/slot), against a dev-head backend (cd7f84432).e817319cd)Bundle gate:
perf/web.sh --bundle-only --gate(the 17 failures from the housekeeping audit). Per the gate's own rule (total_js_brotlibudget must equal the sum of the named chunk budgets) a cap can only move between named chunks; there is no donor chunk inside this PR, so a fix is a code cut or a decision by kayg. I raised nothing and moved nothing.e817319cd): thetable-widthsline was written withuserEvent: 'input.table'; dev's editor drops every frontmatter edit not taggedinput.properties, so a dragged width never reached the note.widths.tsnow usesinput.properties. Probe: the right change was dispatched and silently filtered.widget10.35 KB vs 1.1 cap. First paint JS +277 B, CSS +147 B vs dev.Not done: Not run yet: Mac VM Safari blur/frame check and perf ABAB x5 on the perf VMs (they need a ready PR first); light/dark 2x screenshots against the mockup are only done for #888 (see its comment).
Not marked READY FOR MERGE.
Screenshots and state (issue #1009),
0a98ffe3f9Product (the #854 tip, which contains #845; Chromium, 2x) next to the approved mockup, light and dark, 1440x900 and 390x844. Real Safari not taken yet. Not READY: first paint is over dev (see the #1009 table).
Differences from the mockup: the product's row bar is shorter (insert above/below, move up/down, delete, done) and its cell and column bars lack the mic; the mockup note shows its own Share and More pills, a warm sky and a 40-note list; the product table's rows are a little taller; on
widethe product shows seven columns before the edge fade, the mockup six.Screenshots (2x; light and dark; 1440x900 and 390x844). Left: the approved mockup (review/calendar-2). Right: this PR.
cell
row
col
rest
wide
Real Safari (Mac VM, safaridriver, 1x: the VM reports devicePixelRatio 1)
cell
row
col
rest
wide
Screenshots and state (issue #1009),
1f87444052Tables (#845, #854; this is the #854 tip), restacked on dev
661123e94. Product (Chromium, 2x, re-taken after the rebase) next to the approved mockup, light and dark. Not READY: first paint JS is over dev (+387 B plain for #854, +506 B for #845; CSS +142 B). Specs: tables, tables-more, bars, dialogs, slash menu: green on Chromium and WebKit at both sizes exceptslash-menu:79, which fails about one run in six on dev661123e94itself. Gate passes (budget total 517.6 KiB). Rebase notes: dev's Insert sheet now lists the block registry, so Table is a registry block whose action runs the grid's insert (the registry's blocks may run something instead of writing markdown). Perf ABAB is queued behind other lanes.Screenshots (2x; light and dark; 1440x900 and 390x844). Left: the approved mockup (review/calendar-2). Right: this PR.
cell
row
col
rest
wide
Differences from the mockup: as in the earlier set (the row bar is shorter, the cell and column bars lack the mic, the mockup's own Share and More pills and warm sky).
Perf (perf-02, Chromium 4x slowdown, 10k notes, 5 interleaved rounds, dev built from
3f079de39run twice as a control; medians of per-run p50 / p95, ms):The dev-vs-dev control moves by as much as any arm (code_block p95 34.8 vs 47.3; long_note p95 53.4 vs 55.5), so there is no change beyond the noise on any metric, for any arm. Arms are the heads built from the rebased branches (#854
f58c71010, #861f20b9457b, #849 as144013926before its budget-only commit, #102217010f469).First paint on dev
3f079de39(before credits): +365 B plain / +384 B normalised over dev. Specs on the rebased headf58c71010: only dev's own failures (lazy-ui:70, preload:89 at 390); gate passes.READY FOR MERGE: tables 2 (head
8c6ec171b, on #845)Rebased on dev
9438918f3(#848/#849 in), budgets regenerated from a fresh build of this head, bundle gate clean, specs on dev-02 (idle host) withcalternal-h861, chromium and webkit at 1440 and 390 (preload, lazy-ui, lazy-offline, glass, shortcuts and this PR's own specs): 0 failed.234 passed, 42 skipped. Perf: the 11-09 run on the previous head is on #854.
READY FOR MERGE: tables 2 (head
fb563bf69, on #845)Merged dev
fe2efbf11(#1044) into the branch (it also merges cleanly with4274dafb4,git merge-tree), budgets regenerated from a fresh build, bundle gate clean, specs on dev-02 withcalternal-h861, chromium and webkit at 1440 and 390. Dev baseline onfe2efbf11: 228023 B plain / 227378 B normalised / CSS 18236.Specs:
tables-more(including the motion spec that #1044 would have broken) andkeys-no-motionpass, 48 passed, 0 failed; earlier full set 221 passed. Gate clean.Handoff: head
fb563bf69is pushed and READY as postedHandoff (usage limit): the x86 pixel and contrast run on dev-01 (4 projects, 15 specs) was stopped before finishing this head; I released its job. Done: dev
fe2efbf11and the earlier heads (#902, #854, rows tip, #878 base) ran there with the same 6phone-barsphoto-dark failures on dev itself and nothing new. Next step: re-runpx-d1b.sh-style pixel set on this head on dev-01 (about 1 h per head) if you want it before merging.BLOCKED / unrun in the current ports lane
Current remote head:
fb563bf69976edc2bab47fb4497562510d775805. This PR was not changed or retested in this pass.The requested serial lane stopped at #902: fresh dev-01 measurement on dev
31972329bshows first-paint JS +313 B (+0.306 KiB), CSS unchanged, and failed index/ContactsScreen bundle lines. The instruction is to stop and report additional growth requiring kayg; no budgets were raised. Current #902 evidence and exact commands.For this PR: rebase/push, svelte-check, vitest, four-project targeted e2e, contrast, bundle delta, editor perf vs dev, and fresh real Safari / iPhone Simulator product-versus-mockup captures are unrun in this pass. Earlier evidence remains historical; this comment makes no current READY claim. The approved tables/attachments growth remains accepted as specified by kayg; that approval was not revoked or changed. No merge performed.
current-dev validation: BLOCKED
Head
3f67f0cbe, based on dev31972329b. No merge performed.Only this PR's original named budget lines were carried over; current dev's unrelated lines and ContactsScreen approval remain intact.
_approval_tables_854cites "kayg 11-10, tables and attachments ports OK".All checks ran on dev-01 through
~/bin/slotand the Nix shell:bun run --cwd apps/web checkbun run --cwd apps/web testbun run --cwd packages/editor testbunx playwright test --project=contrast --workers=1 --retries=0PERF_WORK=… PERF_OUT=… bash perf/web.sh --bundle-only --gateTargeted command:
CI=1 E2E_DIST=<built-dist> CALTERNAL_BIN=<dev-debug-bin> bunx playwright test e2e/tables.spec.ts e2e/tables-more.spec.ts e2e/keys-no-motion.spec.ts --project=chromium-1440 --project=chromium-390 --project=webkit-1440 --project=webkit-390 --workers=1 --retries=0.First paint, Brotli vs current dev: JS +543 B (+0.530 KiB); CSS +167 B (+0.163 KiB). Total JS including opt-in chunks +13022 B (+12.717 KiB). Dev: JS 227763 B, CSS 18859 B, total JS 534085 B. Normalising content-hash references gives JS +284 B. The recorded allowance is JS +275 B plain / +611 B normalised, CSS +164 B. Normalised JS is within that record, but wire JS is larger and CSS is 3 B beyond it. This is BLOCKED; no extra budget was granted or added.
Gate logs and bundle JSON.
Typing on perf-02 through the plain FIFO
perf-turn, holding both VM locks, Chromium 4× slowdown, 10k fixture notes, three counterbalanced rounds, independent dev A and dev B controls. Exact selector:bunx playwright test -c perf/playwright.config.ts '(^|/)typing[.]perf[.]ts$' --project=chromium --workers=1. 48/48 checks passed. Both locks released. No timings ran on std; Mac VM memory was below its 2 GB perf floor, so it was used only for captures.Medians of per-run p50 / p95 latency (ms), and median CPU ms/key:
Raw samples, logs and exact run script. The initial broad filename selector was stopped and discarded; these results use fresh fixture homes and the exact selector. The perf-01-to-perf-02 SSH connection failed on retry, so the control host coordinated a FIFO perf-01 holder and the measurement unit on perf-02; both locks were held together, and measurement began immediately.
Perf qualification is BLOCKED for #854: code-note prose latency is 60.6 / 100.2 ms versus dev A 43.3 / 70.5 and dev B 51.7 / 74.9. CPU cost is flat, but that does not establish flat input latency. No no-regression claim is made.
Real Safari on the Mac VM, actual 1440×900, light and dark. Native iPhone 18 Pro Safari on std, own simulator under the std lock, iOS 27, light and dark. The native phone is 402 CSS px wide (1206-pixel screenshots); auxiliary WebKit captures below cover exactly 390×844. Glass is judged only from real Safari and iPhone captures.
Visual differences remain visible: the resting phone capture uses narrower, more equal column widths and a solid cell/header treatment; the mockup gives the first column more room and a tint. This wraps exercise names more on the phone. The active desktop grid also has a different tint from the mockup. The product also retains its current shell/backdrop and larger gap below the title. Captures use sample data. A fresh iPhone light capture taken after only 10 seconds showed pending content; the 25-second settled capture above renders the table. No visual parity claim is made.
Active desktop grid, real Safari: light product / light mockup · dark product / dark mockup
Implementation plan: typing and first paint
Base: dev
31972329b; current stack heads: #845f828454e7, #8543f67f0cbe.Tables gates on head
2d8ccfc97(dev796d80cbamerged), 14 NovAll on current heads, dev-01 (x86) and dev-02 (aarch64) through
~/bin/slot, Nix shell; server binary built from this branch (crates identical to dev). Logs: gate-logs.bun run --cwd apps/web checkbun run --cwd apps/web testbun run --cwd packages/editor testCI=1 … bunx playwright test e2e/tables.spec.ts e2e/tables-more.spec.ts --project=chromium-1440 --project=chromium-390 --workers=1 --retries=0(dev-01)--project=webkit-1440 --project=webkit-390(dev-02)bunx playwright test --project=contrast --workers=1 --retries=0(dev-01, head981f15448, later commits only budgets and a test skip)PERF_WORK=… PERF_OUT=… PERF_DIST=… bash perf/web.sh --bundle-only --gateBundle (brotli, vs dev
796d80cbabuild on the same box): first-paint JS +695 B (224.428 KiB vs 223.75), first-paint CSS +0 B (18.479 KiB). kayg approved <1 KB on 14 Nov, so no trimming; lines recorded inperf/budgets.json(_approval_tables_1114): index 224.6, tables 12.2, new lazy chunk 0.55, press 7.9 and code-javascript 24.5 for hash jitter, total = sum of lines (558.84).What changed this round
origin/devmerged into #845, #845 merged into #854 (conflicts:perf/budgets.json,Editor.sveltereadFm+ table-cell skip).parseInline/parse/nextLinesamples. Fix (gate.ts): keys wait for a 160 ms gap (480 ms at most) and then write once; leaving the cell, structure edits, undo,destroyand page hide flush at once. Profiled: 124 → 27 writes per 168 keys; under the profiler on the busy box cell p50 1705 → 183 ms. New testtables-commit-gate.test.ts(burst coalescing, max wait, flush, cancel); existing tests cover decoration mapping (tables-cell-update), the width-only ResizeObserver (tables-resize), and fallbacks (tables-lazy,tables-trigger)..td:last-childneeds 7.5em, so the last column ("Reps") poked out past the card and showed blank on desktop. The fit now reserves it (grid.ts), with an e2e check (the last column stays inside the card).cell typing keeps column widthmeasured before the first fit (WebKit failed deterministically).Typing, formal: ABAB ×3 with dev-vs-dev control, perf-02 under both perf locks via perf-01
perf-turnticketSelector
bunx playwright test -c perf/playwright.config.ts '(^|/)typing[.]perf[.]ts$' --project=chromium --workers=1, 10k fixture notes, Chromium 4x slowdown, fresh fixture home per run; arms devA / devB (same dev build, independent controls) / #845 / #854, three rounds in rotated order, 12/12 runs rc=0. Binaries and fixtures sha256-verified before the ticket. Median over the 3 runs of each run's p50 / p95 (ms) and CPU ms/key:Raw: typing-results.tgz.
Reading: plain-note typing for #854 is inside the dev-vs-dev spread on every case (long note 58.1 vs 48.5–53.6 p50 is the one to watch: dev A/B differ by 5 ms themselves and CPU/key is flat 29.9 vs 30.5/30.8; prose 56.4 vs 56.8/53.3; nested list 45.9 vs 46.7/45.3; code block 51.5 vs 54.2/60.1). CPU per key is flat everywhere (±1 ms). Table cell: #854 79 / 160 ms and 31 ms CPU/key, against #845's 172 / 436 ms and 71 ms/key; there is no dev cell arm (dev has no tables), the cell CPU/key now equals dev's plain-note level (30–36). By design the commit to the note is now 385 ms median (it waits for the quiet gap); nothing paints from it.
Real Safari (macos-01, 1440×900) and iPhone Simulator (std, own sim iOS 27.0, deleted), product at
2d8ccfc97's code, sample noteMockup images are the approved
review/calendar-2ones already attached above.No parity claim. Open on the phone: a 3-column table with a long first column is wider than the 402 px card, so Reps sits off to the right behind the fade (scrolls sideways, first column pinned) while the mockup shows all columns; the first-column width allotment is the thing to look at. Phone shots show resting state only (no tap automation this round).
Not merged. Decisions: no extra trimming (kayg 14 Nov); cell commit debounce chosen over a parser change (a table stays one Markdown block).
Round 2 on head
deba78c8f(orchestrator + kayg 14 Nov): typing straight into the note, long-note check, phone width1. Debounce reverted: a key in a cell is a note edit in the same event
How it maps onto the note is written in the PR description (section "How a table cell maps onto the note"). Short version: the note's pipe lines are the only copy; each
inputevent in a cell replaces that one row's line in the note document in the same event (no timer, frame or queue); undo/redo/sync/crash recovery are the note's own.tables/gate.tsand its test.Grid.onInputcallscommit()directly; the table's start position comes from the note's table record instead of walking the page's DOM.parseInline/parse/nextLinesamples). Newtables/parser.ts: the note language keeps the stock table block rules (same ranges, checked against the stock parser on 13 shapes) but leaves cells without inline nodes; the grid draws cell Markdown itself. The parser still walks the table's lines (Lezer cannot skip a block), no per-cell work. In the profileparseInline/parse/nextLineno longer appear in the top functions.tables-live.test.ts(the note holds each key at once; undo/redo round-trips and the cell follows; other rows byte-for-byte),tables-parser.test.ts(ranges equal stock; no inline nodes in tables; a cell edit'sparseInlinecount is 0 for 10 and 400 rows, with a stock-parser control that does grow), e2eeach key in a cell is in the note document the moment it is typed. Existing tests still cover decoration mapping (tables-cell-update), the width-only ResizeObserver (tables-resize,fitis 0 per 168 keys in the profile) and fallbacks (tables-lazy,tables-trigger).2. Long-note typing: no per-key work from this PR
Profile on dev-01 (V8 sampler, Chromium 4x CPU), dev vs #854, 3 alternating runs each, long 50,000-word note: layout events/key 1.99 vs 1.94–1.99, style recalcs/key 3.9–4.0 vs 3.9–4.0, ScriptDuration ms/key 21.9 / 25.8 / 22.1 (dev) vs 21.7 / 24.8 / 26.4 (PR); top self-time functions identical (
(program)28.3 vs 29.4,update.75 vs .78,measure.52 vs .50; the only name that differs is a minified identifier). In a note with no table, the PR adds nothing per key (the table field and Grid are not installed; the cell-edit check inHiddenView.updateis oneisUserEventcall). The one in-note thing on every key is the Enter-only keydown check. The earlier 58.1 vs 48.5–53.6 was run-to-run spread on perf-02 (p50 per run swings 22–52 ms in both arms).3. Formal typing: ABAB ×3 with dev-vs-dev control, perf-02 under both perf locks via perf-01
perf-turnticket (long note + table cell; 12/12 runs rc=0)Arms devA / devB (same dev build) and #854 twice per round, rounds in rotated order. Median over runs of each run's p50 / p95 (ms) and main-thread CPU ms/key. Raw.
PaintArtifactCompositor) ≈ 7 ms, a hit test after layout ≈ 6 ms, and our JS (FunctionCall) ≈ 22 ms, the same as plain typing's script time. Not fixed here; the next lever is fewer paint chunks per table row (the row/column strips). Open item for you, not a claim of parity.4. Phone width (mockup shows every column)
tables/shrink.ts: when the columns' wanted widths exceed the card, each column gives back width above its floor (longest word, number width, the 7.5em last column) in proportion to its slack, so long text wraps instead of scrolling; a dragged width stays. Unit teststables-shrink.test.ts; e2ea three-column table fits the card, at desktop and on a phone, long text wrapsat 390 and 1440. iPhone Simulator (std, own sim, iOS 27.0, deleted): light · dark; all three columns are on the card, names wrap. (The first column is narrower than the mockup's; the last column keeps its 7.5em.)Gates on
deba78c8f(code is758c4eda8; later commits are budgets only)d94766894)no route to host) from about 15:17 IST. Last green WebKit run: 55 passed onad649b89d(before the parser slimming80c9644bdand the new e2e test)Not merged.
Addendum: WebKit on the final code
dev-02 and std stayed unreachable, so I ran the WebKit projects on dev-01 (x86, Playwright WebKit, through
~/bin/slot):CI=1 … bunx playwright test e2e/tables.spec.ts e2e/tables-more.spec.ts --project=webkit-1440 --project=webkit-390 --workers=1 --retries=0on headdeba78c8f(code758c4eda8): 57 passed, 1 skipped, 0 failed. That replaces the "not re-run" row above. (x86 WebKit is not dev-02's aarch64 build; rerun there when it is back if you want the same box as the daily train.)Round 3 on head
a47c26d4a: faster cell typing, still no layer in between (14 Nov)The write path stays exactly as kayg asked: every
inputin a cell replaces that row's line in the note document in the same event. No timer, no batching, no draft. All of this round's work is in how the browser draws the card.Where the time went (dev-01, Chromium trace, 4× CPU, 168 keys, 120-row × 8-column table)
I profiled the base head
deba78c8f, then took CSS out piece by piece by injecting a style tag into the same build (one variable per run, alternating, with base repeated). Main-thread task ms per key:content-visibilityon rowscontent-visibilityper 16-row group instead of per rowScript time (
FunctionCall) was 18 ms/key in every arm, the same as plain-note typing. Forced layouts from JS were under 0.3 ms/key (CodeMirror's own measure). The big forced layout came from the browser's text insertion, and it was mostly the snap areas.It no longer grows with the table (dev-01, same trace setup, 2 runs per cell):
What still grows is about 1 ms per 100 rows, mostly the per-group check (one entry per 16 rows).
What changed
cf241fb01,559e4ee16:tables.css+grid.tstbodyeach, withcontent-visibility: autoper group. A short last group gets its own size guess. Rows are read throughtable.rows/rowIndex, which span the groups.edges.ts/motion.tstake the table instead of a tbody.position: stickyonly when the table is wider than its card.data-wideis set inapplyWidths, wherescrollWidthwas already read; it is never read on a key, because typing keeps the column widths..td:not(.th)instead oftr + tr, becausetr + trwould miss the first row of each group. The header background istbody:first-child > tr:first-child.a47c26d4a: a typing fix svelte-check asked for. Alsonotes-visibility-applyjitter: the code is identical (raw 1,092 B in dev and here), but its brotli size moves 568–574 B with hashed import names. Line 0.56 → 0.57, total +0.01 (559.08), with a note inbudgets.json.tables-live.test.ts"a long table is drawn in row groups of 16, and a key in a later group edits its own row" (41 rows → groups 16/16/9; a key in row 20 changes note line 22 and leaves 21 and 23 byte-for-byte). The happy-dom polyfill gainedHTMLTableElement.rows/rowIndex.Not needed: the widget's
eq/updateDOM. A cell edit already maps the same decoration and widget instance (no DOM rebuild), and the trace shows no widget work per key. The scroller's width-onlyResizeObserveralready ignores same-width edits.Formal typing: ABAB ×3 with dev-vs-dev control
Setup:
~/bin/perf-turn(tickettables-typing-1114), with perf-02's lock held for the whole session by an hd01 watcher. Asked 13:59, held 14:01–14:08 CET, released at once.~/nfa-perf).796d80cba; crates are identical to this branch. sha256 checked on dev-01, hd01 and perf-01.typing.perf.ts,-g "50,000-word note|inside a table cell".796d80cbadist), pre (deba78c8f), new (a47c26d4a). Rounds rotated. 12/12 runs rc=0; dev skips the table test (no tables).Median over runs of each run's p50 / p95 (ms), and main-thread CPU ms/key:
Raw: typing-results-1114.tgz (driver, metrics, logs); profile summaries, ablation CSS and gate logs: profile-gates-1114.tgz.
Gates
bun run --cwd apps/web checka47c26d4acf241fb01it found the typing error fixed ina47c26d4a)bun run --cwd apps/web testcf241fb01(a47c26d4aonly changes a TS annotation and budgets)bun run --cwd packages/editor test(incl. tables-live / tables-parser / tables-shrink)a47c26d4aCI=1 CALTERNAL_BIN=<debug 796d80cba> bunx playwright test e2e/tables.spec.ts e2e/tables-more.spec.ts --project=<p> --workers=1 --retries=0cf241fb01a47c26d4abunx playwright test --project=contrast --workers=1 --retries=0cf241fb01PERF_WORK=… PERF_OUT=… bash perf/web.sh --bundle-only --gatea47c26d4aWebKit ran on dev-01 (x86), not dev-02: dev-02 was unreachable ("no route to host" at about 16:40 IST).
Bundle (brotli), vs
deba78c8f: first-paint JS raw is identical (810,716 B), brotli −33 B (jitter); first-paint CSS is identical. The lazytableschunk is +89 B (12,457 → 12,546 B, the row groups anddata-wide).Open
Final checks, #854 @
a47c26d4avs origin/dev8b00393b0(attachments port): NOT merge-ready, stopped after step 1.1. Merge-readiness: CONFLICTS (
git merge origin/port/port-tables-2on a detached origin/dev worktree; aborted, nothing resolved, nothing pushed). 3 files:packages/editor/src/insert/insert.ts: 1 hunk. dev added a comment aboveif (a.run) return a.run(view)(file chooser "does something else than write markdown"); the branch removed it. Trivial.packages/editor/src/insert/plugins.ts: 1 hunk in the imports. dev addedimport type { EditorView }plus theattach()helper (calternal:attachevent for Photos/File blocks); the branch addedimport { insertTable } from '../tables/slot'. Keep both.perf/budgets.json: 1 hunk. dev hasnotes-visibility-apply0.56,_web_attachments_lazynote andchunk.index224.59; the branch has 0.57 and 224.7. The two sets of growth have to be re-measured together, so this needs a real first-paint number on the merged head, not a pick of one side.2-4 not run. The merge needs a hand resolution and a new budget, so the branch will get a new head. Webkit tables specs, the per-project full suite and real Safari / iPhone Simulator shots on a resolved head would not describe what merges, and would need repeating. Nothing was started on any VM; no locks, sims or Safari touched.
Next: rebase or merge origin/dev into
port/port-tables-2(the three hunks above), re-measure the index chunk, then rerun steps 2-4 on the new head.Final checks, resumed (hd01): #854 now merged with dev
8b00393b0and pushed as730a6dd33. All suites green; one flake (not a blocker); Safari/iPhone findings below. Supersedes my earlier comment (which said 1 conflicting hunk inperf/budgets.json; it was 3 hunks).1. Merge (orchestrator OK):
git merge --no-ff origin/devintoa47c26d4a->e19d3165d, conflicts ininsert.ts(kept dev's comment),plugins.ts(kept both:EditorViewimport +attach()ANDinsertTable),perf/budgets.json(3 hunks: both sides' notes kept,chunk.attachments+ dev's lines kept). Then730a6dd33sets the budgets to the measured sizes on dev-01 (perf/web.sh --bundle-only): first-paint JS 225.318 KiB brotli (+0.73 KiB over dev's 224.59, under 1 KB), CSS 18.48 (budget 22.1);chunk.index225.32,PictureViewer1.222 -> 1.23, total = sum of lines (570.05). Pushed toport/port-tables-2(a47c26d4a..730a6dd33).Gates on the merged head (dev-01):
bun run check: 0 errors (19 warnings, same files as before); web vitest 272/272, editor vitest 663/663;tables.spec.ts+tables-more.spec.tschromium-1440: 28 passed, 1 skipped.2. WebKit tables (dev-02, server binary built from the head):
tables.spec.ts+tables-more.spec.tswebkit-1440: 28 passed, 1 skipped.3. Full suite on
730a6dd33(already = branch merged with dev; no extra scratch merge),CI=1 --retries=0 --workers=1, own--outputper project, throwaway config outside the repo (dependencies emptied; admin-* run together with admin-setup):touch-select.spec.ts:246(farwas NaN at line 261).--repeat-each=10on the same head and project: 10 passed -> not branch-reproducible, so flaky, not a blocker. I did not repeat it on dev: it needs a failure on the branch first. Filed as #1134 (no existing stability issue to add it to).4. Real Safari (macos-01, 1440, Mac lock held and released, Safari + safaridriver quit) and iPhone Simulator (std, own iPhone 18 Pro iOS 27.0, deleted), light and dark. The server ran on dev-02 from the head, sample notes only, reached through a tunnel as localhost.
Approved mockup compared:
review/calendar-2chrome.html#/note/gym-logandbig-table. The mockup ignores?theme=dark, so it was shot in light only.left659 =cellLeft659 after scrollLeft 317/317), page does not move. Same on the phone: swipe moves the table, first column pinned with a divider line. OK in light and dark.getBoundingClientRectshows a 64 px gap before rows 32 and 48 (rows 1.. are 41-42 px): the rows are probably still estimated-size placeholders then; nothing visible, but worth knowing if the seam code is touched.color(srgb 0.949 0.926 0.904)light,0.115 0.110 0.105dark); the mockup's is a neutral grey (0.928).Differences vs the approved mockup: (a) header tint warm vs neutral grey, as above; (b) in the mockup the number columns (Sets/Reps/kg) have a grey tint and the first column is white, in the product all body cells are the same cream, with a hairline after the pinned column; (c) the mockup's wide week table (9 columns) scrolls under a pinned Day column, the product at 1440 shrinks it to fit the card (words wrap, "Warm-/up") so it only scrolls ~7 px; (d) the card is wider in the product's frame (layout, not table).
Open points that need a look (not proven bugs):
big-table(5 columns) at 390: on a fresh load (light and dark) the Date column is pinned and the Exercise column is not visible: the header shows Date | "ets" (Sets half-clipped) | Reps | an empty column, so the table looks already scrolled sideways. Playwright chromium and webkit at 390 on the same note readscrollLeft0 on 3 of 3 loads, so I could not reproduce it there; I could not read the scroll position inside the simulator.scrollLeftwas already 239 before I touched it (the shot shows the Programmeringsförklaring column scrolled away); the dark load of the same note and all later loads read 0.Shots attached below (sample data only). Everything cleaned up: sim deleted, tunnels and the dev-02 server stopped, Safari/safaridriver quit, Mac lock released, build/dist/target scratch removed.
#854 last fixes: mockup parity, no sideways open, row-group size (head
9d972514aonport/port-tables-2)Four commits on top of
730a6dd33(CSS inapps/web/src/styles/tables.css, logic inpackages/editor/src/tables/grid.ts, new spece2e/tables-parity.spec.ts, budgets). Not merged.1. Mockup parity: computed values, mockup (
review/calendar-2gym-log, Chromium 1440, light) vs product (same fixture text).twbackground)--tpaper--tpaper(#f7f7f7)--tpapervar(--page-tint, var(--paper))var(--paper)var(--page-tint, var(--paper))--thead= ink 5 % over--tpaper=color(srgb .9276 .9276 .9276)(.9488 .9259 .9040)x proximity+ header snap areasposition: sticky(a) Header tint: the table's formula is already the mockup's (
--thead= ink 5 % of the paper). The warm tone comes from the global paper token: the mockup's default theme "Calternal" sets base#f7f7f7/ ink#262626, the product'spackages/ui/src/styles/tokens.cssiscolor-mix(accent 4%, #fffdfa)/#1f1b17. That is a product-wide token, not a table value, so I did NOT recolour the table alone (it would be a grey header on a warm page). Decision for kayg: if the neutral grey is meant for the whole app, it is a token change intokens.css, not part of this PR.(b) Number columns tinted in the mockup: the mockup's body cells are transparent over a see-through page, only the first column is opaque; the product had a solid card behind everything. The card fill is gone, cells now behave like the mockup's.
(c) Wide table: wrap-to-fit now only applies to tables of up to 4 columns whose longest words still fit the card (the phone's three columns); everything wider scrolls under the pinned first column. Probe at 1440 / 390: 9 columns scroll in both, 3 columns fit at 390.
2. Opens already scrolled sideways: cause and fix
Reproduced in real Safari (macos-01 Safari, before the fix):
t854-widescrollLeft= 241 / 379 / 379 / 241 on four loads, and in the iPhone Simulatorbig-tableopened with Exercise hidden under the pinned Date column. 241 is the first column's width: Safari settled the freshly opened table on the second column's scroll-snap header and ignoredscroll-padding-left: var(--tpin)that should leave room for the pinned column. Fix: the table has no scroll-snap any more (the mockup has none). Plus a safety net ingrid.ts: an untouched table (no wheel/touch/pointer on the scroller, no caret scroll) is put back atscrollLeft 0after every column measure.After the fix, real Safari 1440 light and dark, 3 loads each of the wide note:
scrollLeft0, 0, 0 / 0, 0, 0;big-tableand gym-log 0. iPhone Simulator: big-table shows Date | Exercise (light + dark).Spec:
tables-parity.spec.ts(opens at 0 three loads in a row, no snap points, a person's own scroll is kept when the card is resized). Chromium/WebKit could not reproduce the bug (as in the last report); the spec guards the regression only through the no-snap assertion.Behaviour change to know about: with no snap, a column can now rest half under the pinned column, as in the mockup (see
mac-*-gym-week-scrolled). The old snap was a product addition (not in the mockup) and it is what broke the opening position. If kayg wants the resting-at-the-pin behaviour back it needs another mechanism (e.g. snap only after the first scroll, re-checked in Safari).3. Row-group placeholder
contain-intrinsic-block-size: auto calc(16 * var(--trow))with--trow=1.4em + 21pxdesktop,max(var(--hit-min), 1.4em + 24px) + 1pxon touch (the real row heights, 42 / 63 px when two lines), and the short last groupauto calc(<rows> * var(--trow)). Before: 16 x 46 = 736 vs a real group of about 672 (the 64 px gap). Specan undrawn row group is guessed at its real height: heights of all 4 groups of a 51-row table before and after drawing differ by at most 2 px. Real Safari 1440:big-table51 rows, all row gaps 0, row heights 41/42 before any scrolling (earlier report: a 64 px gap before rows 32 and 48); shots at rows 16 and 32 below have no seam.Gates (final head; hosts and commands)
CI=1 CALTERNAL_BIN=<head debug> bunx playwright test e2e/tables.spec.ts e2e/tables-more.spec.ts e2e/tables-parity.spec.ts --project=<p> --workers=1 --retries=0on dev-01 (x86)--project=contrastdev-01, headad8644119(before the grid-only fit changes; CSS identical afterwards)bun run --cwd apps/web checkdev-01bun run --cwd apps/web testbun run --cwd packages/editor testperf/web.sh --bundle-only --gatedev-01730a6dd33(793.886 KB);chunk.indexbrotli 225.318 -> 225.505 (+0.19 KB, hashed lazy-chunk name only; base re-measured today = 225.318). Budgets: index 225.51, total 570.24 (= sum of lines).Real Safari (macos-01, 1440, Mac lock) and iPhone Simulator (std, own iPhone 18 Pro iOS 27.0, deleted): light + dark
Safari: wide-note

scrollLeft0/0/0 in both themes; gym-log week table scrolled shows Day pinned, the rest sliding under it; 51-row note, no seams at rows 16/32; 3-column note fits at 1440.Simulator: big-table (Date | Exercise visible), wide, gym-log, three columns (all three columns fit).
Mockup reference (light only, the mockup ignores
?theme=):Safari light:




Safari dark:
Simulator light:
Simulator dark:
Typing path (cell + long note, ABAB x3 with control)
Setup: perf-01 under
~/bin/perf-turn tpar-854-parity(waited behind sound-comparator and nf3oh), perf-02's lock held by an hd01 watcher only while the turn ran (taken 22:55, released 23:07 IST 14 Nov), 4x CPU, 10k-note fixture, a fresh copy of my own fixture home per run, release server built from this head's crates (sha2561a3a2d92…identical on dev-01, hd01 and perf-01), harness = this branch'styping.perf.ts-g "50,000-word note|inside a table cell". Arms:pre=730a6dd33dist,new= dist built atab1664cb4(see note), orderpre new pre new / new pre new pre / pre new pre new, 12/12 runs passed. The control is pre vs pre (6 runs of the same dist) because dev has no tables.Per run p50 / p95 (ms) and main-thread CPU per key:
Reading: CPU per key is flat (table cell 32.7 vs 33.0, long note 43.1 vs 43.8, both inside each arm's own spread of about 3 ms). The wall-clock table-cell p50 is bimodal in both arms (about 85-100 and about 130-147) and follows the position in the session, not the arm: new minus pre in adjacent pairs is +48, +52, -45, -9, +39, +2 (no consistent sign), and the pre arm alone spans 86.5-129.8. I do not read a regression or an improvement out of it. What changed in the typing path is only the size guess of undrawn row groups (CSS) and, at this head, a
fit()rule that does not run on keys.Note: the
newdist was built atab1664cb4(all of items 1-3 except the last fit rule "only tables of up to four columns wrap to fit", which is infit()and does not run per key). Raw per-run files:~/tpar1114/outon perf-01 (removed after this comment), summaries above.Decisions and risks
Merged into
devwith--no-ffat44fc0b7c4by the orchestrator (stack #845 ⊂ #854), after reviewing the Safari/iPhone shots in comment 96550. Scroll-snap and the 7.5em last-column minimum were port-only additions (dev had no tables), so removing them to match the mockup is not a dropped feature. Closing.Pull request closed