Skip to content

fix(web): keep file edits saved and correctly highlighted - #301

Merged
rynfar merged 5 commits into
pylonfrom
upstream/2026-09-06-editor-reliability
Sep 6, 2026
Merged

fix(web): keep file edits saved and correctly highlighted#301
rynfar merged 5 commits into
pylonfrom
upstream/2026-09-06-editor-reliability

Conversation

@rynfar

@rynfar rynfar commented Sep 6, 2026

Copy link
Copy Markdown
Collaborator

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-before.png

b8-after.png

b8-file-switching.webm

Model: GPT-6 Astra. Harness: Codex.

juliusmarminge and others added 5 commits September 6, 2026 07:19
(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)
@github-actions github-actions Bot added vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. size:L labels Sep 6, 2026
@github-actions

github-actions Bot commented Sep 6, 2026

Copy link
Copy Markdown

Thread transfer impact

✅ Thread transfer remains within every enforced ceiling.

Provider Metric Main baseline This PR Impact PR ceiling
Codex Total thread wire 13.6 KiB 13.6 KiB +18 B (+0.1%) 15.1 KiB
Codex Thread snapshot wire 7.1 KiB 7.1 KiB +5 B (+0.1%) 7.3 KiB
Codex Live turn WebSocket wire 6.5 KiB 6.6 KiB +13 B (+0.2%) 7.8 KiB
Codex Live turn WebSocket decoded 56.5 KiB 56.5 KiB 0 B (0.0%) 66.4 KiB
Codex Live turn messages 8 8 0 (0.0%) 21
Claude Total thread wire 13.7 KiB 13.7 KiB −5 B (−0.0%) 15.1 KiB
Claude Thread snapshot wire 7.1 KiB 7.1 KiB +4 B (+0.1%) 7.3 KiB
Claude Live turn WebSocket wire 6.6 KiB 6.6 KiB −9 B (−0.1%) 7.8 KiB
Claude Live turn WebSocket decoded 57.3 KiB 57.3 KiB 0 B (0.0%) 66.4 KiB
Claude Live turn messages 8 8 0 (0.0%) 21

Baseline: a993745 · PR result: df4ae50 · Source CI: success

Scenario and decoded snapshot size

10 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.

  • Codex decoded thread snapshot: 111.2 KiB
  • Claude decoded thread snapshot: 111.9 KiB

Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed.

@rynfar
rynfar marked this pull request as ready for review September 6, 2026 15:04
@rynfar
rynfar merged commit d47e16c into pylon Sep 6, 2026
22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:L vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants