fix(web): keep file edits saved and correctly highlighted - #301
Merged
Conversation
(cherry picked from commit b01771c2383bbcdf154b8c4e9f1a7d5e3867e2d0)
(cherry picked from commit df8e0eb46bca3dc01c17cc74a53b19aaacbe252b)
(cherry picked from commit 2fa5ef4c7bf3aafabe98392d25be7eb86847ce8f)
Co-authored-by: Claude Fable 5 <noreply@anthropic.com> (cherry picked from commit 3e1333319aacff96856a3c161b8787ff6b0ddd6b)
Thread transfer impact✅ Thread transfer remains within every enforced ceiling.
Baseline: Scenario and decoded snapshot size10 historical turns, 5 command tools per turn, 878.9 KiB retained MCP result per historical turn, and a 1.05 MiB retained result in the measured turn.
Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed. |
rynfar
marked this pull request as ready for review
September 6, 2026 15:04
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.
The file editor could lose autosave after React effect replay, accept stale worker highlights after an edit, or enable editing before its language grammar was ready. Markdown previews could retain widgets from another file. Keep a fresh save coordinator for each mounted file, retire old callbacks, invalidate stale worker tasks/cache entries and load the selected grammar before editing. Reset Markdown widgets across file, workspace and environment changes.
Adopts approved B8: upstream #9878, #9902, #9947 and #9910. Keeps Pylon’s Pierre 1.3.0-beta.10 dependency, existing patches, 500 ms debounce, confirmed file cache and environment-routed writes. Test-only React renderer matches Pylon’s web React version. Web and desktop share this editor; native mobile uses its own surface.
Validation: 31 focused save lifecycle/coordinator and real-worker highlight/grammar tests pass, plus web typecheck, targeted lint and diff checks. Tests cover StrictMode replay, close/reopen, retired callbacks, 7,000-line source edits and stale worker responses.
Integrated Chromium verification reproduced a visible edit that failed to save on the baseline. The repaired editor saves it to disk and retains it after reopening; switching rendered Markdown between two files replaces the previous content. The combined branch passed 303 focused tests and server/web typechecks.
Client verification evidence
b8-file-switching.webm
Model: GPT-6 Astra. Harness: Codex.