Tasks Float port, slice 1: Tasks inside the shared window #1161

Closed
kayg wants to merge 0 commits from port/tasks-float-1 into dev
Owner

Tasks Float port, slice 1 (plan: #1160, docs/plans/tasks-float-port.md; mockup #1077 feat/tasks-float). The desktop Tasks screen is now drawn in the same Float window Notes has, with today's content inside. Not merged; for the orchestrator.

What changed

  • tasks/TasksWindow.svelte (new): mounts the shared WindowLayout with Tasks' Side in the sidebar slot and the shared WindowDock (account, app switcher, search) as its foot; the list card (Middle) and the open task's card sit side by side in the window. SideFoot.svelte is deleted; TasksScreen's desktop .shell/.pane CSS and markup go. Phone branch untouched.
  • WindowLayout: list is optional (Tasks has no flat list column) and a [data-win-area] slot that fills the window's inside on the window's own spring. Notes' use is unchanged.
  • window/SideDrawer.svelte (new, pure move out of Shell): the sidebar drawer is one shared part; Notes uses it with the same markup/classes ([data-drawer], [data-drawer-scrim]).
  • window/side-width.svelte.ts (new): the sidebar's remembered width/handle for an app with no list. (Shell still has its own inline copy of the list half; follow-up when its list width is split out.)
  • Sidebar hide uses the shared side pref; ⌘\ / ⌘. through commands; zen is local; no root attribute/custom property written per open or frame (the #1077 perf cause).
  • perf/budgets.json: lines at measured sizes (TasksScreen 13.15 → 13.7, index 232 → 232.026, hash jitter on others); total = sum.
  • e2e: tasks-window.spec.ts (new), tasks-lists.spec.ts:91 moved from the old SideFoot tabs to the dock's switcher.

Decisions

  • Tasks stays built: false in lib/apps.ts: it is reached by address (as on prod) and shows in the switcher only while you are in it. Listing it in Notes' switcher is a release decision for kayg. Switching specs therefore go Notes → #/tasks → the dock's Notes pill.
  • The task card keeps today's body; the shared-editor card is slice 6 (needs its own plan).
  • Content inside the cards is unchanged (reading-width list, Switcher header): header/toolbar pill, sidebar tree, Lists/Projects pill are slices 2 to 4.

Gates (results in the comments below)

svelte-check 0 errors; vitest 319 pass; tasks-*, app-switch, switching, keys-no-motion, pane-transition, window-layout, composer-tasks, task-check on chromium-1440/390 (dev-01) and webkit-1440/390 (dev-02); bundle gate (first paint 232.025 KB brotli ≤ 240); real Safari frames Notes↔Tasks vs dev, ABAB; product vs mockup shots; pooled typing/list ABAB on perf-01 (queued).

🤖 Generated with Claude Code

Tasks Float port, **slice 1** (plan: #1160, `docs/plans/tasks-float-port.md`; mockup #1077 `feat/tasks-float`). The desktop Tasks screen is now drawn in the same Float window Notes has, with today's content inside. Not merged; for the orchestrator. ## What changed - `tasks/TasksWindow.svelte` (new): mounts the shared `WindowLayout` with Tasks' `Side` in the sidebar slot and the shared `WindowDock` (account, app switcher, search) as its foot; the list card (`Middle`) and the open task's card sit side by side in the window. `SideFoot.svelte` is deleted; TasksScreen's desktop `.shell/.pane` CSS and markup go. Phone branch untouched. - `WindowLayout`: `list` is optional (Tasks has no flat list column) and a `[data-win-area]` slot that fills the window's inside on the window's own spring. Notes' use is unchanged. - `window/SideDrawer.svelte` (new, pure move out of `Shell`): the sidebar drawer is one shared part; Notes uses it with the same markup/classes (`[data-drawer]`, `[data-drawer-scrim]`). - `window/side-width.svelte.ts` (new): the sidebar's remembered width/handle for an app with no list. (Shell still has its own inline copy of the list half; follow-up when its list width is split out.) - Sidebar hide uses the shared `side` pref; ⌘\ / ⌘. through `commands`; zen is local; no root attribute/custom property written per open or frame (the #1077 perf cause). - `perf/budgets.json`: lines at measured sizes (TasksScreen 13.15 → 13.7, index 232 → 232.026, hash jitter on others); total = sum. - e2e: `tasks-window.spec.ts` (new), `tasks-lists.spec.ts:91` moved from the old SideFoot tabs to the dock's switcher. ## Decisions - Tasks stays `built: false` in `lib/apps.ts`: it is reached by address (as on prod) and shows in the switcher only while you are in it. Listing it in Notes' switcher is a release decision for kayg. Switching specs therefore go Notes → `#/tasks` → the dock's Notes pill. - The task card keeps today's body; the shared-editor card is slice 6 (needs its own plan). - Content inside the cards is unchanged (reading-width list, Switcher header): header/toolbar pill, sidebar tree, Lists/Projects pill are slices 2 to 4. ## Gates (results in the comments below) svelte-check 0 errors; vitest 319 pass; tasks-*, app-switch, switching, keys-no-motion, pane-transition, window-layout, composer-tasks, task-check on chromium-1440/390 (dev-01) and webkit-1440/390 (dev-02); bundle gate (first paint 232.025 KB brotli ≤ 240); real Safari frames Notes↔Tasks vs dev, ABAB; product vs mockup shots; pooled typing/list ABAB on perf-01 (queued). 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
e2e: tasks-window ignores the app's own boot flags on <html>
Some checks failed
CI / server (pull_request) Has been cancelled
CI / web (pull_request) Has been cancelled
Markdown extraction contract / markdown-native-contract (pull_request) Has been cancelled
Markdown extraction contract / markdown-editor-contract (pull_request) Has been cancelled
CI / rust (pull_request) Has been cancelled
b7260232ce
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Author
Owner

Evidence 1: functional gates and bundle

svelte-check (bun run check, dev-02): 0 errors, 19 warnings (same files as dev). vitest (bun run test): 34 files, 319 tests pass.

Playwright, bunx playwright test e2e/tasks- e2e/task-check e2e/app-switch e2e/switching e2e/keys-no-motion e2e/pane-transition e2e/window-layout e2e/composer-tasks --project=<p> --workers=2, server binary built from this base (dev 245875408; Rust unchanged):

host projects result
dev-02 (aarch64) webkit webkit-1440, webkit-390 166 pass, 1 fail: tasks-tick.spec.ts:61 (webkit-390)
dev-01 (x86) chromium chromium-1440, chromium-390 162 pass, 5 fail (first run, head before the spec fixes): see below

Failures, each checked against dev (a worktree at origin/dev, same binary):

  • window-layout.spec.ts:112 (chromium-1440 and webkit-1440): also fails on dev (webkit-1440, settled-box race). Not mine.
  • tasks-swipe.spec.ts:74 (Matrix Someday swipe, chromium-1440): also fails on dev (chromium-1440).
  • tasks-tick.spec.ts:61/49/72/107 (several projects): flaky on dev as well; :61 webkit-390 repeated ×6 each: 1 failed on this branch and 1 failed on dev.
  • tasks-card.spec.ts:68 (Someday in More, chromium-1440): --repeat-each=6 on this branch 6/6 pass, on dev 6/6 pass (first run was a flake).
  • tasks-window.spec.ts (mine): first runs failed on my own spec bugs (it left the shared sidebar preference hidden, which then failed three window-layout tests; it counted Notes' still-built window; data-input/data-ready boot flags). Fixed; tasks-window ×6 on chromium-1440: 30/30 pass.
  • tasks-lists.spec.ts:91 asserted the old foot's tablist: moved to the dock's switcher.

Bundle (bun run build + node scripts/bundle-size.mjs, brotli): first paint JS 232.025 KB (dev 231.946, +0.08; cap 240), first paint CSS +0.1 KB, all JS 548.69 (dev 547.86), TasksScreen chunk 13.70 (dev 13.15). Lines in perf/budgets.json set to the measured sizes, total = sum.

## Evidence 1: functional gates and bundle **svelte-check** (`bun run check`, dev-02): 0 errors, 19 warnings (same files as dev). **vitest** (`bun run test`): 34 files, 319 tests pass. **Playwright**, `bunx playwright test e2e/tasks- e2e/task-check e2e/app-switch e2e/switching e2e/keys-no-motion e2e/pane-transition e2e/window-layout e2e/composer-tasks --project=<p> --workers=2`, server binary built from this base (dev 245875408; Rust unchanged): | host | projects | result | |---|---|---| | dev-02 (aarch64) webkit | webkit-1440, webkit-390 | 166 pass, 1 fail: `tasks-tick.spec.ts:61` (webkit-390) | | dev-01 (x86) chromium | chromium-1440, chromium-390 | 162 pass, 5 fail (first run, head before the spec fixes): see below | Failures, each checked against dev (a worktree at origin/dev, same binary): - `window-layout.spec.ts:112` (chromium-1440 and webkit-1440): also fails on dev (webkit-1440, settled-box race). Not mine. - `tasks-swipe.spec.ts:74` (Matrix Someday swipe, chromium-1440): also fails on dev (chromium-1440). - `tasks-tick.spec.ts:61/49/72/107` (several projects): flaky on dev as well; `:61` webkit-390 repeated ×6 each: 1 failed on this branch and 1 failed on dev. - `tasks-card.spec.ts:68` (Someday in More, chromium-1440): `--repeat-each=6` on this branch 6/6 pass, on dev 6/6 pass (first run was a flake). - `tasks-window.spec.ts` (mine): first runs failed on my own spec bugs (it left the shared sidebar preference hidden, which then failed three `window-layout` tests; it counted Notes' still-built window; `data-input`/`data-ready` boot flags). Fixed; `tasks-window` ×6 on chromium-1440: 30/30 pass. - `tasks-lists.spec.ts:91` asserted the old foot's tablist: moved to the dock's switcher. **Bundle** (`bun run build` + `node scripts/bundle-size.mjs`, brotli): first paint JS 232.025 KB (dev 231.946, +0.08; cap 240), first paint CSS +0.1 KB, all JS 548.69 (dev 547.86), TasksScreen chunk 13.70 (dev 13.15). Lines in `perf/budgets.json` set to the measured sizes, total = sum.
Author
Owner

Evidence 2: real Safari on macos-01 (Safari, 1440×900, Mac lock held with an EXIT trap that quits Safari and safaridriver; blank page 60 rAF/s check passed; #260 shows no benchmark window then)

Server: calternal-s4 (the Mac VM's staged binary; the arms differ only in dist), both arms seeded with 40 notes and 14 Today tasks. ABAB inside one session, 6 runs per arm, each run a fresh page, gestures recorded as rAF deltas for 1.6 s. Idle baseline in the same runs: max 27 (tf) / 35 (dev), none ≥ 50 ms.

gesture dev worst-frame median / max this PR median / max frames ≥ 50 ms (total over 6 runs)
Notes → Tasks, first visit (address #/tasks/today; chunk fetch + build) session 1 151.5 / 220 207.5 / 334 17 / 17
same, session 2 (separate ABAB session) 448.5 / 699 195 / 805 16 / 18
Notes → Tasks, second visit (chunk cached: the build alone) 23 / 33 23 / 24 0 / 0
Tasks → Notes (mouse on the Notes pill; dev: its old tab) 24 / 25 23 / 25 0 / 0
Tasks → Notes, second 25.5 / 27 23 / 23 0 / 0

Reading: the building of the screen is not slower (second visit: flat, 23 ms both) and the way back is clean on both. The first visit has 100 to 800 ms frames on dev AND on this PR (the lazy chunk's fetch and parse, which prod already has: ADR 0066 keeps Tasks out of idle warming); the two sessions disagree on which arm is worse (151 vs 207, then 448 vs 195), so I read it as the same pre-existing cost with noise, not a regression from this PR, but I did not isolate the chunk cost. If kayg wants the first visit cheap, that is a change to ADR 0066 (idle prefetch of the chunk) and out of this slice.

Shots (real Safari; product = this PR, mockup = https://preview.calternal.cloud/tasks/chrome.html; sample data only). Differences vs the mockup that are NOT this slice: the list header (title count, one layout pill, ⋯, ✦ slot), the Lists/Projects pill and sections in the sidebar, the toolbar pill, groups. The dark product shots were taken after the light "closed" shot, in the same Safari profile, so the sidebar is hidden in them (the shared preference persisted); it is not a bug.

## Evidence 2: real Safari on macos-01 (Safari, 1440×900, Mac lock held with an EXIT trap that quits Safari and safaridriver; blank page 60 rAF/s check passed; #260 shows no benchmark window then) Server: `calternal-s4` (the Mac VM's staged binary; the arms differ only in `dist`), both arms seeded with 40 notes and 14 Today tasks. ABAB inside one session, 6 runs per arm, each run a fresh page, gestures recorded as rAF deltas for 1.6 s. Idle baseline in the same runs: max 27 (tf) / 35 (dev), none ≥ 50 ms. | gesture | dev worst-frame median / max | this PR median / max | frames ≥ 50 ms (total over 6 runs) | |---|---|---|---| | Notes → Tasks, first visit (address `#/tasks/today`; chunk fetch + build) session 1 | 151.5 / 220 | 207.5 / 334 | 17 / 17 | | same, session 2 (separate ABAB session) | 448.5 / 699 | 195 / 805 | 16 / 18 | | Notes → Tasks, second visit (chunk cached: the build alone) | 23 / 33 | 23 / 24 | 0 / 0 | | Tasks → Notes (mouse on the Notes pill; dev: its old tab) | 24 / 25 | 23 / 25 | 0 / 0 | | Tasks → Notes, second | 25.5 / 27 | 23 / 23 | 0 / 0 | Reading: the building of the screen is not slower (second visit: flat, 23 ms both) and the way back is clean on both. The first visit has 100 to 800 ms frames on dev AND on this PR (the lazy chunk's fetch and parse, which prod already has: ADR 0066 keeps Tasks out of idle warming); the two sessions disagree on which arm is worse (151 vs 207, then 448 vs 195), so I read it as the same pre-existing cost with noise, not a regression from this PR, but I did not isolate the chunk cost. If kayg wants the first visit cheap, that is a change to ADR 0066 (idle prefetch of the chunk) and out of this slice. Shots (real Safari; product = this PR, mockup = https://preview.calternal.cloud/tasks/chrome.html; sample data only). Differences vs the mockup that are NOT this slice: the list header (title count, one layout pill, ⋯, ✦ slot), the Lists/Projects pill and sections in the sidebar, the toolbar pill, groups. The dark product shots were taken after the light "closed" shot, in the same Safari profile, so the sidebar is hidden in them (the shared preference persisted); it is not a bug.
Author
Owner

Evidence 3: iPhone Simulator (std, own sim iPhone 18 Pro iOS 27.0, deleted after; std sim lock), light and dark, 390 pt

The phone branch of TasksScreen is untouched by this slice (stack, PhoneFoot, ListDock stay). Shots: this PR tf-*, dev dev-*, the mockup mockup-*. Sample data only. One difference between this PR and dev in the first light pair: the status-bar strip shows sky (this PR) vs a paper strip (dev) and the sky's cloud layer is not painted yet in this PR's shot; both were taken 10 s after openurl on a fresh Safari tab, and no phone code changed, so I read it as backdrop paint timing, not a regression, but I did not re-shoot to prove it.

## Evidence 3: iPhone Simulator (std, own sim iPhone 18 Pro iOS 27.0, deleted after; std sim lock), light and dark, 390 pt The phone branch of TasksScreen is untouched by this slice (stack, PhoneFoot, ListDock stay). Shots: this PR `tf-*`, dev `dev-*`, the mockup `mockup-*`. Sample data only. One difference between this PR and dev in the first light pair: the status-bar strip shows sky (this PR) vs a paper strip (dev) and the sky's cloud layer is not painted yet in this PR's shot; both were taken 10 s after openurl on a fresh Safari tab, and no phone code changed, so I read it as backdrop paint timing, not a regression, but I did not re-shoot to prove it.
Author
Owner

Evidence 4: re-run of the functional gates on the final head (b7260232c)

  • dev-02 webkit-1440/390: 166 pass, 1 fail (tasks-tick.spec.ts:61 webkit-390; flaky on dev too: ×6 repeat, 1 fail on this branch, 1 fail on dev).
  • dev-01 chromium-1440/390: 165 pass, 2 fail: tasks-tick.spec.ts:61 (chromium-390, same flake) and tasks-swipe.spec.ts:74 (Matrix Someday swipe; fails on dev as well).
  • window-layout all pass on this head (the earlier failure of :112 was dev's own, see Evidence 1).
## Evidence 4: re-run of the functional gates on the final head (`b7260232c`) - dev-02 webkit-1440/390: 166 pass, 1 fail (`tasks-tick.spec.ts:61` webkit-390; flaky on dev too: ×6 repeat, 1 fail on this branch, 1 fail on dev). - dev-01 chromium-1440/390: 165 pass, 2 fail: `tasks-tick.spec.ts:61` (chromium-390, same flake) and `tasks-swipe.spec.ts:74` (Matrix Someday swipe; fails on dev as well). - `window-layout` all pass on this head (the earlier failure of `:112` was dev's own, see Evidence 1).
Author
Owner

Evidence 5: re-gate on dev 42c219afd merged in (head 93573c938; web code unchanged since the merge 79aa906ad)

I merged origin/dev (42c219afd, includes the #1160 plan) into the branch: one conflict, perf/budgets.json (took dev's lines, re-measured below). Rust is unchanged by this branch, so one server binary (built from this tree, sha256 96f93198a78f…) serves both arms everywhere.

Functional gates

bunx playwright test e2e/tasks- e2e/task-check e2e/app-switch e2e/switching e2e/keys-no-motion e2e/pane-transition e2e/window-layout e2e/composer-tasks --project=<p> --workers=2

project host first runs on this head after the daily train released the VMs
webkit-390 dev-02 61 pass (same)
webkit-1440 dev-02 3 fail under the daily train's load (tasks-board:110, tasks-tick:49, window-layout:112) 104 pass, 2 fail (tasks-board:69, window-layout:112)
chromium-390 dev-01 6 fail under the train's load 60 pass, 1 fail (tasks-tick:61)
chromium-1440 dev-01 104 pass, 2 fail (tasks-swipe:74, tasks-card:68) 103 pass, 3 fail (tasks-board:42, tasks-tick:107, window-layout:187)

Every failing test, run alone with --workers=1 --repeat-each=10 on this branch AND on dev (a worktree at origin/dev, same binary): 10/10 pass on both, for all of tasks-tick:49, :61, :107, tasks-board:42, :69, :110, tasks-card:68, window-layout:112, :187, tasks-swipe:74 (on chromium-1440 and chromium-390). The same full-run command on dev itself also fails a different handful each run (dev, chromium-1440: tasks-card:68, tasks-swipe:64; dev, webkit-1440: tasks-tick:72; dev chromium-390 61 pass). So these are the known full-run flakes (workers=2, parallel specs on one server), different on every run, on both sides; none reproduces alone on this branch or on dev. tasks-swipe:74 does not fail on dev in isolation any more (10/10 on chromium-1440, ×10 on dev and on the branch): it fails only inside the full run, as other specs do, so I did not open a separate stability issue for it; the flaky-run pattern above is the stability item (the earlier lane's "fails on dev as well" is true only for the full run).

Static gates

  • svelte-check (bun run check, dev-02 and dev-01): 0 errors, 19 warnings (same as dev).
  • vitest (bun run test): 34 files, 319 tests pass.
  • Bundle gate (bash perf/web.sh --bundle-only --gate, dev-01, rc 0 on this head): first-paint JS 232.642 KB brotli (dev 232.518: +0.124; cap 240), first-paint CSS 19.111 (dev 19.032: +0.079; cap 22.1), TasksScreen chunk 13.738 (dev 13.140: +0.598), total JS 588.101 (dev 587.223). Sizes were identical on dev-02 (aarch64). perf/budgets.json lines are set at the measured sizes (+0.001); 14 other lazy chunks moved by hashed-import jitter (0.001 to 0.06), total = sum of lines (589.905).

Real Safari frames, Notes ↔ Tasks (macos-01, Mac lock atomic, Safari and safaridriver quit by the EXIT trap; 1440×900; ABAB, 8 runs per arm, one session; dev = origin/dev 42c219afd, this PR = 79aa906ad web code)

Blank page: 132 frames in 2 s (mean 18.0 ms), then each run is a fresh page; rAF deltas for 1.6 s per gesture.

gesture dev worst frame median / max this PR median / max frames ≥ 50 ms, dev frames ≥ 50 ms, this PR
idle baseline (no input) 23.0 / 29 23.5 / 26 0 0
Notes → Tasks, first visit (address #/tasks/today: lazy chunk fetch, parse, build) 521.5 / 1129 533.0 / 1460 15 (8/8 runs) 16 (8/8 runs)
Tasks → Notes (first) 23.0 / 25 24.0 / 25 0 0
Notes → Tasks, second visit (chunk cached) 23.5 / 26 23.0 / 25 0 0
Tasks → Notes, second 23.0 / 25 23.5 / 26 0 0

Reading: nothing this PR adds is ≥ 50 ms: the switch both ways is as clean as the idle baseline once the chunk is there. The first visit by address is a 500 ms stall on dev and on this PR alike (8/8 runs each): it is today's lazy TasksScreen chunk (ADR 0066 keeps it out of idle warming), not the window. Per the ≥ 50 ms rule I looked for a fix inside this slice and there is none that is only mine: Tasks is not in Notes' switcher yet (built: false, reached by address), so there is no control to carry data-preload-ui intent warming, and idle-warming the chunk is an ADR 0066 change that also moves Notes' idle cost. Decision for kayg: when Tasks is listed in the switcher (the release step), give its pill data-preload-ui="tasksScreen" (pointer intent fetches the chunk before the click, no idle cost); until then the first entry by address stalls as it does on prod today.

Product vs the approved mockup, real Safari (light and dark, sample data)

Computed values (Safari getComputedStyle of the same element in both pages, 1440×900, the task open): product = this PR, mockup = https://preview.calternal.cloud/tasks/chrome.html. Slice-1-owned shell: window, sidebar, dock, glass cards. The rest is slices 2 to 4 (list header, Lists/Projects pill and tree, toolbar pill, rows).

property (product at this PR / mockup; light and dark shown as light / dark when they differ) product mockup match note
sidebar width (box incl. 5 px margin) 233 265 ≠ mockup float.svelte.ts WINDOW_SIDE default 260 for Tasks; product keeps Notes' 228 (Notes product also differs from its mockup, 320)
sidebar title line height 52 52 ✓
sidebar title size 15px 22px ≠ product copies Notes' 15 px title (NotesSide); mockup --fs-title 22
sidebar title weight 650 650 ✓
dock height 44 44 ✓
list card radius 20px 20px ✓
list card top 17 17 ✓
list card height 866 866 ✓
list card glass tint (light / dark) rgba(255, 251, 245, 0.56) / rgba(14, 13, 12, 0.64) rgba(0, 0, 0, 0) / rgba(0, 0, 0, 0) ≠ mockup tints a child .fg-glass (oklab); product tints the card (--glass-pane); same family, not the same layer
list card shadow rgba(60, 40, 20, 0.32) 0px 14px 34px -14px, rgba(60, 40, 20, 0.12) 0px 2px 8px -2px / rgba(0, 0, 0, 0.65) 0px 16px 36px -14px, rgba(0, 0, 0, 0.35) 0px 2px 8px -2px rgba(20, 20, 20, 0.32) 0px 14px 34px -14px, rgba(20, 20, 20, 0.12) 0px 2px 8px -2px / rgba(0, 0, 0, 0.65) 0px 16px 36px -14px, rgba(0, 0, 0, 0.35) 0px 2px 8px -2px ≠ light: product warm paper tint vs mockup neutral grey; dark equal
list card width at 1440, task open 380 769 ≠ slice 4 (mockup: list flexible, task card 360); the product card keeps its capsule bar (about 445 px) so it cannot be 360 yet
task card radius 20px 20px ✓
task card width 781 360 ≠ same as above
task row height 73 63 ≠ slice 3 (rows)
task row radius 10px 12px ≠ slice 3
task row title size 15px 15px ✓
task row title weight 500 500 ✓

Matches: the window's gutters, the title line (52), the dock row, both cards' radius (20) and top/height, the glass family, the row title type. Open differences owned by this slice, both a choice for kayg (I followed the shipped Notes window): (1) the sidebar title is 15 px as Notes' (mockup 22 px) and (2) the sidebar is 228 px wide as Notes' (the mockup's per-app default for Tasks is 260; its Notes default is 320, which the shipped Notes also did not take). Both are one-line changes (TasksWindow brand CSS, sideWidth("cal.tasksSideW", 260)). The dark mockup needs its own preference (window.__cal.setPref("theme","dark"); it ignores ?theme=), done here.

Shots follow (product product-*, mockup mockup-*; the "closed" shots hide the sidebar with the shared preference and put it back).

Perf

Ticket tf1 is queued on perf-01 (behind mail-1011 and daily-1116c-r); pooled ABAB ×3: Notes typing + list scroll (harness as on dev) and the Tasks list scroll, the card open/close and typing in Notes after a Tasks visit, each dev / dev2 (control) / this PR. Results in the next comment.

product-tasks-light

product-tasks-light

product-task-open-light

product-task-open-light

product-tasks-closed-light

product-tasks-closed-light

mockup-tasks-light

mockup-tasks-light

mockup-task-open-light

mockup-task-open-light

product-tasks-dark

product-tasks-dark

product-task-open-dark

product-task-open-dark

product-tasks-closed-dark

product-tasks-closed-dark

mockup-tasks-dark

mockup-tasks-dark

mockup-task-open-dark

mockup-task-open-dark

## Evidence 5: re-gate on dev 42c219afd merged in (head `93573c938`; web code unchanged since the merge `79aa906ad`) I merged `origin/dev` (42c219afd, includes the #1160 plan) into the branch: one conflict, `perf/budgets.json` (took dev's lines, re-measured below). Rust is unchanged by this branch, so one server binary (built from this tree, sha256 `96f93198a78f…`) serves both arms everywhere. ### Functional gates `bunx playwright test e2e/tasks- e2e/task-check e2e/app-switch e2e/switching e2e/keys-no-motion e2e/pane-transition e2e/window-layout e2e/composer-tasks --project=<p> --workers=2` | project | host | first runs on this head | after the daily train released the VMs | |---|---|---|---| | webkit-390 | dev-02 | 61 pass | (same) | | webkit-1440 | dev-02 | 3 fail under the daily train's load (`tasks-board:110`, `tasks-tick:49`, `window-layout:112`) | 104 pass, 2 fail (`tasks-board:69`, `window-layout:112`) | | chromium-390 | dev-01 | 6 fail under the train's load | 60 pass, 1 fail (`tasks-tick:61`) | | chromium-1440 | dev-01 | 104 pass, 2 fail (`tasks-swipe:74`, `tasks-card:68`) | 103 pass, 3 fail (`tasks-board:42`, `tasks-tick:107`, `window-layout:187`) | Every failing test, run alone with `--workers=1 --repeat-each=10` on this branch AND on dev (a worktree at origin/dev, same binary): **10/10 pass on both**, for all of `tasks-tick:49`, `:61`, `:107`, `tasks-board:42`, `:69`, `:110`, `tasks-card:68`, `window-layout:112`, `:187`, `tasks-swipe:74` (on chromium-1440 and chromium-390). The same full-run command on dev itself also fails a different handful each run (dev, chromium-1440: `tasks-card:68`, `tasks-swipe:64`; dev, webkit-1440: `tasks-tick:72`; dev chromium-390 61 pass). So these are the known full-run flakes (workers=2, parallel specs on one server), different on every run, on both sides; none reproduces alone on this branch or on dev. **`tasks-swipe:74` does not fail on dev in isolation any more (10/10 on chromium-1440, ×10 on dev and on the branch)**: it fails only inside the full run, as other specs do, so I did not open a separate stability issue for it; the flaky-run pattern above is the stability item (the earlier lane's "fails on dev as well" is true only for the full run). ### Static gates - svelte-check (`bun run check`, dev-02 and dev-01): 0 errors, 19 warnings (same as dev). - vitest (`bun run test`): 34 files, 319 tests pass. - Bundle gate (`bash perf/web.sh --bundle-only --gate`, dev-01, rc 0 on this head): first-paint JS 232.642 KB brotli (dev 232.518: **+0.124**; cap 240), first-paint CSS 19.111 (dev 19.032: +0.079; cap 22.1), TasksScreen chunk 13.738 (dev 13.140: +0.598), total JS 588.101 (dev 587.223). Sizes were identical on dev-02 (aarch64). `perf/budgets.json` lines are set at the measured sizes (+0.001); 14 other lazy chunks moved by hashed-import jitter (0.001 to 0.06), total = sum of lines (589.905). ### Real Safari frames, Notes ↔ Tasks (macos-01, Mac lock atomic, Safari and safaridriver quit by the EXIT trap; 1440×900; ABAB, 8 runs per arm, one session; dev = origin/dev 42c219afd, this PR = 79aa906ad web code) Blank page: 132 frames in 2 s (mean 18.0 ms), then each run is a fresh page; rAF deltas for 1.6 s per gesture. | gesture | dev worst frame median / max | this PR median / max | frames ≥ 50 ms, dev | frames ≥ 50 ms, this PR | |---|---|---|---|---| | idle baseline (no input) | 23.0 / 29 | 23.5 / 26 | 0 | 0 | | Notes → Tasks, **first visit** (address `#/tasks/today`: lazy chunk fetch, parse, build) | 521.5 / 1129 | 533.0 / 1460 | 15 (8/8 runs) | 16 (8/8 runs) | | Tasks → Notes (first) | 23.0 / 25 | 24.0 / 25 | 0 | 0 | | Notes → Tasks, **second visit** (chunk cached) | 23.5 / 26 | 23.0 / 25 | 0 | 0 | | Tasks → Notes, second | 23.0 / 25 | 23.5 / 26 | 0 | 0 | Reading: nothing this PR adds is ≥ 50 ms: the switch both ways is as clean as the idle baseline once the chunk is there. The **first visit by address is a 500 ms stall on dev and on this PR alike** (8/8 runs each): it is today's lazy `TasksScreen` chunk (ADR 0066 keeps it out of idle warming), not the window. Per the ≥ 50 ms rule I looked for a fix inside this slice and there is none that is only mine: Tasks is not in Notes' switcher yet (`built: false`, reached by address), so there is no control to carry `data-preload-ui` intent warming, and idle-warming the chunk is an ADR 0066 change that also moves Notes' idle cost. **Decision for kayg:** when Tasks is listed in the switcher (the release step), give its pill `data-preload-ui="tasksScreen"` (pointer intent fetches the chunk before the click, no idle cost); until then the first entry by address stalls as it does on prod today. ### Product vs the approved mockup, real Safari (light and dark, sample data) Computed values (Safari `getComputedStyle` of the same element in both pages, 1440×900, the task open): `product` = this PR, `mockup` = https://preview.calternal.cloud/tasks/chrome.html. Slice-1-owned shell: window, sidebar, dock, glass cards. The rest is slices 2 to 4 (list header, Lists/Projects pill and tree, toolbar pill, rows). | property (product at this PR / mockup; light and dark shown as `light / dark` when they differ) | product | mockup | match | note | |---|---|---|---|---| | sidebar width (box incl. 5 px margin) | 233 | 265 | ≠ | mockup `float.svelte.ts` WINDOW_SIDE default 260 for Tasks; product keeps Notes' 228 (Notes product also differs from its mockup, 320) | | sidebar title line height | 52 | 52 | ✓ | | | sidebar title size | 15px | 22px | ≠ | product copies Notes' 15 px title (`NotesSide`); mockup `--fs-title` 22 | | sidebar title weight | 650 | 650 | ✓ | | | dock height | 44 | 44 | ✓ | | | list card radius | 20px | 20px | ✓ | | | list card top | 17 | 17 | ✓ | | | list card height | 866 | 866 | ✓ | | | list card glass tint (light / dark) | rgba(255, 251, 245, 0.56) / rgba(14, 13, 12, 0.64) | rgba(0, 0, 0, 0) / rgba(0, 0, 0, 0) | ≠ | mockup tints a child `.fg-glass` (oklab); product tints the card (`--glass-pane`); same family, not the same layer | | list card shadow | rgba(60, 40, 20, 0.32) 0px 14px 34px -14px, rgba(60, 40, 20, 0.12) 0px 2px 8px -2px / rgba(0, 0, 0, 0.65) 0px 16px 36px -14px, rgba(0, 0, 0, 0.35) 0px 2px 8px -2px | rgba(20, 20, 20, 0.32) 0px 14px 34px -14px, rgba(20, 20, 20, 0.12) 0px 2px 8px -2px / rgba(0, 0, 0, 0.65) 0px 16px 36px -14px, rgba(0, 0, 0, 0.35) 0px 2px 8px -2px | ≠ | light: product warm paper tint vs mockup neutral grey; dark equal | | list card width at 1440, task open | 380 | 769 | ≠ | slice 4 (mockup: list flexible, task card 360); the product card keeps its capsule bar (about 445 px) so it cannot be 360 yet | | task card radius | 20px | 20px | ✓ | | | task card width | 781 | 360 | ≠ | same as above | | task row height | 73 | 63 | ≠ | slice 3 (rows) | | task row radius | 10px | 12px | ≠ | slice 3 | | task row title size | 15px | 15px | ✓ | | | task row title weight | 500 | 500 | ✓ | | Matches: the window's gutters, the title line (52), the dock row, both cards' radius (20) and top/height, the glass family, the row title type. Open differences owned by this slice, both a **choice for kayg** (I followed the shipped Notes window): (1) the sidebar title is 15 px as Notes' (mockup 22 px) and (2) the sidebar is 228 px wide as Notes' (the mockup's per-app default for Tasks is 260; its Notes default is 320, which the shipped Notes also did not take). Both are one-line changes (`TasksWindow` brand CSS, `sideWidth("cal.tasksSideW", 260)`). The dark mockup needs its own preference (`window.__cal.setPref("theme","dark")`; it ignores `?theme=`), done here. Shots follow (product `product-*`, mockup `mockup-*`; the "closed" shots hide the sidebar with the shared preference and put it back). ### Perf Ticket `tf1` is queued on perf-01 (behind mail-1011 and daily-1116c-r); pooled ABAB ×3: Notes typing + list scroll (harness as on dev) and the Tasks list scroll, the card open/close and typing in Notes after a Tasks visit, each dev / dev2 (control) / this PR. Results in the next comment. **product-tasks-light** ![product-tasks-light](https://git.kayg.org/attachments/bbb90ed0-e522-4f56-a0df-9a757d4f872f) **product-task-open-light** ![product-task-open-light](https://git.kayg.org/attachments/12fa0c64-d016-4fbc-ab16-b5fa4272b4d7) **product-tasks-closed-light** ![product-tasks-closed-light](https://git.kayg.org/attachments/189a2c63-c876-4d9b-80aa-ed2830fed8d2) **mockup-tasks-light** ![mockup-tasks-light](https://git.kayg.org/attachments/0b5da608-b35c-4961-8047-b081f2291b1d) **mockup-task-open-light** ![mockup-task-open-light](https://git.kayg.org/attachments/73540564-0e17-4e31-aee4-23ef29b80221) **product-tasks-dark** ![product-tasks-dark](https://git.kayg.org/attachments/2ad8b86e-363b-4de4-ac38-88462fc00091) **product-task-open-dark** ![product-task-open-dark](https://git.kayg.org/attachments/62ad2792-2137-4509-a33a-ab2923fbcf53) **product-tasks-closed-dark** ![product-tasks-closed-dark](https://git.kayg.org/attachments/6c8370ed-350f-48a8-9373-2cf6a15bea4d) **mockup-tasks-dark** ![mockup-tasks-dark](https://git.kayg.org/attachments/a72311a3-aca0-4802-85eb-9e304f3b5946) **mockup-task-open-dark** ![mockup-task-open-dark](https://git.kayg.org/attachments/0b2456e1-f115-4afc-b229-8d133f713c9b)
Author
Owner

Evidence 6: iPhone Simulator (std, own sim iPhone 18 Pro iOS 27.0, deleted after; std sim lock), light and dark, 390 pt, on head 93573c938 (web code as 79aa906ad)

Shots: this PR (tf-lists, tf-today, tf-open), dev (dev-today), the mockup (mockup-today, mockup-open); sample data. This slice leaves the phone branch of TasksScreen untouched (phone stack, PhoneFoot, ListDock), and the product's Today shot is pixel-identical in layout to dev's (the first lane's sky/strip difference did not reproduce: both show the same paper strip now). Phone differences vs the mockup (inset sheet, sidebar-as-first-screen with the shared tree) are slice 5, by plan.

tf-lists-light

tf-today-light

tf-open-light

dev-today-light

mockup-today-light

mockup-open-light

tf-lists-dark

tf-today-dark

tf-open-dark

dev-today-dark

mockup-today-dark

mockup-open-dark

## Evidence 6: iPhone Simulator (std, own sim iPhone 18 Pro iOS 27.0, deleted after; std sim lock), light and dark, 390 pt, on head `93573c938` (web code as `79aa906ad`) Shots: this PR (`tf-lists`, `tf-today`, `tf-open`), dev (`dev-today`), the mockup (`mockup-today`, `mockup-open`); sample data. This slice leaves the phone branch of TasksScreen untouched (phone stack, PhoneFoot, ListDock), and the product's Today shot is pixel-identical in layout to dev's (the first lane's sky/strip difference did not reproduce: both show the same paper strip now). Phone differences vs the mockup (inset sheet, sidebar-as-first-screen with the shared tree) are slice 5, by plan. **tf-lists-light** <img src="https://git.kayg.org/attachments/4b89d43a-82a3-4d40-9092-7411fb868eaf" width="260"> **tf-today-light** <img src="https://git.kayg.org/attachments/a9f940b3-354d-4a6d-9bb3-ec2d523528e0" width="260"> **tf-open-light** <img src="https://git.kayg.org/attachments/9e91a684-96ea-4d06-8d3c-dd85d17f3a48" width="260"> **dev-today-light** <img src="https://git.kayg.org/attachments/c963db5a-3f44-48ac-a08c-50a642a3598e" width="260"> **mockup-today-light** <img src="https://git.kayg.org/attachments/44316da6-0a88-4da9-a3e5-88e7b35a7448" width="260"> **mockup-open-light** <img src="https://git.kayg.org/attachments/d502ed12-545d-42f4-ade3-c80993e10e33" width="260"> **tf-lists-dark** <img src="https://git.kayg.org/attachments/5c33c464-fffa-4257-b50c-abcc978c57f3" width="260"> **tf-today-dark** <img src="https://git.kayg.org/attachments/aa31f0e3-1543-4a59-8d0b-f63e6f7c9adc" width="260"> **tf-open-dark** <img src="https://git.kayg.org/attachments/01e71949-b690-4a25-b0cb-482c4e1748a4" width="260"> **dev-today-dark** <img src="https://git.kayg.org/attachments/716fb083-6188-4dda-926b-d8e2da607ff5" width="260"> **mockup-today-dark** <img src="https://git.kayg.org/attachments/d3d69a2e-aee4-40a0-96fc-473bb769d99f" width="260"> **mockup-open-dark** <img src="https://git.kayg.org/attachments/01167464-97b4-4e51-a530-1533460c3c4a" width="260">
Author
Owner

Evidence 7: perf, pooled ABAB on perf-01 (~/bin/perf-turn tf1, perf-02's lock held by a unit for the turn and released after; dev = origin/dev 42c219afd, dev2 = the same dev build as the control, new = this PR 79aa906ad web code; one server binary for all arms; chromium headless 1440×900, 4× CPU throttle, CDP ThreadTime; fixture: 40 notes + 160 undated tasks)

Pooled over sessions, each arm 4 runs per session, ratios to the session's dev mean; the control column is dev2 vs dev (the noise floor). Session 1's Notes half failed to start (the harness's playwright path was missing: a staging mistake, fixed for sessions 2 and 3), so Notes = 2 sessions, Tasks = 3 sessions.

Notes (the Notes Float harness: typing + list scroll), 2 sessions × 4 runs per arm

metric dev2 control this PR vs dev upper 95% CI
typing CPU per key +0.02% -0.06% +0.16%
typing script per key +0.13% -0.38% +0.09%
list-scroll CPU -0.11% +0.08% +0.40%
list-scroll script -3.09% +0.63% +3.98%
list-scroll recalc style -4.03% +2.69% +6.30%

Tasks (new script perf-01/tasks-cpu.mjs: Anytime list of 160 tasks scrolled with the wheel; a card opened and closed; typing in Notes after a Tasks visit), 3 sessions × 4 runs per arm

metric dev2 control this PR vs dev upper 95% CI
Tasks list-scroll CPU -0.09% +4.61% +6.40%
Tasks list-scroll script -1.77% +7.75% +11.21%
Tasks list-scroll recalc style +4.05% +4.96% +10.92%
card open+close CPU (steady) -1.11% +1.05% +3.24%
card open+close script -0.56% +0.70% +4.51%
first card open CPU (lazy chunks) -0.70% -0.41% +1.93%
typing in Notes after a Tasks visit, CPU/key -0.64% +0.34% +0.80%
typing script/key -0.53% +0.74% +1.71%

Verdict: NOT zero regression. Notes and the card/typing paths are flat inside the control's noise. The Tasks list scroll costs about +4.6% main-thread CPU (+7.8% script) over dev, outside the control (-0.1%). Per kayg's rule this blocks the merge until fixed or accepted.

What I found (dev-01 CPU profiles of the same scroll, unminified builds, 8 runs per arm, perf/…/tasks-prof.mjs): about 20% of the whole scroll is the adaptive glass recompute on both sides (recomputeBehind → watchScrollers → elementsFromPoint, about 2.0 s of 10.4 s), +6% on this PR, and Svelte's effect flush is +16% (about +0.2 s): the window's extra stacked layers (global-layer pieces, window box, cards) make each hit test and each glass recompute a little dearer. Root inclusive time dev 10.37 s, this PR 11.06 s (+6.7%). Two cheap CSS candidates did not help: dropping transform: translateZ(0) on the list card (11.05 s) and replacing it with contain: layout paint style (11.38 s, worse). It is the same shell Notes has, so I did not find a slice-local fix in the time I had; candidates for the next round: make watchScrollers skip scrollers inside the Tasks window's own cards (it re-hit-tests per scroll end), or give the Tasks list the Notes list's contain: strict. I did not start slice 2: slice 1 is not clean on perf, and a stacked slice would inherit the regression.

## Evidence 7: perf, pooled ABAB on perf-01 (`~/bin/perf-turn tf1`, perf-02's lock held by a unit for the turn and released after; dev = origin/dev 42c219afd, dev2 = the same dev build as the control, new = this PR 79aa906ad web code; one server binary for all arms; chromium headless 1440×900, 4× CPU throttle, CDP `ThreadTime`; fixture: 40 notes + 160 undated tasks) Pooled over sessions, each arm 4 runs per session, ratios to the session's dev mean; the control column is dev2 vs dev (the noise floor). Session 1's Notes half failed to start (the harness's playwright path was missing: a staging mistake, fixed for sessions 2 and 3), so **Notes = 2 sessions, Tasks = 3 sessions**. **Notes (the Notes Float harness: typing + list scroll)**, 2 sessions × 4 runs per arm | metric | dev2 control | this PR vs dev | upper 95% CI | |---|---|---|---| | typing CPU per key | +0.02% | -0.06% | +0.16% | | typing script per key | +0.13% | -0.38% | +0.09% | | list-scroll CPU | -0.11% | +0.08% | +0.40% | | list-scroll script | -3.09% | +0.63% | +3.98% | | list-scroll recalc style | -4.03% | +2.69% | +6.30% | **Tasks (new script `perf-01/tasks-cpu.mjs`: Anytime list of 160 tasks scrolled with the wheel; a card opened and closed; typing in Notes after a Tasks visit)**, 3 sessions × 4 runs per arm | metric | dev2 control | this PR vs dev | upper 95% CI | |---|---|---|---| | **Tasks list-scroll CPU** | -0.09% | **+4.61%** | +6.40% | | **Tasks list-scroll script** | -1.77% | **+7.75%** | +11.21% | | Tasks list-scroll recalc style | +4.05% | +4.96% | +10.92% | | card open+close CPU (steady) | -1.11% | +1.05% | +3.24% | | card open+close script | -0.56% | +0.70% | +4.51% | | first card open CPU (lazy chunks) | -0.70% | -0.41% | +1.93% | | typing in Notes after a Tasks visit, CPU/key | -0.64% | +0.34% | +0.80% | | typing script/key | -0.53% | +0.74% | +1.71% | **Verdict: NOT zero regression.** Notes and the card/typing paths are flat inside the control's noise. **The Tasks list scroll costs about +4.6% main-thread CPU (+7.8% script) over dev, outside the control (-0.1%).** Per kayg's rule this blocks the merge until fixed or accepted. What I found (dev-01 CPU profiles of the same scroll, unminified builds, 8 runs per arm, `perf/…/tasks-prof.mjs`): about 20% of the whole scroll is the adaptive glass recompute on both sides (`recomputeBehind` → `watchScrollers` → `elementsFromPoint`, about 2.0 s of 10.4 s), +6% on this PR, and Svelte's effect flush is +16% (about +0.2 s): the window's extra stacked layers (global-layer pieces, window box, cards) make each hit test and each glass recompute a little dearer. Root inclusive time dev 10.37 s, this PR 11.06 s (+6.7%). Two cheap CSS candidates did not help: dropping `transform: translateZ(0)` on the list card (11.05 s) and replacing it with `contain: layout paint style` (11.38 s, worse). It is the same shell Notes has, so I did not find a slice-local fix in the time I had; candidates for the next round: make `watchScrollers` skip scrollers inside the Tasks window's own cards (it re-hit-tests per scroll end), or give the Tasks list the Notes list's `contain: strict`. **I did not start slice 2:** slice 1 is not clean on perf, and a stacked slice would inherit the regression.
Author
Owner

Evidence 8: the Tasks list-scroll regression, found and fixed (head d67032e81); the pooled perf gate is queued

Cause (dev-01, deterministic counts over the gate's exact 40-step wheel scroll of the Anytime list, 160 tasks, 4× throttle)

Counters injected before the app loads (elementsFromPoint and getComputedStyle calls, transitionend by property, scrollend dispatches, DOM mutation records, glass recompute runs, CDP RecalcStyleCount):

per scroll dev (42c219afd) slice 1 before (36d038c90) slice 1 + fix (bcf87420c)
transitionend (all opacity on .grip) 43–47 43–46 42–47
elementsFromPoint calls 100–116 100–116 0
getComputedStyle calls 405–480 490–562 0
glass recompute runs 30–39 31–41 48–49
busy-map builds 3–6 4–8 12
script (CDP, ms) 4697–5249 4047–5433 3063–3973

Each task row fades its grip in or out (an opacity transition) as the list scrolls under the still pointer. The glass module bumped boxGen on every transitionend, so every scroll-end recompute then re-ran watchScrollers: hit tests over each glass plus a computed-style read for every ancestor. That is the ~20% of scroll time the earlier profile found in recomputeBehind → watchScrollers → elementsFromPoint. dev pays it too, and the Tasks window's deeper stack of layers makes each hit test and style read cost more. The scroller was registered once (DIV.scroll only, not twice), and the same 2 glasses are registered on both sides (the list's morph bar and the hidden BulkBar). So the Tasks list's contain, or a second registration, was not the lever.

Fix (shared glass, packages/ui/src/lib/behind-glass.ts)

A transition that only repaints (opacity, every *color, box-shadow/text-shadow, fill, stroke, filter/backdrop-filter, the glass's own --glass-busy) no longer bumps boxGen. It moves no box and changes no hit test (an element at opacity 0 is still hit; visibility is deliberately not in the list). Box-moving transitions (transform, width, left, …) still bump it as before. Nothing is dropped: one glass, the adaptive ink still recomputes at every scroll end (the runs count above), the glass never fades. New spec adaptive-glass.spec.ts "a paint-only transition ending does not re-scan the scrollers; a moving one does".

Commits: bcf87420c (fix), 6c421dda8 (shorter pattern, the same properties), b3fcc4ce5 (spec), d67032e81 (six lazy budget lines follow hashed-import jitter).

dev-01 pre-check (not the gate; dev-01 load 11–21; tasks-cpu.mjs, minified, 3–4 runs per arm)

Tasks list-scroll CPU: dev 9316 ms, slice before 10409 (+11.7%), slice + fix 9024 (−3.1% vs dev); script 4130 / 4604 / 2652 (−36%); recalc style 175 / 194 / 202 (+15%: more recompute runs fit into the scroll now that each costs ~2 ms instead of ~70 ms). Two of 24 runs timed out under the host's load: one fix run on a card open and one dev run on the return to Notes. Neither reproduced.

Functional gates

bunx playwright test e2e/tasks- e2e/window-layout e2e/app-switch e2e/switching e2e/adaptive-glass e2e/glass --project=<p> --workers=1 at bcf87420c:

project host result
chromium-1440 dev-01 111 passed, 3 skipped
chromium-390 dev-01 69 passed, 45 skipped
webkit-1440 dev-02 111 passed, 3 skipped
webkit-390 dev-02 69 passed, 45 skipped

At b3fcc4ce5 (with the new spec), e2e/adaptive-glass e2e/glass: chromium-1440 29 passed, chromium-390 26 passed, webkit-1440 29 passed, webkit-390 26 passed.
Static (dev-02): svelte-check 0 errors / 19 warnings (as dev); vitest 34 files, 319 tests pass.
Bundle (bash perf/web.sh --bundle-only --gate, dev-01, at d67032e81): rc 0. first-paint JS 232.585 KB (dev 232.518). Six lazy chunks moved by hashed-import jitter only, and their lines were raised to the measured size + 0.001 (attachments, lazy, ListSearch, panes, tables, tree-to); total = sum of lines (589.935).

Real Safari, Tasks list-scroll frames (macos-01, Mac lock atomic, Safari and safaridriver quit by the EXIT trap; 1440×900; Anytime list of 160 tasks; 24 wheel steps over 3 s; dev vs the fix bcf87420c web build (same properties as head); ABAB, 8 runs per arm, two sessions)

session arm idle median worst scroll median worst / max frames > 33 ms frames ≥ 50 ms mean frame glass runs per scroll
1 dev 24 35 / 646 6 4 17.41 4
1 fix 24 25 / 51 1 1 16.68 4
2 dev 23 26 / 42 2 0 16.69 4
2 fix 23.5 24 / 80 1 1 16.70 4

Pooled over both sessions: frames ≥ 50 ms, dev 4 and fix 2, each a single frame in one run. The blank page before each session also showed a 98 ms and a 121 ms frame with no app at all, so that is this VM's noise floor. No ≥ 50 ms frame repeated in the same place.

Perf gate

Ticket tf1b on perf-01: pooled ABAB ×3, Notes typing + list and Tasks list/card/typing, with dev / dev2 (control) / head b3fcc4ce5 web build (the same web code as d67032e81). My first turn (06:15 IST) failed before measuring: every arm, dev included, timed out waiting for the Notes list. The Tasks fixture I had seeded on dev-01 does not load its Notes list on perf-01. Locks were released at once. Requeued: the Tasks fixture is now seeded inside the turn from perf-01's own Notes fixture with perf-01's own server binary, and the turn stops early if the Notes harness fails. Results will follow in the next comment.

## Evidence 8: the Tasks list-scroll regression, found and fixed (head `d67032e81`); the pooled perf gate is queued ### Cause (dev-01, deterministic counts over the gate's exact 40-step wheel scroll of the Anytime list, 160 tasks, 4× throttle) Counters injected before the app loads (`elementsFromPoint` and `getComputedStyle` calls, `transitionend` by property, `scrollend` dispatches, DOM mutation records, glass recompute runs, CDP `RecalcStyleCount`): | per scroll | dev (42c219afd) | slice 1 before (36d038c90) | slice 1 + fix (bcf87420c) | |---|---|---|---| | `transitionend` (all `opacity` on `.grip`) | 43–47 | 43–46 | 42–47 | | `elementsFromPoint` calls | 100–116 | 100–116 | **0** | | `getComputedStyle` calls | 405–480 | 490–562 | **0** | | glass recompute runs | 30–39 | 31–41 | 48–49 | | busy-map builds | 3–6 | 4–8 | 12 | | script (CDP, ms) | 4697–5249 | 4047–5433 | **3063–3973** | Each task row fades its grip in or out (an `opacity` transition) as the list scrolls under the still pointer. The glass module bumped `boxGen` on **every** `transitionend`, so every scroll-end recompute then re-ran `watchScrollers`: hit tests over each glass plus a computed-style read for every ancestor. That is the ~20% of scroll time the earlier profile found in `recomputeBehind → watchScrollers → elementsFromPoint`. dev pays it too, and the Tasks window's deeper stack of layers makes each hit test and style read cost more. The scroller was registered once (`DIV.scroll` only, not twice), and the same 2 glasses are registered on both sides (the list's `morph` bar and the hidden `BulkBar`). So the Tasks list's `contain`, or a second registration, was not the lever. ### Fix (shared glass, `packages/ui/src/lib/behind-glass.ts`) A transition that only repaints (`opacity`, every `*color`, `box-shadow`/`text-shadow`, `fill`, `stroke`, `filter`/`backdrop-filter`, the glass's own `--glass-busy`) no longer bumps `boxGen`. It moves no box and changes no hit test (an element at opacity 0 is still hit; `visibility` is deliberately **not** in the list). Box-moving transitions (`transform`, `width`, `left`, …) still bump it as before. Nothing is dropped: one glass, the adaptive ink still recomputes at every scroll end (the runs count above), the glass never fades. New spec `adaptive-glass.spec.ts` "a paint-only transition ending does not re-scan the scrollers; a moving one does". Commits: `bcf87420c` (fix), `6c421dda8` (shorter pattern, the same properties), `b3fcc4ce5` (spec), `d67032e81` (six lazy budget lines follow hashed-import jitter). ### dev-01 pre-check (not the gate; dev-01 load 11–21; tasks-cpu.mjs, minified, 3–4 runs per arm) Tasks list-scroll CPU: dev 9316 ms, slice before 10409 (+11.7%), **slice + fix 9024 (−3.1% vs dev)**; script 4130 / 4604 / **2652 (−36%)**; recalc style 175 / 194 / 202 (+15%: more recompute runs fit into the scroll now that each costs ~2 ms instead of ~70 ms). Two of 24 runs timed out under the host's load: one fix run on a card open and one dev run on the return to Notes. Neither reproduced. ### Functional gates `bunx playwright test e2e/tasks- e2e/window-layout e2e/app-switch e2e/switching e2e/adaptive-glass e2e/glass --project=<p> --workers=1` at `bcf87420c`: | project | host | result | |---|---|---| | chromium-1440 | dev-01 | 111 passed, 3 skipped | | chromium-390 | dev-01 | 69 passed, 45 skipped | | webkit-1440 | dev-02 | 111 passed, 3 skipped | | webkit-390 | dev-02 | 69 passed, 45 skipped | At `b3fcc4ce5` (with the new spec), `e2e/adaptive-glass e2e/glass`: chromium-1440 29 passed, chromium-390 26 passed, webkit-1440 29 passed, webkit-390 26 passed. Static (dev-02): svelte-check 0 errors / 19 warnings (as dev); vitest 34 files, 319 tests pass. Bundle (`bash perf/web.sh --bundle-only --gate`, dev-01, at `d67032e81`): rc 0. first-paint JS 232.585 KB (dev 232.518). Six lazy chunks moved by hashed-import jitter only, and their lines were raised to the measured size + 0.001 (attachments, lazy, ListSearch, panes, tables, tree-to); total = sum of lines (589.935). ### Real Safari, Tasks list-scroll frames (macos-01, Mac lock atomic, Safari and safaridriver quit by the EXIT trap; 1440×900; Anytime list of 160 tasks; 24 wheel steps over 3 s; dev vs the fix `bcf87420c` web build (same properties as head); ABAB, 8 runs per arm, two sessions) | session | arm | idle median worst | scroll median worst / max | frames > 33 ms | frames ≥ 50 ms | mean frame | glass runs per scroll | |---|---|---|---|---|---|---|---| | 1 | dev | 24 | 35 / 646 | 6 | 4 | 17.41 | 4 | | 1 | fix | 24 | 25 / 51 | 1 | 1 | 16.68 | 4 | | 2 | dev | 23 | 26 / 42 | 2 | 0 | 16.69 | 4 | | 2 | fix | 23.5 | 24 / 80 | 1 | 1 | 16.70 | 4 | Pooled over both sessions: frames ≥ 50 ms, dev 4 and fix 2, each a single frame in one run. The blank page before each session also showed a 98 ms and a 121 ms frame with no app at all, so that is this VM's noise floor. No ≥ 50 ms frame repeated in the same place. ### Perf gate Ticket `tf1b` on perf-01: pooled ABAB ×3, Notes typing + list and Tasks list/card/typing, with dev / dev2 (control) / head `b3fcc4ce5` web build (the same web code as `d67032e81`). My first turn (06:15 IST) failed before measuring: every arm, dev included, timed out waiting for the Notes list. The Tasks fixture I had seeded on dev-01 does not load its Notes list on perf-01. Locks were released at once. Requeued: the Tasks fixture is now seeded inside the turn from perf-01's own Notes fixture with perf-01's own server binary, and the turn stops early if the Notes harness fails. Results will follow in the next comment.
Author
Owner

Evidence 9: perf gate passes. Tasks list scroll is now below dev (perf-01, pooled ABAB ×3, head d67032e81)

PERF_TURN_FRONT=1 ~/bin/perf-turn tf1b on perf-01 (orchestrator's OK). perf-02's lock was held by a systemd-run unit for the whole turn (07:15–08:02 IST) and released at the end. Arms: dev = origin/dev 42c219afd; dev2 = the same dev build (the control); new = this PR's web build at b3fcc4ce5 (d67032e81 only adds budget lines). One server binary serves every arm. The Tasks fixture was seeded inside the turn from perf-01's own Notes fixture (40 notes in the list, plus 160 undated tasks). Chromium headless 1440×900, 4× CPU throttle, CDP ThreadTime. 3 sessions × 4 runs per arm, every run as a ratio to its session's dev mean.

Notes (typing + list scroll), 12 runs per arm

metric dev (abs) dev2 control this PR vs dev upper 95% CI
typing CPU per key 66.5 ms +0.03% +0.06% +0.22%
typing script per key 12.7 ms +0.19% +0.13% +0.79%
list-scroll CPU 2755.5 ms +0.09% +0.08% +0.21%
list-scroll script 263.6 ms +2.47% +1.27% +3.25%
list-scroll layout 65.6 ms +1.99% -1.69% -0.59%
list-scroll recalc style 99.6 ms +3.00% +1.01% +3.64%

Tasks, 12 runs per arm

metric dev (abs) dev2 control this PR vs dev upper 95% CI
Tasks list-scroll CPU 5788.2 ms +0.35% -2.69% -1.49%
Tasks list-scroll script 2217.6 ms +0.72% -41.09% -39.12%
Tasks list-scroll recalc style 114.4 ms +1.99% +2.34% +8.47%
card open+close CPU (steady) 3684.7 ms -5.21% -1.16% +1.82%
card open+close script 1365.7 ms -6.86% +0.56% +4.71%
first card open CPU (lazy chunks) 1448.7 ms -4.06% -0.54% +1.34%
typing in Notes after a Tasks visit, CPU/key 66.6 ms +0.53% +0.19% +1.13%
typing script/key 12.8 ms +0.40% +0.24% +1.04%

Verdict: Tasks list-scroll CPU is −2.7% against dev; the whole 95% CI is below dev (upper bound −1.5%), with the control at +0.35%. Before the fix it was +4.61%. Script is −41%. Notes typing and list stay flat: every Notes number is inside the control's own spread, and the upper CIs of the CPU metrics are +0.22% and +0.21%. The card and typing-after-Tasks paths are inside the control too (the card's dev2 control is −5%, which is wider than any difference here). Tasks list recalc style is +2.3% against a +2.0% control. It comes from more of the now-cheap scroll-end recomputes fitting into the scroll (the dev-01 counts in Evidence 8). It is time inside the CPU total, which went down.

Notes on method: the first turn (06:15 IST) failed before measuring because the Notes list in the fixture I had seeded on dev-01 never loaded on perf-01. The fixture is now seeded inside the turn on perf-01, and the turn stops early if the Notes harness fails. The --layout inert comparator table does not apply here: the Notes Float pooled harness is the gate for these metrics (preamble).

The sidebar title (15 vs 22 px) and width (228 vs 260) keep Notes' shipped values: one sidebar across apps, as the brief says. The orchestrator will raise it with kayg. Slice 2 is not started.

## Evidence 9: perf gate passes. Tasks list scroll is now below dev (perf-01, pooled ABAB ×3, head `d67032e81`) `PERF_TURN_FRONT=1 ~/bin/perf-turn tf1b` on perf-01 (orchestrator's OK). perf-02's lock was held by a `systemd-run` unit for the whole turn (07:15–08:02 IST) and released at the end. Arms: dev = origin/dev 42c219afd; dev2 = the same dev build (the control); new = this PR's web build at `b3fcc4ce5` (`d67032e81` only adds budget lines). One server binary serves every arm. The Tasks fixture was seeded inside the turn from perf-01's own Notes fixture (40 notes in the list, plus 160 undated tasks). Chromium headless 1440×900, 4× CPU throttle, CDP `ThreadTime`. 3 sessions × 4 runs per arm, every run as a ratio to its session's dev mean. **Notes (typing + list scroll)**, 12 runs per arm | metric | dev (abs) | dev2 control | this PR vs dev | upper 95% CI | |---|---|---|---|---| | typing CPU per key | 66.5 ms | +0.03% | +0.06% | +0.22% | | typing script per key | 12.7 ms | +0.19% | +0.13% | +0.79% | | list-scroll CPU | 2755.5 ms | +0.09% | +0.08% | +0.21% | | list-scroll script | 263.6 ms | +2.47% | +1.27% | +3.25% | | list-scroll layout | 65.6 ms | +1.99% | -1.69% | -0.59% | | list-scroll recalc style | 99.6 ms | +3.00% | +1.01% | +3.64% | **Tasks**, 12 runs per arm | metric | dev (abs) | dev2 control | this PR vs dev | upper 95% CI | |---|---|---|---|---| | **Tasks list-scroll CPU** | 5788.2 ms | +0.35% | **-2.69%** | **-1.49%** | | **Tasks list-scroll script** | 2217.6 ms | +0.72% | **-41.09%** | -39.12% | | Tasks list-scroll recalc style | 114.4 ms | +1.99% | +2.34% | +8.47% | | card open+close CPU (steady) | 3684.7 ms | -5.21% | -1.16% | +1.82% | | card open+close script | 1365.7 ms | -6.86% | +0.56% | +4.71% | | first card open CPU (lazy chunks) | 1448.7 ms | -4.06% | -0.54% | +1.34% | | typing in Notes after a Tasks visit, CPU/key | 66.6 ms | +0.53% | +0.19% | +1.13% | | typing script/key | 12.8 ms | +0.40% | +0.24% | +1.04% | **Verdict:** Tasks list-scroll CPU is −2.7% against dev; the whole 95% CI is below dev (upper bound −1.5%), with the control at +0.35%. Before the fix it was +4.61%. Script is −41%. Notes typing and list stay flat: every Notes number is inside the control's own spread, and the upper CIs of the CPU metrics are +0.22% and +0.21%. The card and typing-after-Tasks paths are inside the control too (the card's dev2 control is −5%, which is wider than any difference here). Tasks list recalc style is +2.3% against a +2.0% control. It comes from more of the now-cheap scroll-end recomputes fitting into the scroll (the dev-01 counts in Evidence 8). It is time inside the CPU total, which went down. Notes on method: the first turn (06:15 IST) failed before measuring because the Notes list in the fixture I had seeded on dev-01 never loaded on perf-01. The fixture is now seeded inside the turn on perf-01, and the turn stops early if the Notes harness fails. The `--layout inert` comparator table does not apply here: the Notes Float pooled harness is the gate for these metrics (preamble). The sidebar title (15 vs 22 px) and width (228 vs 260) keep Notes' shipped values: one sidebar across apps, as the brief says. The orchestrator will raise it with kayg. Slice 2 is not started.
Author
Owner

Merged into dev with --no-ff at ea57b84b9 (orchestrator, 16 Nov ~08:15 IST). I checked the product-vs-mockup shots myself. The perf gate passes after the behind-glass fix (Tasks list scroll −2.69% CPU vs dev, control +0.35%; Notes typing/list flat). Slice 2 follows.

Merged into dev with `--no-ff` at `ea57b84b9` (orchestrator, 16 Nov ~08:15 IST). I checked the product-vs-mockup shots myself. The perf gate passes after the behind-glass fix (Tasks list scroll −2.69% CPU vs dev, control +0.35%; Notes typing/list flat). Slice 2 follows.
kayg closed this pull request 2026-11-16 02:34:45 +00:00
Some checks failed
CI / server (pull_request) Has been cancelled
CI / web (pull_request) Has been cancelled
Markdown extraction contract / markdown-native-contract (pull_request) Has been cancelled
Markdown extraction contract / markdown-editor-contract (pull_request) Has been cancelled
CI / rust (pull_request) Has been cancelled

Pull request closed

Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
kayg/calternal!1161
No description provided.