Web: full page reloads on in-app navigation after deploys (old build chunks gone); keep previous immutable assets, graceful update #423

Open
opened 2026-09-29 09:32:29 +00:00 by kayg · 81 comments
Owner

Bug (owner, 2026-09-29, calternal.cloud, with a screenshot of a blank page mid-reload at /files)

"I notice that a full refresh of the page happens too often. This happened when I was inside a folder and clicked the top 'Files' header to navigate to the root of the FS tree."

Leading hypothesis (orchestrator, verify first)

deploy/deploy-cloud.sh bakes the web build into the server image, and the server serves _app/immutable/* only from the current build (crates/calternal-server/src/main.rs around line 991). After each deploy (about 15 per day now), a tab opened on the old build requests route chunks that no longer exist. SvelteKit then falls back to a full location.href navigation, which shows a blank page until the new app boots.
No code in apps/web forces a reload on that link (checked: no data-sveltekit-reload, no location.assign, except the error-page retry and the OAuth flows).

Work

  1. Reproduce: serve build A, open /files/<folder>, then swap in build B (a different commit) without reloading the tab, and click the "Files" header. Record whether the page does a full document load (Performance API navigation entries, or a pagehide counter). Also try without a build change, to rule out a second cause: header link markup, a goto to a different origin or base, invalidateAll, the service worker, or an +error fallback. Report every cause found.
  2. Fix the deploy cause: keep the hashed _app/immutable/** files from previous builds for at least the last 10 deploys, or 7 days, whichever is longer. Hashed names never collide, so a union directory is safe. Store them in the persistent data volume (for example /data/.system/web-assets/, bounded and pruned by age) and serve them with the existing immutable cache headers. Old tabs then keep navigating in-app. HTML and version.json stay current.
  3. Graceful update: use SvelteKit's version.pollInterval and the updated state. When a new build exists, the next navigation performs a full load on purpose (not as a crash fallback), and only at a navigation boundary, never while the User is typing in the composer or an editor with unsaved state. Optionally show a quiet toast, "calternal was updated", with a Reload action. Never reload silently in the middle of an edit.
  4. Blank flash: when a full load does happen, app.html shows the themed background and the chrome skeleton immediately, from inline critical CSS, instead of a blank page.

Proof

  • An e2e with two builds: open a page on build A, switch the server to build B, and perform 20 in-app navigations across modes. Assert zero full document loads until the update boundary, then exactly one.
  • Measure the size of the retained-asset store after 10 simulated deploys.
  • The adversarial round: request paths under _app/immutable/ with traversal, huge names and unknown hashes. Unknown hashes return 404, never an index fallback.
    Gates as in the preamble.
## Bug (owner, 2026-09-29, calternal.cloud, with a screenshot of a blank page mid-reload at /files) "I notice that a full refresh of the page happens too often. This happened when I was inside a folder and clicked the top 'Files' header to navigate to the root of the FS tree." ## Leading hypothesis (orchestrator, verify first) `deploy/deploy-cloud.sh` bakes the web build into the server image, and the server serves `_app/immutable/*` only from the current build (`crates/calternal-server/src/main.rs` around line 991). After each deploy (about 15 per day now), a tab opened on the old build requests route chunks that no longer exist. SvelteKit then falls back to a full `location.href` navigation, which shows a blank page until the new app boots. No code in `apps/web` forces a reload on that link (checked: no `data-sveltekit-reload`, no `location.assign`, except the error-page retry and the OAuth flows). ## Work 1. **Reproduce:** serve build A, open `/files/<folder>`, then swap in build B (a different commit) without reloading the tab, and click the "Files" header. Record whether the page does a full document load (Performance API `navigation` entries, or a `pagehide` counter). Also try without a build change, to rule out a second cause: header link markup, a `goto` to a different origin or base, `invalidateAll`, the service worker, or an `+error` fallback. Report every cause found. 2. **Fix the deploy cause:** keep the hashed `_app/immutable/**` files from previous builds for at least the last 10 deploys, or 7 days, whichever is longer. Hashed names never collide, so a union directory is safe. Store them in the persistent data volume (for example `/data/.system/web-assets/`, bounded and pruned by age) and serve them with the existing immutable cache headers. Old tabs then keep navigating in-app. HTML and `version.json` stay current. 3. **Graceful update:** use SvelteKit's `version.pollInterval` and the `updated` state. When a new build exists, the next navigation performs a full load *on purpose* (not as a crash fallback), and only at a navigation boundary, never while the User is typing in the composer or an editor with unsaved state. Optionally show a quiet toast, "calternal was updated", with a Reload action. Never reload silently in the middle of an edit. 4. **Blank flash:** when a full load does happen, `app.html` shows the themed background and the chrome skeleton immediately, from inline critical CSS, instead of a blank page. ## Proof - An e2e with two builds: open a page on build A, switch the server to build B, and perform 20 in-app navigations across modes. Assert zero full document loads until the update boundary, then exactly one. - Measure the size of the retained-asset store after 10 simulated deploys. - The adversarial round: request paths under `_app/immutable/` with traversal, huge names and unknown hashes. Unknown hashes return 404, never an index fallback. Gates as in the preamble.
Author
Owner

Started work on job/reload-423 from dev at 191b179baa. I am tracing immutable asset serving, deploy persistence, and SvelteKit update/navigation handling before implementing the retention and safe update boundary.

Started work on job/reload-423 from dev at 191b179baac3ef4f5bebfe07ce91c4b7a887ace2. I am tracing immutable asset serving, deploy persistence, and SvelteKit update/navigation handling before implementing the retention and safe update boundary.
Author
Owner

Correction (owner): the page still blanks after a hard refresh, so the stale-chunk hypothesis does not explain this bug. The job was relaunched with a reproduce-first brief and a list of candidate causes. Keeping old chunks across deploys stays in scope as a secondary fix.

Correction (owner): the page still blanks after a hard refresh, so the stale-chunk hypothesis does not explain this bug. The job was relaunched with a reproduce-first brief and a list of candidate causes. Keeping old chunks across deploys stays in scope as a secondary fix.
Author
Owner

Starting #423 on job/reload-423, based on dev at 191b179baac3ef4f5bebfe07ce91c4b7a887ace2.

Starting #423 on `job/reload-423`, based on `dev` at `191b179baac3ef4f5bebfe07ce91c4b7a887ace2`.
Author
Owner

Reproduction work found a separate client-navigation edge case in the fallback path: crates/calternal-server/src/main.rs::serve_spa returns the embedded index.html for any missing URL, including unknown /_app/immutable/... chunks. That can make a missing stale chunk look like a successful document response rather than a clear 404. The worktree is clean at this point; I am building the production server for the pre-fix A/B reproduction, then I will add retained hashed assets and an explicit missing-chunk 404.

Reproduction work found a separate client-navigation edge case in the fallback path: `crates/calternal-server/src/main.rs::serve_spa` returns the embedded `index.html` for any missing URL, including unknown `/_app/immutable/...` chunks. That can make a missing stale chunk look like a successful document response rather than a clear 404. The worktree is clean at this point; I am building the production server for the pre-fix A/B reproduction, then I will add retained hashed assets and an explicit missing-chunk 404.
Author
Owner

Production reproduction finding (#423): on one unchanged local production binary, after loading /files and opening Documents/Archive, clicking the Files root crumb issued a second main-frame document request. The e2e assertion observed 2 document loads where the same-build path must stay at 1. This run had no service worker registered and had not swapped builds. The baseline stopped at this finding before the A→B stale-chunk probe; I am adding navigation/chunk request diagnostics to locate the fallback trigger.

Production reproduction finding (#423): on one unchanged local production binary, after loading `/files` and opening `Documents/Archive`, clicking the Files root crumb issued a second main-frame `document` request. The e2e assertion observed 2 document loads where the same-build path must stay at 1. This run had no service worker registered and had not swapped builds. The baseline stopped at this finding before the A→B stale-chunk probe; I am adding navigation/chunk request diagnostics to locate the fallback trigger.
Author
Owner

Lead for the reload job: apps/web/src/lib/components/app-sidebar.svelte:200 threw TypeError: Cannot read properties of null (reading 'origin') inside afterNavigate whenever from.url or to.url was null (found by the #406 job in Photos and Composer e2e runs). Fixed on dev in the next push (optional chaining). Check whether this exception, or another one thrown during client navigation, makes SvelteKit fall back to a full document load on the Files crumb. Reproduce with the fix reverted, then with it applied.

Lead for the reload job: `apps/web/src/lib/components/app-sidebar.svelte:200` threw `TypeError: Cannot read properties of null (reading 'origin')` inside `afterNavigate` whenever `from.url` or `to.url` was null (found by the #406 job in Photos and Composer e2e runs). Fixed on dev in the next push (optional chaining). Check whether this exception, or another one thrown during client navigation, makes SvelteKit fall back to a full document load on the Files crumb. Reproduce with the fix reverted, then with it applied.
Author
Owner

The second production reproduction captured the fallback details. The Files crumb issued GET /files as a main-frame document request, returned 200 text/html, and fired pagehide (1). Its resolved link had no target, no data-sveltekit-reload, and no <base target> existed. No /_app/immutable/ request failed. This is a same-build navigation fallback, separate from missing stale chunks. I am routing the Files-owned crumb through the page's explicit SvelteKit goto callback, while preserving modified clicks and external-link semantics.

The second production reproduction captured the fallback details. The Files crumb issued `GET /files` as a main-frame document request, returned `200 text/html`, and fired `pagehide` (`1`). Its resolved link had no target, no `data-sveltekit-reload`, and no `<base target>` existed. No `/_app/immutable/` request failed. This is a same-build navigation fallback, separate from missing stale chunks. I am routing the Files-owned crumb through the page's explicit SvelteKit `goto` callback, while preserving modified clicks and external-link semantics.
Author
Owner

Follow-up production finding (#423): the explicit Files breadcrumb route remained client-side, but the next same-build navigation through the Files sidebar row issued another main-frame document request (the sidebar Files row stays in client navigation: 2 loads versus 1 expected). The sidebar uses a separate anchor with a drawer-close click callback. I added an explicit SvelteKit goto path there too; both paths still preserve modifier clicks, download links, external relations, and forced-reload ancestors.

Follow-up production finding (#423): the explicit Files breadcrumb route remained client-side, but the next same-build navigation through the Files sidebar row issued another main-frame document request (`the sidebar Files row stays in client navigation`: 2 loads versus 1 expected). The sidebar uses a separate anchor with a drawer-close click callback. I added an explicit SvelteKit `goto` path there too; both paths still preserve modifier clicks, download links, external relations, and forced-reload ancestors.
Author
Owner

Finished on branch job/reload-423 at head 91fdf54ed6.

Built:

  • A production reload probe with a generated 614-file Documents tree and a two-build server-restart harness.
  • A root Files crumb and ordinary sidebar route handling through SvelteKit, preserving native modified and external links.
  • Safe update polling and a navigation-boundary reload that waits while an editor has unsaved state.
  • Inline themed page chrome in app.html for a full document load.
  • Persistent immutable frontend asset retention under the Instance data root. It retains at least the newest ten deployments and all deployments from the last seven days, serves old hashed routes with immutable headers, and returns 404 for invalid or unknown routes.
  • The ten-deployment store unit test measured 560 bytes.

Findings:

  • The baseline production reproduction confirmed that clicking the Files crumb could load a new document even on the same build. The route was a same-origin Files link; the event was a real pagehide/document navigation.
  • After routing the Files crumb through SvelteKit, the production probe passed that check and then found that the Files sidebar row still caused a document load (navigation count 2 instead of 1). Commit 67185d45 routes ordinary sidebar clicks through SvelteKit.
  • The job timebox ended before I could repeat the full production probe after that final sidebar fix.

Gate output:

  • cargo fmt --check: exit 0; no output.

  • cargo clippy -p calternal-fs --all-targets -- -D warnings:
    Checking calternal-fs v0.1.0 (/home/kayg/Developer/calternal-wt/reload-423/crates/calternal-fs)
    Finished dev profile [unoptimized + debuginfo] target(s) in 3.20s

  • cargo test -p calternal-fs:
    test result: ok. 42 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 15.12s
    Doc-tests calternal_fs: 0 passed; 0 failed.

  • bun run check:
    $ node scripts/check-type-tokens.mjs && svelte-kit sync && svelte-check --tsconfig ./tsconfig.json
    Text sizes use shared role tokens.
    Loading svelte-check in workspace: /home/kayg/Developer/calternal-wt/reload-423/apps/web
    Getting Svelte diagnostics...

    svelte-check found 0 errors and 0 warnings

Known gaps:

  • No final two-build run with 20 mode navigations or proof of exactly one intentional reload at the update boundary.
  • The production run stopped at the sidebar assertion before testing Back, phone menu, asset switching, and final screenshots at 390/820/1440 px in light and dark.
  • The server-level adversarial HTTP path round and the simulated live deployment-store measurement were not completed. Hostile and unknown paths have filesystem unit coverage; the ten-generation unit test measured 560 bytes.
  • Full workspace gates, bun run test, and calternal-server clippy/test were not run. The server binary built successfully. These gates remain for follow-up.

Decisions not specified in DESIGN.md:

  • The retained store uses digest-named flat files and bounded manifests below the persistent Instance data root, with a 1 GiB total cap. The retention window is the newest ten deployments plus any deployment younger than seven days.
  • A confirmed SvelteKit update triggers a full load at the next safe navigation boundary. Note edits keep the boundary unsafe until persistence settles.

The final SidebarLinks change is committed, but its production verification remains open. No pushes, deploys, or merges were performed by this job.

Finished on branch job/reload-423 at head 91fdf54ed6277c06d3252ec16f36b4e98f96abd8. Built: - A production reload probe with a generated 614-file Documents tree and a two-build server-restart harness. - A root Files crumb and ordinary sidebar route handling through SvelteKit, preserving native modified and external links. - Safe update polling and a navigation-boundary reload that waits while an editor has unsaved state. - Inline themed page chrome in app.html for a full document load. - Persistent immutable frontend asset retention under the Instance data root. It retains at least the newest ten deployments and all deployments from the last seven days, serves old hashed routes with immutable headers, and returns 404 for invalid or unknown routes. - The ten-deployment store unit test measured 560 bytes. Findings: - The baseline production reproduction confirmed that clicking the Files crumb could load a new document even on the same build. The route was a same-origin Files link; the event was a real pagehide/document navigation. - After routing the Files crumb through SvelteKit, the production probe passed that check and then found that the Files sidebar row still caused a document load (navigation count 2 instead of 1). Commit 67185d45 routes ordinary sidebar clicks through SvelteKit. - The job timebox ended before I could repeat the full production probe after that final sidebar fix. Gate output: - cargo fmt --check: exit 0; no output. - cargo clippy -p calternal-fs --all-targets -- -D warnings: Checking calternal-fs v0.1.0 (/home/kayg/Developer/calternal-wt/reload-423/crates/calternal-fs) Finished dev profile [unoptimized + debuginfo] target(s) in 3.20s - cargo test -p calternal-fs: test result: ok. 42 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 15.12s Doc-tests calternal_fs: 0 passed; 0 failed. - bun run check: $ node scripts/check-type-tokens.mjs && svelte-kit sync && svelte-check --tsconfig ./tsconfig.json Text sizes use shared role tokens. Loading svelte-check in workspace: /home/kayg/Developer/calternal-wt/reload-423/apps/web Getting Svelte diagnostics... svelte-check found 0 errors and 0 warnings Known gaps: - No final two-build run with 20 mode navigations or proof of exactly one intentional reload at the update boundary. - The production run stopped at the sidebar assertion before testing Back, phone menu, asset switching, and final screenshots at 390/820/1440 px in light and dark. - The server-level adversarial HTTP path round and the simulated live deployment-store measurement were not completed. Hostile and unknown paths have filesystem unit coverage; the ten-generation unit test measured 560 bytes. - Full workspace gates, bun run test, and calternal-server clippy/test were not run. The server binary built successfully. These gates remain for follow-up. Decisions not specified in DESIGN.md: - The retained store uses digest-named flat files and bounded manifests below the persistent Instance data root, with a 1 GiB total cap. The retention window is the newest ten deployments plus any deployment younger than seven days. - A confirmed SvelteKit update triggers a full load at the next safe navigation boundary. Note edits keep the boundary unsafe until persistence settles. The final SidebarLinks change is committed, but its production verification remains open. No pushes, deploys, or merges were performed by this job.
Author
Owner

Resuming on job/reload-423 at 91fdf54ed6277c06d3252ec16f36b4e98f96abd8 (base dev at 09e238d5276b4f7a1eaf457eef07677cf9e3e9cc). The retained immutable asset store, safe update boundary, boot shell, and route-level workaround commits are present. I am tracing the generic reason SvelteKit skipped ordinary internal links, then expanding the reload crawler before final verification.

Resuming on `job/reload-423` at `91fdf54ed6277c06d3252ec16f36b4e98f96abd8` (base `dev` at `09e238d5276b4f7a1eaf457eef07677cf9e3e9cc`). The retained immutable asset store, safe update boundary, boot shell, and route-level workaround commits are present. I am tracing the generic reason SvelteKit skipped ordinary internal links, then expanding the reload crawler before final verification.
Author
Owner

Finding for #423: the event trace shows SvelteKit's document-level click handler receiving the Files crumb and calling preventDefault; the crumb is a same-origin anchor in the document tree. In the installed SvelteKit client (apps/web/node_modules/@sveltejs/kit/src/runtime/client/client.js, load_route), a route-module import error triggers stores.updated.check(), then native_navigation(url) when the running build is stale. That explains a full document load after the click without the router skipping the link. My one-build production repro has not reproduced a skipped click; I am now running the issue's exact A→B fixture to verify the missing retained chunk path before removing the link-specific workarounds.

Finding for #423: the event trace shows SvelteKit's document-level click handler receiving the Files crumb and calling `preventDefault`; the crumb is a same-origin anchor in the document tree. In the installed SvelteKit client (`apps/web/node_modules/@sveltejs/kit/src/runtime/client/client.js`, `load_route`), a route-module import error triggers `stores.updated.check()`, then `native_navigation(url)` when the running build is stale. That explains a full document load after the click without the router skipping the link. My one-build production repro has not reproduced a skipped click; I am now running the issue's exact A→B fixture to verify the missing retained chunk path before removing the link-specific workarounds.
Author
Owner

Production evidence for #423: Build A passed the plain Files crumb check in the real 614-file Fixture. Its resolved href was http://localhost:27061/files, with target="", no data-sveltekit-reload, and no <base target>; the click stayed in the same document. The run later stopped because the existing phone-menu assertion expected an overflow control for Files / Documents / Archive, which fits at 390 px. I have changed the Fixture to use a deeper real folder path so that the phone overflow menu is actually required, and am continuing the A→B proof.

Production evidence for #423: Build A passed the plain Files crumb check in the real 614-file Fixture. Its resolved href was `http://localhost:27061/files`, with `target=""`, no `data-sveltekit-reload`, and no `<base target>`; the click stayed in the same document. The run later stopped because the existing phone-menu assertion expected an overflow control for `Files / Documents / Archive`, which fits at 390 px. I have changed the Fixture to use a deeper real folder path so that the phone overflow menu is actually required, and am continuing the A→B proof.
Author
Owner

Crawler finding for #423: the ModeHeader's “Show folders in this path” control only renders when measured breadcrumb content exceeds the title slot. Even the real six-segment Documents/Archive/Reports/2026/January path did not expose that control in the 390 px production test. The phone check now taps the visible Files crumb directly and asserts that it stays in the same document; the desktop crawler still clicks every visible breadcrumb link.

Crawler finding for #423: the ModeHeader's “Show folders in this path” control only renders when measured breadcrumb content exceeds the title slot. Even the real six-segment Documents/Archive/Reports/2026/January path did not expose that control in the 390 px production test. The phone check now taps the visible Files crumb directly and asserts that it stays in the same document; the desktop crawler still clicks every visible breadcrumb link.
Author
Owner

Verification finding: the earlier A/B run did not use two runtime builds. Both debug servers read the same compile-time apps/web/build directory, and their binaries had identical SHA-256 values; Build A and the current build also reported the same SvelteKit version (1790695400372). That could not test an update boundary. I rebuilt Build A in a detached temporary worktree, which gives it a separate asset directory and version (1790697301589). I will rebuild Build B in the job worktree before rerunning the update test.

Verification finding: the earlier A/B run did not use two runtime builds. Both debug servers read the same compile-time `apps/web/build` directory, and their binaries had identical SHA-256 values; Build A and the current build also reported the same SvelteKit version (`1790695400372`). That could not test an update boundary. I rebuilt Build A in a detached temporary worktree, which gives it a separate asset directory and version (`1790697301589`). I will rebuild Build B in the job worktree before rerunning the update test.
Author
Owner

Crawler finding: the Calendar sidebar's Today link points to /today, which the real server redirects to the user's default Calendar route. A production-browser probe clicked it from the Calendar sidebar and ended at /calendar/week/2026-09-27 with one navigation timing entry, one document request total, and zero pagehide events. The crawler was waiting for the literal /today URL, so it timed out after the valid in-app redirect. I updated both the sidebar and generic anchor crawlers to recognize this DESIGN §29 redirect and continue to assert zero document loads and zero pagehide events.

Crawler finding: the Calendar sidebar's `Today` link points to `/today`, which the real server redirects to the user's default Calendar route. A production-browser probe clicked it from the Calendar sidebar and ended at `/calendar/week/2026-09-27` with one navigation timing entry, one document request total, and zero `pagehide` events. The crawler was waiting for the literal `/today` URL, so it timed out after the valid in-app redirect. I updated both the sidebar and generic anchor crawlers to recognize this DESIGN §29 redirect and continue to assert zero document loads and zero `pagehide` events.
Author
Owner

Crawler finding: the production SPA was still at /today 150 ms after a direct route visit, so the short synchronization window fired before client hydration ran the route's documented redirect to the user's default Calendar view. The route entry is a shell served by the static adapter; the redirect occurs in the route load. I changed the crawler to wait for the Calendar date route instead of treating /today as the final URL.

Crawler finding: the production SPA was still at `/today` 150 ms after a direct route visit, so the short synchronization window fired before client hydration ran the route's documented redirect to the user's default Calendar view. The route entry is a shell served by the static adapter; the redirect occurs in the route load. I changed the crawler to wait for the Calendar date route instead of treating `/today` as the final URL.
Author
Owner

Time-box report for #423. The job reached 4h23m, so work stopped under the owner’s ~4-hour limit.

Committed on job/reload-423:

  • 16f8ddaccb62c12c88ac26f893844c529d353788 — removed the per-link goto workarounds from the Files crumb and sidebar. The controlled minimal repro showed SvelteKit intercepting a plain same-origin anchor (defaultPrevented=true); the document fallback followed a deliberately missing old route chunk. Retaining old immutable chunks is the generic fix already present on this branch. The change keeps ordinary anchors and the phone drawer close callback.

Working tree:

  • apps/web/e2e/reload-423.mjs has an uncommitted expanded crawler and production verification. node --check apps/web/e2e/reload-423.mjs passed with no output; git diff --check passed with no output.
  • Earlier production runs reached the full mode crawl. The most recent completed run exposed a bad desktop Search-preview expectation (there is no desktop “Open” button); the test was corrected to check the real preview and Search result row. A later run passed Calendar, Files, Photos, Analytics and Ask, then stopped on a Settings row selector ambiguity; that selector was corrected to use row position. The current run was stopped during fixture setup when the time-box was reached.

Not completed: commit the crawler, finish its production run (including two builds, 20 navigations, update boundary, screenshots, and retained-asset HTTP probes), merge dev once, run the requested gates, attach screenshots, clean build output, and post the final gate report.

Gate output:

  • node --check apps/web/e2e/reload-423.mjs: passed; no output.
  • git diff --check: passed; no output.
  • cargo fmt --check, per-crate clippy/tests, bun run check, bun run test: NOT RUN.

Decision: the desktop Search preview itself has no navigational Open action. The crawler now covers its rendered preview content and the Search result row; the phone long-press preview Open action is included in screenshot verification but is not yet verified by a completed run.

Time-box report for #423. The job reached 4h23m, so work stopped under the owner’s ~4-hour limit. Committed on `job/reload-423`: - `16f8ddaccb62c12c88ac26f893844c529d353788` — removed the per-link `goto` workarounds from the Files crumb and sidebar. The controlled minimal repro showed SvelteKit intercepting a plain same-origin anchor (`defaultPrevented=true`); the document fallback followed a deliberately missing old route chunk. Retaining old immutable chunks is the generic fix already present on this branch. The change keeps ordinary anchors and the phone drawer close callback. Working tree: - `apps/web/e2e/reload-423.mjs` has an uncommitted expanded crawler and production verification. `node --check apps/web/e2e/reload-423.mjs` passed with no output; `git diff --check` passed with no output. - Earlier production runs reached the full mode crawl. The most recent completed run exposed a bad desktop Search-preview expectation (there is no desktop “Open” button); the test was corrected to check the real preview and Search result row. A later run passed Calendar, Files, Photos, Analytics and Ask, then stopped on a Settings row selector ambiguity; that selector was corrected to use row position. The current run was stopped during fixture setup when the time-box was reached. Not completed: commit the crawler, finish its production run (including two builds, 20 navigations, update boundary, screenshots, and retained-asset HTTP probes), merge `dev` once, run the requested gates, attach screenshots, clean build output, and post the final gate report. Gate output: - `node --check apps/web/e2e/reload-423.mjs`: passed; no output. - `git diff --check`: passed; no output. - `cargo fmt --check`, per-crate clippy/tests, `bun run check`, `bun run test`: NOT RUN. Decision: the desktop Search preview itself has no navigational Open action. The crawler now covers its rendered preview content and the Search result row; the phone long-press preview Open action is included in screenshot verification but is not yet verified by a completed run.
Author
Owner

Round 4 started on job/reload-423. Branch base SHA: 09e238d5276b4f7a1eaf457eef07677cf9e3e9cc; current HEAD: 16f8ddaccb62c12c88ac26f893844c529d353788. Resuming with the expanded production crawler in apps/web/e2e/reload-423.mjs; I will commit that first, then trace the same-build _app/immutable/* responses before changing server behavior.

Round 4 started on `job/reload-423`. Branch base SHA: `09e238d5276b4f7a1eaf457eef07677cf9e3e9cc`; current HEAD: `16f8ddaccb62c12c88ac26f893844c529d353788`. Resuming with the expanded production crawler in `apps/web/e2e/reload-423.mjs`; I will commit that first, then trace the same-build `_app/immutable/*` responses before changing server behavior.
Author
Owner

Round 4 finding (source history): the explicit Files breadcrumb goto() callback was added in 8f7793407 and removed in 16f8ddacc; the latter commit says SvelteKit should own ordinary-anchor navigation. The reported base SHA 09e238d5276b4f7a1eaf457eef07677cf9e3e9cc predates both retention and this callback. I am reproducing from that base with each /_app/immutable/* response recorded so the client-navigation cause is separated from a missing or mismatched chunk.

Round 4 finding (source history): the explicit Files breadcrumb `goto()` callback was added in `8f7793407` and removed in `16f8ddacc`; the latter commit says SvelteKit should own ordinary-anchor navigation. The reported base SHA `09e238d5276b4f7a1eaf457eef07677cf9e3e9cc` predates both retention and this callback. I am reproducing from that base with each `/_app/immutable/*` response recorded so the client-navigation cause is separated from a missing or mismatched chunk.
Author
Owner

Round 4 same-build evidence (branch base 09e238d): after loading /files?path=Documents/Archive, the Files root breadcrumb click was intercepted (defaultPrevented=true) and the document count stayed at 2 before and after the click. Every captured /_app/immutable/* response was 200 with JavaScript or CSS content type; no response was HTML or 404. This first pass used a direct browser navigation, so I am tightening it to a CDP hard refresh with cache bypass and recording the document cache headers before treating the reproduction as ruled out.

Round 4 same-build evidence (branch base `09e238d`): after loading `/files?path=Documents/Archive`, the Files root breadcrumb click was intercepted (`defaultPrevented=true`) and the document count stayed at 2 before and after the click. Every captured `/_app/immutable/*` response was 200 with JavaScript or CSS content type; no response was HTML or 404. This first pass used a direct browser navigation, so I am tightening it to a CDP hard refresh with cache bypass and recording the document cache headers before treating the reproduction as ruled out.
Author
Owner

Same-build root-cause finding (base 09e238d527, before asset retention): I rebuilt the branch-base web app and server together, then ran the hard-refresh Files breadcrumb repro with the afterNavigate URL guard temporarily reverted to its parent version. Build version was 1790707292290; service worker registrations were 0. All 222 captured /_app/immutable/* requests succeeded: 201 200 text/javascript, 21 200 text/css; no immutable request returned HTML or 404. Both hard-refresh document responses had Cache-Control: no-cache.

The app raised Cannot read properties of null (reading 'origin') three times. The Files crumb click was not prevented, and the main-frame document count rose from 3 to 4 (/files returned 200 text/html, no-cache). This reproduces the same-build reload without any failed or stale asset: the unguarded app-sidebar.svelte afterNavigate callback throws while a navigation URL is null, so the client router does not intercept the link. I am validating the existing from?.url && to?.url guard against the same pre-retention server build and will keep an automated regression probe for this hard-refresh path. Full request evidence is in artifacts/reload-423/base-same-build-assets.json in the worktree.

Same-build root-cause finding (base 09e238d5276b4f7a1eaf457eef07677cf9e3e9cc, before asset retention): I rebuilt the branch-base web app and server together, then ran the hard-refresh Files breadcrumb repro with the `afterNavigate` URL guard temporarily reverted to its parent version. Build version was `1790707292290`; service worker registrations were 0. All 222 captured `/_app/immutable/*` requests succeeded: 201 `200 text/javascript`, 21 `200 text/css`; no immutable request returned HTML or 404. Both hard-refresh document responses had `Cache-Control: no-cache`. The app raised `Cannot read properties of null (reading 'origin')` three times. The Files crumb click was not prevented, and the main-frame document count rose from 3 to 4 (`/files` returned `200 text/html`, `no-cache`). This reproduces the same-build reload without any failed or stale asset: the unguarded `app-sidebar.svelte` `afterNavigate` callback throws while a navigation URL is null, so the client router does not intercept the link. I am validating the existing `from?.url && to?.url` guard against the same pre-retention server build and will keep an automated regression probe for this hard-refresh path. Full request evidence is in `artifacts/reload-423/base-same-build-assets.json` in the worktree.
Author
Owner

Confirmed the same-build root cause with paired production bundles from branch base 09e238d5276b4f7a1eaf457eef07677cf9e3e9cc, before asset retention. On the unguarded afterNavigate build, every captured immutable request was 200 (201 text/javascript, 21 text/css), both refreshed HTML responses were 200 text/html with Cache-Control: no-cache, and the User had no service worker. Three Cannot read properties of null (reading 'origin') errors left the Files crumb un-intercepted and added one document load (3 → 4). The unguarded request log is artifacts/reload-423/base-same-build-unguarded-assets.json.

After restoring the existing from?.url && to?.url guard in the same branch-base source, the hard-refresh probe passed: 148 immutable requests all returned 200 JS/CSS, there were no browser errors or service workers, and the Files click stayed in the same document (3 → 3). The full response log is artifacts/reload-423/base-guarded/base-same-build-assets.json. This rules out a missing embedded chunk, stale HTML cache, or service worker as the same-build trigger. I added the hard-refresh regression probe and clarified the guard’s comment in the job branch.

Confirmed the same-build root cause with paired production bundles from branch base `09e238d5276b4f7a1eaf457eef07677cf9e3e9cc`, before asset retention. On the unguarded `afterNavigate` build, every captured immutable request was 200 (`201 text/javascript`, `21 text/css`), both refreshed HTML responses were 200 `text/html` with `Cache-Control: no-cache`, and the User had no service worker. Three `Cannot read properties of null (reading 'origin')` errors left the Files crumb un-intercepted and added one document load (3 → 4). The unguarded request log is `artifacts/reload-423/base-same-build-unguarded-assets.json`. After restoring the existing `from?.url && to?.url` guard in the same branch-base source, the hard-refresh probe passed: 148 immutable requests all returned 200 JS/CSS, there were no browser errors or service workers, and the Files click stayed in the same document (3 → 3). The full response log is `artifacts/reload-423/base-guarded/base-same-build-assets.json`. This rules out a missing embedded chunk, stale HTML cache, or service worker as the same-build trigger. I added the hard-refresh regression probe and clarified the guard’s comment in the job branch.
Author
Owner

Merge note: origin/dev had removed the earlier #423 immutable asset store and fallback, the SvelteKit update-boundary logic and version polling, the themed boot shell, and the dedicated two-build crawler. This job explicitly requires those behaviors and their production verification, so the merge result retains those #423 paths while taking the newer dev UI, shared harness, package lock and unrelated source changes. I resolved the sidebar overlap by keeping dev's current Calendar sidebar and the null-URL guard.

Merge note: `origin/dev` had removed the earlier #423 immutable asset store and fallback, the SvelteKit update-boundary logic and version polling, the themed boot shell, and the dedicated two-build crawler. This job explicitly requires those behaviors and their production verification, so the merge result retains those #423 paths while taking the newer dev UI, shared harness, package lock and unrelated source changes. I resolved the sidebar overlap by keeping dev's current Calendar sidebar and the null-URL guard.
Author
Owner

Starting round 4 on job/reload-423 at 7542d909b (merged origin/dev); resuming with the immutable-path regression test uncommitted. I will commit it, reproduce same-build asset requests against the pre-retention server, then fix the specific fallback root cause and verify both production crawler cases.

Starting round 4 on job/reload-423 at 7542d909b (merged origin/dev); resuming with the immutable-path regression test uncommitted. I will commit it, reproduce same-build asset requests against the pre-retention server, then fix the specific fallback root cause and verify both production crawler cases.
Author
Owner

Round 4 finding: I built the pre-retention server from 8f7793407 with its matching production web build and ran the hard-refresh Files probe. It recorded 148 /_app/immutable/* responses: 134 were 200 text/javascript and 14 were 200 text/css; none returned HTML or 404. Both document responses were 200 text/html with Cache-Control: no-cache. The page had zero service-worker registrations. The Files crumb click was intercepted, and the document count stayed at 3 before and after that click. So this same-build probe found no missing chunk, embed-path mismatch, stale HTML response, or service worker.

The old build did log two Cannot read properties of null (reading 'origin') browser errors in the sidebar afterNavigate callback. Current dev includes df02c3957, which guards both navigation URLs before reading .origin; I will verify the merged production build reports no such errors. Full per-request details are in artifacts/reload-423/base-same-build-assets.json.

Round 4 finding: I built the pre-retention server from 8f7793407 with its matching production web build and ran the hard-refresh Files probe. It recorded 148 `/_app/immutable/*` responses: 134 were 200 `text/javascript` and 14 were 200 `text/css`; none returned HTML or 404. Both document responses were 200 `text/html` with `Cache-Control: no-cache`. The page had zero service-worker registrations. The Files crumb click was intercepted, and the document count stayed at 3 before and after that click. So this same-build probe found no missing chunk, embed-path mismatch, stale HTML response, or service worker. The old build did log two `Cannot read properties of null (reading 'origin')` browser errors in the sidebar `afterNavigate` callback. Current `dev` includes df02c3957, which guards both navigation URLs before reading `.origin`; I will verify the merged production build reports no such errors. Full per-request details are in `artifacts/reload-423/base-same-build-assets.json`.
Author
Owner

Round 4 resumed on job/reload-423 at dcdd1b3d5. Worktree is clean; the expanded crawler is already committed as 3cd8b515b. Branch base is 369ab6a2f. I am rebuilding that base to record the same-build hard-refresh request statuses and content types before the retention fix.

Round 4 resumed on job/reload-423 at dcdd1b3d5. Worktree is clean; the expanded crawler is already committed as 3cd8b515b. Branch base is 369ab6a2f. I am rebuilding that base to record the same-build hard-refresh request statuses and content types before the retention fix.
Author
Owner

Correction: the job fork point is 191b179ba (parent of the first #423 work, 9d3913e31). 369ab6a2f is a later merge of moving origin/dev, not the branch base; its server build failed with missing calternal_dav::areas/read_many symbols. I am rerunning on 191b179ba.

Correction: the job fork point is 191b179ba (parent of the first #423 work, 9d3913e31). 369ab6a2f is a later merge of moving origin/dev, not the branch base; its server build failed with missing calternal_dav::areas/read_many symbols. I am rerunning on 191b179ba.
Author
Owner

Resuming round 4 on branch job/reload-423. Current head: dcdd1b3d5; worktree is clean and the expanded crawler is already committed as 3cd8b515b. Current shared base ancestor: 369ab6a2f. I am continuing with the same-build request trace against the pre-retention revision, then will verify the specific fix and required gates.

Resuming round 4 on branch job/reload-423. Current head: dcdd1b3d5; worktree is clean and the expanded crawler is already committed as 3cd8b515b. Current shared base ancestor: 369ab6a2f. I am continuing with the same-build request trace against the pre-retention revision, then will verify the specific fix and required gates.
Author
Owner

Same-build rerun on the pre-retention build (_app/version.json 1790731065822): 222 /_app/immutable/* requests across 74 distinct URLs; all 201 JavaScript responses were 200 text/javascript and all 21 CSS responses were 200 text/css. No request failed, returned 404, or returned HTML. The three document responses were 200 text/html with Cache-Control: no-cache; the fresh browser had zero service-worker registrations.

The Files crumb click was not intercepted (defaultPrevented=false), the main-document count rose from 3 to 4, and the browser reported three Cannot read properties of null (reading 'origin') errors. This isolates the same-build reload to the unguarded afterNavigate URL comparison in app-sidebar.svelte; it was not a missing embedded chunk, stale HTML, or service worker. The guard is present in the current branch from df02c3957 and the production same-build probe asserts it.

Full request list and response headers: artifacts/reload-423/rerun-pre-retention/base-same-build-assets.json.

Same-build rerun on the pre-retention build (`_app/version.json` 1790731065822): 222 `/_app/immutable/*` requests across 74 distinct URLs; all 201 JavaScript responses were `200 text/javascript` and all 21 CSS responses were `200 text/css`. No request failed, returned 404, or returned HTML. The three document responses were `200 text/html` with `Cache-Control: no-cache`; the fresh browser had zero service-worker registrations. The Files crumb click was not intercepted (`defaultPrevented=false`), the main-document count rose from 3 to 4, and the browser reported three `Cannot read properties of null (reading 'origin')` errors. This isolates the same-build reload to the unguarded `afterNavigate` URL comparison in `app-sidebar.svelte`; it was not a missing embedded chunk, stale HTML, or service worker. The guard is present in the current branch from `df02c3957` and the production same-build probe asserts it. Full request list and response headers: `artifacts/reload-423/rerun-pre-retention/base-same-build-assets.json`.
Author
Owner

Source-matched rerun completed from revision 8f7793407, with a production web bundle built from that same revision (version 1790740188023). It reproduced the same result: 222 immutable requests across 74 paths, every response 200 text/javascript or 200 text/css, no failures, HTML fallbacks, or 404s; HTML remained no-cache, with zero service-worker registrations. The Files click still loaded one extra document and emitted the same null-origin errors.

No immutable URL returned index.html or 404. Each requested URL resolved through the pre-retention server's embedded assets; there is no asset-path/include mismatch in this reproduction. The full per-request capture is artifacts/reload-423/fresh-pre-retention/base-same-build-assets.json.

Source-matched rerun completed from revision `8f7793407`, with a production web bundle built from that same revision (version `1790740188023`). It reproduced the same result: 222 immutable requests across 74 paths, every response `200 text/javascript` or `200 text/css`, no failures, HTML fallbacks, or 404s; HTML remained `no-cache`, with zero service-worker registrations. The Files click still loaded one extra document and emitted the same null-`origin` errors. No immutable URL returned `index.html` or 404. Each requested URL resolved through the pre-retention server's embedded assets; there is no asset-path/include mismatch in this reproduction. The full per-request capture is `artifacts/reload-423/fresh-pre-retention/base-same-build-assets.json`.
Author
Owner

Round 4 gate findings:

  • cargo test -p calternal-server: 85 passed, 2 ignored, 1 failed. The existing wire::tests::full_app_setup_session_config_and_backup child process timed out at crates/calternal-server/src/wire.rs:7106 after 45.22s; the wrapper then failed at line 6127. This is a slow-only failure on the shared host. The #423 unit test unknown_immutable_asset_paths_never_receive_the_spa_shell passed.
  • The first bun run check could not resolve fast-check, although it is declared in apps/web/package.json and bun.lock. bun install --frozen-lockfile installed the missing package; the rerun passed with 0 errors and 0 warnings.
Round 4 gate findings: - `cargo test -p calternal-server`: 85 passed, 2 ignored, 1 failed. The existing `wire::tests::full_app_setup_session_config_and_backup` child process timed out at `crates/calternal-server/src/wire.rs:7106` after 45.22s; the wrapper then failed at line 6127. This is a slow-only failure on the shared host. The #423 unit test `unknown_immutable_asset_paths_never_receive_the_spa_shell` passed. - The first `bun run check` could not resolve `fast-check`, although it is declared in `apps/web/package.json` and `bun.lock`. `bun install --frozen-lockfile` installed the missing package; the rerun passed with 0 errors and 0 warnings.
Author
Owner

The full bun run test gate completed with 877 passed and 1 failed across 878 tests (135 passed files, 1 failed file). The lone failure was StatRow summary cards > toggles all four cards together and remembers the mode, which timed out at its existing 5-second Vitest limit in apps/web/src/lib/components/analytics/widgets/StatRow.svelte.test.ts:97. The suite took 431.13s; this occurred during the same shared-host load as the server subprocess timeout. No test expectations were changed.

The full `bun run test` gate completed with 877 passed and 1 failed across 878 tests (135 passed files, 1 failed file). The lone failure was `StatRow summary cards > toggles all four cards together and remembers the mode`, which timed out at its existing 5-second Vitest limit in `apps/web/src/lib/components/analytics/widgets/StatRow.svelte.test.ts:97`. The suite took 431.13s; this occurred during the same shared-host load as the server subprocess timeout. No test expectations were changed.
Author
Owner

Production A/B run so far: Build A 1790749280372 switched to Build B 1790749101975 while the loaded page stayed on A. The same-build crawler passed its Files, Calendar, Shared, Recent and Trash anchor audits. The full crawler then timed out after 15 seconds while auditing a visible same-origin anchor from the Photos route; the first trace did not include the anchor identity. A focused Photos-page probe reached the page's visible Videos, Stacks, Home and library-folder settings URLs. I added route/link/final-URL context to that timeout and will rerun the production proof once to identify the full-crawler state.

Production A/B run so far: Build A `1790749280372` switched to Build B `1790749101975` while the loaded page stayed on A. The same-build crawler passed its Files, Calendar, Shared, Recent and Trash anchor audits. The full crawler then timed out after 15 seconds while auditing a visible same-origin anchor from the Photos route; the first trace did not include the anchor identity. A focused Photos-page probe reached the page's visible Videos, Stacks, Home and library-folder settings URLs. I added route/link/final-URL context to that timeout and will rerun the production proof once to identify the full-crawler state.
Author
Owner

The second production run reached the mode-tray audit and stopped before clicking the Shared link: Files mode anchor remains available failed after a direct route restore because the Files sidebar had not yet republished that visible link. No navigation or document load occurred for that anchor. The crawler now waits for that exact link after restoring a route (commit 0f8274d7a). The separate timeout context change is commit 91cd1f9d3.

The second production run reached the mode-tray audit and stopped before clicking the `Shared` link: `Files mode anchor remains available` failed after a direct route restore because the Files sidebar had not yet republished that visible link. No navigation or document load occurred for that anchor. The crawler now waits for that exact link after restoring a route (commit `0f8274d7a`). The separate timeout context change is commit `91cd1f9d3`.
Author
Owner

Production crawler finding: after selecting Calendar from /files?path=Documents/Archive/Reports, the shell changed to data-mode=calendar and selected tab-calendar, but the URL stayed on the Files route for 45 seconds and the Calendar entry route never committed. This is now reported with the source URL and selected tab. I am tracing the pending route requests before changing product code or relaxing the crawler assertion.

Production crawler finding: after selecting Calendar from `/files?path=Documents/Archive/Reports`, the shell changed to `data-mode=calendar` and selected `tab-calendar`, but the URL stayed on the Files route for 45 seconds and the Calendar entry route never committed. This is now reported with the source URL and selected tab. I am tracing the pending route requests before changing product code or relaxing the crawler assertion.
Author
Owner

A/B production finding: after switching the server from Build A to Build B, an A tab requested /_app/immutable/chunks/DN7OJJEK.js; Build B returned 404. The path exists in Build A’s asset manifest and is absent from Build B. Retention already included route nodes, but is_hashed_asset only recognized name.hash.ext, while this SvelteKit chunk uses an eight-character hash-only filename. Commit 06c99a91e accepts that generated form under _app/immutable/chunks/ and adds a regression test. The corrected crawler derives the Notes route leaf IDs from Build A’s server manifest instead of fixed node numbers.

A/B production finding: after switching the server from Build A to Build B, an A tab requested `/_app/immutable/chunks/DN7OJJEK.js`; Build B returned 404. The path exists in Build A’s asset manifest and is absent from Build B. Retention already included route nodes, but `is_hashed_asset` only recognized `name.hash.ext`, while this SvelteKit chunk uses an eight-character hash-only filename. Commit `06c99a91e` accepts that generated form under `_app/immutable/chunks/` and adds a regression test. The corrected crawler derives the Notes route leaf IDs from Build A’s server manifest instead of fixed node numbers.
Author
Owner

A/B production trace exposed a test-fixture boundary: the first Build A server was compiled with the previous is_hashed_asset predicate. It retained named route nodes but did not retain hash-only chunks such as /_app/immutable/chunks/DN7OJJEK.js; after restart, Build B could not serve bytes that Build A had never stored, so the stale page received 404. I am rebuilding the older UI with the corrected server retention code and adding an end-to-end assertion that Build B serves an A-only hash-only chunk. The branch-base same-build probe remains separate and unchanged.

A/B production trace exposed a test-fixture boundary: the first Build A server was compiled with the previous `is_hashed_asset` predicate. It retained named route nodes but did not retain hash-only chunks such as `/_app/immutable/chunks/DN7OJJEK.js`; after restart, Build B could not serve bytes that Build A had never stored, so the stale page received 404. I am rebuilding the older UI with the corrected server retention code and adding an end-to-end assertion that Build B serves an A-only hash-only chunk. The branch-base same-build probe remains separate and unchanged.
Author
Owner

The second fixture build confirmed why the version still read Build B: a Cargo dev binary uses RustEmbed's development filesystem path, so it followed the restored apps/web/build directory even after a clean rebuild. The browser never had two frontend versions. I am switching the Build A fixture to a release server binary, which embeds its Build A frontend; Build B remains the current server build. This keeps the two-build check tied to actual embedded production assets.

The second fixture build confirmed why the version still read Build B: a Cargo dev binary uses RustEmbed's development filesystem path, so it followed the restored `apps/web/build` directory even after a clean rebuild. The browser never had two frontend versions. I am switching the Build A fixture to a release server binary, which embeds its Build A frontend; Build B remains the current server build. This keeps the two-build check tied to actual embedded production assets.
Author
Owner

With both release builds active, Build A 1790749280372 and Build B 1790763412644 were distinct, and the A-only hash-only chunk request now succeeded. The next cross-build pass reached the 20 in-app route loop. Its assertion expected a global document-load count of 1, but the same-build crawler had already made 20 deliberate direct document visits on a second page and added them to that shared counter. I am changing the A/B check to assert zero delta from its own baseline; this preserves the separate same-build route-load accounting.

With both release builds active, Build A `1790749280372` and Build B `1790763412644` were distinct, and the A-only hash-only chunk request now succeeded. The next cross-build pass reached the 20 in-app route loop. Its assertion expected a global document-load count of 1, but the same-build crawler had already made 20 deliberate direct document visits on a second page and added them to that shared counter. I am changing the A/B check to assert zero delta from its own baseline; this preserves the separate same-build route-load accounting.
Author
Owner

The Photos failure is now traced exactly. The crawler identified Choose folders… but its saved a[href] index resolved to the Home link (href=/files) before Playwright clicked; the captured hit target and click event both named Home. Svelte republished the sidebar between numeric-index discovery and locator use. I replaced the index lookup with a live locator intersected by exact accessible name and href, so the click stays attached to the intended link as the DOM changes.

The Photos failure is now traced exactly. The crawler identified `Choose folders…` but its saved `a[href]` index resolved to the `Home` link (`href=/files`) before Playwright clicked; the captured hit target and click event both named Home. Svelte republished the sidebar between numeric-index discovery and locator use. I replaced the index lookup with a live locator intersected by exact accessible name and href, so the click stays attached to the intended link as the DOM changes.
Author
Owner

Production crawler finding: after a navigation changed the URL while auditing the /notes listing, its recovery path restored the original route but waited for .note-card. The Notes listing has .notes-explorer .explorer-row, while .note-card is only present on note detail routes. The crawler timed out after 20 seconds at auditSameOriginAnchors line 301; this was a crawler readiness mismatch, not an app navigation failure. I am making the recovery wait match each route before rerunning the production crawl.

Production crawler finding: after a navigation changed the URL while auditing the `/notes` listing, its recovery path restored the original route but waited for `.note-card`. The Notes listing has `.notes-explorer .explorer-row`, while `.note-card` is only present on note detail routes. The crawler timed out after 20 seconds at `auditSameOriginAnchors` line 301; this was a crawler readiness mismatch, not an app navigation failure. I am making the recovery wait match each route before rerunning the production crawl.
Author
Owner

Same-build root cause confirmed before asset retention. I rebuilt the web app and server from the pre-retention branch source and recorded every /_app/immutable/* response. All 222 requests were successful: 201 200 text/javascript and 21 200 text/css; no asset returned HTML or 404. Both refreshed HTML responses were 200 text/html with Cache-Control: no-cache; the User had no service worker. The Files crumb click was not intercepted and added one document load (3 → 4). The browser reported Cannot read properties of null (reading 'origin') three times.

A paired production run from the same branch-base source, with only the existing from?.url && to?.url guard restored in app-sidebar.svelte, passed the same hard-refresh probe: 148 immutable requests (134 JS, 14 CSS), all 200; no page errors; the click was intercepted and document loads stayed 3 → 3. This isolates the same-build reload to the unguarded afterNavigate callback, not an absent embedded asset, stale HTML cache, or service worker. The guard is present in the current production build and the crawler now verifies same-build link navigation. Per-request records are in artifacts/reload-423/base-same-build-unguarded-assets.json and artifacts/reload-423/base-guarded/base-same-build-assets.json.

Same-build root cause confirmed before asset retention. I rebuilt the web app and server from the pre-retention branch source and recorded every `/_app/immutable/*` response. All 222 requests were successful: 201 `200 text/javascript` and 21 `200 text/css`; no asset returned HTML or 404. Both refreshed HTML responses were `200 text/html` with `Cache-Control: no-cache`; the User had no service worker. The Files crumb click was not intercepted and added one document load (3 → 4). The browser reported `Cannot read properties of null (reading 'origin')` three times. A paired production run from the same branch-base source, with only the existing `from?.url && to?.url` guard restored in `app-sidebar.svelte`, passed the same hard-refresh probe: 148 immutable requests (134 JS, 14 CSS), all 200; no page errors; the click was intercepted and document loads stayed 3 → 3. This isolates the same-build reload to the unguarded `afterNavigate` callback, not an absent embedded asset, stale HTML cache, or service worker. The guard is present in the current production build and the crawler now verifies same-build link navigation. Per-request records are in `artifacts/reload-423/base-same-build-unguarded-assets.json` and `artifacts/reload-423/base-guarded/base-same-build-assets.json`.
Author
Owner

Built

  • Retained hashed frontend assets in the Instance store across deployments. The store keeps builds from the last seven days and at least the newest ten, with bounded manifests and storage.
  • Served an older tab's exact immutable chunk from retained assets. Unknown /_app/immutable/* paths now return 404 and never receive index.html.
  • Added a themed boot shell for intentional update-boundary loads. The app checks for updates every 30 seconds and reloads at a safe in-app navigation boundary, while a Note or Composer has unsaved state.
  • Stabilized cold mode-tab activation and expanded the production crawler for same-build links, A→B deploys, retained route/shared chunks, and hostile immutable paths.
  • Confirmed the same-build cause before asset retention: all 222 immutable requests were 200 (201 text/javascript, 21 text/css); no chunk returned HTML or 404. HTML was no-cache, with zero service workers. The unguarded afterNavigate callback raised three null-origin errors; the Files click was not intercepted and document loads changed 3→4. In a paired build with the existing URL guard restored, all 148 requests were 200 (134 JS, 14 CSS), errors were zero, and document loads stayed 3→3. This rules out missing embedded files, stale HTML, and a service worker for the same-build reload. The guard is in the current build.

Files

  • apps/web/src/app.html; apps/web/src/routes/+layout.svelte; apps/web/src/lib/components/app-sidebar.svelte; apps/web/src/lib/components/SidebarLinks.svelte; apps/web/src/lib/files/FilesBrowser.svelte; apps/web/src/lib/notes/NoteView.svelte; apps/web/src/lib/themes.test.ts; apps/web/src/lib/tray.svelte.test.ts; apps/web/src/lib/modeHeader.svelte.test.ts; apps/web/svelte.config.js; apps/web/package.json
  • apps/web/e2e/harness.mjs; apps/web/e2e/reload-423.mjs; bench/reload-423/.gitignore; bench/reload-423/generate-documents.mjs
  • crates/calternal-fs/src/lib.rs; crates/calternal-fs/src/web_assets.rs; crates/calternal-server/src/main.rs; crates/calternal-server/src/wire.rs
  • packages/ui/src/components/ModeHeader.svelte; packages/ui/src/components/SegmentedControl.svelte

Verification

cargo fmt --all -- --check
(exit 0; no output)

cargo clippy -p calternal-fs --all-targets -- -D warnings
Finished `dev` profile [unoptimized + debuginfo] target(s) in 27.22s

cargo test -p calternal-fs
test result: ok. 42 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 28.18s
test result: ok. 42 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 9.50s
test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s

cargo clippy -p calternal-server --all-targets -- -D warnings
Finished `dev` profile [unoptimized + debuginfo] target(s) in 5m 51s

cargo test -p calternal-server
test result: ok. 87 passed; 0 failed; 2 ignored; 0 measured; 0 filtered out; finished in 73.76s

bun run check
svelte-check found 0 errors and 0 warnings

bun run test
 Test Files  136 passed (136)
      Tests  879 passed (879)
   Duration  202.53s (transform 62%, environment 16%, import 11%, tests 8%, setup 3%)

Production crawler exited 0 and reported:

PASS same-build Files crumb, sidebar row, browser Back, and phone folder menu: zero extra document loads
PASS 20 in-app mode navigations across the A→B server switch: zero additional document loads from baseline 21
PASS an unsaved Note stays in the A document, then reaches the server before a later boundary load
PASS updated state causes exactly one document load at the next safe navigation boundary
PASS retained Build A Notes route chunk served after Build B: /_app/immutable/nodes/38.DeDbnZBO.js
PASS retained Build A hash-only shared chunk served after Build B: /_app/immutable/chunks/-xN1Iuj-.js
PASS 6 raw immutable-asset paths return 404 without the SPA shell
Captured Calendar, Files, Photos, Note editor, and boot-shell screenshots at 390, 820, and 1440 px in light and dark

Screenshots: full 30-image set, 390 light shell, 390 dark shell, 1440 light shell, 1440 dark shell. Same-build per-request captures: JSON evidence bundle.

Head, gaps, and decisions

  • Head: 4222eeab3236dff04b687e8722637af0b5043509 (docs(reload): link shell and retention invariants to issue). Worktree is clean. Ran cargo clean (removed 54,880 files, 10.8 GiB) and deleted generated fixture and web build output. No dependencies or migrations added.
  • Known gaps: no open implementation failures. One earlier full web-suite attempt hit a 5-second Analytics summary-card timeout under shared load; the final full run passed all 879 tests.
  • Decisions not specified in DESIGN: retain the newest ten builds and every build no more than seven days old, bounded by the one-GiB store cap; poll for frontend updates every 30 seconds and reload only at a safe route boundary; show an inline theme-aware boot skeleton during that intentional load. The hash-only eight-character rule applies only to SvelteKit immutable chunk paths.
## Built - Retained hashed frontend assets in the Instance store across deployments. The store keeps builds from the last seven days and at least the newest ten, with bounded manifests and storage. - Served an older tab's exact immutable chunk from retained assets. Unknown `/_app/immutable/*` paths now return 404 and never receive `index.html`. - Added a themed boot shell for intentional update-boundary loads. The app checks for updates every 30 seconds and reloads at a safe in-app navigation boundary, while a Note or Composer has unsaved state. - Stabilized cold mode-tab activation and expanded the production crawler for same-build links, A→B deploys, retained route/shared chunks, and hostile immutable paths. - Confirmed the same-build cause before asset retention: all 222 immutable requests were 200 (201 `text/javascript`, 21 `text/css`); no chunk returned HTML or 404. HTML was `no-cache`, with zero service workers. The unguarded `afterNavigate` callback raised three null-`origin` errors; the Files click was not intercepted and document loads changed 3→4. In a paired build with the existing URL guard restored, all 148 requests were 200 (134 JS, 14 CSS), errors were zero, and document loads stayed 3→3. This rules out missing embedded files, stale HTML, and a service worker for the same-build reload. The guard is in the current build. ## Files - `apps/web/src/app.html`; `apps/web/src/routes/+layout.svelte`; `apps/web/src/lib/components/app-sidebar.svelte`; `apps/web/src/lib/components/SidebarLinks.svelte`; `apps/web/src/lib/files/FilesBrowser.svelte`; `apps/web/src/lib/notes/NoteView.svelte`; `apps/web/src/lib/themes.test.ts`; `apps/web/src/lib/tray.svelte.test.ts`; `apps/web/src/lib/modeHeader.svelte.test.ts`; `apps/web/svelte.config.js`; `apps/web/package.json` - `apps/web/e2e/harness.mjs`; `apps/web/e2e/reload-423.mjs`; `bench/reload-423/.gitignore`; `bench/reload-423/generate-documents.mjs` - `crates/calternal-fs/src/lib.rs`; `crates/calternal-fs/src/web_assets.rs`; `crates/calternal-server/src/main.rs`; `crates/calternal-server/src/wire.rs` - `packages/ui/src/components/ModeHeader.svelte`; `packages/ui/src/components/SegmentedControl.svelte` ## Verification ```text cargo fmt --all -- --check (exit 0; no output) cargo clippy -p calternal-fs --all-targets -- -D warnings Finished `dev` profile [unoptimized + debuginfo] target(s) in 27.22s cargo test -p calternal-fs test result: ok. 42 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 28.18s test result: ok. 42 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 9.50s test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s cargo clippy -p calternal-server --all-targets -- -D warnings Finished `dev` profile [unoptimized + debuginfo] target(s) in 5m 51s cargo test -p calternal-server test result: ok. 87 passed; 0 failed; 2 ignored; 0 measured; 0 filtered out; finished in 73.76s bun run check svelte-check found 0 errors and 0 warnings bun run test Test Files 136 passed (136) Tests 879 passed (879) Duration 202.53s (transform 62%, environment 16%, import 11%, tests 8%, setup 3%) ``` Production crawler exited 0 and reported: ```text PASS same-build Files crumb, sidebar row, browser Back, and phone folder menu: zero extra document loads PASS 20 in-app mode navigations across the A→B server switch: zero additional document loads from baseline 21 PASS an unsaved Note stays in the A document, then reaches the server before a later boundary load PASS updated state causes exactly one document load at the next safe navigation boundary PASS retained Build A Notes route chunk served after Build B: /_app/immutable/nodes/38.DeDbnZBO.js PASS retained Build A hash-only shared chunk served after Build B: /_app/immutable/chunks/-xN1Iuj-.js PASS 6 raw immutable-asset paths return 404 without the SPA shell Captured Calendar, Files, Photos, Note editor, and boot-shell screenshots at 390, 820, and 1440 px in light and dark ``` Screenshots: [full 30-image set](https://git.kayg.org/attachments/35ed5075-87ae-44d5-8f11-88e3b3d0c9a2), [390 light shell](https://git.kayg.org/attachments/cd467ea9-f4bf-42b5-8668-217550dcbf82), [390 dark shell](https://git.kayg.org/attachments/0f23f52a-9514-4bca-a6e7-ba94d4daaba7), [1440 light shell](https://git.kayg.org/attachments/c8972565-3cc3-4512-84d2-9655002f44d8), [1440 dark shell](https://git.kayg.org/attachments/f908aea2-1640-4fb9-acbb-865506f1b3c7). Same-build per-request captures: [JSON evidence bundle](https://git.kayg.org/attachments/432288e8-b62e-418a-9f57-9f2c32d84e40). ## Head, gaps, and decisions - Head: `4222eeab3236dff04b687e8722637af0b5043509` (`docs(reload): link shell and retention invariants to issue`). Worktree is clean. Ran `cargo clean` (removed 54,880 files, 10.8 GiB) and deleted generated fixture and web build output. No dependencies or migrations added. - Known gaps: no open implementation failures. One earlier full web-suite attempt hit a 5-second Analytics summary-card timeout under shared load; the final full run passed all 879 tests. - Decisions not specified in DESIGN: retain the newest ten builds and every build no more than seven days old, bounded by the one-GiB store cap; poll for frontend updates every 30 seconds and reload only at a safe route boundary; show an inline theme-aware boot skeleton during that intentional load. The hash-only eight-character rule applies only to SvelteKit immutable chunk paths.
Author
Owner

Starting round 2 on job/reload-423. Base SHA: dfb5964a2f. I will add cold/warm route measurements and update-toast behavior, then run the requested web and per-crate Rust gates.

Starting round 2 on job/reload-423. Base SHA: dfb5964a2fcf13dc8b9a50a319eee09bc386f322. I will add cold/warm route measurements and update-toast behavior, then run the requested web and per-crate Rust gates.
Author
Owner

Finding: the first found a missing handler in the merged shell () and five initial-prop capture warnings in Mail. I added the pointer-cancel handler, made the cached Inbox snapshot capture explicit, and reran the check: svelte-check now reports 0 errors and 0 warnings. The new route profile measures the seven requested views with cold, hard-refresh, Tab or Settings-link, deep-link, Back and Forward paths.

Finding: the first found a missing handler in the merged shell () and five initial-prop capture warnings in Mail. I added the pointer-cancel handler, made the cached Inbox snapshot capture explicit, and reran the check: svelte-check now reports 0 errors and 0 warnings. The new route profile measures the seven requested views with cold, hard-refresh, Tab or Settings-link, deep-link, Back and Forward paths.
Author
Owner

Finding: the first bun run check found a missing cancelModePreload handler in the merged shell (apps/web/src/routes/+layout.svelte:735) and five initial-prop capture warnings in Mail. I added the pointer-cancel handler, made the cached Inbox snapshot capture explicit, and reran the check: svelte-check now reports 0 errors and 0 warnings. The new route profile measures the seven requested views with cold, hard-refresh, Tab or Settings-link, deep-link, Back and Forward paths.

Finding: the first bun run check found a missing cancelModePreload handler in the merged shell (apps/web/src/routes/+layout.svelte:735) and five initial-prop capture warnings in Mail. I added the pointer-cancel handler, made the cached Inbox snapshot capture explicit, and reran the check: svelte-check now reports 0 errors and 0 warnings. The new route profile measures the seven requested views with cold, hard-refresh, Tab or Settings-link, deep-link, Back and Forward paths.
Author
Owner

Finding: the first route probe did not classify Calendar /today for first-meaningful-paint timing, and its cold Files path landed at a root containing only the Documents folder while the seeded rows were inside Documents. I fixed the route observer and now cold-load the stable Documents folder identity. Warm navigation also delays API GET responses by 300 ms and asserts that cached content appears first, before revalidation completes. No API contract changed.

Finding: the first route probe did not classify Calendar `/today` for first-meaningful-paint timing, and its cold Files path landed at a root containing only the Documents folder while the seeded rows were inside Documents. I fixed the route observer and now cold-load the stable Documents folder identity. Warm navigation also delays API GET responses by 300 ms and asserts that cached content appears first, before revalidation completes. No API contract changed.
Author
Owner

Finding: the first cargo clippy -p calternal-server --all-targets -- -D warnings attempt stopped at RustEmbed because apps/web/build/ did not exist, then reported the expected missing embedded-asset methods. I am running the web production build before retrying the server gate; no Rust source diagnostic was emitted.

Finding: the first `cargo clippy -p calternal-server --all-targets -- -D warnings` attempt stopped at RustEmbed because `apps/web/build/` did not exist, then reported the expected missing embedded-asset methods. I am running the web production build before retrying the server gate; no Rust source diagnostic was emitted.
Author
Owner

Progress: bun run check reports 0 errors and 0 warnings; bun run test passed 138 files / 906 tests. After building apps/web/build, cargo clippy -p calternal-server --all-targets -- -D warnings passed and cargo test -p calternal-server passed 87 tests with 2 ignored. The release server build is running for the production A→B proof and route profile.

Progress: `bun run check` reports 0 errors and 0 warnings; `bun run test` passed 138 files / 906 tests. After building `apps/web/build`, `cargo clippy -p calternal-server --all-targets -- -D warnings` passed and `cargo test -p calternal-server` passed 87 tests with 2 ignored. The release server build is running for the production A→B proof and route profile.
Author
Owner

Evidence: three real production Build A→B reproductions committed the Calendar URL while the Files/Trash shell stayed visible. The browser request trace showed GET /api/v1/calendar/range pending, and the production server emitted no error. The mode selector awaited both route preparation and the full API preload before starting goto, so a slow Calendar data request delayed the route transition. Changed it to start navigation at activation and let real code/data preloads continue in parallel; a cold mode still shows its pending view until the route commits. Added the request/shell diagnostics to the E2E timeout for future route stalls.

Evidence: three real production Build A→B reproductions committed the Calendar URL while the Files/Trash shell stayed visible. The browser request trace showed `GET /api/v1/calendar/range` pending, and the production server emitted no error. The mode selector awaited both route preparation and the full API preload before starting `goto`, so a slow Calendar data request delayed the route transition. Changed it to start navigation at activation and let real code/data preloads continue in parallel; a cold mode still shows its pending view until the route commits. Added the request/shell diagnostics to the E2E timeout for future route stalls.
Author
Owner

Follow-up diagnosis from the browser state: Calendar's /today entry commits through a same-mode redirect to /calendar/week/<date>. The layout's pending-header cleanup required an exact pathname match, so it kept the captured Files header after the Calendar route changed. Updated the cleanup to accept redirects when both paths resolve to the same registered mode. The Calendar range request in the trace belongs to its independent preload and can remain pending without blocking route navigation.

Follow-up diagnosis from the browser state: Calendar's `/today` entry commits through a same-mode redirect to `/calendar/week/<date>`. The layout's pending-header cleanup required an exact pathname match, so it kept the captured Files header after the Calendar route changed. Updated the cleanup to accept redirects when both paths resolve to the same registered mode. The Calendar range request in the trace belongs to its independent preload and can remain pending without blocking route navigation.
Author
Owner

Evidence from --fallback-only: Build A serves the Files shell and /api/v1/plugins returns 200, but fallbackPage records cancelModePreload is not defined and has no [role=tab] elements. The same was true before restarting to Build B. This is a branch-base client defect from the missing callback that Build B already fixes. The full A→B harness needs a usable old shell, so I will add that callback only in the temporary Build A source used to generate the test binary; it is not a product change.

Evidence from `--fallback-only`: Build A serves the Files shell and `/api/v1/plugins` returns 200, but `fallbackPage` records `cancelModePreload is not defined` and has no `[role=tab]` elements. The same was true before restarting to Build B. This is a branch-base client defect from the missing callback that Build B already fixes. The full A→B harness needs a usable old shell, so I will add that callback only in the temporary Build A source used to generate the test binary; it is not a product change.
Author
Owner

The isolated missing-chunk probe returns /notes in the same document after the Build A Notes module receives the simulated 404. Evidence: the browser recorded the old Notes node request, location.href became /notes, and no page errors were recorded; Playwright observed no document request. Updated the obsolete reload assertion to require the Notes surface to load without a document reload, matching #423's user-controlled refresh behavior. Build B's real old-node and hostile-path checks remain in probeImmutablePaths.

The isolated missing-chunk probe returns `/notes` in the same document after the Build A Notes module receives the simulated 404. Evidence: the browser recorded the old Notes node request, `location.href` became `/notes`, and no page errors were recorded; Playwright observed no document request. Updated the obsolete reload assertion to require the Notes surface to load without a document reload, matching #423's user-controlled refresh behavior. Build B's real old-node and hostile-path checks remain in `probeImmutablePaths`.
Author
Owner

The full A→B crawl found that branch-base Build A (6c50a0f) can keep the Files header after its Calendar tab redirects from /today to /calendar/week/<date>: its older exact-path header matcher does not clear on that redirect. Build B handles the same-mode redirect, and its real-server crawler passes Calendar routes. I scoped the stale Build A asset-retention check to Files/Photos mode switches and the retained Note chunk; the current Build B Calendar behavior remains covered by the full route crawler. This is limited to the already-open legacy shell and cannot be repaired by changing the newly deployed Build B code.

The full A→B crawl found that branch-base Build A (6c50a0f) can keep the Files header after its Calendar tab redirects from `/today` to `/calendar/week/<date>`: its older exact-path header matcher does not clear on that redirect. Build B handles the same-mode redirect, and its real-server crawler passes Calendar routes. I scoped the stale Build A asset-retention check to Files/Photos mode switches and the retained Note chunk; the current Build B Calendar behavior remains covered by the full route crawler. This is limited to the already-open legacy shell and cannot be repaired by changing the newly deployed Build B code.
Author
Owner

The first profile attempt rebuilt the production SPA and release server, then stopped before route measurement. bench/run.sh had hard-coded $ROOT/target/release/calternal-server, while this job uses the required preset CARGO_TARGET_DIR=/mnt/hdd/targets/jobs/reload-423; the built server was at $CARGO_TARGET_DIR/release/calternal-server. I changed the bench runner to use CARGO_TARGET_DIR with a worktree-target fallback and verified the configured release binary exists. The measured profile is being rerun now.

The first profile attempt rebuilt the production SPA and release server, then stopped before route measurement. `bench/run.sh` had hard-coded `$ROOT/target/release/calternal-server`, while this job uses the required preset `CARGO_TARGET_DIR=/mnt/hdd/targets/jobs/reload-423`; the built server was at `$CARGO_TARGET_DIR/release/calternal-server`. I changed the bench runner to use `CARGO_TARGET_DIR` with a worktree-target fallback and verified the configured release binary exists. The measured profile is being rerun now.
Author
Owner

The next route-profile attempt launched the production server but failed while building the realistic Home: seedRealisticHome() calls assert.deepEqual() but route-perf.mjs did not import node:assert/strict (ReferenceError: assert is not defined, line 190). I added the missing import and verified the profile file parses. I am rerunning the profile from the committed head.

The next route-profile attempt launched the production server but failed while building the realistic Home: `seedRealisticHome()` calls `assert.deepEqual()` but `route-perf.mjs` did not import `node:assert/strict` (`ReferenceError: assert is not defined`, line 190). I added the missing import and verified the profile file parses. I am rerunning the profile from the committed head.
Author
Owner

#423 round 2 report

Built

  • Warm mode selection navigates immediately while route and API preloads continue. Calendar same-mode redirects clear the captured old header.
  • Calendar, Mail, Money and Settings use cached data on warm navigation and revalidate after the cached first paint. Files retains the #522 loader path.
  • A newer version shows the shared “calternal has been updated” toast with a user-triggered Refresh. The test covers an A→B version change, unsaved Note and Composer protection, and restoration of the exact Note URL.
  • Added a production route profile for cold, hard-refresh, warm tab, in-app link, deep link, Back and Forward paths across Calendar, Files, Photos, Mail, Money, Analytics and Settings. The bench now honors CARGO_TARGET_DIR.

Files

apps/web/src/app.html, apps/web/svelte.config.js, apps/web/src/routes/+layout.svelte, apps/web/src/lib/navigation/modePreload.ts, apps/web/src/lib/notes/NoteView.svelte, apps/web/src/lib/mail/MailView.svelte, apps/web/src/lib/mail/inboxCache.ts, apps/web/src/lib/money/store.svelte.ts, apps/web/src/routes/money/[budget]/[month]/+page.svelte, apps/web/src/routes/settings/[...path]/+page.svelte, apps/web/src/routes/settings/api.svelte.ts, apps/web/e2e/reload-423.mjs, apps/web/e2e/route-perf.mjs, bench/run.sh, bench/record.py, bench/compare.py, bench/test_record.py, bench/test_compare.py.

Evidence and gates

  • Production Build A→B crawl passed against the real server. It covered the 614-file Home, current-build navigation through all requested route families, 20 legacy Files/Photos switches, retained Note and shared chunks, six hostile immutable-asset paths, and no-reload toast behavior.
  • Exact production crawl output: PASS 20 in-app Files/Photos mode navigations and retained Notes chunk across A→B: zero extra document loads from baseline 24; PASS A→B production update toast: no automatic reload, Note and Composer protection, exact deep link, and intentional Refresh; PASS 6 raw immutable-asset paths return 404 without the SPA shell.
  • Screenshots exist in the worktree at artifacts/reload-423/: toast, Calendar, Files, Photos, Note editor and boot shell at 390, 820 and 1440 px in light and dark. They are not attached to this comment yet.
  • bun run check had passed earlier in round 2, before the final E2E and bench-harness-only edits:
$ node scripts/check-type-tokens.mjs && node scripts/check-motion-tokens.mjs && svelte-kit sync && svelte-check --tsconfig ./tsconfig.json
Text sizes and UI shape values use shared role tokens.
UI transitions and animation options use shared motion tokens or documented exceptions.
Loading svelte-check in workspace: /home/kayg/Developer/calternal-wt/reload-423/apps/web
Getting Svelte diagnostics...

svelte-check found 0 errors and 0 warnings
  • The earlier web unit run reported 138 files and 906 tests passed in 208.76s. Rust fmt/clippy/test gates also passed earlier in round 2 (calternal-fs: 44 core and 42 integration tests; calternal-server: 87 passed, 2 ignored). No Rust source changed in this round. These gates were not rerun after the final harness and bench edits.
  • The required route benchmark did not produce measurements. Its first attempt exposed and fixed a hard-coded target path; its second exposed and fixed a missing assertion import. The third profile was stopped before timing samples when the four-hour job cap elapsed. Therefore there are no cold/warm p50/p95 numbers or new docs/perf report.

Gaps and decisions

  • Remaining: rerun bench/run.sh --runs 3, record its results beside the baseline, rerun bun run check and bun run test, attach the screenshots to #423, then run cargo clean and remove apps/web/build. I stopped at the owner’s four-hour cap.
  • Local cold meaningful-paint budget is 5,000 ms, matching the route profile default; this still needs a successful measured run.
  • Build A predates the Calendar /today same-mode redirect fix. The current Build B crawler covers that redirect; the stale Build A asset-retention check uses non-redirecting Files/Photos routes.
  • The toast offers Refresh only; a Later action was optional in the issue prompt.

Head: 462038149b2861d5ceca7c92651d71c585e887ca.

#423 round 2 report ## Built - Warm mode selection navigates immediately while route and API preloads continue. Calendar same-mode redirects clear the captured old header. - Calendar, Mail, Money and Settings use cached data on warm navigation and revalidate after the cached first paint. Files retains the #522 loader path. - A newer version shows the shared “calternal has been updated” toast with a user-triggered Refresh. The test covers an A→B version change, unsaved Note and Composer protection, and restoration of the exact Note URL. - Added a production route profile for cold, hard-refresh, warm tab, in-app link, deep link, Back and Forward paths across Calendar, Files, Photos, Mail, Money, Analytics and Settings. The bench now honors `CARGO_TARGET_DIR`. ## Files `apps/web/src/app.html`, `apps/web/svelte.config.js`, `apps/web/src/routes/+layout.svelte`, `apps/web/src/lib/navigation/modePreload.ts`, `apps/web/src/lib/notes/NoteView.svelte`, `apps/web/src/lib/mail/MailView.svelte`, `apps/web/src/lib/mail/inboxCache.ts`, `apps/web/src/lib/money/store.svelte.ts`, `apps/web/src/routes/money/[budget]/[month]/+page.svelte`, `apps/web/src/routes/settings/[...path]/+page.svelte`, `apps/web/src/routes/settings/api.svelte.ts`, `apps/web/e2e/reload-423.mjs`, `apps/web/e2e/route-perf.mjs`, `bench/run.sh`, `bench/record.py`, `bench/compare.py`, `bench/test_record.py`, `bench/test_compare.py`. ## Evidence and gates - Production Build A→B crawl passed against the real server. It covered the 614-file Home, current-build navigation through all requested route families, 20 legacy Files/Photos switches, retained Note and shared chunks, six hostile immutable-asset paths, and no-reload toast behavior. - Exact production crawl output: `PASS 20 in-app Files/Photos mode navigations and retained Notes chunk across A→B: zero extra document loads from baseline 24`; `PASS A→B production update toast: no automatic reload, Note and Composer protection, exact deep link, and intentional Refresh`; `PASS 6 raw immutable-asset paths return 404 without the SPA shell`. - Screenshots exist in the worktree at `artifacts/reload-423/`: toast, Calendar, Files, Photos, Note editor and boot shell at 390, 820 and 1440 px in light and dark. They are not attached to this comment yet. - `bun run check` had passed earlier in round 2, before the final E2E and bench-harness-only edits: ```text $ node scripts/check-type-tokens.mjs && node scripts/check-motion-tokens.mjs && svelte-kit sync && svelte-check --tsconfig ./tsconfig.json Text sizes and UI shape values use shared role tokens. UI transitions and animation options use shared motion tokens or documented exceptions. Loading svelte-check in workspace: /home/kayg/Developer/calternal-wt/reload-423/apps/web Getting Svelte diagnostics... svelte-check found 0 errors and 0 warnings ``` - The earlier web unit run reported 138 files and 906 tests passed in 208.76s. Rust fmt/clippy/test gates also passed earlier in round 2 (`calternal-fs`: 44 core and 42 integration tests; `calternal-server`: 87 passed, 2 ignored). No Rust source changed in this round. These gates were not rerun after the final harness and bench edits. - The required route benchmark did not produce measurements. Its first attempt exposed and fixed a hard-coded target path; its second exposed and fixed a missing assertion import. The third profile was stopped before timing samples when the four-hour job cap elapsed. Therefore there are no cold/warm p50/p95 numbers or new `docs/perf` report. ## Gaps and decisions - Remaining: rerun `bench/run.sh --runs 3`, record its results beside the baseline, rerun `bun run check` and `bun run test`, attach the screenshots to #423, then run `cargo clean` and remove `apps/web/build`. I stopped at the owner’s four-hour cap. - Local cold meaningful-paint budget is 5,000 ms, matching the route profile default; this still needs a successful measured run. - Build A predates the Calendar `/today` same-mode redirect fix. The current Build B crawler covers that redirect; the stale Build A asset-retention check uses non-redirecting Files/Photos routes. - The toast offers Refresh only; a Later action was optional in the issue prompt. Head: `462038149b2861d5ceca7c92651d71c585e887ca`.
Author
Owner

Round 3 started on job/reload-423 at 462038149b (base dev: 9ecde429a7). I am completing the shared Calendar/Files/Photos/Mail/Money/Analytics/Settings cold, hard-refresh and warm benchmark on the locked perf VM, shortening the phone update toast to one line with Refresh and a normal Later dismiss, then recording results, running the requested web gates and cleaning build output.

Round 3 started on job/reload-423 at 462038149b2861d5ceca7c92651d71c585e887ca (base dev: 9ecde429a7e6f8b846211287ecd6b1475394db94). I am completing the shared Calendar/Files/Photos/Mail/Money/Analytics/Settings cold, hard-refresh and warm benchmark on the locked perf VM, shortening the phone update toast to one line with Refresh and a normal Later dismiss, then recording results, running the requested web gates and cleaning build output.
Author
Owner

Screenshot harness finding: the new toast-only production run reached the real Files route but waited only for ; its setup had already created the real row, so the 30 s readiness wait expired before toast checks. I am changing readiness to accept either a real Files row or the real empty state and rerunning the capture.

Screenshot harness finding: the new toast-only production run reached the real Files route but waited only for ; its setup had already created the real row, so the 30 s readiness wait expired before toast checks. I am changing readiness to accept either a real Files row or the real empty state and rerunning the capture.
Author
Owner

Correction to my previous finding: the screenshot-only run timed out waiting for the empty-folder marker because the fixture had created a visible Archive row. I will let readiness accept either that real row or the real empty state.

Correction to my previous finding: the screenshot-only run timed out waiting for the empty-folder marker because the fixture had created a visible Archive row. I will let readiness accept either that real row or the real empty state.
Author
Owner

Finding after the required origin/dev merge: the resolved layout kept the incoming chrome but lost the existing updated.current hook. The production-build screenshot check then timed out for 30 seconds waiting for .cal-toast-label. I restored the #423 update hook alongside the merged layout; rebuild and screenshot recapture are next.

Finding after the required origin/dev merge: the resolved layout kept the incoming chrome but lost the existing updated.current hook. The production-build screenshot check then timed out for 30 seconds waiting for .cal-toast-label. I restored the #423 update hook alongside the merged layout; rebuild and screenshot recapture are next.
Author
Owner

Perf setup finding on 2026-09-30: the shared release server returned HTTP 404 for POST /api/v1/money/budgets while seeding the real route Home, so the route measurements did not start. That binary predates the merged Money API. I am building the merged release server on the worktree host and will copy it to the perf VM; no compilation will run on the VM. The failed setup released /root/perf.lock and recorded its end load.

Perf setup finding on 2026-09-30: the shared release server returned HTTP 404 for POST /api/v1/money/budgets while seeding the real route Home, so the route measurements did not start. That binary predates the merged Money API. I am building the merged release server on the worktree host and will copy it to the perf VM; no compilation will run on the VM. The failed setup released /root/perf.lock and recorded its end load.
Author
Owner

Perf setup finding on 2026-09-30: the current server build accepts Money fixture creation, then the shared route harness stops at setThemeContext with HTTP 422: auto_scheme.location is an unknown field; the merged API accepts only mode. No route timing was recorded and /root/perf.lock was released. I am updating the shared harness request to the merged Appearance contract before rerunning.

Perf setup finding on 2026-09-30: the current server build accepts Money fixture creation, then the shared route harness stops at setThemeContext with HTTP 422: auto_scheme.location is an unknown field; the merged API accepts only mode. No route timing was recorded and /root/perf.lock was released. I am updating the shared harness request to the merged Appearance contract before rerunning.
Author
Owner

Fixed the Appearance helper mismatch uncovered by the perf run. The current API rejects the retired auto_scheme.location field with HTTP 422, so the shared E2E harness now sends only auto_scheme.mode in each theme helper. The fix is committed as 1fb1ef0c3; the benchmark is rerunning on the perf VM under /root/perf.lock with the current server and harness.

Fixed the Appearance helper mismatch uncovered by the perf run. The current API rejects the retired `auto_scheme.location` field with HTTP 422, so the shared E2E harness now sends only `auto_scheme.mode` in each theme helper. The fix is committed as `1fb1ef0c3`; the benchmark is rerunning on the perf VM under `/root/perf.lock` with the current server and harness.
Author
Owner

The first locked route run passed its 390 px light cold and hard-refresh samples, then stopped while seeding warm routes: the test tried to use the Files tray tab before the fresh shell had finished exposing its plugin tabs. The shared profile now seeds its route caches with same-tab deep links, then measures actual tray switches separately. This keeps the route cache warm-up independent of asynchronous tab availability while retaining real warm mode-switch samples. Fix committed as 263f52f9f.

The first locked route run passed its 390 px light cold and hard-refresh samples, then stopped while seeding warm routes: the test tried to use the Files tray tab before the fresh shell had finished exposing its plugin tabs. The shared profile now seeds its route caches with same-tab deep links, then measures actual tray switches separately. This keeps the route cache warm-up independent of asynchronous tab availability while retaining real warm mode-switch samples. Fix committed as `263f52f9f`.
Author
Owner

Follow-up to the warm-profile finding: a second cache setup loop also used a mode-tab click before collecting timed samples. It now primes the source route through a same-tab deep link as well. The measured tab-switch path remains unchanged; this removes only setup dependencies on asynchronous tab readiness. Committed as cf8be1672.

Follow-up to the warm-profile finding: a second cache setup loop also used a mode-tab click before collecting timed samples. It now primes the source route through a same-tab deep link as well. The measured tab-switch path remains unchanged; this removes only setup dependencies on asynchronous tab readiness. Committed as `cf8be1672`.
Author
Owner

The next run reached warm sampling and showed why its setup still timed out: its final setup route was Settings, where the app hides the mode tray. The timed loop now navigates to its source view through a same-tab deep link, then measures the target mode-tab click. The back/forward cases keep their target route as the preceding history entry. Fix committed as 3c7f1380d.

The next run reached warm sampling and showed why its setup still timed out: its final setup route was Settings, where the app hides the mode tray. The timed loop now navigates to its source view through a same-tab deep link, then measures the target mode-tab click. The back/forward cases keep their target route as the preceding history entry. Fix committed as `3c7f1380d`.
Author
Owner

The warm tab sample then reached Photos as its source and found that an item deep link does not expose the mode tray used by this measurement. The timed samples now start from the Files or Photos mode entry route. Photo-item deep links remain in the separate deep-link measurements. Committed as 2df1484d6.

The warm tab sample then reached Photos as its source and found that an item deep link does not expose the mode tray used by this measurement. The timed samples now start from the Files or Photos mode entry route. Photo-item deep links remain in the separate deep-link measurements. Committed as `2df1484d6`.
Author
Owner

The Files warm sample timed out because Playwright waited for the full document load on the large folder. The shared route harness now disables that click auto-wait and waits for URL commit followed by the real route-ready marker, so timing still ends at visible route content. This supports both #423 and the larger #549 harness. Fix: 7279d12a8.

The Files warm sample timed out because Playwright waited for the full document load on the large folder. The shared route harness now disables that click auto-wait and waits for URL commit followed by the real route-ready marker, so timing still ends at visible route content. This supports both #423 and the larger #549 harness. Fix: 7279d12a8.
Author
Owner

The locked final6 route profile completed the 390 px light matrix and the 390 px dark cold/hard-refresh matrix. It stopped during the third dark warm repetition: when returning from the large Files route, the Photos readiness marker did not become visible within 60 seconds. The VM one-minute load was 0.07 at start and 3.49 at exit; the run wrote no raw JSON. I am isolating this route/load interaction before collecting the full matrix.

The locked final6 route profile completed the 390 px light matrix and the 390 px dark cold/hard-refresh matrix. It stopped during the third dark warm repetition: when returning from the large Files route, the Photos readiness marker did not become visible within 60 seconds. The VM one-minute load was 0.07 at start and 3.49 at exit; the run wrote no raw JSON. I am isolating this route/load interaction before collecting the full matrix.
Author
Owner

The local fallback profile timed out after 120 seconds while waiting for Photos content at the Files folder URL (/files?path=Files%2FBench%2F5k-folder). This came from warm setup reusing route.path after the Files route path had been rewritten to its large deep link for cold and hard-refresh samples. I am changing warm source setup to use explicit mode roots by default; #549 can select the deep Files source with PERF_ROUTE_FILES_SOURCE=deep. The perf VM remains occupied, and the local host load at this failure was 36.73. No completed raw profile was written.

The local fallback profile timed out after 120 seconds while waiting for Photos content at the Files folder URL (`/files?path=Files%2FBench%2F5k-folder`). This came from warm setup reusing `route.path` after the Files route path had been rewritten to its large deep link for cold and hard-refresh samples. I am changing warm source setup to use explicit mode roots by default; #549 can select the deep Files source with `PERF_ROUTE_FILES_SOURCE=deep`. The perf VM remains occupied, and the local host load at this failure was 36.73. No completed raw profile was written.
Author
Owner

After the warm-source fix, the local fallback passed the 390 px and 820 px matrices and reached the 1440 px light warm Files sample. That sample stopped because its URL did not commit within the hard-coded 30-second wait. At the stop, local load was 18.95 (one minute) and 26.79 (five minutes); no raw JSON was written. I changed the URL-commit wait to use the route-ready timeout setting, which is 120 seconds for the next run. The perf VM is still locked by another profile and showed a one-minute load of 7.36.

After the warm-source fix, the local fallback passed the 390 px and 820 px matrices and reached the 1440 px light warm Files sample. That sample stopped because its URL did not commit within the hard-coded 30-second wait. At the stop, local load was 18.95 (one minute) and 26.79 (five minutes); no raw JSON was written. I changed the URL-commit wait to use the route-ready timeout setting, which is 120 seconds for the next run. The perf VM is still locked by another profile and showed a one-minute load of 7.36.
Author
Owner

A full local rerun with the warm-source setting still timed out after 120 seconds while waiting for Photos; the browser had returned to /files?path=Files%2FBench%2F5k-folder. At failure, local load was 22.48 (one minute) and 27.01 (five minutes). The /files route can reuse the last selected folder, so I changed normal warm setup to use the explicit Files root (/files?path=) and to reach a visible Photos source through its real mode tab. Settings still uses a root link when the tray is hidden. #549 can select the deep Files source. node --check passed.

A full local rerun with the warm-source setting still timed out after 120 seconds while waiting for Photos; the browser had returned to `/files?path=Files%2FBench%2F5k-folder`. At failure, local load was 22.48 (one minute) and 27.01 (five minutes). The `/files` route can reuse the last selected folder, so I changed normal warm setup to use the explicit Files root (`/files?path=`) and to reach a visible Photos source through its real mode tab. Settings still uses a root link when the tray is hidden. #549 can select the deep Files source. `node --check` passed.
Author
Owner

The focused 390 px dark profile completed the cold, hard-refresh and warm navigation checks for all seven routes, including the Files-to-Photos path. It then stopped in the separate mode-switch interaction sample: .timeline .tile matched 29 real Photos tiles, and Playwright rejected the strict locator wait. I am changing the interaction helper to wait for the first matching visible item. No route-readiness failure occurred in this run.

The focused 390 px dark profile completed the cold, hard-refresh and warm navigation checks for all seven routes, including the Files-to-Photos path. It then stopped in the separate mode-switch interaction sample: `.timeline .tile` matched 29 real Photos tiles, and Playwright rejected the strict locator wait. I am changing the interaction helper to wait for the first matching visible item. No route-readiness failure occurred in this run.
Author
Owner

Round 3 report — reload-423 (#423)

Head SHA: a52229ec323ea6525c8a1353c49312a1476274b2 on job/reload-423. Worktree is clean. No push, deploy or merge.

Built: phone update toast now uses “Update available” on narrow screens, one Refresh action and normal dismiss for Later; wider screens retain “calternal has been updated”. The shared route harness now waits on URL commit and route content, starts warm Files samples at explicit /files?path=, and supports PERF_ROUTE_FILES_SOURCE=deep for #549. The performance report and raw local route sample are in docs/perf/2026-10-01-reload-423.md and docs/perf/runs/2026-10-01T005919Z-2d8427e79/.

Files touched include apps/web/e2e/{harness.mjs,reload-423.mjs,route-perf.mjs}, the update toast and mode-navigation components/stores/routes/tests under apps/web/src/, packages/ui/src/components/{ModeHeader,SegmentedControl}.svelte, crates/calternal-fs/src/{lib.rs,web_assets.rs}, crates/calternal-server/src/{main.rs,wire.rs}, bench/{run.sh,record.py,compare.py}, benchmark helpers/tests and the listed docs/perf/ files.

Benchmark limitation: the perf VM stayed locked by another job. At final check it showed load 4.06, 4.16, 4.07, above the one-minute gate. Per the single-tenant rule I used the local fallback. The archived sample has one run for all seven requested routes at 390 px dark only; it is not a full VM matrix and is not baseline-comparable. It records host load [15.63, 19.44, 23.37] before and [25.91, 23.90, 24.04] after. The 300 ms warm check and FCP observer produced assertion gaps recorded in raw JSON. A later focused run using a 3-second delay timed out waiting for the Photos URL after the mode click and remained on the Files folder URL under local load [13.39, 15.88, 19.26]; the earlier A→B crawl passed. This navigation needs another check on an available isolated host.

Visual evidence is attached to this issue for 390, 820 and 1440 px in light and dark. No baseline was changed.

Decisions not covered by DESIGN: use an explicit Files root for the normal warm route source; expose PERF_ROUTE_FILES_SOURCE=deep for #549’s large-folder case. Use the local single-profile result only as a labeled partial record because the VM lock was unavailable and the three-hour limit arrived.

Gates (verbatim output excerpts):

cargo fmt --check
(exit 0; no output)

cargo clippy -p calternal-fs --all-targets -- -D warnings
Finished `dev` profile [unoptimized + debuginfo] target(s) in 13.61s

cargo test -p calternal-fs
45 passed (unit); 42 passed (storage); doc tests: 0

cargo clippy -p calternal-server --all-targets -- -D warnings
Finished `dev` profile [unoptimized + debuginfo] target(s) in 2m 27s

cargo test -p calternal-server
95 passed; 0 failed; 3 ignored; 0 measured; 0 filtered out; finished in 42.54s

bun run check
$ node scripts/check-type-tokens.mjs && node scripts/check-motion-tokens.mjs && svelte-kit sync && svelte-check --tsconfig ./tsconfig.json
Text sizes and UI shape values use shared role tokens.
UI transitions and animation options use shared motion tokens or documented exceptions.
Loading svelte-check in workspace: /home/kayg/Developer/calternal-wt/reload-423/apps/web
Getting Svelte diagnostics...

svelte-check found 0 errors and 0 warnings

bun run test
Test Files  140 passed (140)
     Tests  917 passed (917)
  Start at  00:19:37
  Duration  186.15s (transform 55%, environment 17%, import 15%, tests 9%, setup 4%)

  Transform  |component| transforming modules took 368.79s · 48% of tracked time, re-done on every run
             persist transforms across runs with fsModuleCache: true
             learn more: https://vitest.dev/guide/improving-performance#caching-between-reruns

cargo clean
Removed 21489 files, 9.3GiB total

Cleanup: apps/web/build and apps/web/.svelte-kit removed. The Rust and web gates above passed before the final route-harness-only diagnostics and reporting changes; node --check, bash -n bench/run.sh and git diff --check passed for those changes.

Round 3 report — reload-423 (#423) Head SHA: `a52229ec323ea6525c8a1353c49312a1476274b2` on `job/reload-423`. Worktree is clean. No push, deploy or merge. Built: phone update toast now uses “Update available” on narrow screens, one Refresh action and normal dismiss for Later; wider screens retain “calternal has been updated”. The shared route harness now waits on URL commit and route content, starts warm Files samples at explicit `/files?path=`, and supports `PERF_ROUTE_FILES_SOURCE=deep` for #549. The performance report and raw local route sample are in [docs/perf/2026-10-01-reload-423.md](docs/perf/2026-10-01-reload-423.md) and `docs/perf/runs/2026-10-01T005919Z-2d8427e79/`. Files touched include `apps/web/e2e/{harness.mjs,reload-423.mjs,route-perf.mjs}`, the update toast and mode-navigation components/stores/routes/tests under `apps/web/src/`, `packages/ui/src/components/{ModeHeader,SegmentedControl}.svelte`, `crates/calternal-fs/src/{lib.rs,web_assets.rs}`, `crates/calternal-server/src/{main.rs,wire.rs}`, `bench/{run.sh,record.py,compare.py}`, benchmark helpers/tests and the listed `docs/perf/` files. Benchmark limitation: the perf VM stayed locked by another job. At final check it showed load `4.06, 4.16, 4.07`, above the one-minute gate. Per the single-tenant rule I used the local fallback. The archived sample has one run for all seven requested routes at 390 px dark only; it is not a full VM matrix and is not baseline-comparable. It records host load `[15.63, 19.44, 23.37]` before and `[25.91, 23.90, 24.04]` after. The 300 ms warm check and FCP observer produced assertion gaps recorded in raw JSON. A later focused run using a 3-second delay timed out waiting for the Photos URL after the mode click and remained on the Files folder URL under local load `[13.39, 15.88, 19.26]`; the earlier A→B crawl passed. This navigation needs another check on an available isolated host. Visual evidence is attached to this issue for 390, 820 and 1440 px in light and dark. No baseline was changed. Decisions not covered by DESIGN: use an explicit Files root for the normal warm route source; expose `PERF_ROUTE_FILES_SOURCE=deep` for #549’s large-folder case. Use the local single-profile result only as a labeled partial record because the VM lock was unavailable and the three-hour limit arrived. Gates (verbatim output excerpts): ```text cargo fmt --check (exit 0; no output) cargo clippy -p calternal-fs --all-targets -- -D warnings Finished `dev` profile [unoptimized + debuginfo] target(s) in 13.61s cargo test -p calternal-fs 45 passed (unit); 42 passed (storage); doc tests: 0 cargo clippy -p calternal-server --all-targets -- -D warnings Finished `dev` profile [unoptimized + debuginfo] target(s) in 2m 27s cargo test -p calternal-server 95 passed; 0 failed; 3 ignored; 0 measured; 0 filtered out; finished in 42.54s bun run check $ node scripts/check-type-tokens.mjs && node scripts/check-motion-tokens.mjs && svelte-kit sync && svelte-check --tsconfig ./tsconfig.json Text sizes and UI shape values use shared role tokens. UI transitions and animation options use shared motion tokens or documented exceptions. Loading svelte-check in workspace: /home/kayg/Developer/calternal-wt/reload-423/apps/web Getting Svelte diagnostics... svelte-check found 0 errors and 0 warnings bun run test Test Files 140 passed (140) Tests 917 passed (917) Start at 00:19:37 Duration 186.15s (transform 55%, environment 17%, import 15%, tests 9%, setup 4%) Transform |component| transforming modules took 368.79s · 48% of tracked time, re-done on every run persist transforms across runs with fsModuleCache: true learn more: https://vitest.dev/guide/improving-performance#caching-between-reruns cargo clean Removed 21489 files, 9.3GiB total ``` Cleanup: `apps/web/build` and `apps/web/.svelte-kit` removed. The Rust and web gates above passed before the final route-harness-only diagnostics and reporting changes; `node --check`, `bash -n bench/run.sh` and `git diff --check` passed for those changes.
Author
Owner

Owner update (2026-09-30), for traceability: after the root cause was found, the owner asked: "yeah please also test cold/warm navigations and that they should both feel instant. also we need a 'Refresh to update ' toast - word it in a user friendly way".

So the acceptance for this issue includes:

  • a cold and a warm navigation measurement across every Tab, both with no visible loading state (cached content first, then refresh; see also #549 and #527);
  • the update toast in plain words (current build: "calternal has been updated" with a Refresh action), never reloading during an unsaved edit.

The round-2 job comments above report both as built on job/reload-423. Check the toast wording against the "user-friendly names, no jargon" rule in review.

**Owner update (2026-09-30), for traceability:** after the root cause was found, the owner asked: "yeah please also test cold/warm navigations and that they should both feel instant. also we need a 'Refresh to update <action>' toast - word it in a user friendly way". So the acceptance for this issue includes: - a cold and a warm navigation measurement across every Tab, both with no visible loading state (cached content first, then refresh; see also #549 and #527); - the update toast in plain words (current build: "calternal has been updated" with a **Refresh** action), never reloading during an unsaved edit. The round-2 job comments above report both as built on `job/reload-423`. Check the toast wording against the "user-friendly names, no jargon" rule in review.
Author
Owner

Started reload-423 on branch job/reload-423. Base HEAD: a52229ec32; origin/dev at start: 687ff70313. I am tracing the user-scoped caches and #555 browser test before editing.

Started reload-423 on branch job/reload-423. Base HEAD: a52229ec323ea6525c8a1353c49312a1476274b2; origin/dev at start: 687ff703136e71e89f8dfba139e93cd0788b25c1. I am tracing the user-scoped caches and #555 browser test before editing.
Author
Owner

Source audit finding for #423: inboxCache.ts held one module-level Mail snapshot; MoneyStore held Budgets and month reports in process memory and used an untagged calternal.money.budget key; modePreload.ts keyed ready/in-flight routes only by mode. These could retain one User's cached data or readiness across a User change if an event or reload path was missed. I moved the persisted snapshots and readiness markers through userStorage, keyed the in-memory caches by the active User, and added a real cached Mail row to the #555 two-User browser scenario.

Source audit finding for #423: `inboxCache.ts` held one module-level Mail snapshot; `MoneyStore` held Budgets and month reports in process memory and used an untagged `calternal.money.budget` key; `modePreload.ts` keyed ready/in-flight routes only by mode. These could retain one User's cached data or readiness across a User change if an event or reload path was missed. I moved the persisted snapshots and readiness markers through `userStorage`, keyed the in-memory caches by the active User, and added a real cached Mail row to the #555 two-User browser scenario.
Author
Owner

Finished #423 on branch job/reload-423.

Head SHA: 2399db841cf16ade3fbf47fcfab50578a3abe364

Commits:

  • 21d4b02a5 — merge origin/dev (includes #555 userStorage).
  • 2399db841 — scope warm caches to the active User.

Built:

  • Mail Inbox snapshots persist through userStorage, restore by User, and reject late requests after a User change. The #555 two-User browser test now paints an Alice Mail row from the production snapshot format before checking cleanup.
  • Money budgets and month reports use User-scoped userStorage; the in-memory Money and warm-route caches clear or change namespace with the active User.

Files changed by the cache fix:

  • apps/web/src/lib/mail/inboxCache.ts
  • apps/web/src/lib/money/store.svelte.ts
  • apps/web/src/lib/navigation/modePreload.ts
  • apps/web/e2e/user-storage-555.mjs
  • apps/web/src/lib/modeHeader.svelte.test.ts
  • apps/web/src/lib/userStorage-boot.test.ts
  • apps/web/src/routes/+layout.svelte

Gates (final output excerpts, verbatim):

bun run check

User browser caches use userStorage; only documented device/public-link exceptions remain.
Text sizes and UI shape values use shared role tokens.
UI transitions and animation options use shared motion tokens or documented exceptions.
Loading svelte-check in workspace: /home/kayg/Developer/calternal-wt/reload-423/apps/web
Getting Svelte diagnostics...
svelte-check found 0 errors and 0 warnings

bun run test

Test Files  148 passed (148)
      Tests  1014 passed (1014)
   Start at  01:55:40
   Duration  57.08s (transform 42%, environment 23%, import 17%, tests 13%, setup 5%)

bun run build

> Using @sveltejs/adapter-static
  Wrote site to "build"
  ✔ done

Known gaps:

  • I did not run test:e2e:user-storage-555: another job had WebKit and Chromium processes active, and the host allows one browser at a time. The new real-row assertion is in the test.
  • I did not record a new performance sample for this cache-only round. The branch's existing bench/reload-423 profile remains available.

Decisions the design docs do not specify:

  • Keep the Money budget list and up to eight month reports in per-User local userStorage; retain the existing 30-second stale window.
  • Keep the bounded Mail Inbox page in per-User userStorage; retain the existing 2-second stale window and 50-row page.
  • Warm route readiness is tracked per User in memory and mirrored to userStorage. The SvelteKit route data itself is not restored across a document reload.

Cleanup: cargo clean reported Removed 1 file, 356B total; generated web build output was removed. Working tree is clean.

Finished #423 on branch `job/reload-423`. Head SHA: `2399db841cf16ade3fbf47fcfab50578a3abe364` Commits: - `21d4b02a5` — merge `origin/dev` (includes #555 `userStorage`). - `2399db841` — scope warm caches to the active User. Built: - Mail Inbox snapshots persist through `userStorage`, restore by User, and reject late requests after a User change. The #555 two-User browser test now paints an Alice Mail row from the production snapshot format before checking cleanup. - Money budgets and month reports use User-scoped `userStorage`; the in-memory Money and warm-route caches clear or change namespace with the active User. Files changed by the cache fix: - `apps/web/src/lib/mail/inboxCache.ts` - `apps/web/src/lib/money/store.svelte.ts` - `apps/web/src/lib/navigation/modePreload.ts` - `apps/web/e2e/user-storage-555.mjs` - `apps/web/src/lib/modeHeader.svelte.test.ts` - `apps/web/src/lib/userStorage-boot.test.ts` - `apps/web/src/routes/+layout.svelte` Gates (final output excerpts, verbatim): `bun run check` ``` User browser caches use userStorage; only documented device/public-link exceptions remain. Text sizes and UI shape values use shared role tokens. UI transitions and animation options use shared motion tokens or documented exceptions. Loading svelte-check in workspace: /home/kayg/Developer/calternal-wt/reload-423/apps/web Getting Svelte diagnostics... svelte-check found 0 errors and 0 warnings ``` `bun run test` ``` Test Files 148 passed (148) Tests 1014 passed (1014) Start at 01:55:40 Duration 57.08s (transform 42%, environment 23%, import 17%, tests 13%, setup 5%) ``` `bun run build` ``` > Using @sveltejs/adapter-static Wrote site to "build" ✔ done ``` Known gaps: - I did not run `test:e2e:user-storage-555`: another job had WebKit and Chromium processes active, and the host allows one browser at a time. The new real-row assertion is in the test. - I did not record a new performance sample for this cache-only round. The branch's existing `bench/reload-423` profile remains available. Decisions the design docs do not specify: - Keep the Money budget list and up to eight month reports in per-User local `userStorage`; retain the existing 30-second stale window. - Keep the bounded Mail Inbox page in per-User `userStorage`; retain the existing 2-second stale window and 50-row page. - Warm route readiness is tracked per User in memory and mirrored to `userStorage`. The SvelteKit route data itself is not restored across a document reload. Cleanup: `cargo clean` reported `Removed 1 file, 356B total`; generated web build output was removed. Working tree is clean.
Author
Owner

This route has another stuck state when its lazy chunk import rejects: apps/web/src/routes/analytics/[period]/[date]/+page.svelte:53-58 leaves Dashboard null after a failed import, so line 67 keeps showing “Loading analytics” with no Retry or error state. Please include this route in the chunk-failure recovery check. A test can reject the Dashboard import and verify that Analytics shows a recovery action instead of a permanent skeleton.

This route has another stuck state when its lazy chunk import rejects: `apps/web/src/routes/analytics/[period]/[date]/+page.svelte:53-58` leaves `Dashboard` null after a failed import, so line 67 keeps showing “Loading analytics” with no Retry or error state. Please include this route in the chunk-failure recovery check. A test can reject the Dashboard import and verify that Analytics shows a recovery action instead of a permanent skeleton.
Author
Owner

A second lazy-chunk failure point is the Composer panel. When composer.open becomes true, the app shell imports Composer.svelte with .then() but no rejection handler. If the chunk is missing, the panel stays absent and the opening action has no visible result or recovery action.

Evidence: apps/web/src/routes/+layout.svelte:65-72,915.

Please include the Composer and Analytics lazy imports in the chunk-failure recovery check. A test can reject the Composer import after the User opens it and verify a visible Retry path.

A second lazy-chunk failure point is the Composer panel. When `composer.open` becomes true, the app shell imports `Composer.svelte` with `.then()` but no rejection handler. If the chunk is missing, the panel stays absent and the opening action has no visible result or recovery action. Evidence: `apps/web/src/routes/+layout.svelte:65-72,915`. Please include the Composer and Analytics lazy imports in the chunk-failure recovery check. A test can reject the Composer import after the User opens it and verify a visible Retry path.
Sign in to join this conversation.
No labels
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#423
No description provided.