BM15 readiness #947

Open
opened 2026-11-04 23:36:55 +00:00 by kayg · 38 comments
Owner

Update 11-05 (first-paint diet): merged BM15 = −300 B JS and −232 B CSS vs dev (hash-normalised −631 B JS). Table and details: #947 (comment). The table below is the state before the diet, kept for history; the heads, first-paint numbers and "ready" column in the comment replace it.

BM15 carries approved UI to prod after BM14e (#914, head 1aed57bc) lands. Gates ran on dev-01 (Nix shell, everything through ~/bin/slot, CI=1 --workers=1 --retries=0; Chromium and WebKit, 1440 and 390, all four chromium-1440/390 + webkit-1440/390 projects, because dev-02 was held by the BM14e-fix train the whole time). Baseline = dev 41f2efa3 (BM13, what prod runs). origin/dev is 9377d711 (docs only on top of it).

Merge order and readiness

First-paint bytes are brotli q11 from apps/web/scripts/bundle-size.mjs (JS of the first-paint closure / CSS), delta vs dev 41f2efa3 = 238,797 B JS + 19,250 B CSS. "Lazy" = growth of all other chunks.

# PR head own gates (all on this head unless noted) first paint JS / CSS vs dev ready what is missing
1 #887 Archive/Hide server 47457c52 fmt ✓, build ✓, clippy --workspace --all-targets --locked ✓, cargo test --workspace --locked --no-fail-fast ✓ (0 failed); web: lint ✓, svelte-check = dev baseline (2 errors, below), editor 511 / primitives 55 / web 103 tests ✓, bundle gate ✓. No spec of its own (its UI specs are #877/#878/#904) +333 B / 0 real, −151 B hash-normalised (lazy +488 B) yes One trivial conflict with BM14e: crates/notes/src/write_executor/plan.rs (keep BM14e's ExpectedOwners variant). Perf-VM evidence stops at 9c8789e7 (list first page flat); later b4e87385 and 451ea80b have no perf-VM verdict yet.
2 #909 sharing hardening 98afda51 Gated on BM14e 1aed57bc + this head (merge 922415f1, it has no meaning on dev alone): fmt ✓, build ✓, clippy ✓, cargo test --workspace --locked ✓. Author's perf-VM verdict: flat none (no web files) yes Merges clean into BM14e. Needs BM14e in dev first (its base is #829/#835).
3 #926 top pills while typing d52759dc lint ✓, check = baseline, editor/primitives/web ✓, note-pills.spec 10 passed (4 projects), bundle gate ✓ +350 B / −12 B real, +24 B normalised yes Merges clean into BM14e.
4 #875 rows 1/3 (press engine) 302d92ac all web gates ✓; press.spec 18 passed / 14 skipped (4 projects); bundle gate ✓ after I added the missing press chunk budget (3.4 KB, total 407.6) −2,051 B / −271 B with #887 (this slice −2,384 B over #887; lazy +13.9 KB); normalised −2,523 B yes (the offset for the rest) Rebased onto #887 head (was on a 255-commit-old base). Forgejo's +19.8k/−70k counter is stale; local three-dot diff vs #887 is +2,461/−74. Needs #887.
5 #877 rows 2/3 (Archive/Hide UI, bulk Move) 71ed79ac web gates ✓ except one spec: bulk-tag.spec fails on chromium-1440: 3/10 and 7/10 in two --repeat-each=10 runs on this head, and 4/10 on the pre-restack head da8c7bb0, so it is not caused by my rebase. WebKit and the 390 project pass. Other specs (press, visibility) ✓ −1,731 B / −270 B (+320 B / +1 B over #875); normalised −1,755 B yes (bulk-tag passed on its first run, 4 projects; the ×10 repeat not re-run) Fix the Move menu race. The menu decides add-or-remove from the store (bulk-note.ts move, every) at menu-open time. A fast second click sees stale tags and the toast says "They already have #tag", so the third Move adds instead of removing. Either read fresh state or make the spec wait until the row shows the new tags before the next Move.
6 #878 rows 3/3 (drop on tags, hide places, Empty Trash) ed8e3ff2 web gates ✓, sidebar-drop.spec 6 passed (4 projects), bundle gate ✓ (press budget tightened to 2.1 KB, total 406.3) −1,252 B / −221 B (+479 B / +49 B over #877); normalised −1,448 B yes (after #877) Biggest first-paint growth in BM15 (index is 244,377 B, still under the 240 KiB gate). The 179-line slice adds 2.4 KB to first paint: something that should be lazy is in index. Needs a diet before it ships.
7 #904 hidden blocks 7443f392 lint ✓, check = baseline, editor 520 tests ✓, hidden-blocks.spec 16 passed, bundle gate ✓ +594 B / 0 real (+261 B over #887); normalised +538 B (+689 B over #887); lazy +2.7 KB yes Base retargeted to notes-archive-hide: now +667/−3. Conflicts with BM14e: Tools.svelte, composer/commands.ts, perf/budgets.json (budgets: recompute the total as the sum of chunk lines).
8 #903 code block languages 4c4cdda1 lint ✓, check = baseline after my fix (it had +1 error: Lang was imported from the editor root, now @calternal/editor/code), code-block.spec 28 passed, bundle gate ✓. Editor unit: tree-cost and refusal-performance are wall-clock tests that also fail on dev under load (base 1/4, this head 2/4 full-suite runs; refusal-performance alone 5/5 ✓ on both), not blocking +320 B / 0 real, +126 B normalised (lazy +83 KB JS in code-* chunks) yes Conflicts with BM14e: Editor.svelte, vite.config.ts, packages/editor/package.json, perf/budgets.json.
9 #832 Tasks lists baeb845d lint ✓, check = baseline, units ✓ (quiet), Tasks specs 54 passed (4 projects), bundle gate ✓ after I added the missing TasksScreen (5.1 KB) and dates (0.55 KB) budgets, total 409.85 +505 B / 0 real, +276 B normalised (lazy +5.5 KB JS, +2 KB CSS) yes Conflict with BM14e: scripts/lazy-ui-plugin.ts (the lazy import count; contacts bumps it too, so recount when both land).
10 #841 Contacts list d36491eb I rebased it onto dev (it sat 255 commits behind and conflicted on App.svelte, lazy-ui-plugin.ts, bundle-size.mjs). lint ✓, check = baseline, units ✓, contacts-list.spec 16 passed, bundle gate ✓ +355 B / 0 real, +234 B normalised (lazy +5.5 KB JS, +2.2 KB CSS) yes Conflicts with BM14e: lazy-ui-plugin.ts, App.svelte, lib/apps.ts, lib/lazy-ui.svelte.ts. Its old contacts bundle counter is dropped in favour of dev's generic chunk accounting.
11 #843 Contacts card a80a3bb0 rebased onto #841; units ✓, contacts-card + contacts-list 46 passed, bundle gate ✓ +408 B / 0 real, +234 B normalised (+53 B real, 0 normalised over #841; lazy +17.5 KB JS, +3.7 KB CSS) yes Merges clean after #841.

Left out: #694 (already on dev as 6e5f99de; the rebase hits add/add conflicts on TrashPreview.svelte and trash-search.spec.ts because dev has the finished version; close it). #902 Devices (+0.137 KB): BM14e's own first-paint offset is only −629 B (JS −377, CSS −252 vs dev), and BM15 above is already +7.3 KB, so nothing covers it.

First-paint ledger

  • BM14e offset vs dev: −629 B (first JS 238,420, CSS 18,998, from the #914 comments).
  • (before the diet) BM15 if everything above shipped: roughly +7.3 KB over dev (#887 +479, rows stack from #887 +5,101, #904 +234, #903 +320, #926 +86, #832 +505, contacts +408).
  • Under the "no perf regression, even within budget" rule only #926, #903 and the contacts pair are small enough to argue for; #875 to #878 need a diet (the heaviest is #878's +2.4 KB).

Baseline notes (so nobody chases them)

  • bun run --cwd apps/web check fails on dev itself: 2 errors in e2e/review4-signout.spec.ts (logoutStatus typed never), and src/lib/actions.gen.ts is stale against contracts/actions.json (sharing actions). All rows say "= baseline" when they show exactly those 2 errors. BM14e regenerates the file. For the byte numbers I measured the files as committed (not regenerated).
  • Wall-clock editor tests (refusal-performance, tree-cost, link-rank) fail under load on dev too; they passed on quiet reruns of every PR except as noted for #903.
  • A cargo test --workspace run stopped at auth::a_cold_valid_password_gets_through_a_concurrent_flood once under load average 25; the same run with --no-fail-fast on a quiet host passed fully.

What I changed on the branches (all pushed, force-with-lease)

  • Rows stack onto #887: port/rows (#875) = its 12 commits rebased onto 451ea80b; port/rows-actions (#877) = its own 12 commits (the old merge of #887 dropped) cherry-picked, one conflict in notes.svelte.ts imports (kept pendingReload from #887's new head plus the visibility views import); port/rows-drop (#878) = its 2 commits. Local diffs: #875 vs #887 +2,461/−74, #877 vs #875 +527/−20, #878 vs #877 +181/−11. Forgejo's counters for #875/#877/#878/#841/#843 still show the old -70k numbers; they lag.
  • #904: 14 commits cherry-picked onto 451ea80b, PR base set to notes-archive-hide (+667/−3). It merges cleanly with the rows stack.
  • Budgets: press (3.4 KB in #875, 2.1 KB in #878), TasksScreen and dates in #832; web.bundle.total_js_brotli raised by exactly the new chunk budgets, because the gate demands total = sum of chunk lines (404.2 → 407.6 → 406.3 for rows, 409.85 for tasks). These are new lines for chunks that had none, not loosened limits. At train time recompute the total as the sum.
  • #903: one-line type import fix (4c4cdda1).
  • #841/#843: rebased onto dev (conflicts resolved as described).
  • #694: not rebased (see above).

BM15 dry run on BM14e head 1aed57bc

Merging in the order above (taking "theirs" on a conflict only to see the next one): clean = #909, #926, #875, #877, #878, #843; conflicts as listed per row for #887, #904, #903, #832, #841. No two BM15 PRs conflict with each other except the shared lazy-import count and perf/budgets.json total lines.

Commands

~/bin/slot bun run --cwd apps/web lint; bun run --cwd packages/editor check && bun run --cwd apps/web check; bun run --cwd packages/editor test && bun run --cwd packages/ui test:primitives && bun run --cwd apps/web test; perf/web.sh --bundle-only --gate; node apps/web/scripts/bundle-size.mjs apps/web/dist --json; CI=1 CALTERNAL_BIN=<bin> bunx playwright test <specs> --project=chromium-1440 --project=chromium-390 --project=webkit-1440 --project=webkit-390 --workers=1 --retries=0; Rust: cargo fmt --all --check, cargo build -p calternal --locked, cargo clippy --workspace --all-targets --locked -j4, cargo test --workspace --locked --no-fail-fast -j4. Binaries: own build of #887 451ea80b (also used for #875-#904 specs), dev 41f2efa3 for the dev-based PRs.

Merge order

#887 → #909 → #926 → #875 → #877 (after its Move race is fixed) → #878 (after its first-paint diet) → #904 → #903 → #832 → #841 → #843. If #877/#878 are not fixed in time, BM15 ships without them and #904 still works (it only needs #887).

First-paint ledger (after the diet, 11-05)

  • Merged BM15 (simulation sim/bm15-first-paint a6a293e8): 238,497 B JS (−300 vs dev; −631 hash-normalised), 19,018 B CSS (−232). BM14e's own −629 B offset is not counted here (it is not in dev yet).
**Update 11-05 (first-paint diet): merged BM15 = −300 B JS and −232 B CSS vs dev (hash-normalised −631 B JS). Table and details: https://git.kayg.org/kayg/calternal/issues/947#issuecomment-79348. The table below is the state before the diet, kept for history; the heads, first-paint numbers and "ready" column in the comment replace it.** BM15 carries approved UI to prod after BM14e (#914, head `1aed57bc`) lands. Gates ran on dev-01 (Nix shell, everything through `~/bin/slot`, `CI=1 --workers=1 --retries=0`; Chromium **and** WebKit, 1440 and 390, all four `chromium-1440/390` + `webkit-1440/390` projects, because dev-02 was held by the BM14e-fix train the whole time). Baseline = dev `41f2efa3` (BM13, what prod runs). origin/dev is `9377d711` (docs only on top of it). ## Merge order and readiness First-paint bytes are brotli q11 from `apps/web/scripts/bundle-size.mjs` (JS of the first-paint closure / CSS), delta vs dev `41f2efa3` = **238,797 B JS + 19,250 B CSS**. "Lazy" = growth of all other chunks. | # | PR | head | own gates (all on this head unless noted) | first paint JS / CSS vs dev | ready | what is missing | |---|---|---|---|---|---|---| | 1 | #887 Archive/Hide server | `47457c52` | fmt ✓, build ✓, clippy `--workspace --all-targets --locked` ✓, `cargo test --workspace --locked --no-fail-fast` ✓ (0 failed); web: lint ✓, svelte-check = dev baseline (2 errors, below), editor 511 / primitives 55 / web 103 tests ✓, bundle gate ✓. No spec of its own (its UI specs are #877/#878/#904) | **+333 B / 0** real, **−151 B** hash-normalised (lazy +488 B) | **yes** | One trivial conflict with BM14e: `crates/notes/src/write_executor/plan.rs` (keep BM14e's `ExpectedOwners` variant). Perf-VM evidence stops at `9c8789e7` (list first page flat); later `b4e87385` and `451ea80b` have no perf-VM verdict yet. | | 2 | #909 sharing hardening | `98afda51` | Gated on BM14e `1aed57bc` + this head (merge `922415f1`, it has no meaning on dev alone): fmt ✓, build ✓, clippy ✓, `cargo test --workspace --locked` ✓. Author's perf-VM verdict: flat | none (no web files) | **yes** | Merges clean into BM14e. Needs BM14e in dev first (its base is #829/#835). | | 3 | #926 top pills while typing | `d52759dc` | lint ✓, check = baseline, editor/primitives/web ✓, `note-pills.spec` 10 passed (4 projects), bundle gate ✓ | **+350 B / −12 B** real, **+24 B** normalised | **yes** | Merges clean into BM14e. | | 4 | #875 rows 1/3 (press engine) | `302d92ac` | all web gates ✓; `press.spec` 18 passed / 14 skipped (4 projects); bundle gate ✓ after I added the missing `press` chunk budget (3.4 KB, total 407.6) | **−2,051 B / −271 B** with #887 (this slice −2,384 B over #887; lazy +13.9 KB); normalised −2,523 B | **yes** (the offset for the rest) | Rebased onto #887 head (was on a 255-commit-old base). Forgejo's `+19.8k/−70k` counter is stale; local three-dot diff vs #887 is +2,461/−74. Needs #887. | | 5 | #877 rows 2/3 (Archive/Hide UI, bulk Move) | `71ed79ac` | web gates ✓ except one spec: **`bulk-tag.spec` fails on `chromium-1440`: 3/10 and 7/10 in two `--repeat-each=10` runs on this head, and 4/10 on the pre-restack head `da8c7bb0`**, so it is not caused by my rebase. WebKit and the 390 project pass. Other specs (`press`, `visibility`) ✓ | **−1,731 B / −270 B** (+320 B / +1 B over #875); normalised −1,755 B | **yes** (`bulk-tag` passed on its first run, 4 projects; the ×10 repeat not re-run) | Fix the Move menu race. The menu decides add-or-remove from the store (`bulk-note.ts` `move`, `every`) at menu-open time. A fast second click sees stale tags and the toast says "They already have #tag", so the third Move adds instead of removing. Either read fresh state or make the spec wait until the row shows the new tags before the next Move. | | 6 | #878 rows 3/3 (drop on tags, hide places, Empty Trash) | `ed8e3ff2` | web gates ✓, `sidebar-drop.spec` 6 passed (4 projects), bundle gate ✓ (press budget tightened to 2.1 KB, total 406.3) | **−1,252 B / −221 B** (+479 B / +49 B over #877); normalised −1,448 B | **yes** (after #877) | Biggest first-paint growth in BM15 (index is 244,377 B, still under the 240 KiB gate). The 179-line slice adds 2.4 KB to first paint: something that should be lazy is in `index`. Needs a diet before it ships. | | 7 | #904 hidden blocks | `7443f392` | lint ✓, check = baseline, editor 520 tests ✓, `hidden-blocks.spec` 16 passed, bundle gate ✓ | **+594 B / 0** real (+261 B over #887); normalised +538 B (+689 B over #887); lazy +2.7 KB | **yes** | Base retargeted to `notes-archive-hide`: now +667/−3. Conflicts with BM14e: `Tools.svelte`, `composer/commands.ts`, `perf/budgets.json` (budgets: recompute the total as the sum of chunk lines). | | 8 | #903 code block languages | `4c4cdda1` | lint ✓, check = baseline after my fix (it had **+1 error**: `Lang` was imported from the editor root, now `@calternal/editor/code`), `code-block.spec` 28 passed, bundle gate ✓. Editor unit: `tree-cost` and `refusal-performance` are wall-clock tests that also fail on dev under load (base 1/4, this head 2/4 full-suite runs; `refusal-performance` alone 5/5 ✓ on both), not blocking | **+320 B / 0** real, +126 B normalised (lazy +83 KB JS in `code-*` chunks) | **yes** | Conflicts with BM14e: `Editor.svelte`, `vite.config.ts`, `packages/editor/package.json`, `perf/budgets.json`. | | 9 | #832 Tasks lists | `baeb845d` | lint ✓, check = baseline, units ✓ (quiet), Tasks specs 54 passed (4 projects), bundle gate ✓ after I added the missing `TasksScreen` (5.1 KB) and `dates` (0.55 KB) budgets, total 409.85 | **+505 B / 0** real, +276 B normalised (lazy +5.5 KB JS, +2 KB CSS) | **yes** | Conflict with BM14e: `scripts/lazy-ui-plugin.ts` (the lazy import count; contacts bumps it too, so recount when both land). | | 10 | #841 Contacts list | `d36491eb` | I rebased it onto dev (it sat 255 commits behind and conflicted on `App.svelte`, `lazy-ui-plugin.ts`, `bundle-size.mjs`). lint ✓, check = baseline, units ✓, `contacts-list.spec` 16 passed, bundle gate ✓ | **+355 B / 0** real, +234 B normalised (lazy +5.5 KB JS, +2.2 KB CSS) | **yes** | Conflicts with BM14e: `lazy-ui-plugin.ts`, `App.svelte`, `lib/apps.ts`, `lib/lazy-ui.svelte.ts`. Its old `contacts` bundle counter is dropped in favour of dev's generic chunk accounting. | | 11 | #843 Contacts card | `a80a3bb0` | rebased onto #841; units ✓, `contacts-card` + `contacts-list` 46 passed, bundle gate ✓ | **+408 B / 0** real, +234 B normalised (+53 B real, 0 normalised over #841; lazy +17.5 KB JS, +3.7 KB CSS) | **yes** | Merges clean after #841. | **Left out:** #694 (already on dev as `6e5f99de`; the rebase hits add/add conflicts on `TrashPreview.svelte` and `trash-search.spec.ts` because dev has the finished version; close it). #902 Devices (+0.137 KB): BM14e's own first-paint offset is only −629 B (JS −377, CSS −252 vs dev), and BM15 above is already +7.3 KB, so nothing covers it. ## First-paint ledger - BM14e offset vs dev: **−629 B** (first JS 238,420, CSS 18,998, from the #914 comments). - (before the diet) BM15 if everything above shipped: roughly **+7.3 KB** over dev (#887 +479, rows stack from #887 +5,101, #904 +234, #903 +320, #926 +86, #832 +505, contacts +408). - Under the "no perf regression, even within budget" rule only #926, #903 and the contacts pair are small enough to argue for; #875 to #878 need a diet (the heaviest is #878's +2.4 KB). ## Baseline notes (so nobody chases them) - `bun run --cwd apps/web check` fails on dev itself: 2 errors in `e2e/review4-signout.spec.ts` (`logoutStatus` typed `never`), and `src/lib/actions.gen.ts` is stale against `contracts/actions.json` (sharing actions). All rows say "= baseline" when they show exactly those 2 errors. BM14e regenerates the file. For the byte numbers I measured the files as committed (not regenerated). - Wall-clock editor tests (`refusal-performance`, `tree-cost`, `link-rank`) fail under load on dev too; they passed on quiet reruns of every PR except as noted for #903. - A `cargo test --workspace` run stopped at `auth::a_cold_valid_password_gets_through_a_concurrent_flood` once under load average 25; the same run with `--no-fail-fast` on a quiet host passed fully. ## What I changed on the branches (all pushed, force-with-lease) - **Rows stack onto #887:** `port/rows` (#875) = its 12 commits rebased onto `451ea80b`; `port/rows-actions` (#877) = its own 12 commits (the old merge of #887 dropped) cherry-picked, one conflict in `notes.svelte.ts` imports (kept `pendingReload` from #887's new head plus the visibility views import); `port/rows-drop` (#878) = its 2 commits. Local diffs: #875 vs #887 +2,461/−74, #877 vs #875 +527/−20, #878 vs #877 +181/−11. Forgejo's counters for #875/#877/#878/#841/#843 still show the old `-70k` numbers; they lag. - **#904:** 14 commits cherry-picked onto `451ea80b`, PR base set to `notes-archive-hide` (+667/−3). It merges cleanly with the rows stack. - **Budgets:** `press` (3.4 KB in #875, 2.1 KB in #878), `TasksScreen` and `dates` in #832; `web.bundle.total_js_brotli` raised by exactly the new chunk budgets, because the gate demands total = sum of chunk lines (404.2 → 407.6 → 406.3 for rows, 409.85 for tasks). These are new lines for chunks that had none, not loosened limits. At train time recompute the total as the sum. - **#903:** one-line type import fix (`4c4cdda1`). - **#841/#843:** rebased onto dev (conflicts resolved as described). - **#694:** not rebased (see above). ## BM15 dry run on BM14e head `1aed57bc` Merging in the order above (taking "theirs" on a conflict only to see the next one): clean = #909, #926, #875, #877, #878, #843; conflicts as listed per row for #887, #904, #903, #832, #841. No two BM15 PRs conflict with each other except the shared lazy-import count and `perf/budgets.json` total lines. ## Commands `~/bin/slot bun run --cwd apps/web lint`; `bun run --cwd packages/editor check && bun run --cwd apps/web check`; `bun run --cwd packages/editor test && bun run --cwd packages/ui test:primitives && bun run --cwd apps/web test`; `perf/web.sh --bundle-only --gate`; `node apps/web/scripts/bundle-size.mjs apps/web/dist --json`; `CI=1 CALTERNAL_BIN=<bin> bunx playwright test <specs> --project=chromium-1440 --project=chromium-390 --project=webkit-1440 --project=webkit-390 --workers=1 --retries=0`; Rust: `cargo fmt --all --check`, `cargo build -p calternal --locked`, `cargo clippy --workspace --all-targets --locked -j4`, `cargo test --workspace --locked --no-fail-fast -j4`. Binaries: own build of #887 `451ea80b` (also used for #875-#904 specs), dev `41f2efa3` for the dev-based PRs. ## Merge order **#887 → #909 → #926 → #875 → #877 (after its Move race is fixed) → #878 (after its first-paint diet) → #904 → #903 → #832 → #841 → #843.** If #877/#878 are not fixed in time, BM15 ships without them and #904 still works (it only needs #887). ## First-paint ledger (after the diet, 11-05) - Merged BM15 (simulation `sim/bm15-first-paint` `a6a293e8`): **238,497 B JS (−300 vs dev; −631 hash-normalised), 19,018 B CSS (−232)**. BM14e's own −629 B offset is not counted here (it is not in dev yet).
Author
Owner

Fixed on #877 at 27abe224: the Move menu now reads the notes with pending Moves applied, and writes queue. bulk-tag.spec passes --repeat-each=20 on chromium-1440 (40/40) and webkit-1440 (40/40) with the new fast-double-tap spec; a unit test holds the first write open (no timers). #878 rebased onto it (353feeaa), its specs pass. Note: dropping notes on a sidebar tag (#878) writes through tagNotes directly and does not record pending tags, so a Move menu opened right after a drop still reads the list; small follow-up if wanted.

Fixed on #877 at `27abe224`: the Move menu now reads the notes with pending Moves applied, and writes queue. `bulk-tag.spec` passes `--repeat-each=20` on chromium-1440 (40/40) and webkit-1440 (40/40) with the new fast-double-tap spec; a unit test holds the first write open (no timers). #878 rebased onto it (`353feeaa`), its specs pass. Note: dropping notes on a sidebar tag (#878) writes through `tagNotes` directly and does not record pending tags, so a Move menu opened right after a drop still reads the list; small follow-up if wanted.
Author
Owner

Add #932 (Mail P1, head f03397cf) to BM15, after #909. It's backend-only, an approved exception to the UI rule. The third review (79212) found no P1 or P2: ready.

Open note for the train's build gate: the PR's own cold build went from 199 s to 247 s. The review shows the default build doesn't compile mail-send or the platform verifier, and excluding the mail crates from default-members would save at most about 5 s. So the rest is unexplained, probably a different base or noise. The train must measure cold and incremental build time against dev on the same host, back to back, and flag any real growth.

Add **#932** (Mail P1, head `f03397cf`) to BM15, after #909. It's backend-only, an approved exception to the UI rule. The third review (79212) found no P1 or P2: ready. Open note for the train's build gate: the PR's own cold build went from 199 s to 247 s. The review shows the default build doesn't compile mail-send or the platform verifier, and excluding the mail crates from default-members would save at most about 5 s. So the rest is unexplained, probably a different base or noise. The train must measure cold and incremental build time against dev on the same host, back to back, and flag any real growth.
Author
Owner

BM15 first-paint diet (11-05): merged BM15 is −300 B JS, −232 B CSS against dev

Dev 41f2efa3 first paint = 238,797 B JS, 19,250 B CSS (brotli q11, bundle-size.mjs). All eleven heads merged in the order below (simulation branch sim/bm15-first-paint, head a6a293e8): 238,497 B JS (−300; hash-normalised 238,173 = −631) and 19,018 B CSS (−232). BM15 does not grow first paint. Before this lane it was about +7.3 KB.

How to read the numbers. The chunk-file hashes in the first script are random and move its brotli size by ±300 B between two builds of the same code (#887's real +333 is −151 normalised). Each PR below gives the real figure and the hash-normalised one (same chunk, hashes replaced by a fixed string); a claim under about 300 B is only meaningful in the normalised one.

# PR head first JS real (Δ dev) normalised (Δ dev) first CSS (Δ dev) ≤ 0 alone?
1 #887 Archive/Hide server 47457c52 239,130 (+333) 238,653 (−151) 19,250 (0) normalised yes, real no (hash luck)
2 #909 sharing hardening 98afda51 no web files yes
3 #926 top pills while typing d52759dc 239,147 (+350) 238,828 (+24) 19,238 (−12) +24 B
4 #875 rows 1/3 (press engine) 302d92ac 236,746 (−2,051) with #887 236,281 (−2,523) 18,979 (−271) yes, −2,384 over #887
5 #877 rows 2/3 71ed79ac 237,066 (−1,731); +320 over #875 237,049 (−1,755); +768 over #875 18,980 (−270); +1 yes (stack)
6 #878 rows 3/3 ed8e3ff2 237,545 (−1,252); +479 over #877 237,356 (−1,448); +307 over #877 19,029 (−221); +49 yes (stack)
7 #904 hidden blocks 7443f392 239,391 (+594); +261 over #887 239,342 (+538); +689 over #887 19,250 (0) no
8 #903 code languages 4c4cdda1 239,117 (+320) 238,930 (+126) 19,250 (0) no
9 #832 Tasks baeb845d 239,302 (+505) 239,080 (+276) 19,250 (0) no
10 #841 Contacts list d36491eb 239,152 (+355) 239,038 (+234) 19,250 (0) no
11 #843 Contacts card a80a3bb0 239,205 (+408); +53 over #841 239,038 (+234); 0 over #841 19,250 (0) 0 over #841

Not every PR is ≤ 0 alone, and I could not make them so. #926, #904, #903, #832, #841 and #843 are already lazy except for a trigger and its wiring (a ViewPlugin, a route entry, a button); each costs +24…+689 B normalised and I trimmed what I could (#926's follower, #904's Hide action, #832's/#841's wiring). The offset is in #875: the row swipe engine (−2.2 KB), the press data/menu/preview code and the tooltip engine with its CSS (−0.85 KB, −271 B CSS) now load on use or when idle. Order. In hash-normalised bytes the order in the issue already stays under dev at every step (#887 −151, #926 −127, #875 −2,499 …). In real bytes #887 + #926 are about +680 until #875 lands, so I would merge #875 right after #887 (nothing depends on #926 coming first): then every step is ≤ 0 in both. #877 and #878 need #875 anyway. The running total in normalised bytes, #875 second: #887 −151, #875 −2,523, #926 −2,499, #877 −1,731, #878 −1,424, #904 −735, #903 −609, #832 −333, #841 −99, #843 −99; the merged build confirms −631 at the end. #875's offset (−2.4 KB) is what pays for #904…#843 (+1.5 KB normalised together); without it BM15 would end at about +0.9 KB.

What changed on each branch (details, per-change bytes, specs and latency are in each PR's comment): #887 (hide/archive/restore rules load on first event); #926 (one follower); #875 (press, menu, previews, swipe engine, tooltip engine and CSS lazy; dim-page, menu-open, menu-for, drop-registry split out of shared first-paint files; the preview contract is now { component } taking item); #877 (Archived/Show-hidden reads, tag-edit helpers, Archive/Hide actions, faded-row CSS lazy); #878 (drop-target registry apart from the drag engine, tag-writing code on first drop); #904 (Hide action body lazy); #832/#903/#841/#843 (budget lines only; code unchanged).

Rules I followed. First paint holds the shell and the Notes list/editor; everything else loads when used. Warm on idle (or at once on a touch screen for the swipe engine), the same pattern as #908's pickers: each lazy piece brings its own CSS in its chunk, so nothing shows unstyled. The one trap worth remembering: a function in a file that both the first screen and a lazy chunk import lands in the first script; lazy-only code must live in its own file. Also: a prop default or a {...spread} in a lazy Svelte component pulls Svelte's helper into the first script.

Specs (Chromium and WebKit, 1440 and 390, CI=1 --workers=1 --retries=0, dev-01 through ~/bin/slot; server binary = the #887 build): #875 press swipe-rows menu-first-press select-rows touch-select tooltips 167 passed / 81 skipped / 0 failed; #877 press visibility bulk-tag 28 / 24 / 0; #878 sidebar-drop press 24 / 20 / 0; #904 hidden-blocks 16 passed; #903 code-block 28 passed; #832 tasks specs 54 passed / 2 skipped; #841 contacts-list 16 / 4; #843 contacts-card contacts-list 46 / 10; #926 note-pills 10 / 10 skipped. One bug of mine surfaced and is fixed: #877's press.spec "tapping the preview opens the note" failed (mounting the preview by hand ran after the menu measured it); fixed in #875 (7c6479a0). Lint ok, svelte-check = dev baseline (the 2 review4-signout errors) on #878, #904 and #926, web unit tests 55 passed. Not re-run: the flaky-rule repeat of bulk-tag (it passed on its first run here), Rust (no Rust change except #887's own).

First-use latency (Chromium on dev-01, localhost, host load ~22, ABAB interleaved dev vs the #875 stack, medians of 8). Warm (after idle): right-click menu 319 → 434 ms (ranges 112–991 and 86–700), swipe first transform 26 → 28 ms, tooltip 1,275 → 1,325 ms (includes the 400 ms delay): equal within noise. Cold (the first action in the first moments after the list appears, before the idle warm): swipe 34 → 113 ms, right-click 561 → 805 ms: one chunk fetch, no service-worker cache in these runs. Frame timing was not measured (Linux VM; the Mac VM is for that).

Budgets. Every earlier total bump is reverted: each PR's new lazy lines are carved from the index and idle-screens lines so the total stays 404.2, and perf/web.sh --bundle-only --gate passes on each head. Two things cannot stay: merged, the lines need +2.65 KiB of lazy weight beyond what the slack in other lines can give, and #903's seven code-* chunks are 83 KiB of new lazy JS by themselves (the total is the sum of the chunk lines). For the train: index 233.0, idle-screens 46.0, Palette 21.0, ContactsScreen 13.7, vim 38.1, svelte 9.45, replay 6.1, TreeSection 3.1, ListSearch 3.1, new lines press 7.2, tooltip-engine 1.5, hidden-ui 2.5, notes-visibility-apply 0.6, drop-on-tag 0.15, TasksScreen 5.1, dates 0.55, code-* as in #903, total 490.95 (404.2 + 2.65 + 84.1). The index line is the only first-paint cap here and it goes down from 240.

Merge conflicts the train will hit (resolved in the simulation, same resolutions): perf/budgets.json (above); lazy-ui-plugin.ts (expected import count 23: rows 21 + Tasks + Contacts); Editor.svelte and packages/editor/package.json (#904 and #903 each add one extension and one export: keep both); and Tasks and Contacts both special-case their screen in App.svelte, lazy-ui.svelte.ts and apps.ts: I replaced the pair with one appScreens = { tasks, contacts } registry, a few bytes smaller than the two (merge commit on the simulation branch).

Coordination. Another agent is pushing fixes to #877 and #878. I restacked those branches with --force-with-lease and kept their commits by cherry-pick (SHAs changed); they have been told in the PR comments to reset before pushing. If they push first, rebase my head under their commit rather than force.

Open risks. (1) Six PRs are positive alone; their sum is covered only if #875 merges before them. (2) Tooltips now load an engine on first hover or idle: a hover in the first ~second after load waits one chunk fetch. (3) The first swipe on a touch screen waits for the engine if the chunk has not arrived (it starts loading when the list mounts). (4) keyChips and the preview contract changed in #875 (provider = { component }, component takes item); nothing else used the old one. (5) Measurements are on a loaded shared VM and the real brotli figure carries ±300 B hash noise: the merged build was measured once.

## BM15 first-paint diet (11-05): merged BM15 is **−300 B JS, −232 B CSS** against dev Dev `41f2efa3` first paint = **238,797 B JS, 19,250 B CSS** (brotli q11, `bundle-size.mjs`). All eleven heads merged in the order below (simulation branch `sim/bm15-first-paint`, head `a6a293e8`): **238,497 B JS (−300; hash-normalised 238,173 = −631) and 19,018 B CSS (−232).** BM15 does not grow first paint. Before this lane it was about +7.3 KB. **How to read the numbers.** The chunk-file hashes in the first script are random and move its brotli size by ±300 B between two builds of the same code (#887's real +333 is −151 normalised). Each PR below gives the real figure and the hash-normalised one (same chunk, hashes replaced by a fixed string); a claim under about 300 B is only meaningful in the normalised one. | # | PR | head | first JS real (Δ dev) | normalised (Δ dev) | first CSS (Δ dev) | ≤ 0 alone? | |---|---|---|---|---|---|---| | 1 | #887 Archive/Hide server | `47457c52` | 239,130 (+333) | 238,653 (**−151**) | 19,250 (0) | normalised yes, real no (hash luck) | | 2 | #909 sharing hardening | `98afda51` | no web files | | | yes | | 3 | #926 top pills while typing | `d52759dc` | 239,147 (+350) | 238,828 (+24) | 19,238 (−12) | +24 B | | 4 | #875 rows 1/3 (press engine) | `302d92ac` | **236,746 (−2,051)** with #887 | 236,281 (**−2,523**) | **18,979 (−271)** | **yes, −2,384 over #887** | | 5 | #877 rows 2/3 | `71ed79ac` | 237,066 (−1,731); +320 over #875 | 237,049 (−1,755); +768 over #875 | 18,980 (−270); +1 | yes (stack) | | 6 | #878 rows 3/3 | `ed8e3ff2` | 237,545 (−1,252); +479 over #877 | 237,356 (−1,448); +307 over #877 | 19,029 (−221); +49 | yes (stack) | | 7 | #904 hidden blocks | `7443f392` | 239,391 (+594); +261 over #887 | 239,342 (+538); +689 over #887 | 19,250 (0) | no | | 8 | #903 code languages | `4c4cdda1` | 239,117 (+320) | 238,930 (+126) | 19,250 (0) | no | | 9 | #832 Tasks | `baeb845d` | 239,302 (+505) | 239,080 (+276) | 19,250 (0) | no | | 10 | #841 Contacts list | `d36491eb` | 239,152 (+355) | 239,038 (+234) | 19,250 (0) | no | | 11 | #843 Contacts card | `a80a3bb0` | 239,205 (+408); +53 over #841 | 239,038 (+234); 0 over #841 | 19,250 (0) | 0 over #841 | **Not every PR is ≤ 0 alone, and I could not make them so.** #926, #904, #903, #832, #841 and #843 are already lazy except for a trigger and its wiring (a ViewPlugin, a route entry, a button); each costs +24…+689 B normalised and I trimmed what I could (#926's follower, #904's Hide action, #832's/#841's wiring). The offset is in #875: the row swipe engine (−2.2 KB), the press data/menu/preview code and the tooltip engine with its CSS (−0.85 KB, −271 B CSS) now load on use or when idle. **Order.** In hash-normalised bytes the order in the issue already stays under dev at every step (#887 −151, #926 −127, #875 −2,499 …). In real bytes #887 + #926 are about +680 until #875 lands, so **I would merge #875 right after #887** (nothing depends on #926 coming first): then every step is ≤ 0 in both. #877 and #878 need #875 anyway. The running total in normalised bytes, #875 second: #887 −151, #875 −2,523, #926 −2,499, #877 −1,731, #878 −1,424, #904 −735, #903 −609, #832 −333, #841 −99, #843 −99; the merged build confirms −631 at the end. #875's offset (−2.4 KB) is what pays for #904…#843 (+1.5 KB normalised together); without it BM15 would end at about +0.9 KB. **What changed on each branch** (details, per-change bytes, specs and latency are in each PR's comment): #887 (hide/archive/restore rules load on first event); #926 (one follower); #875 (press, menu, previews, swipe engine, tooltip engine and CSS lazy; `dim-page`, `menu-open`, `menu-for`, `drop`-registry split out of shared first-paint files; the preview contract is now `{ component }` taking `item`); #877 (Archived/Show-hidden reads, tag-edit helpers, Archive/Hide actions, faded-row CSS lazy); #878 (drop-target registry apart from the drag engine, tag-writing code on first drop); #904 (Hide action body lazy); #832/#903/#841/#843 (budget lines only; code unchanged). **Rules I followed.** First paint holds the shell and the Notes list/editor; everything else loads when used. Warm on idle (or at once on a touch screen for the swipe engine), the same pattern as #908's pickers: each lazy piece brings its own CSS in its chunk, so nothing shows unstyled. The one trap worth remembering: a function in a file that both the first screen and a lazy chunk import lands in the first script; lazy-only code must live in its own file. Also: a prop default or a `{...spread}` in a lazy Svelte component pulls Svelte's helper into the first script. **Specs** (Chromium and WebKit, 1440 and 390, `CI=1 --workers=1 --retries=0`, dev-01 through `~/bin/slot`; server binary = the #887 build): #875 `press swipe-rows menu-first-press select-rows touch-select tooltips` 167 passed / 81 skipped / 0 failed; #877 `press visibility bulk-tag` 28 / 24 / 0; #878 `sidebar-drop press` 24 / 20 / 0; #904 `hidden-blocks` 16 passed; #903 `code-block` 28 passed; #832 tasks specs 54 passed / 2 skipped; #841 `contacts-list` 16 / 4; #843 `contacts-card contacts-list` 46 / 10; #926 `note-pills` 10 / 10 skipped. One bug of mine surfaced and is fixed: #877's `press.spec` "tapping the preview opens the note" failed (mounting the preview by hand ran after the menu measured it); fixed in #875 (`7c6479a0`). Lint ok, `svelte-check` = dev baseline (the 2 `review4-signout` errors) on #878, #904 and #926, web unit tests 55 passed. Not re-run: the flaky-rule repeat of `bulk-tag` (it passed on its first run here), Rust (no Rust change except #887's own). **First-use latency** (Chromium on dev-01, localhost, host load ~22, ABAB interleaved dev vs the #875 stack, medians of 8). Warm (after idle): right-click menu 319 → 434 ms (ranges 112–991 and 86–700), swipe first transform 26 → 28 ms, tooltip 1,275 → 1,325 ms (includes the 400 ms delay): equal within noise. Cold (the first action in the first moments after the list appears, before the idle warm): swipe 34 → 113 ms, right-click 561 → 805 ms: one chunk fetch, no service-worker cache in these runs. Frame timing was not measured (Linux VM; the Mac VM is for that). **Budgets.** Every earlier total bump is reverted: each PR's new lazy lines are carved from the `index` and `idle-screens` lines so the total stays 404.2, and `perf/web.sh --bundle-only --gate` passes on each head. Two things cannot stay: merged, the lines need +2.65 KiB of lazy weight beyond what the slack in other lines can give, and #903's seven `code-*` chunks are 83 KiB of new lazy JS by themselves (the total is the sum of the chunk lines). For the train: index 233.0, idle-screens 46.0, Palette 21.0, ContactsScreen 13.7, vim 38.1, svelte 9.45, replay 6.1, TreeSection 3.1, ListSearch 3.1, new lines press 7.2, tooltip-engine 1.5, hidden-ui 2.5, notes-visibility-apply 0.6, drop-on-tag 0.15, TasksScreen 5.1, dates 0.55, code-* as in #903, **total 490.95** (404.2 + 2.65 + 84.1). The `index` line is the only first-paint cap here and it goes down from 240. **Merge conflicts the train will hit** (resolved in the simulation, same resolutions): `perf/budgets.json` (above); `lazy-ui-plugin.ts` (expected import count 23: rows 21 + Tasks + Contacts); `Editor.svelte` and `packages/editor/package.json` (#904 and #903 each add one extension and one export: keep both); and Tasks and Contacts both special-case their screen in `App.svelte`, `lazy-ui.svelte.ts` and `apps.ts`: I replaced the pair with one `appScreens = { tasks, contacts }` registry, a few bytes smaller than the two (merge commit on the simulation branch). **Coordination.** Another agent is pushing fixes to #877 and #878. I restacked those branches with `--force-with-lease` and kept their commits by cherry-pick (SHAs changed); they have been told in the PR comments to reset before pushing. If they push first, rebase my head under their commit rather than force. **Open risks.** (1) Six PRs are positive alone; their sum is covered only if #875 merges before them. (2) Tooltips now load an engine on first hover or idle: a hover in the first ~second after load waits one chunk fetch. (3) The first swipe on a touch screen waits for the engine if the chunk has not arrived (it starts loading when the list mounts). (4) `keyChips` and the preview contract changed in #875 (provider = `{ component }`, component takes `item`); nothing else used the old one. (5) Measurements are on a loaded shared VM and the real brotli figure carries ±300 B hash noise: the merged build was measured once.
Author
Owner

Closed the drop risk: sidebar drops go through the same pending-tags overlay and write line as Move (#878 6e994016), bulk-tag + sidebar-drop pass --repeat-each=20 on chromium-1440 (100/100) and webkit-1440 (100/100). The last residual ~1% failure was a test collision (tag text inside the prefix), not product code; fixed in the specs.

Closed the drop risk: sidebar drops go through the same pending-tags overlay and write line as Move (#878 `6e994016`), `bulk-tag` + `sidebar-drop` pass `--repeat-each=20` on chromium-1440 (100/100) and webkit-1440 (100/100). The last residual ~1% failure was a test collision (tag text inside the prefix), not product code; fixed in the specs.
Author
Owner

Add #946 (a11y Highs from #935, head 8812570f) and #950 (contact-card Undo toast clock, prod bug #948, head 4a6af836) to BM15.

Byte call for #946, my decision: accept. Against dev it is −443 B raw JS, −4 B gzip and −99 B brotli with hashes normalised. CSS is −1,460 B raw and −241 B brotli. Only the as-built brotli figure reads +21 B, and that is inside the ±150 B noise the same content shows between builds. The train measures the merged BM15 first paint, which must be ≤ dev; it currently is (−300 B JS, −232 B CSS, before #946).

Add **#946** (a11y Highs from #935, head `8812570f`) and **#950** (contact-card Undo toast clock, prod bug #948, head `4a6af836`) to BM15. Byte call for #946, my decision: accept. Against dev it is −443 B raw JS, −4 B gzip and −99 B brotli with hashes normalised. CSS is −1,460 B raw and −241 B brotli. Only the as-built brotli figure reads +21 B, and that is inside the ±150 B noise the same content shows between builds. The train measures the merged BM15 first paint, which must be ≤ dev; it currently is (−300 B JS, −232 B CSS, before #946).
Author
Owner

Follow-up (11-05): cold first use, and the total JS budget

1. Cold first use

Change (259b5ab7 in #875, restacked through #877 53104962 and #878 bef3b4f7): the press+swipe chunk is warmed right after the list's first paint (at once on a touch screen, first idle moment with a 150 ms cap elsewhere) and by the first pointer over the list; the tooltip engine is fetched at idle (200 ms cap) and by the first pointer movement; a touch or right-click before that still loads the chunk and goes on (unchanged). Each lazy piece brings its own CSS, so nothing shows unstyled. I did not add modulepreload hints: the chunk hashes are not known to the HTML, and the import() already preloads its dependencies. The merged train now measures 238,541 B JS (−256 vs dev) / 19,018 B CSS (−232) (sim/bm15-first-paint 245c41ff).

Rig. Mac VM macos-01-std under the bench lock, Playwright WebKit (and Chromium) driving the dev build (41f2efa3) and the train build side by side. Both are served like a CDN on a broadband link (a shared 2.5 MB/s cap and 40 ms RTT, brotli files as in production; /api and its socket go to a real #887 server on dev-01 through a tunnel). Every run is a fresh browser context (cold cache, no service worker), dev and train interleaved, a touch swipe at 390×844 and a right-click at 1440×900. "Delay" is how long after navigation start the action was held back to; the list itself is not interactive before about 2 s on this link, so the ~1 s cell is really the earliest a person can touch a row (dev about 2.2 s, train about 2.7 s in WebKit, see the note below). The swipe time is touchstart to the first transform.

WebKit, Mac VM (real GPU), n = 10 per cell (n = 20 at ~1 s), medians:

action at ~1 s (acted at 2.2 s dev / 2.7 s train) at 3 s at 10 s
first right-click → menu visible, dev 8 ms (n 20; max 262) 11 ms 9 ms
first right-click → menu visible, train 6 ms (max 18) 5 ms 7 ms
first swipe → first transform, dev 28 ms (max 112) 25 ms 31 ms
first swipe → first transform, train 21 ms (max 34) 27 ms 28 ms

First-swipe frame timing (rAF deltas over the drag and the settle, WebKit): median of the per-run worst frame 20 ms for both builds at every delay. Worst single frame: dev 56 / 23 / 133 ms, train 27 / 44 / 112 ms (1 s with n = 20 / 3 s / 10 s). Frames over 25 ms across all runs of a cell: dev 6 / 0 / 20, train 3 / 2 / 15. Equal within the noise of a shared VM.

Chromium on the same VM (software rendering: rAF runs at about 8 fps there, so its swipe times are quantised and its frame numbers are not frame performance; only the menu is meaningful): right-click menu dev 7 / 6 / 15 ms vs train 5 / 5 / 5 ms at ~1 / 3 / 10 s (n = 10; at ~1 s with n = 20 dev 6 ms, train 4 ms). One of 10 train runs at ~1 s took 4.2 s to open the menu in the first batch; it did not repeat in the 20 more runs (it is the only outlier I saw, and I did not find its cause). Chromium swipe first-transform medians, dev vs train: 32 vs 64 (1 s), 31 vs 17 (3 s), 22 vs 21 ms (10 s), and 25 vs 42 at n = 20 for 1 s, from per-run values that range 3–150 ms in both builds: no consistent difference. I did not get a quiet Linux host: dev-01 ran at load 15–22 the whole time, so Chromium numbers are from the Mac VM only.

Pass bar: equal to dev at 3 s and 10 s: met for the menu and the swipe, in WebKit and Chromium. At ~1 s: reported above; the train is no slower for the first interaction. Not met, open: the list becomes ready later. In WebKit the first row shows at a median 2,214 ms on the train vs 2,035 ms on dev (n = 20; a second batch gave 2,208 vs 2,017), about +180 ms, and the page then answers my first action about 300 ms later. The same +170 ms shows in the train without this warm-up (previous head a6a293e8: 2,185 ms), so it does not come from warming; Chromium shows no difference (1,695 vs 1,733 ms). I have not found the cause (candidates: the service worker's precache of the extra 124 KB of lazy files competing on the capped link, or other BM15 work at start-up). It should be chased before the train: it is a start-up regression in WebKit that the first-paint bytes do not show.

Specs on the new heads (Chromium + WebKit, 1440 and 390, retries off): #875 press swipe-rows menu-first-press select-rows touch-select tooltips 167 passed / 81 skipped / 0 failed; #878 sidebar-drop press visibility bulk-tag 34 passed / 30 skipped / 0 failed. Earlier warm-up on a hover is now one pointerover once-listener on the list.

2. Total JS budget: it cannot be made to fit without losing something kayg may miss

How the gate counts (bundle-size.mjs, perf/web-report.mjs): the total is the sum of every emitted JS chunk's brotli size, per chunk name, and the cap must equal the sum of the chunk lines. Files in dist/assets only are counted. Loading a language only when a block in that language appears is already how #903 works (one chunk per grammar), and it changes nothing here: a lazy chunk counts in the total whether or not it ever loads. There is no separate category to put them in: the only one, "opt-in plugins" (Vim), is counted in the total too and has its own ≤ 45 KB cap that Vim already fills to 37.9. Serving the parsers from public/ would put them outside dist/assets and out of the count, but that hides the weight instead of cutting it, so I did not do it.

Numbers (KiB brotli, merged train 245c41ff): all chunks 474.4; the cap 404.2. The code-* chunks are 81.1 (JavaScript/TypeScript 24.4, Rust 23.5, Python 12.7, CSS 6.9, JSON 1.0, parser runtime 8.1, the menu/colours code 4.4); everything else is 393.3. The cap also holds reserved lines for chunks that do not exist in this build (widget 7.25, table-bar.svelte 2.5, PictureViewer 1.1, rolldown-runtime 0.5 = 11.35), so the room for chunks that exist is 392.85. BM15 without #903 already overflows it by 0.5 KiB (plus about 1 KiB of per-line headroom). With #903 it is 81.6 over. No Lezer language fits at all: after the non-#903 chunks only about 9.4 KiB remain even if the reserved lines were released, and the parser runtime alone is 8.1 plus the menu code 4.4.

Options for kayg (nothing raised, nothing changed):

  • A. Raise the total to about 490 (404.2 + 2.65 + 81.6 + headroom): all five languages, no code change. The line-by-line block is in the earlier comment; this is lazy weight only, first paint is unaffected.
  • B. Keep the cap, give up Lezer: highlight every language with the mockup's own regex pass (words.ts already does Shell and SQL this way): code ≈ 4.4 + about 2.5 for six more word lists ≈ 7 KiB (my estimate, not built), colours coarser than a real parse (no nesting or context). Fits only if the 11.35 KiB of reserved lines are released (393.3 + 7 + ~1.5 headroom = 401.8 ≤ 404.2), which is for the owners of those ports to say.
  • C. Keep fewer Lezer languages: removing Rust saves 23.5 KiB, Rust + Python 36.2, Rust + Python + JS/TS 60.6; none of these gets under the cap, because the runtime and menu stay (12.5 KiB).
  • D. Put the parsers outside dist/assets: fits on paper, hides 81 KiB from the gate. Not recommended.
    I recommend A for the total and a later look at B, since the parsers load only when a note has a fenced block of that language.
## Follow-up (11-05): cold first use, and the total JS budget ### 1. Cold first use **Change** (`259b5ab7` in #875, restacked through #877 `53104962` and #878 `bef3b4f7`): the press+swipe chunk is warmed right after the list's first paint (at once on a touch screen, first idle moment with a 150 ms cap elsewhere) and by the first pointer over the list; the tooltip engine is fetched at idle (200 ms cap) and by the first pointer movement; a touch or right-click before that still loads the chunk and goes on (unchanged). Each lazy piece brings its own CSS, so nothing shows unstyled. I did not add `modulepreload` hints: the chunk hashes are not known to the HTML, and the `import()` already preloads its dependencies. The merged train now measures **238,541 B JS (−256 vs dev) / 19,018 B CSS (−232)** (`sim/bm15-first-paint` `245c41ff`). **Rig.** Mac VM `macos-01-std` under the bench lock, Playwright WebKit (and Chromium) driving the dev build (`41f2efa3`) and the train build side by side. Both are served like a CDN on a broadband link (a shared 2.5 MB/s cap and 40 ms RTT, brotli files as in production; `/api` and its socket go to a real #887 server on dev-01 through a tunnel). Every run is a fresh browser context (cold cache, no service worker), dev and train interleaved, a touch swipe at 390×844 and a right-click at 1440×900. "Delay" is how long after navigation start the action was held back to; the list itself is not interactive before about 2 s on this link, so the **~1 s cell is really the earliest a person can touch a row** (dev about 2.2 s, train about 2.7 s in WebKit, see the note below). The swipe time is touchstart to the first transform. **WebKit, Mac VM (real GPU), n = 10 per cell (n = 20 at ~1 s), medians:** | action | at ~1 s (acted at 2.2 s dev / 2.7 s train) | at 3 s | at 10 s | |---|---|---|---| | first right-click → menu visible, dev | 8 ms (n 20; max 262) | 11 ms | 9 ms | | first right-click → menu visible, train | **6 ms** (max 18) | **5 ms** | **7 ms** | | first swipe → first transform, dev | 28 ms (max 112) | 25 ms | 31 ms | | first swipe → first transform, train | **21 ms** (max 34) | **27 ms** | **28 ms** | First-swipe frame timing (rAF deltas over the drag and the settle, WebKit): median of the per-run worst frame 20 ms for both builds at every delay. Worst single frame: dev 56 / 23 / 133 ms, train 27 / 44 / 112 ms (1 s with n = 20 / 3 s / 10 s). Frames over 25 ms across all runs of a cell: dev 6 / 0 / 20, train 3 / 2 / 15. Equal within the noise of a shared VM. **Chromium on the same VM** (software rendering: rAF runs at about 8 fps there, so its swipe times are quantised and its frame numbers are not frame performance; only the menu is meaningful): right-click menu dev 7 / 6 / 15 ms vs train 5 / 5 / 5 ms at ~1 / 3 / 10 s (n = 10; at ~1 s with n = 20 dev 6 ms, train 4 ms). One of 10 train runs at ~1 s took 4.2 s to open the menu in the first batch; it did not repeat in the 20 more runs (it is the only outlier I saw, and I did not find its cause). Chromium swipe first-transform medians, dev vs train: 32 vs 64 (1 s), 31 vs 17 (3 s), 22 vs 21 ms (10 s), and 25 vs 42 at n = 20 for 1 s, from per-run values that range 3–150 ms in both builds: no consistent difference. I did not get a quiet Linux host: dev-01 ran at load 15–22 the whole time, so Chromium numbers are from the Mac VM only. **Pass bar:** equal to dev at 3 s and 10 s: **met** for the menu and the swipe, in WebKit and Chromium. At ~1 s: reported above; the train is no slower for the first interaction. **Not met, open: the list becomes ready later.** In WebKit the first row shows at a median 2,214 ms on the train vs 2,035 ms on dev (n = 20; a second batch gave 2,208 vs 2,017), about +180 ms, and the page then answers my first action about 300 ms later. The same +170 ms shows in the train *without* this warm-up (previous head `a6a293e8`: 2,185 ms), so it does not come from warming; Chromium shows no difference (1,695 vs 1,733 ms). I have not found the cause (candidates: the service worker's precache of the extra 124 KB of lazy files competing on the capped link, or other BM15 work at start-up). It should be chased before the train: it is a start-up regression in WebKit that the first-paint bytes do not show. **Specs on the new heads** (Chromium + WebKit, 1440 and 390, retries off): #875 `press swipe-rows menu-first-press select-rows touch-select tooltips` 167 passed / 81 skipped / 0 failed; #878 `sidebar-drop press visibility bulk-tag` 34 passed / 30 skipped / 0 failed. Earlier warm-up on a hover is now one `pointerover` once-listener on the list. ### 2. Total JS budget: it cannot be made to fit without losing something kayg may miss How the gate counts (`bundle-size.mjs`, `perf/web-report.mjs`): the total is the sum of every emitted JS chunk's brotli size, per chunk name, and the cap must equal the sum of the chunk lines. Files in `dist/assets` only are counted. **Loading a language only when a block in that language appears is already how #903 works** (one chunk per grammar), and it changes nothing here: a lazy chunk counts in the total whether or not it ever loads. There is no separate category to put them in: the only one, "opt-in plugins" (Vim), is counted in the total too and has its own ≤ 45 KB cap that Vim already fills to 37.9. Serving the parsers from `public/` would put them outside `dist/assets` and out of the count, but that hides the weight instead of cutting it, so I did not do it. Numbers (KiB brotli, merged train `245c41ff`): all chunks **474.4**; the cap **404.2**. The `code-*` chunks are 81.1 (JavaScript/TypeScript 24.4, Rust 23.5, Python 12.7, CSS 6.9, JSON 1.0, parser runtime 8.1, the menu/colours code 4.4); everything else is **393.3**. The cap also holds reserved lines for chunks that do not exist in this build (`widget` 7.25, `table-bar.svelte` 2.5, `PictureViewer` 1.1, `rolldown-runtime` 0.5 = 11.35), so the room for chunks that exist is 392.85. **BM15 without #903 already overflows it by 0.5 KiB (plus about 1 KiB of per-line headroom).** With #903 it is 81.6 over. No Lezer language fits at all: after the non-#903 chunks only about 9.4 KiB remain even if the reserved lines were released, and the parser runtime alone is 8.1 plus the menu code 4.4. Options for kayg (nothing raised, nothing changed): - **A. Raise the total** to about 490 (404.2 + 2.65 + 81.6 + headroom): all five languages, no code change. The line-by-line block is in the earlier comment; this is lazy weight only, first paint is unaffected. - **B. Keep the cap, give up Lezer**: highlight every language with the mockup's own regex pass (`words.ts` already does Shell and SQL this way): code ≈ 4.4 + about 2.5 for six more word lists ≈ 7 KiB (my estimate, not built), colours coarser than a real parse (no nesting or context). Fits only if the 11.35 KiB of reserved lines are released (393.3 + 7 + ~1.5 headroom = 401.8 ≤ 404.2), which is for the owners of those ports to say. - **C. Keep fewer Lezer languages**: removing Rust saves 23.5 KiB, Rust + Python 36.2, Rust + Python + JS/TS 60.6; none of these gets under the cap, because the runtime and menu stay (12.5 KiB). - **D. Put the parsers outside `dist/assets`**: fits on paper, hides 81 KiB from the gate. Not recommended. I recommend A for the total and a later look at B, since the parsers load only when a note has a fenced block of that language.
Author
Owner

Adding #941 (shared Pill + Toolbar + PageToolbar, prod port 1 of #912), head 83f4e377, to BM15, after #950.

  • First paint vs dev: JS −447 B gzip / −108 br. CSS −685 B gzip / −664 br. The --bundle-only --gate check passes.
  • Visual check: I looked at the base/head shots myself (comment 79486).
    • At 1440 the only differences are the timestamps.
    • At 402 the back chevron and the pill ends follow the one bar-icon size, which is intended.
  • Frames: flat vs dev on the Mac VM (WebKit).
  • Note on the total JS budget: #941 moves about 1 KB of icons into the lazy idle-screens chunk, so the total-JS question for kayg (comment 79453) also grows by about 1 KB. That decision is still open.
Adding **#941** (shared Pill + Toolbar + PageToolbar, prod port 1 of #912), head `83f4e377`, to BM15, after #950. - **First paint vs dev:** JS −447 B gzip / −108 br. CSS −685 B gzip / −664 br. The `--bundle-only --gate` check passes. - **Visual check:** I looked at the base/head shots myself (comment 79486). - At 1440 the only differences are the timestamps. - At 402 the back chevron and the pill ends follow the one bar-icon size, which is intended. - **Frames:** flat vs dev on the Mac VM (WebKit). - **Note on the total JS budget:** #941 moves about 1 KB of icons into the lazy `idle-screens` chunk, so the total-JS question for kayg (comment 79453) also grows by about 1 KB. That decision is still open.
Author
Owner

kayg chose option A for the total JS budget (11-05, about 11:30 IST): "correct".

  • The raised total of 488.3 KB brotli, already on #903 (port/codeblock), is approved.
  • BM15 measures 474.4 KB, plus about 1 KB from #941's moved icons, so it fits.
  • The first-paint budgets do not change. The merged BM15 first paint must still be ≤ dev.

The only BM15 blocker left is the WebKit first-row +180 ms. A lane is bisecting it.

**kayg chose option A** for the total JS budget (11-05, about 11:30 IST): "correct". - The raised total of **488.3 KB brotli**, already on #903 (`port/codeblock`), is approved. - BM15 measures 474.4 KB, plus about 1 KB from #941's moved icons, so it fits. - The first-paint budgets do not change. The merged BM15 first paint must still be ≤ dev. The only BM15 blocker left is the WebKit first-row +180 ms. A lane is bisecting it.
Author
Owner

BM15 WebKit first-row delay: cause found and fixed (11-05)

Cause: the service worker's install-time precache. On first visit it fetched every emitted file (all lazy chunks, 7 fonts, icons, backdrops) while the first screen was still loading, on the same capped link. Each lazy chunk a PR adds is more bytes competing with the first list row. It is not the warm-up (259b5ab7) and not start-up work in a PR.

Rig. Mac VM macos-01-std under /tmp/mac-bench.lock, Playwright WebKit 1440×900, fresh context per run (cold cache, SW allowed), CDN-like server: brotli files, one 2.5 MB/s cap shared by all connections, 40 ms before each response; /api and socket go to one #887 server on dev-01 (same server and 60 seeded notes for every cell). "Row" = button.row first in the DOM, ms after navigation start. Order alternates every round (ABAB). Each cell is its own dist build of the commit (dev-01/dev-02, bun run build).

Bisect by PR (n = 10 per cell, medians, one session)

build median ms vs dev min–max
dev 9377d711 1,699 1,682–1,734
dev again (control) 1,752 +53 1,684–1,863
+ #887 1,698 −1 1,684–1,860
+ #909 1,702 +3 1,693–1,865
+ #926 1,703 +4 1,689–1,874
+ #875 1,769 +70 1,762–1,945
+ #877 1,772 +73 1,758–1,928
+ #878 1,853 +154 1,759–1,968
+ #904 1,792 +93 1,781–1,970
+ #903 1,896 +197 1,887–2,224
+ #841 1,929 +230 1,911–2,098
+ #843 (= train 245c41ff) 1,951 +252 1,934–2,120

(#832 did not build standalone in this order, so it is missing as a row; the cumulative rows after it include it. The control's 53 ms spread is the noise floor; the +250 ms end is far outside it. The steps follow the lazy bytes each PR adds: #875 +14 KB, #903 +83 KB.)

Service worker blocked (serviceWorkers: 'block', n = 10): dev 1,194 · dev control 1,108 · train 1,216. The gap is gone, and both builds are about 500 ms faster than with the worker. So the worker's install cost is the whole difference, and it also costs dev itself.

The fix: fix/sw-lazy-precache (on top of #875 259b5ab7), head e2397446

  • 6bdd43f0 the worker installs only CORE = the files index.html points at (entry script and styles, the 2 preloaded fonts, icons, manifest; 8 files). sw-plugin.ts computes it from the page text.
  • 4fb88513, e14748a8 the page asks the worker for the rest of the shell (warm message) 300 ms after the list has arrived (data-listed), with a 15 s fallback timer. Uncached files still fall through to the network, exactly like before the worker existed; the worker skips files already cached, so repeating is harmless.
  • 8ace38d0, ba633893, e2397446 lazy-offline.spec now waits for the shell to be fully cached (that is the new contract), and takes the chunk URLs from the shell list. That spec also failed 3/3 on port/rows before my change (passes on dev): since the diet the page no longer loads Palette/ListSearch at start-up, so resource timing never listed them. Same intent, now deterministic.
  • No limit or budget touched.

After (WebKit, Mac VM, n = 18, interleaved, same session; train + fix built from 245c41ff + the three fix commits)

build median ms p25–p75 bytes served by the row
dev 2,096 (n 17) 2,084–2,106 3.21 MB
dev again (control) 2,095 (n 17) 2,067–2,107 3.21 MB
train 245c41ff 2,348 2,328–2,368 3.65 MB
train + fix 1,647 1,614–1,656 2.39 MB

Train + fix is 449 ms faster than dev and 701 ms faster than the train. (Absolute numbers are higher than the bisect session: the Mac was slower that session; only same-session comparisons count. Two rounds were lost to the measurement API on dev-01 timing out its 3 h unit, so n is 17–18.) An earlier session with the first version of the fix gave 1,342 vs dev 1,781/1,729 vs train 2,104 (n = 20).

First paint bytes (bundle-size.mjs, brotli): train + fix 238,712 B JS / 19,018 B CSS vs dev 238,797 / 19,250, so −85 B / −232 B real; hash-normalised entry chunk 238,360 vs dev 238,804 (−444 B). Over the earlier train head (238,541 real, 238,299 normalised) it is +171 / +61 B: the 12-line trigger in pwa.svelte.ts. The merged train stays below dev.

Specs (~/bin/slot, targeted: pwa pwa-update served lazy-offline prefs-offline, CI=1 --workers=1 --retries=0):

  • dev-01 Chromium 1440 + 390 at e2397446: 7 passed, 15 skipped, 0 failed.
  • dev-02 WebKit 1440 + 390 at 8ace38d0 (same code; later commits touch only the Chromium-only spec): 8 passed, 14 skipped, 0 failed.
  • lazy-offline on origin/port/rows before the fix: 3/3 failed; origin/dev: 3/3 passed.

Notes

  • The same worker change would also speed up dev/prod today (about 500 ms with the worker blocked on this link). The fix ships through #875, so BM15 carries it to prod.
  • Offline readiness now starts when the list has arrived plus about 300 ms, not at install; opening the app offline in the first second after the very first visit would miss lazy chunks. I judge that acceptable and noted it here; say if you want the old guarantee.
  • The branch needs to be merged into #875's branch (port/rows) by the owner/orchestrator; I did not touch port/rows itself or the train branch.

Commands

  • Builds: ~/bin/slot on dev-01/dev-02, nix develop -c bash -c 'bun install --frozen-lockfile; cd apps/web && bun run build' per commit; sizes: node apps/web/scripts/bundle-size.mjs apps/web/dist --json.
  • Rig: ~/bisect-rig/rig.mjs <dists> <labels> <n> <out.jsonl> [webkit] [nosw] under ~/bisect-rig/run.sh (takes /tmp/mac-bench.lock, EXIT trap), run inside nix develop. Example: ./run.sh dev,devB,843,fix3 20 final.jsonl. Control = the same dist served twice.
  • Specs: ~/bin/slot ~/specrun-sw.sh <server bin> chromium-1440 chromium-390 (dev-01, #887 binary) and ... webkit-1440 webkit-390 (dev-02).
## BM15 WebKit first-row delay: cause found and fixed (11-05) **Cause: the service worker's install-time precache.** On first visit it fetched *every* emitted file (all lazy chunks, 7 fonts, icons, backdrops) while the first screen was still loading, on the same capped link. Each lazy chunk a PR adds is more bytes competing with the first list row. It is not the warm-up (259b5ab7) and not start-up work in a PR. **Rig.** Mac VM `macos-01-std` under `/tmp/mac-bench.lock`, Playwright WebKit 1440×900, fresh context per run (cold cache, SW allowed), CDN-like server: brotli files, one **2.5 MB/s cap shared by all connections, 40 ms before each response**; `/api` and socket go to one #887 server on dev-01 (same server and 60 seeded notes for every cell). "Row" = `button.row` first in the DOM, ms after navigation start. Order alternates every round (ABAB). Each cell is its own dist build of the commit (dev-01/dev-02, `bun run build`). ### Bisect by PR (n = 10 per cell, medians, one session) | build | median ms | vs dev | min–max | |---|---|---|---| | dev `9377d711` | 1,699 | | 1,682–1,734 | | **dev again (control)** | **1,752** | +53 | 1,684–1,863 | | + #887 | 1,698 | −1 | 1,684–1,860 | | + #909 | 1,702 | +3 | 1,693–1,865 | | + #926 | 1,703 | +4 | 1,689–1,874 | | + #875 | 1,769 | **+70** | 1,762–1,945 | | + #877 | 1,772 | +73 | 1,758–1,928 | | + #878 | 1,853 | **+154** | 1,759–1,968 | | + #904 | 1,792 | +93 | 1,781–1,970 | | + #903 | 1,896 | **+197** | 1,887–2,224 | | + #841 | 1,929 | +230 | 1,911–2,098 | | + #843 (= train `245c41ff`) | 1,951 | **+252** | 1,934–2,120 | (#832 did not build standalone in this order, so it is missing as a row; the cumulative rows after it include it. The control's 53 ms spread is the noise floor; the +250 ms end is far outside it. The steps follow the lazy bytes each PR adds: #875 +14 KB, #903 +83 KB.) **Service worker blocked** (`serviceWorkers: 'block'`, n = 10): dev 1,194 · dev control 1,108 · train 1,216. The gap is gone, and *both* builds are about 500 ms faster than with the worker. So the worker's install cost is the whole difference, and it also costs dev itself. ### The fix: `fix/sw-lazy-precache` (on top of #875 `259b5ab7`), head `e2397446` - `6bdd43f0` the worker installs only `CORE` = the files `index.html` points at (entry script and styles, the 2 preloaded fonts, icons, manifest; 8 files). `sw-plugin.ts` computes it from the page text. - `4fb88513`, `e14748a8` the page asks the worker for the rest of the shell (`warm` message) 300 ms after the list has arrived (`data-listed`), with a 15 s fallback timer. Uncached files still fall through to the network, exactly like before the worker existed; the worker skips files already cached, so repeating is harmless. - `8ace38d0`, `ba633893`, `e2397446` `lazy-offline.spec` now waits for the shell to be fully cached (that is the new contract), and takes the chunk URLs from the shell list. That spec also **failed 3/3 on `port/rows` before my change** (passes on dev): since the diet the page no longer loads `Palette`/`ListSearch` at start-up, so resource timing never listed them. Same intent, now deterministic. - No limit or budget touched. ### After (WebKit, Mac VM, n = 18, interleaved, same session; train + fix built from `245c41ff` + the three fix commits) | build | median ms | p25–p75 | bytes served by the row | |---|---|---|---| | dev | 2,096 (n 17) | 2,084–2,106 | 3.21 MB | | dev again (control) | 2,095 (n 17) | 2,067–2,107 | 3.21 MB | | train `245c41ff` | 2,348 | 2,328–2,368 | 3.65 MB | | **train + fix** | **1,647** | 1,614–1,656 | 2.39 MB | Train + fix is **449 ms faster than dev** and 701 ms faster than the train. (Absolute numbers are higher than the bisect session: the Mac was slower that session; only same-session comparisons count. Two rounds were lost to the measurement API on dev-01 timing out its 3 h unit, so n is 17–18.) An earlier session with the first version of the fix gave 1,342 vs dev 1,781/1,729 vs train 2,104 (n = 20). **First paint bytes** (`bundle-size.mjs`, brotli): train + fix **238,712 B JS / 19,018 B CSS** vs dev 238,797 / 19,250, so −85 B / −232 B real; hash-normalised entry chunk 238,360 vs dev 238,804 (−444 B). Over the earlier train head (238,541 real, 238,299 normalised) it is +171 / +61 B: the 12-line trigger in `pwa.svelte.ts`. The merged train stays below dev. **Specs** (`~/bin/slot`, targeted: `pwa pwa-update served lazy-offline prefs-offline`, `CI=1 --workers=1 --retries=0`): - dev-01 Chromium 1440 + 390 at `e2397446`: 7 passed, 15 skipped, 0 failed. - dev-02 WebKit 1440 + 390 at `8ace38d0` (same code; later commits touch only the Chromium-only spec): 8 passed, 14 skipped, 0 failed. - `lazy-offline` on `origin/port/rows` before the fix: 3/3 failed; `origin/dev`: 3/3 passed. ### Notes - The same worker change would also speed up **dev/prod today** (about 500 ms with the worker blocked on this link). The fix ships through #875, so BM15 carries it to prod. - Offline readiness now starts when the list has arrived plus about 300 ms, not at install; opening the app offline in the first second after the very first visit would miss lazy chunks. I judge that acceptable and noted it here; say if you want the old guarantee. - The branch needs to be merged into #875's branch (`port/rows`) by the owner/orchestrator; I did not touch `port/rows` itself or the train branch. ### Commands - Builds: `~/bin/slot` on dev-01/dev-02, `nix develop -c bash -c 'bun install --frozen-lockfile; cd apps/web && bun run build'` per commit; sizes: `node apps/web/scripts/bundle-size.mjs apps/web/dist --json`. - Rig: `~/bisect-rig/rig.mjs <dists> <labels> <n> <out.jsonl> [webkit] [nosw]` under `~/bisect-rig/run.sh` (takes `/tmp/mac-bench.lock`, EXIT trap), run inside `nix develop`. Example: `./run.sh dev,devB,843,fix3 20 final.jsonl`. Control = the same dist served twice. - Specs: `~/bin/slot ~/specrun-sw.sh <server bin> chromium-1440 chromium-390` (dev-01, #887 binary) and `... webkit-1440 webkit-390` (dev-02).
Author
Owner

Accepted the service-worker fix into #875 (port/rows → e2397446).

  • First paint: −85 B real and −444 B hash-normalised vs dev, which meets the rule (≤ dev). The +171 B against the earlier train head comes from the trigger and is fine, because the gate is dev.
  • Offline: lazy chunks may be uncached during the first ~300 ms of the very first visit. That's accepted, because they fall back to the network.
  • What's left:
    • restack #877 and #878;
    • re-run the BM15 train with the full matrix and perf vs dev on a matching #887 aarch64 binary.
  • Budget: the total JS budget is approved (79634).
Accepted the service-worker fix into #875 (`port/rows` → `e2397446`). - **First paint:** −85 B real and −444 B hash-normalised vs dev, which meets the rule (≤ dev). The +171 B against the earlier train head comes from the trigger and is fine, because the gate is dev. - **Offline:** lazy chunks may be uncached during the first ~300 ms of the very first visit. That's accepted, because they fall back to the network. - **What's left:** - restack #877 and #878; - re-run the BM15 train with the full matrix and perf vs dev on a matching #887 aarch64 binary. - **Budget:** the total JS budget is approved (79634).
Author
Owner

BM15 train, interim (11-05 ~17:30 IST): static gates done, matrix running

Train branch sim/bm15 head 14577f0e (dev ca7dead1 = #914 + #929, then the 15 PRs in the order above). Full Playwright matrices: WebKit started 16:25 IST on dev-02, Chromium 17:27 IST on dev-01 (it waited for another agent's slot job) (first run, CI=1 --workers=1 --retries=0, SLOT_TRAIN=1).

Restack: #877 → 4191d499 and #878 → a95db69f (merged the new port/rows e2397446), then re-merged again after the dev merge below.

Ported to dev (one merge commit per owner, pushed): #887 13cae26a, #875 a2897fc5, #877 55ad9e20, #878 5fd0967a, #904 ffa1f99b, #903 505064a7, #832 e9ad5127, #841 fd021862, #843 5ba2be84, #946 34abbbb1, #941 3ff49fb4. The train contains every one of them as an ancestor and its tree is unchanged by that re-merge, so train = these heads.

Conflicts and what decided them (BM14e replaced Inspector.svelte with components/style/*, which is the root of #946 and #941):

  • #887 vs BM14e: plan.rs keeps dev's ExpectedOwners.
  • #946: its sheetDialog() moves to style/StyleSheet.svelte; dev dropped the unused .visually-hidden rule (a0c7130a) that #946's hidden dialog title uses, so it is restored in base.css.
  • #941: Inspector's registerExtraIcons() and the swatch bounce move into the style tabs; image goes back into the first icon table (the page menu's "Add cover" draws it before any idle sheet has loaded); BM14e's bar icons move into the table itself (icons.test.ts reads that table: Tools.svelte add/paperclip were reported missing).
  • #904 vs BM14e: the "Show hidden blocks" button joins the desktop bar row (Tools.svelte) and the palette gets "peek"; the phone's rest bar has no such button (palette only).
  • Lazy-import count in lazy-ui-plugin.ts is now 30; vite.config.ts idle-screens regex is dev's plus dialog-focus and icons-extra.
  • Budgets: see below.

Static gates (dev-01, Nix shell, ~/bin/slot, train lock):

gate train dev ca7dead1
cargo fmt --all --check pass
cargo clippy -j4 --workspace --all-targets --locked -- -D warnings pass
cargo test -j4 --workspace --locked --no-fail-fast 1648 passed, 0 failed
bun run lint (web) pass
vitest web / editor / primitives 192 / 520 / 56 passed
bunx svelte-check --tsconfig ./tsconfig.json 2 errors, 16 warnings, 11 files same (baseline)
bun run check fails at its first step fails the same way, see #958 (actions.gen.ts out of date, a dev defect, not the train's)
node ci/check-ui-primitives.mjs (#941's guard) FAIL, 9 findings the guard does not exist on dev

The guard (blocks, deterministic): #941's check-ui-primitives flags hand-made pills and local press rules in the other PRs' code, which it cannot know about until they meet on one tree: contacts/ContactTop.svelte:15,18 and contacts/ContactsScreen.svelte:200 (#841/#843), tasks/TasksScreen.svelte:69 (#832) — a glass pill built by hand, use <Pill alone>; styles/code-block.css:89 (#903), styles/hidden-blocks.css:44 (#904), styles/note-bars-lazy.css:63,122 and styles/note-bars.css:55 (BM14e, now in dev) — a local :active { scale }, give the button bounce. I did not change those PRs' UI; each needs its owner's fix (or a reasoned entry in the guard's allow-lists, which is kayg's call).

Budgets (needs an ack): the merged train measures 485.6 KB total JS (cap 488.3, approved) and first paint 237,850 B JS / 18,180 B CSS (dev 238,451 / 19,017: −601 B / −837 B). But with BM14e in dev, idle-screens measures 57.5 KB (dev 49.6), and the per-chunk lines must sum to the total. I set every line to its measured size + 0.5 %, dropped the four lines for chunks this build does not emit (widget, table-bar.svelte, PictureViewer, rolldown-runtime), and gave idle-screens the rest: 4e42f732, one commit on the train only, total unchanged at 488.3. That raises the idle-screens line (48.55 → 58.48) inside the approved total.

Still running: Chromium and WebKit matrices, backend perf ABAB on perf-01/02 (both locks held), WebKit on the Mac VM (first row and first menu done, below in the final table).

## BM15 train, interim (11-05 ~17:30 IST): static gates done, matrix running Train branch `sim/bm15` head `14577f0e` (dev `ca7dead1` = #914 + #929, then the 15 PRs in the order above). Full Playwright matrices: WebKit started 16:25 IST on dev-02, Chromium 17:27 IST on dev-01 (it waited for another agent's slot job) (first run, `CI=1 --workers=1 --retries=0`, `SLOT_TRAIN=1`). **Restack:** #877 → `4191d499` and #878 → `a95db69f` (merged the new `port/rows` `e2397446`), then re-merged again after the dev merge below. **Ported to dev (one merge commit per owner, pushed):** #887 `13cae26a`, #875 `a2897fc5`, #877 `55ad9e20`, #878 `5fd0967a`, #904 `ffa1f99b`, #903 `505064a7`, #832 `e9ad5127`, #841 `fd021862`, #843 `5ba2be84`, #946 `34abbbb1`, #941 `3ff49fb4`. The train contains every one of them as an ancestor and its tree is unchanged by that re-merge, so train = these heads. **Conflicts and what decided them** (BM14e replaced `Inspector.svelte` with `components/style/*`, which is the root of #946 and #941): - #887 vs BM14e: `plan.rs` keeps dev's `ExpectedOwners`. - #946: its `sheetDialog()` moves to `style/StyleSheet.svelte`; dev dropped the unused `.visually-hidden` rule (`a0c7130a`) that #946's hidden dialog title uses, so it is restored in `base.css`. - #941: Inspector's `registerExtraIcons()` and the swatch `bounce` move into the style tabs; `image` goes back into the first icon table (the page menu's "Add cover" draws it before any idle sheet has loaded); BM14e's bar icons move into the table itself (`icons.test.ts` reads that table: `Tools.svelte` `add`/`paperclip` were reported missing). - #904 vs BM14e: the "Show hidden blocks" button joins the desktop bar row (`Tools.svelte`) and the palette gets "peek"; the phone's rest bar has no such button (palette only). - Lazy-import count in `lazy-ui-plugin.ts` is now 30; `vite.config.ts` idle-screens regex is dev's plus `dialog-focus` and `icons-extra`. - Budgets: see below. **Static gates (dev-01, Nix shell, `~/bin/slot`, train lock):** | gate | train | dev `ca7dead1` | |---|---|---| | `cargo fmt --all --check` | pass | | | `cargo clippy -j4 --workspace --all-targets --locked -- -D warnings` | pass | | | `cargo test -j4 --workspace --locked --no-fail-fast` | 1648 passed, 0 failed | | | `bun run lint` (web) | pass | | | vitest web / editor / primitives | 192 / 520 / 56 passed | | | `bunx svelte-check --tsconfig ./tsconfig.json` | 2 errors, 16 warnings, 11 files | **same** (baseline) | | `bun run check` | **fails at its first step** | **fails the same way**, see #958 (`actions.gen.ts` out of date, a dev defect, not the train's) | | `node ci/check-ui-primitives.mjs` (#941's guard) | **FAIL, 9 findings** | the guard does not exist on dev | **The guard (blocks, deterministic):** #941's `check-ui-primitives` flags hand-made pills and local press rules in the other PRs' code, which it cannot know about until they meet on one tree: `contacts/ContactTop.svelte:15,18` and `contacts/ContactsScreen.svelte:200` (#841/#843), `tasks/TasksScreen.svelte:69` (#832) — a glass pill built by hand, use `<Pill alone>`; `styles/code-block.css:89` (#903), `styles/hidden-blocks.css:44` (#904), `styles/note-bars-lazy.css:63,122` and `styles/note-bars.css:55` (BM14e, now in dev) — a local `:active { scale }`, give the button `bounce`. I did not change those PRs' UI; each needs its owner's fix (or a reasoned entry in the guard's allow-lists, which is kayg's call). **Budgets (needs an ack):** the merged train measures 485.6 KB total JS (cap 488.3, approved) and first paint 237,850 B JS / 18,180 B CSS (dev 238,451 / 19,017: −601 B / −837 B). But with BM14e in dev, `idle-screens` measures 57.5 KB (dev 49.6), and the per-chunk lines must sum to the total. I set every line to its measured size + 0.5 %, dropped the four lines for chunks this build does not emit (`widget`, `table-bar.svelte`, `PictureViewer`, `rolldown-runtime`), and gave `idle-screens` the rest: `4e42f732`, one commit on the train only, total unchanged at 488.3. That raises the `idle-screens` line (48.55 → 58.48) inside the approved total. Still running: Chromium and WebKit matrices, backend perf ABAB on perf-01/02 (both locks held), WebKit on the Mac VM (first row and first menu done, below in the final table).
Author
Owner

BM15 train: RED (11-05, ~21:00 IST)

Train: sim/bm15 14577f0e (what the full matrix ran on). sim/bm15-final 1613d6dd = the same plus every PR's current head, i.e. the fixes pushed after the matrix (below). Base: dev ca7dead1 (= #914 12103f1c + #929). Dev has moved since (b5e8dcb2, docs only, #962).

PR heads (all merged into the train; each owner's branch now contains dev, so each ports back by itself)

PR head PR head
#887 13cae26a #832 46dee691
#909 98afda51 (unchanged) #841 40adc307
#926 a16e51f4→e05e6b76 #843 7761f4d2
#875 6d63ec3d #932 f03397cf (unchanged)
#877 8437df9a #946 e59eb683
#878 f023551a #950 4a6af836 (unchanged)
#904 f30e0bb7 #941 3ff49fb4
#903 505064a7

Gate table

gate result
fmt cargo fmt --all --check pass
clippy cargo clippy -j4 --workspace --all-targets --locked -- -D warnings pass
cargo test -j4 --workspace --locked --no-fail-fast pass: 1648 passed, 0 failed
bun run lint (apps/web) pass
vitest web / editor / test:primitives pass: 192 / 520 / 56
bunx svelte-check --tsconfig ./tsconfig.json 2 errors, 16 warnings = dev's baseline (same). bun run check fails on dev too: #958
node ci/check-ui-primitives.mjs FAIL, 9 findings (see below)
perf/web.sh --bundle-only --gate pass at 1613d6dd (first paint ≤ dev; total 485.45 ≤ 488.3)
Playwright Chromium (dev-01, 12 projects) FAIL: 1487 passed, 25 failed (+throttled: pass)
Playwright WebKit (dev-02, 8 projects) FAIL: 1485 passed, 23 failed
flaky rule (--repeat-each=10, train and dev) 22 distinct failures reproduce 10/10 on the train, 0/10 on dev: all block. 3 do not reproduce, opened #964
backend perf ABAB on perf-01+02 (both locks) RED, not attributed: see below
WebKit cold first row (Mac VM) pass: train 1,639 / 1,654 ms vs dev 2,130 / 2,133 (n = 20 each, 2 copies each)
WebKit first interaction (Mac VM) right-click menu: train 3–4 ms vs dev 1–2 ms at 3 s and 6 s after nav start (n = 20; slower by 2 ms, so not ≤ dev); at "as soon as the first row is there" 177–180 vs 162–163 ms (+15 ms) but 490 ms earlier in wall time; swipe at that point: train 192/223 ms vs dev 240/262, frame worst 60 vs 59 ms. Swipe at 3 s: not measured (my detector saw no transform in either build)
build time vs dev web vite build median 11.6 s train vs 10.0 s dev (5 runs each, dev-01, +1.6 s): ~67 more emitted chunk files

Blocking (every one reproduces 10/10 on the train, 0/10 on dev)

Each was triaged on a per-PR bisect build (dev + that PR) and the owner's branch fixed where the cause was clear. Fixed and verified at the fix head in WebKit, 1 run: list-chrome, hidden-blocks, phone-foot, note-bars-fit, note-pills, shortcuts, preload (palette). Fixed on the branch, not yet verified by a full run (pushed after): preload.spec:89 (phone Search) and lazy-ui.spec:70 (#875 6d63ec3d), a11y-high Style (#946, see below).

failing spec (project) cause owner and fix
list-chrome:143 (390) .top-chrome > * always had translate: 0 var(--hold, 0px); even a translate of 0 is a transform on the glass pills' ancestor, which breaks the backdrop blur #926 a16e51f4, e05e6b76: only while data-held
hidden-blocks:53 (390) BM14e's phone rest bar (Style, Write, Attach) has no place for #904's button #904 f30e0bb7: a fourth button only on a note with hidden blocks
phone-foot:12 (390) Contacts has an app tab now (#841); the spec expected one #841 40adc307 (spec)
note-bars-fit:67 (all) #946's hidden dialog title is .visually-hidden and the check reported it as cut off #946 314015e1 (spec)
shortcuts:265 (1440) tooltip draws one kbd chip per key #875 3a9f5d57 (spec)
preload:118 palette (all) Palette and the Tasks screen share the dates chunk #832 46dee691 (spec)
preload:89 phone Search (chromium-390) the rows' engine is warmed at once on touch and imports idle-screens #875 6d63ec3d (spec)
lazy-ui:70 idle-screens (all) first aborted idle-screens css is the preload; its link stays in styleSheets and cssRules throws a SecurityError #875 6d63ec3d (spec): the loaded sheet must have rules. The product recovers in place (debug run: the sheet loads)
a11y-high:107 Style (all), Note info and Insert (390) phone spec opens buttons BM14e's bar no longer has (#946 4268141f: skip). Style (1440 and 390) still fails after 3 rounds: the Style sheet builds its tabs in stages after it opens (BM14e), so the set of focusable controls changes while the 40-Tab loop runs, and the loop of #946 (dialog-focus.ts) leaves the dialog at Shift+Tab #9–15. I stopped patching it (max 3 review rounds, brief) needs a simpler design in #946: trap focus with a sentinel pair (or inert on everything outside the sheet) instead of computing first/last control

check-ui-primitives (deterministic, 9 findings): hand-made glass pills contacts/ContactTop.svelte:15,18, contacts/ContactsScreen.svelte:200, tasks/TasksScreen.svelte:69 (use <Pill alone>); local :active { scale } in styles/code-block.css:89 (#903), styles/hidden-blocks.css:44 (#904), styles/note-bars-lazy.css:63,122 and styles/note-bars.css:55 (BM14e, already in dev: so dev + #941 alone fails it). Not changed by me: each is an owner's UI call.

Backend perf (perf-02, both locks held, release builds, dev-01 → control host → perf-02 with sha256 checks; plain 10k Home, 5 warm runs × session)

First ABAB, 3 sessions (dev, train, dev-again), medians of p50. The dev-vs-dev control stayed within ±5 % on every row below:

metric dev train Δ control
sync.durable_write 16.10 ms 20.73 +29 % −0.4 %
sync.save_ack 2.59 3.16 +22 % −4.7 %
uploads.response 104.6 137.3 +31 % −1.6 %
uploads.save_ack 3.33 3.90 +17 % −3.1 %
storm.save_ack 4.79 6.40 +34 % −3.4 %
storm.typing 1.84 s 2.46 +34 % 0 %
storm.edits_per_s 5,426 4,063 −25 % 0 %
open.api_get 2.68 3.44 +29 % +0.6 %
home.page, page_next, page_title, page_tag, open.note, search., cold., mem.* flat or within the control

Reads are flat; every write path is slower (fsync-bound: durable write, save ack, uploads, edit storm). With #887's flagged-Home config (20 % archived, 5 % hidden; dev has no such concept so it is not comparable) the same write rows are +19..+36 %.

Bisect (second session set, same harness, dev + one PR each; the control drifted ±12 % this time, the shared host disk): sync.durable_write dev 17.9 → #887 +4 %, #909 +12 %, #932 −10 %, train +20 %, control −12 %; storm.save_ack #909 +14 %, #887 +2 %, #932 −15 %, train +18 %; storm.typing #909 +10 %; trash.delete #909 +15 %, #887 +10 %; uploads.response #887 +11 %, #909 −1 %. #909 (the owner fast path in core/action.rs, auth/sharing.rs, notes/home.rs) is the main suspect for the write path, #887 adds a smaller share; #932 (mail, not on any hot path) is flat. n = 2 per label in a noisy session, so this points, it does not prove. mail-bench: not run (needs --dir and the plan's fixture; #932's own baseline is already RED on mail.list_flat_pct, #78549).

Nothing may be slower than dev, so this is RED for #909 and #887 until a quiet re-run (control within ±3 %) shows flat. Raw per-session JSON is on the perf VM (~/perf/bm15/out, out2, small files); I deleted the seeded Homes.

Budgets

Total JS 485.45 KB ≤ 488.3 (approved, #903). First paint at 1613d6dd vs dev ca7dead1: JS raw 821,689 vs 822,513, gzip 273,841 vs 274,318, brotli 232,269 vs 232,862 B; CSS raw 99,368 vs 104,896, gzip 20,325 vs 21,237, brotli 17,798 vs 18,571 B; hash-normalised brotli JS 237,551 vs 238,271, CSS 18,225 vs 19,017. All ≤ dev. One commit on the train only, 4e42f732: with BM14e in dev, idle-screens is 57.5 KB (dev 49.6); I set every chunk line to its measured size + 0.5 %, dropped the four lines for chunks that do not exist (widget, table-bar.svelte, PictureViewer, rolldown-runtime) and gave idle-screens the rest (58.48), so the lines still sum to the approved 488.3. That raises one line inside the approved total; needs your ack.

Issues opened

#958 (dev: bun run check fails at its first step, a stale actions.gen.ts), #964 (stability: composer-tasks:51 and admin:64).

Commands

Chromium: ~/bm15-matrix.sh chromium on dev-01; WebKit: ~/bm15-matrix.sh webkit on dev-02 (train lock, SLOT_TRAIN=1 CI=1, bunx playwright test --project=… --workers=1 --retries=0 over the 12 / 8 projects of the BM14e script, + throttled-1440/390 --no-deps). Reruns: bunx playwright test <spec> --project=<p> --repeat-each=10 --workers=1 --retries=0, on bm15-train and bm15-dev worktrees. Perf: calternal-perf --bin <bin> --work <dir> --sizes 10k --runs 5 --cold-runs 1 --idle-secs 0 under ~/bin/perf-lock on both VMs. Mac: ~/bisect-rig/rig.mjs (first row) and rig2.mjs (menu, swipe) under /tmp/mac-bench.lock, WebKit, 2.5 MB/s + 40 ms CDN, fresh context per run, dev/train/dev/train.

Not done

Re-run of the full matrix on 1613d6dd; the #946 Style loop; perf re-run on a quiet disk and per-PR fix for the write path; the 9 guard findings.

## BM15 train: **RED** (11-05, ~21:00 IST) Train: `sim/bm15` **`14577f0e`** (what the full matrix ran on). `sim/bm15-final` **`1613d6dd`** = the same plus every PR's current head, i.e. the fixes pushed after the matrix (below). Base: dev `ca7dead1` (= #914 `12103f1c` + #929). **Dev has moved since** (`b5e8dcb2`, docs only, #962). ### PR heads (all merged into the train; each owner's branch now contains dev, so each ports back by itself) | PR | head | PR | head | |---|---|---|---| | #887 | `13cae26a` | #832 | `46dee691` | | #909 | `98afda51` (unchanged) | #841 | `40adc307` | | #926 | `a16e51f4`→`e05e6b76` | #843 | `7761f4d2` | | #875 | `6d63ec3d` | #932 | `f03397cf` (unchanged) | | #877 | `8437df9a` | #946 | `e59eb683` | | #878 | `f023551a` | #950 | `4a6af836` (unchanged) | | #904 | `f30e0bb7` | #941 | `3ff49fb4` | | #903 | `505064a7` | | | ### Gate table | gate | result | |---|---| | fmt `cargo fmt --all --check` | pass | | clippy `cargo clippy -j4 --workspace --all-targets --locked -- -D warnings` | pass | | `cargo test -j4 --workspace --locked --no-fail-fast` | pass: 1648 passed, 0 failed | | `bun run lint` (apps/web) | pass | | vitest web / editor / `test:primitives` | pass: 192 / 520 / 56 | | `bunx svelte-check --tsconfig ./tsconfig.json` | 2 errors, 16 warnings = **dev's baseline** (same). `bun run check` fails on dev too: #958 | | `node ci/check-ui-primitives.mjs` | **FAIL**, 9 findings (see below) | | `perf/web.sh --bundle-only --gate` | pass at `1613d6dd` (first paint ≤ dev; total 485.45 ≤ 488.3) | | Playwright Chromium (dev-01, 12 projects) | **FAIL**: 1487 passed, 25 failed (+throttled: pass) | | Playwright WebKit (dev-02, 8 projects) | **FAIL**: 1485 passed, 23 failed | | flaky rule (`--repeat-each=10`, train and dev) | **22 distinct failures reproduce 10/10 on the train, 0/10 on dev: all block.** 3 do not reproduce, opened #964 | | backend perf ABAB on perf-01+02 (both locks) | **RED, not attributed**: see below | | WebKit cold first row (Mac VM) | **pass**: train 1,639 / 1,654 ms vs dev 2,130 / 2,133 (n = 20 each, 2 copies each) | | WebKit first interaction (Mac VM) | right-click menu: **train 3–4 ms vs dev 1–2 ms** at 3 s and 6 s after nav start (n = 20; slower by 2 ms, so not ≤ dev); at "as soon as the first row is there" 177–180 vs 162–163 ms (+15 ms) but 490 ms earlier in wall time; swipe at that point: train 192/223 ms vs dev 240/262, frame worst 60 vs 59 ms. Swipe at 3 s: **not measured** (my detector saw no transform in either build) | | build time vs dev | web `vite build` median 11.6 s train vs 10.0 s dev (5 runs each, dev-01, +1.6 s): ~67 more emitted chunk files | ### Blocking (every one reproduces 10/10 on the train, 0/10 on dev) Each was triaged on a per-PR bisect build (dev + that PR) and the owner's branch fixed where the cause was clear. **Fixed and verified at the fix head in WebKit, 1 run:** list-chrome, hidden-blocks, phone-foot, note-bars-fit, note-pills, shortcuts, preload (palette). **Fixed on the branch, not yet verified by a full run (pushed after):** `preload.spec:89` (phone Search) and `lazy-ui.spec:70` (#875 `6d63ec3d`), `a11y-high` Style (#946, see below). | failing spec (project) | cause | owner and fix | |---|---|---| | `list-chrome:143` (390) | `.top-chrome > *` always had `translate: 0 var(--hold, 0px)`; even a translate of 0 is a transform on the glass pills' ancestor, which breaks the backdrop blur | #926 `a16e51f4`, `e05e6b76`: only while `data-held` | | `hidden-blocks:53` (390) | BM14e's phone rest bar (Style, Write, Attach) has no place for #904's button | #904 `f30e0bb7`: a fourth button only on a note with hidden blocks | | `phone-foot:12` (390) | Contacts has an app tab now (#841); the spec expected one | #841 `40adc307` (spec) | | `note-bars-fit:67` (all) | #946's hidden dialog title is `.visually-hidden` and the check reported it as cut off | #946 `314015e1` (spec) | | `shortcuts:265` (1440) | tooltip draws one `kbd` chip per key | #875 `3a9f5d57` (spec) | | `preload:118` palette (all) | Palette and the Tasks screen share the `dates` chunk | #832 `46dee691` (spec) | | `preload:89` phone Search (chromium-390) | the rows' engine is warmed at once on touch and imports `idle-screens` | #875 `6d63ec3d` (spec) | | `lazy-ui:70` idle-screens (all) | first aborted `idle-screens` css is the preload; its link stays in `styleSheets` and `cssRules` throws a SecurityError | #875 `6d63ec3d` (spec): the loaded sheet must have rules. The product recovers in place (debug run: the sheet loads) | | `a11y-high:107` Style (all), Note info and Insert (390) | phone spec opens buttons BM14e's bar no longer has (#946 `4268141f`: skip). **Style (1440 and 390) still fails after 3 rounds**: the Style sheet builds its tabs in stages after it opens (BM14e), so the set of focusable controls changes while the 40-Tab loop runs, and the loop of #946 (`dialog-focus.ts`) leaves the dialog at Shift+Tab #9–15. I stopped patching it (max 3 review rounds, brief) | **needs a simpler design in #946**: trap focus with a sentinel pair (or `inert` on everything outside the sheet) instead of computing first/last control | **`check-ui-primitives` (deterministic, 9 findings)**: hand-made glass pills `contacts/ContactTop.svelte:15,18`, `contacts/ContactsScreen.svelte:200`, `tasks/TasksScreen.svelte:69` (use `<Pill alone>`); local `:active { scale }` in `styles/code-block.css:89` (#903), `styles/hidden-blocks.css:44` (#904), `styles/note-bars-lazy.css:63,122` and `styles/note-bars.css:55` (BM14e, already in dev: so dev + #941 alone fails it). Not changed by me: each is an owner's UI call. ### Backend perf (perf-02, both locks held, release builds, dev-01 → control host → perf-02 with sha256 checks; plain 10k Home, 5 warm runs × session) First ABAB, 3 sessions (dev, train, dev-again), medians of p50. The dev-vs-dev control stayed within ±5 % on every row below: | metric | dev | train | Δ | control | |---|---|---|---|---| | sync.durable_write | 16.10 ms | 20.73 | **+29 %** | −0.4 % | | sync.save_ack | 2.59 | 3.16 | **+22 %** | −4.7 % | | uploads.response | 104.6 | 137.3 | **+31 %** | −1.6 % | | uploads.save_ack | 3.33 | 3.90 | **+17 %** | −3.1 % | | storm.save_ack | 4.79 | 6.40 | **+34 %** | −3.4 % | | storm.typing | 1.84 s | 2.46 | **+34 %** | 0 % | | storm.edits_per_s | 5,426 | 4,063 | **−25 %** | 0 % | | open.api_get | 2.68 | 3.44 | +29 % | +0.6 % | | home.page, page_next, page_title, page_tag, open.note, search.*, cold.*, mem.* | | | flat or within the control | | Reads are flat; **every write path is slower** (fsync-bound: durable write, save ack, uploads, edit storm). With #887's flagged-Home config (20 % archived, 5 % hidden; dev has no such concept so it is not comparable) the same write rows are +19..+36 %. **Bisect** (second session set, same harness, dev + one PR each; the control drifted ±12 % this time, the shared host disk): `sync.durable_write` dev 17.9 → #887 +4 %, **#909 +12 %**, #932 −10 %, train +20 %, control −12 %; `storm.save_ack` #909 **+14 %**, #887 +2 %, #932 −15 %, train +18 %; `storm.typing` #909 +10 %; `trash.delete` #909 +15 %, #887 +10 %; `uploads.response` #887 +11 %, #909 −1 %. **#909 (the owner fast path in `core/action.rs`, `auth/sharing.rs`, `notes/home.rs`) is the main suspect for the write path, #887 adds a smaller share**; #932 (mail, not on any hot path) is flat. n = 2 per label in a noisy session, so this points, it does not prove. `mail-bench`: **not run** (needs `--dir` and the plan's fixture; #932's own baseline is already RED on `mail.list_flat_pct`, #78549). Nothing may be slower than dev, so this is **RED** for #909 and #887 until a quiet re-run (control within ±3 %) shows flat. Raw per-session JSON is on the perf VM (`~/perf/bm15/out`, `out2`, small files); I deleted the seeded Homes. ### Budgets Total JS 485.45 KB ≤ 488.3 (approved, #903). First paint at `1613d6dd` vs dev `ca7dead1`: **JS raw 821,689 vs 822,513, gzip 273,841 vs 274,318, brotli 232,269 vs 232,862 B; CSS raw 99,368 vs 104,896, gzip 20,325 vs 21,237, brotli 17,798 vs 18,571 B; hash-normalised brotli JS 237,551 vs 238,271, CSS 18,225 vs 19,017.** All ≤ dev. One commit on the train only, `4e42f732`: with BM14e in dev, `idle-screens` is 57.5 KB (dev 49.6); I set every chunk line to its measured size + 0.5 %, dropped the four lines for chunks that do not exist (`widget`, `table-bar.svelte`, `PictureViewer`, `rolldown-runtime`) and gave `idle-screens` the rest (58.48), so the lines still sum to the approved 488.3. That raises one line **inside** the approved total; needs your ack. ### Issues opened #958 (dev: `bun run check` fails at its first step, a stale `actions.gen.ts`), #964 (stability: `composer-tasks:51` and `admin:64`). ### Commands Chromium: `~/bm15-matrix.sh chromium` on dev-01; WebKit: `~/bm15-matrix.sh webkit` on dev-02 (train lock, `SLOT_TRAIN=1 CI=1`, `bunx playwright test --project=… --workers=1 --retries=0` over the 12 / 8 projects of the BM14e script, + `throttled-1440/390 --no-deps`). Reruns: `bunx playwright test <spec> --project=<p> --repeat-each=10 --workers=1 --retries=0`, on `bm15-train` and `bm15-dev` worktrees. Perf: `calternal-perf --bin <bin> --work <dir> --sizes 10k --runs 5 --cold-runs 1 --idle-secs 0` under `~/bin/perf-lock` on both VMs. Mac: `~/bisect-rig/rig.mjs` (first row) and `rig2.mjs` (menu, swipe) under `/tmp/mac-bench.lock`, WebKit, 2.5 MB/s + 40 ms CDN, fresh context per run, dev/train/dev/train. ### Not done Re-run of the full matrix on `1613d6dd`; the #946 Style loop; perf re-run on a quiet disk and per-PR fix for the write path; the 9 guard findings.
Author
Owner

#926 head bf3d7193 GREEN (gate table on the PR).

**#926** head `bf3d7193` GREEN (gate table on the PR).
Author
Owner

#950 head 94fb425a GREEN (gate table on the PR). Flaky-lane note: WebKit-390 composer-tasks failed once under load, 60/60 on repeat.

**#950** head `94fb425a` GREEN (gate table on the PR). Flaky-lane note: WebKit-390 composer-tasks failed once under load, 60/60 on repeat.
Author
Owner

#903 head 3a634dd1 BLOCKED: first-paint JS +182 B vs dev, total budget 404.2→488.3 raised in its budgets.json (details on the PR). All specs pass.

**#903** head `3a634dd1` BLOCKED: first-paint JS +182 B vs dev, total budget 404.2→488.3 raised in its budgets.json (details on the PR). All specs pass.
Author
Owner

#941 head 5662cd00 GREEN (gate table on the PR; its check job still reports 3 findings that sit in dev's note-bars css).

**#941** head `5662cd00` GREEN (gate table on the PR; its check job still reports 3 findings that sit in dev's note-bars css).
Author
Owner

#946 head c55a3b42 GREEN (Style focus-loop spec skipped; table on the PR).

**#946** head `c55a3b42` GREEN (Style focus-loop spec skipped; table on the PR).
Author
Owner

#832 a1a205fc, #841 63faf541, #843 a5aea510 (stack): all specs green, BLOCKED on first-paint JS (+34 / +79 / +233 B vs dev) and a new check-ui-primitives finding each (needs #941 in dev first). Details on each PR.

**#832** `a1a205fc`, **#841** `63faf541`, **#843** `a5aea510` (stack): all specs green, BLOCKED on first-paint JS (+34 / +79 / +233 B vs dev) and a new check-ui-primitives finding each (needs #941 in dev first). Details on each PR.
Author
Owner

#932 head 4a068556 GREEN (Rust gates; flaky note: one cold-build 101 in cargo test, 2 clean reruns).

**#932** head `4a068556` GREEN (Rust gates; flaky note: one cold-build 101 in cargo test, 2 clean reruns).
Author
Owner

#904, #875, #877, #878 not gated: each carries #887 (Rust, write-path regression lane). They go once #887 is in dev.

**#904, #875, #877, #878** not gated: each carries #887 (Rust, write-path regression lane). They go once #887 is in dev.
Author
Owner

Merged into dev (34c14822): #926, #950, #946, #932. #941 conflicts with #926 in TopPills, so it needs a dev merge and a re-gate.

Merged into dev (34c14822): #926, #950, #946, #932. #941 conflicts with #926 in TopPills, so it needs a dev merge and a re-gate.
Author
Owner

#941 head 01d4a61c GREEN again on dev 789fdaa9 (conflicts resolved, primitives check clean, first paint −388 B). Only the known Style focus-loop spec fails.

**#941** head `01d4a61c` GREEN again on dev `789fdaa9` (conflicts resolved, primitives check clean, first paint −388 B). Only the known Style focus-loop spec fails.
Author
Owner

Pill/press replacements done and gated (primitives check clean, specs green Chromium+WebKit): #832 955e0e46, #841 52a7444d, #843 ae5aec76 (stack), #903 25374a8b. None is GREEN yet: first-paint bytes vs dev 850c23a9 (232.565 KB): #832 +221 B, #841 +155 B (and its idle-screens is 51.320 > 51.3: gate RED), #843 +311 B, #903 +229 B. The cut cannot be one shared credit (it only counts once, and every later PR is then measured against the lowered dev), so each PR needs its own; the safe lazy candidates I found are small (see my report). Waiting on how you want to proceed.

**Pill/press replacements done and gated** (primitives check clean, specs green Chromium+WebKit): #832 `955e0e46`, #841 `52a7444d`, #843 `ae5aec76` (stack), #903 `25374a8b`. **None is GREEN yet: first-paint bytes vs dev `850c23a9` (232.565 KB): #832 +221 B, #841 +155 B (and its `idle-screens` is 51.320 > 51.3: gate RED), #843 +311 B, #903 +229 B.** The cut cannot be one shared credit (it only counts once, and every later PR is then measured against the lowered dev), so each PR needs its own; the safe lazy candidates I found are small (see my report). Waiting on how you want to proceed.
Author
Owner

First-paint attribution (no code pushed; none of #832 / #841 / #843 / #903 is GREEN). Sourcemap diff of the index chunk vs dev 850c23a9 (raw bytes by module; hash-normalised brotli of the whole chunk in the last column, sourcemap builds):

PR modules it adds to first paint hash-normalised Δ
#832 App.svelte +269 (the Tasks derived/effect/away/template, "tasks" in the route allow-list), lazy-ui.svelte.ts +105 (the lazy('TasksScreen', …) entry), apps.ts +14 +358 B
#841 App.svelte +269 (same pattern), Sidebar.svelte +142 (the Contacts button), apps.ts +127 (openApp, built:true), lazy-ui.svelte.ts +100 +357 B
#843 (over #841) Icon.svelte +149 (c-contacts, the app-tab icon, so it must be in the first table) stack +266 B
#903 lazy-code.ts +470 (the lazyCode ViewPlugin + fence regex + dynamic import) +245 B

All of it is registration/route/hook code, not screen UI (the Tasks/Contacts screens and the code-block UI are already lazy chunks). A shared host would shrink the second app's cost by ~110 B but not the first. #841 idle-screens: the module diff is +9 raw bytes of attribution noise and +12 B hash-normalised; the +75 B real is chunk-hash/export-name churn, and dev itself sits 55 B under the 51.3 line.
Not safe to cut without your call (each needs a decision): the only unused-at-first-paint icons are the 9 I listed (~280 B brotli, one PR), the other candidate modules (wipe, link-targets, cm-tags, backdrop, peek, trash) are first-paint logic.

**First-paint attribution (no code pushed; none of #832 / #841 / #843 / #903 is GREEN).** Sourcemap diff of the `index` chunk vs dev `850c23a9` (raw bytes by module; hash-normalised brotli of the whole chunk in the last column, sourcemap builds): | PR | modules it adds to first paint | hash-normalised Δ | |---|---|---| | #832 | `App.svelte` +269 (the `Tasks` derived/effect/`away`/template, "tasks" in the route allow-list), `lazy-ui.svelte.ts` +105 (the `lazy('TasksScreen', …)` entry), `apps.ts` +14 | +358 B | | #841 | `App.svelte` +269 (same pattern), `Sidebar.svelte` +142 (the Contacts button), `apps.ts` +127 (`openApp`, `built:true`), `lazy-ui.svelte.ts` +100 | +357 B | | #843 (over #841) | `Icon.svelte` +149 (`c-contacts`, the app-tab icon, so it must be in the first table) | stack +266 B | | #903 | `lazy-code.ts` +470 (the `lazyCode` ViewPlugin + fence regex + dynamic import) | +245 B | All of it is registration/route/hook code, not screen UI (the Tasks/Contacts screens and the code-block UI are already lazy chunks). A shared host would shrink the *second* app's cost by ~110 B but not the first. #841 `idle-screens`: the module diff is +9 raw bytes of attribution noise and +12 B hash-normalised; the +75 B real is chunk-hash/export-name churn, and dev itself sits 55 B under the 51.3 line. Not safe to cut without your call (each needs a decision): the only unused-at-first-paint icons are the 9 I listed (~280 B brotli, one PR), the other candidate modules (`wipe`, `link-targets`, `cm-tags`, backdrop, peek, trash) are first-paint logic.
Author
Owner

#975 (new, standalone) head d6e3e934 GREEN: first paint −7.08 KB (232.617 → 225.535), specs green Chromium + WebKit, Mac WebKit popup latency and typing flat vs dev. Ready for you to merge.

**#975** (new, standalone) head `d6e3e934` GREEN: first paint −7.08 KB (232.617 → 225.535), specs green Chromium + WebKit, Mac WebKit popup latency and typing flat vs dev. Ready for you to merge.
Author
Owner

#841 head 788aa772: icons moved to icons-extra (screenshots clean, specs green), first paint still +124 B over dev 02cdf878 (232.741 vs 232.617), so NOT GREEN; ~150 B left, waits for kayg's registration answer. Also: dev itself measures idle-screens 51.334 > its 51.3 line.

**#841** head `788aa772`: icons moved to `icons-extra` (screenshots clean, specs green), first paint still +124 B over dev `02cdf878` (232.741 vs 232.617), so NOT GREEN; ~150 B left, waits for kayg's registration answer. Also: dev itself measures idle-screens 51.334 > its 51.3 line.
Author
Owner

#977 head 2d0e82ff GREEN: first paint 232.533 vs dev 232.617 (−84 B), specs green Chromium + WebKit, svelte-check 0 errors.

**#977** head `2d0e82ff` GREEN: first paint 232.533 vs dev 232.617 (−84 B), specs green Chromium + WebKit, svelte-check 0 errors.
Author
Owner

#972 head 4ec3633f GREEN: fmt, clippy -D warnings, notes_crash 3/3 pass (test-only diff).

**#972** head `4ec3633f` GREEN: fmt, clippy -D warnings, notes_crash 3/3 pass (test-only diff).
Author
Owner

#875 / #877 / #878 compile again (ExpectedOwners restored; dev merged, forwarded): heads 367c7d37 / a54f90f2 / d96ee32f; fmt + clippy all-targets rc 0 on #875 and on the #878 tip. Full gates wait for #887.

**#875 / #877 / #878** compile again (ExpectedOwners restored; dev merged, forwarded): heads 367c7d37 / a54f90f2 / d96ee32f; fmt + clippy all-targets rc 0 on #875 and on the #878 tip. Full gates wait for #887.
Author
Owner

final tasks backend gate status; supersedes earlier pending results:

  • #894, bf08566987f9211d23920074d8f6694da1ee48d5, blocked. notes save +35.76%, typing +17.60%; per-field stale dependency #928 remains open. rust/browser/crash retries/brotli/tick/reorder pass.
  • #799, 7656894724bc5689f4ae3807665c703c455107bd, blocked / held pending supersession and missing-scope disposition.
  • #798, f1600ed05109566241d1daa19c91be1d2b81ed1c, blocked / held pending supersession and missing-scope disposition.

full gate table and all perf deltas · raw evidence

recommend keeping #894, with conditional closure of #798/#799 only after review probes and promotion/physical-line moves are accounted for. nothing merged or closed. all own jobs stopped, both perf locks released.

final tasks backend gate status; supersedes earlier pending results: - #894, `bf08566987f9211d23920074d8f6694da1ee48d5`, **blocked**. notes save +35.76%, typing +17.60%; per-field stale dependency #928 remains open. rust/browser/crash retries/brotli/tick/reorder pass. - #799, `7656894724bc5689f4ae3807665c703c455107bd`, **blocked / held** pending supersession and missing-scope disposition. - #798, `f1600ed05109566241d1daa19c91be1d2b81ed1c`, **blocked / held** pending supersession and missing-scope disposition. [full gate table and all perf deltas](https://git.kayg.org/kayg/calternal/pulls/894#issuecomment-81463) · [raw evidence](https://git.kayg.org/attachments/48ee4b2d-0f18-45b2-a584-d4210f1adbd4) recommend keeping #894, with conditional closure of #798/#799 only after review probes and promotion/physical-line moves are accounted for. nothing merged or closed. all own jobs stopped, both perf locks released.
Author
Owner

#976 head 60e33b34: bytes −97 B vs dev, unit 59, Chromium 81 + WebKit 79 (pre-pause) green; Mac toast frames pending: std VMs paused (corrected spec ready). Not GREEN until that runs.

**#976** head `60e33b34`: bytes −97 B vs dev, unit 59, Chromium 81 + WebKit 79 (pre-pause) green; **Mac toast frames pending: std VMs paused** (corrected spec ready). Not GREEN until that runs.
Author
Owner

#894 cross-check: head bf085669 does not modify the #909 files named here (core/action.rs, auth/sharing.rs, notes/home.rs). Its executor is reached from Tasks write/delete paths; normal Notes typing and notes.save still use the unchanged room/save.rs and history/batch.rs paths. The fresh post-pin ABAB is pending the maintainer's CPU-pin confirmation.

#894 cross-check: head `bf085669` does not modify the #909 files named here (`core/action.rs`, `auth/sharing.rs`, `notes/home.rs`). Its executor is reached from Tasks write/delete paths; normal Notes typing and `notes.save` still use the unchanged `room/save.rs` and `history/batch.rs` paths. The fresh post-pin ABAB is pending the maintainer's CPU-pin confirmation.
Author
Owner

WebKit specs pending: std VMs paused. No new WebKit job was queued on dev-02, and no #909 gate process was active on dev-01. ABAB is deferred until after CPU pinning and release of both perf locks.

WebKit specs pending: std VMs paused. No new WebKit job was queued on dev-02, and no #909 gate process was active on dev-01. ABAB is deferred until after CPU pinning and release of both perf locks.
Author
Owner

#976 head 60e33b34 GREEN: Mac toast-morph frames flat vs dev (p50 17/17, p95 25.3/25.0, settle 73.5/74.5 ms, ≥50 ms frames 6.7/6.7 per 1000); Mac sanity pill-press 2 passed. Side finding: dev's own toast morph has 50–68 ms frames (~7/1000), not from this PR.

**#976** head `60e33b34` GREEN: Mac toast-morph frames flat vs dev (p50 17/17, p95 25.3/25.0, settle 73.5/74.5 ms, ≥50 ms frames 6.7/6.7 per 1000); Mac sanity pill-press 2 passed. Side finding: dev's own toast morph has 50–68 ms frames (~7/1000), not from this PR.
Author
Owner

GREEN, re-gated on dev c808ef67 (Option A), merge order #841 → #843 → #832 → #903:

  • #841 84fd36c1: first JS 225.500 KB (dev 225.407: +93 B; prod 233.040: −7.54 KB); Chromium 154 + WebKit 153 pass.
  • #843 3c329848 (stack on #841): 225.665 (+258 B / −7.38 KB); Chromium 69 + WebKit 69 pass.
  • #832 d9bfb49b: 225.782 (+375 B / −7.26 KB); Chromium 73 + WebKit 73 pass. Note: its index budget line needed 2.4 KB, moved from the unbuilt widget chunk's reserved line (total unchanged, nothing raised).
  • #903 571ebdd1: 225.708 (+301 B / −7.33 KB); Chromium 106 + WebKit 98 pass.
    All: svelte-check 0 errors, unit tests pass, check-ui-primitives clean, bundle gate rc 0. After all four land, dev's first paint is about 226.9 KB, 6 KB under prod's 233.04 KB (sum of the four deltas, +1.03 KB).
**GREEN, re-gated on dev `c808ef67` (Option A), merge order #841 → #843 → #832 → #903:** - **#841** `84fd36c1`: first JS 225.500 KB (dev 225.407: +93 B; prod 233.040: −7.54 KB); Chromium 154 + WebKit 153 pass. - **#843** `3c329848` (stack on #841): 225.665 (+258 B / −7.38 KB); Chromium 69 + WebKit 69 pass. - **#832** `d9bfb49b`: 225.782 (+375 B / −7.26 KB); Chromium 73 + WebKit 73 pass. Note: its `index` budget line needed 2.4 KB, moved from the unbuilt `widget` chunk's reserved line (total unchanged, nothing raised). - **#903** `571ebdd1`: 225.708 (+301 B / −7.33 KB); Chromium 106 + WebKit 98 pass. All: svelte-check 0 errors, unit tests pass, `check-ui-primitives` clean, bundle gate rc 0. After all four land, dev's first paint is about 226.9 KB, 6 KB under prod's 233.04 KB (sum of the four deltas, +1.03 KB).
Author
Owner

Correction to the last line above: the four deltas sum to +93 +165 (#843 over #841) +375 +301 = +934 B, so dev's first paint after all four is about 226.34 KB, about 6.7 KB under prod's 233.04 KB (not 226.9 / 6 KB).

Correction to the last line above: the four deltas sum to +93 +165 (#843 over #841) +375 +301 = +934 B, so dev's first paint after all four is about 226.34 KB, about 6.7 KB under prod's 233.04 KB (not 226.9 / 6 KB).
Author
Owner

#832 head bbba9d9c GREEN on dev 3f1f88a6 with Contacts: both apps registered, first JS 226.136 KB (+205 B vs dev, −6.90 KB vs prod 233.040), Tasks + Contacts specs 96/96 on Chromium and WebKit, svelte-check 0 errors, bundle gate rc 0, budget lines moved only (index 226.25, widget 4.35; chunk sum = total 488.3).

**#832** head `bbba9d9c` GREEN on dev `3f1f88a6` with Contacts: both apps registered, first JS 226.136 KB (+205 B vs dev, −6.90 KB vs prod 233.040), Tasks + Contacts specs 96/96 on Chromium and WebKit, svelte-check 0 errors, bundle gate rc 0, budget lines moved only (index 226.25, widget 4.35; chunk sum = total 488.3).
Author
Owner

#894 cross-check: its current diff does not touch #909's core/action.rs, auth/sharing.rs, or notes/home.rs, and it does not overlap #887's current Notes test files. The executor and status_action::plan_one are reached by explicit Tasks writes; ordinary typing and notes.save still use the unchanged room/save.rs and history/batch.rs paths. I found no shared code-path cause at source level; the fresh post-pin ABAB will confirm whether the earlier Notes deltas reproduce.

#894 cross-check: its current diff does not touch #909's `core/action.rs`, `auth/sharing.rs`, or `notes/home.rs`, and it does not overlap #887's current Notes test files. The executor and `status_action::plan_one` are reached by explicit Tasks writes; ordinary typing and `notes.save` still use the unchanged `room/save.rs` and `history/batch.rs` paths. I found no shared code-path cause at source level; the fresh post-pin ABAB will confirm whether the earlier Notes deltas reproduce.
Sign in to join this conversation.
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#947
No description provided.