Repository navigation
fix(remote): client-serving robustness — per-request bundle check, cache headers, self-diagnosing fallback - #431
Merged
Conversation
The construction-time existsSync gate meant building the client bundle after app launch never took effect (placeholder until full restart) and the placeholder didn't say what to do — the first thing real-world testing tripped on. The dist path now passes through unconditionally and serveClient checks index.html on each request, so 'npm run client:build' then reloading the phone page just works; the placeholder now names the exact command. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Field-debugging fallout: a phone kept rendering a stale page through a rebuild AND an app restart because serveClient sent no cache headers, and mobile browsers cache heuristically-forever without them. index.html (and the placeholder/SPA fallback) now send no-cache so every load revalidates; Vite's content-hashed assets get max-age=1y immutable — a new build changes the hash and the revalidated index points at it. Second half of the same incident: when backfill fails, the client's raw-TUI fallback is visually identical to the pre-semantic-rendering UI, so a broken pipeline masquerades as 'nothing changed'. The store now records non-benign backfill errors and SessionView says WHY it is showing raw terminal instead of the rich feed. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Juliusolsson05
force-pushed
the
fix/remote-client-lazy-dist
branch
from
July 6, 2026 22:11
20d5942 to
43bc04c
Compare
Owner
Author
|
Rebased on main (post-#438) and expanded from field debugging: mobile-browser caching served a stale page through a rebuild AND an app restart because we sent no cache headers — now no-cache on HTML, immutable on hashed assets. Also: the raw-TUI fallback now explains itself when backfill fails instead of silently impersonating the old UI. 83 remote tests green, both tsc projects clean. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Found in first real-world smoke test (#420): scanning the QR before running
npm run client:buildshowed the placeholder, and building afterwards changed nothing until a full app restart, because main existence-checked the dist dir once at boot.Now the path passes through unconditionally and
serveClientchecksindex.htmlper request — build, reload the phone page, done. The placeholder copy names the exact command instead of a dead end.Verified: node tsc clean, 76 remote tests green.
🤖 Generated with Claude Code