port: Notes Float shell (approved mockup) #1093

Closed
kayg wants to merge 0 commits from port/notes-float-1a into port/notes-float
Owner

Slice 1a of #1088 (plan: docs/plans/notes-float-port.md, #1089), stacked on nothing: based on dev be968d9df (slice 0, #1090, merged). Notes only; other apps and the phone are unchanged.

What it is. The Notes window from the approved mockup (review/calendar-2, WindowLayout): a flat sidebar on a blurred, theme-tinted global layer; one borderless rounded window showing the sharp backdrop, lifted by an outward shadow; the note list as a card; the page beside it with its own frame; one title line shared by the sidebar title, the toggle and the list header; the sidebar toggle that belongs to the sidebar while it is open and to the list card once it is closed; hover handles (double-click resets, widths remembered); zen replacing Focus (Esc, ⌘., a pointer-only "Leave zen mode" pill). Mockup values win (--win-gap 12, --win-margin 5, --r-wcard 20, --r-win 32, shadows).

Per the scope decision (kayg 11-12): no AI area, no ✦ button, no ⌘J, no tab strip, no dock/switcher (slice 1b), no Collections. The sidebar keeps today's places and the list keeps today's NoteList, inside the new window.

Replaced, not kept: Shell.svelte's grid and glass panes, the .pane / .resizer / .side-pane / .list-pane CSS. Sidebar.svelte loses its own collapse button (the window's toggle replaces it) and its "Calternal" wordmark (the title is the app name, as on the phone).

Measured in real Safari while building this, and built in (details on #1088): the editor keeps ONE size and ONE place however the window changes and draws only what is right of --cl (a spring on the page card's own width re-laid it out every frame: zen 76 ms against 37); no inherited registered custom property (it re-styled the whole document every frame); no root attribute writes; zen keeps its pills mounted (mounting them in the gesture's frame cost 30 ms).

Evidence (shots, frame tables, CPU ABAB, gate tables, bundle) is posted as comments below, never in the repo.

🤖 Generated with Claude Code

Slice 1a of #1088 (plan: `docs/plans/notes-float-port.md`, #1089), stacked on nothing: based on dev `be968d9df` (slice 0, #1090, merged). Notes only; other apps and the phone are unchanged. **What it is.** The Notes window from the approved mockup (`review/calendar-2`, `WindowLayout`): a flat sidebar on a blurred, theme-tinted global layer; one borderless rounded window showing the sharp backdrop, lifted by an outward shadow; the note list as a card; the page beside it with its own frame; one title line shared by the sidebar title, the toggle and the list header; the sidebar toggle that belongs to the sidebar while it is open and to the list card once it is closed; hover handles (double-click resets, widths remembered); zen replacing Focus (Esc, ⌘., a pointer-only "Leave zen mode" pill). Mockup values win (`--win-gap` 12, `--win-margin` 5, `--r-wcard` 20, `--r-win` 32, shadows). **Per the scope decision (kayg 11-12): no AI area, no ✦ button, no ⌘J, no tab strip, no dock/switcher (slice 1b), no Collections.** The sidebar keeps today's places and the list keeps today's `NoteList`, inside the new window. **Replaced, not kept:** `Shell.svelte`'s grid and glass panes, the `.pane` / `.resizer` / `.side-pane` / `.list-pane` CSS. `Sidebar.svelte` loses its own collapse button (the window's toggle replaces it) and its "Calternal" wordmark (the title is the app name, as on the phone). **Measured in real Safari while building this, and built in** (details on #1088): the editor keeps ONE size and ONE place however the window changes and draws only what is right of `--cl` (a spring on the page card's own width re-laid it out every frame: zen 76 ms against 37); no inherited registered custom property (it re-styled the whole document every frame); no root attribute writes; zen keeps its pills mounted (mounting them in the gesture's frame cost 30 ms). Evidence (shots, frame tables, CPU ABAB, gate tables, bundle) is posted as comments below, never in the repo. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
kayg added 21 commits 2026-11-12 13:04:08 +00:00
Replaces Shell's grid and glass panes with components/window/WindowLayout; Backdrop gets a follower
mode for the second picture; tokens for the window; sidebar title row is the one title line.

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>
A spring on the page card's own width re-laid the editor out every frame: zen cost 76 ms in
real Safari against 37 on dev. --f-l is a registered property so the window edge, the list card
and the clip spring as one value.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
--f-l as a registered, inherited property re-styled the whole document every spring frame.
The window edge, its shadow and the handle move by left; the page's clip by --cl; one spring.

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>
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>
web: the phone's places screen keeps the padding its own rules set (my .sidebar.phone padding outranked them)
Some checks failed
CI / server (pull_request) Has been cancelled
CI / rust (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
b9a319721a
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
kayg changed target branch from dev to port/notes-float 2026-11-12 14:33:14 +00:00
Author
Owner

Slice 1a evidence at head 6ab3c9e4c (Notes only; phone and other apps unchanged)

Pairs, product vs mockup, Chromium, same browser (attached): product-1440-light/dark, mockup-1440-light/dark, product-390-light/dark, mockup-390-light/dark. The 390 pairs differ by design: the phone keeps its stack until slice 8, so 1a changes nothing there (the 390 product shots are today's phone screens). At 1440 the structure matches the mockup (flat sidebar on the blurred, tinted global layer; one rounded window with the sharp backdrop and the outward lift; one title line; the toggle at the sidebar's trailing end). Differences that are NOT in this slice, by plan: the tabs pill and the section tree (3b), the dock and switcher (1b), the reading-width page card and the theme gradient (4), the ✦ button and the AI area (not until the AI app lands).

Real Safari (Mac VM, safaridriver, 1440, light and dark, dev vs 1a: safari-*, attached): the blur is judged here only.

Real-Safari frames, one session, ABAB, 8 per build, blank page first at 60 rAF/s (median of each run's worst frame, ms; idle = the same time with no input):

gesture dev 1a note
idle floor 24 24 same
open another note 53 49 to 59 parity
list scroll (wheel) 25 25 no frame over 34 ms on either
sidebar hide 52 to 76 45 to 83 at or under dev in the quiet runs
sidebar show 43 to 63 40 to 66 parity
zen in 28 to 45 36 (best variant) to 83 at parity only in the best variant
zen out 30 to 64 63 to 84 about 20 to 30 ms over dev, open

The host was quiet for the first runs and noisier for the latest (dev's own toggles read 62 to 76 ms there), so read the ranges as that, not as precision. Zen is a known regression and I am reporting it as one: six variants were tried and measured (list card hidden by fade, opacity, translate, visibility; delayed return; pills kept mounted, off-screen, inert) and none brings zen-out to dev's level. Chromium shows the same layout and style-recalc work in both builds, so it is WebKit paint or compositing that I cannot see without Web Inspector. Per the orchestrator: tolerable to report now, fix before the final merge.

Gates

  • svelte-check: 0 errors (19 warnings, same as dev).
  • Targeted specs on the final head (the slice's own plus everything it touches, 18 files), 0 failed: chromium-1440 95 passed, chromium-390 132, webkit-1440 94, webkit-390 131.
  • Full WebKit suites on b9a319721 (one commit earlier): webkit-1440 608 passed, webkit-390 1043 passed, 0 failed. The full suite is not run again per slice (kayg, 11-12); it runs once on the integration branch.
  • Bundle (vite build, bundle-size.mjs; first paint, brotli): JS 229,111 to 229,898 B (+787), CSS 18,922 to 19,673 B (+751). Budgets 240 / 22.1 KB: inside. Total JS brotli +694 B.
  • CI checks: layers, cycles, no-evidence, case-paths clean. Size ceilings: Backdrop.svelte kept inside its ceiling by moving the sky's root variables to lib/sky-root-vars.ts; Sidebar.svelte (528, was 530 on dev) and NoteList.svelte are already over on dev.

Bugs found and fixed on the way: (1) the editor re-laid out every frame while the page card's width sprang (zen 76 ms vs 37): the page area now keeps one size and place and is clipped by --cl, as the old Shell did; (2) an inherited registered custom property re-styled the whole document every frame: removed; (3) a phone regression I introduced (my .sidebar.phone padding outranked the phone's own rule): fixed, matches dev; (4) specs assuming one .backdrop now address the primary (data-follower); (5) the glass spec allows the window's clip-path as the one backdrop root of its own cards; (6) hover handles fade only for the pointer (keys-no-motion).

Perf (CPU ABAB on perf-01, Chromium, 4x throttle, 3000-note Home, 8 runs per build): see the next comment.

## Slice 1a evidence at head 6ab3c9e4c (Notes only; phone and other apps unchanged) **Pairs, product vs mockup, Chromium, same browser** (attached): `product-1440-light/dark`, `mockup-1440-light/dark`, `product-390-light/dark`, `mockup-390-light/dark`. The 390 pairs differ by design: the phone keeps its stack until slice 8, so 1a changes nothing there (the 390 product shots are today's phone screens). At 1440 the structure matches the mockup (flat sidebar on the blurred, tinted global layer; one rounded window with the sharp backdrop and the outward lift; one title line; the toggle at the sidebar's trailing end). Differences that are NOT in this slice, by plan: the tabs pill and the section tree (3b), the dock and switcher (1b), the reading-width page card and the theme gradient (4), the ✦ button and the AI area (not until the AI app lands). **Real Safari** (Mac VM, safaridriver, 1440, light and dark, dev vs 1a: `safari-*`, attached): the blur is judged here only. **Real-Safari frames, one session, ABAB, 8 per build, blank page first at 60 rAF/s** (median of each run's worst frame, ms; idle = the same time with no input): | gesture | dev | 1a | note | |---|---|---|---| | idle floor | 24 | 24 | same | | open another note | 53 | 49 to 59 | parity | | list scroll (wheel) | 25 | 25 | no frame over 34 ms on either | | sidebar hide | 52 to 76 | 45 to 83 | at or under dev in the quiet runs | | sidebar show | 43 to 63 | 40 to 66 | parity | | zen in | 28 to 45 | 36 (best variant) to 83 | **at parity only in the best variant** | | zen out | 30 to 64 | 63 to 84 | **about 20 to 30 ms over dev, open** | The host was quiet for the first runs and noisier for the latest (dev's own toggles read 62 to 76 ms there), so read the ranges as that, not as precision. **Zen is a known regression** and I am reporting it as one: six variants were tried and measured (list card hidden by fade, opacity, translate, visibility; delayed return; pills kept mounted, off-screen, inert) and none brings zen-out to dev's level. Chromium shows the same layout and style-recalc work in both builds, so it is WebKit paint or compositing that I cannot see without Web Inspector. Per the orchestrator: tolerable to report now, fix before the final merge. **Gates** - svelte-check: 0 errors (19 warnings, same as dev). - Targeted specs on the final head (the slice's own plus everything it touches, 18 files), 0 failed: chromium-1440 95 passed, chromium-390 132, webkit-1440 94, webkit-390 131. - Full WebKit suites on b9a319721 (one commit earlier): webkit-1440 608 passed, webkit-390 1043 passed, 0 failed. The full suite is not run again per slice (kayg, 11-12); it runs once on the integration branch. - Bundle (vite build, bundle-size.mjs; first paint, brotli): JS 229,111 to 229,898 B (+787), CSS 18,922 to 19,673 B (+751). Budgets 240 / 22.1 KB: inside. Total JS brotli +694 B. - CI checks: layers, cycles, no-evidence, case-paths clean. Size ceilings: Backdrop.svelte kept inside its ceiling by moving the sky's root variables to `lib/sky-root-vars.ts`; `Sidebar.svelte` (528, was 530 on dev) and `NoteList.svelte` are already over on dev. **Bugs found and fixed on the way:** (1) the editor re-laid out every frame while the page card's width sprang (zen 76 ms vs 37): the page area now keeps one size and place and is clipped by `--cl`, as the old Shell did; (2) an inherited registered custom property re-styled the whole document every frame: removed; (3) a phone regression I introduced (my `.sidebar.phone` padding outranked the phone's own rule): fixed, matches dev; (4) specs assuming one `.backdrop` now address the primary (`data-follower`); (5) the glass spec allows the window's clip-path as the one backdrop root of its own cards; (6) hover handles fade only for the pointer (keys-no-motion). **Perf (CPU ABAB on perf-01, Chromium, 4x throttle, 3000-note Home, 8 runs per build):** see the next comment.
Author
Owner

Slice 1a: CPU ABAB on perf-01 (Chromium headless, software rendering, 4x CPU throttle, 3000-note fixture Home), and what it found

Driver: CDP ThreadTime main-thread CPU, Emulation.setCPUThrottlingRate 4, both perf locks held through ~/bin/perf-turn, one session, 16 samples (8 per build, dev/1a/1a/dev order), each on a fresh copy of the same Home and its own server. Typing: 216 real keys at 60 ms. List: the same 40 wheel steps down and up. Frames and paint are NOT measured here (no GPU); frames are on the Mac VM, above.

run build typing CPU ms/key (dev to 1a) typing script list-scroll CPU ms (dev to 1a)
1 e5647b635, live filter: blur() global layer 60.04 to 60.15 (+0.2 %) 7.67 to 7.33 3249 to 7777 (+139 %)
2 b76a037a2, global layer baked 60.38 to 62.36 (+3.3 %) 7.77 to 8.42 3348 to 3474 (+3.8 %)
3 c09ee1312, + frost follower builds no live picture 59.77 to 61.61 (+3.1 %) 7.45 to 8.07 (+8 %) 3259 to 3408 (+4.6 %)

The 2.4x list-scroll regression was real and is fixed. Bisected on dev-01 (injecting CSS, same scroll, ABAB; n = 2 to 3 passes each): hiding the window clip-path, the cards' glass, the shadow, the sidebar, un-rounding or promoting the card did nothing; hiding the two backdrop followers brought it back to dev (about 9 s vs 18 s on that host); within them it was only the global layer, and only its live filter: blur(32px) (smaller radius did not help: it is a per-frame redraw). Fix: the global layer now shows the picture BAKED blurred once, using the baked copy the phone's frosted screens already make (Backdrop frost), an ordinary image. Real Safari list scroll: worst frame 25 ms on both builds.

Open, reported as they are: after the fix the CPU is still about +3 to 5 % over dev on this synthetic metric, in both typing (script time +8 %, about 0.6 ms of JS per key at 4x) and list scroll, with non-overlapping ranges on perf-01 (typing 1a [61.3 to 62.9] vs dev [59.3 to 61.1]). I could not attribute it: removing the global layer, the sharp copy, both, or the shadow from the DOM (dev-01, n = 4 each) moves typing by less than the host's noise (about +/-2 ms), and Chromium's layout and style-recalc counters match dev. It is not the editor path (the page area is unchanged and clipped by --cl as before). Candidates left: the extra work the two follower Backdrop components do (their effects and observers), and two more Pill mounts. I am not going to guess further without a CPU profile; this needs one before the final merge to dev.

The other open item for the final merge is the zen-out frame cost (see the evidence comment above).

## Slice 1a: CPU ABAB on perf-01 (Chromium headless, software rendering, 4x CPU throttle, 3000-note fixture Home), and what it found Driver: CDP `ThreadTime` main-thread CPU, `Emulation.setCPUThrottlingRate 4`, both perf locks held through `~/bin/perf-turn`, one session, 16 samples (8 per build, dev/1a/1a/dev order), each on a fresh copy of the same Home and its own server. Typing: 216 real keys at 60 ms. List: the same 40 wheel steps down and up. Frames and paint are NOT measured here (no GPU); frames are on the Mac VM, above. | run | build | typing CPU ms/key (dev to 1a) | typing script | list-scroll CPU ms (dev to 1a) | |---|---|---|---|---| | 1 | e5647b635, live `filter: blur()` global layer | 60.04 to 60.15 (+0.2 %) | 7.67 to 7.33 | **3249 to 7777 (+139 %)** | | 2 | b76a037a2, global layer baked | 60.38 to 62.36 (+3.3 %) | 7.77 to 8.42 | 3348 to 3474 (+3.8 %) | | 3 | c09ee1312, + frost follower builds no live picture | 59.77 to 61.61 (+3.1 %) | 7.45 to 8.07 (+8 %) | 3259 to 3408 (+4.6 %) | **The 2.4x list-scroll regression was real and is fixed.** Bisected on dev-01 (injecting CSS, same scroll, ABAB; n = 2 to 3 passes each): hiding the window clip-path, the cards' glass, the shadow, the sidebar, un-rounding or promoting the card did nothing; hiding the two backdrop followers brought it back to dev (about 9 s vs 18 s on that host); within them it was only the global layer, and only its live `filter: blur(32px)` (smaller radius did not help: it is a per-frame redraw). Fix: the global layer now shows the picture BAKED blurred once, using the baked copy the phone's frosted screens already make (`Backdrop` `frost`), an ordinary image. Real Safari list scroll: worst frame 25 ms on both builds. **Open, reported as they are:** after the fix the CPU is still about +3 to 5 % over dev on this synthetic metric, in both typing (script time +8 %, about 0.6 ms of JS per key at 4x) and list scroll, with non-overlapping ranges on perf-01 (typing 1a [61.3 to 62.9] vs dev [59.3 to 61.1]). I could not attribute it: removing the global layer, the sharp copy, both, or the shadow from the DOM (dev-01, n = 4 each) moves typing by less than the host's noise (about +/-2 ms), and Chromium's layout and style-recalc counters match dev. It is not the editor path (the page area is unchanged and clipped by --cl as before). Candidates left: the extra work the two follower `Backdrop` components do (their effects and observers), and two more `Pill` mounts. I am not going to guess further without a CPU profile; this needs one before the final merge to dev. The other open item for the final merge is the zen-out frame cost (see the evidence comment above).
kayg changed title from WIP: port: Notes Float shell (approved mockup) to port: Notes Float shell (approved mockup) 2026-11-12 18:15:50 +00:00
Author
Owner

Merged into port/notes-float (a --no-ff git merge, by the captain) and contained in the integration head e3bc2040c. Closing this PR; slice 1a ships with the final merge of port/notes-float into dev. Open perf items are tracked on #1088.

Merged into `port/notes-float` (a --no-ff git merge, by the captain) and contained in the integration head `e3bc2040c`. Closing this PR; slice 1a ships with the final merge of `port/notes-float` into dev. Open perf items are tracked on #1088.
kayg closed this pull request 2026-11-13 01:46:36 +00:00
Some checks failed
CI / server (pull_request) Has been cancelled
CI / rust (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

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!1093
No description provided.