Skip to content

perf(web): preserve Markdown controls while messages stream - #343

Merged
rynfar merged 1 commit into
pylonfrom
upstream/2026-09-06-stable-markdown
Sep 7, 2026
Merged

perf(web): preserve Markdown controls while messages stream#343
rynfar merged 1 commit into
pylonfrom
upstream/2026-09-06-stable-markdown

Conversation

@rynfar

@rynfar rynfar commented Sep 6, 2026

Copy link
Copy Markdown
Collaborator

Streaming text recreated Markdown renderer component types, resetting controls and repeating syntax highlighting. Keep those renderers mounted and pass current message state through React context. A failed highlighter retries when its inputs change while retaining code-block controls.

Ports upstream #9677, 887ece307131bdc853cc10f3b82067dee77c4ecf, plus the Markdown recovery slice of #9799, ce4712d5b04fb998f79fe132245289191147e5d5. Keeps Pylon’s editor availability, click-time editor preference, external-link behavior, long-link wrapping, and video expansion. No upstream renderer body replaces those behaviors.

Validation: 55 real React and Markdown tests pass, including persistent wrap/copy/details state, current task edits, one highlight call across ten unchanged-fence updates, and recovery from a highlighter failure. Web typecheck and scoped lint pass.

In the disposable browser app, expanded Markdown details and code wrapping survived 90 synthetic streaming updates. An ongoing-stream focus check retained the same connected, focused code control. The baseline collapsed expanded details. Integrated client validation passed 454 focused tests and three client typechecks.

Before After
Before After

Before navigation/streaming clip · After navigation/streaming clip.

Model: GPT-6 Astra. Harness: Codex.

Port upstream #9677 (887ece307131bdc853cc10f3b82067dee77c4ecf) and the Markdown recovery slice of #9799 (ce4712d5b04fb998f79fe132245289191147e5d5). Preserve Pylon link, editor, and media behavior.
@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
Contributor

Thread transfer impact

✅ Thread transfer remains within every enforced ceiling.

Provider Metric Main baseline This PR Impact PR ceiling
Codex Total thread wire 13.7 KiB 13.7 KiB −49 B (−0.3%) 15.1 KiB
Codex Thread snapshot wire 7.1 KiB 7.1 KiB +2 B (+0.0%) 7.3 KiB
Codex Live turn WebSocket wire 6.6 KiB 6.6 KiB −51 B (−0.8%) 7.8 KiB
Codex Live turn WebSocket decoded 57.3 KiB 56.5 KiB −778 B (−1.3%) 66.4 KiB
Codex Live turn messages 8 9 +1 (+12.5%) 21
Claude Total thread wire 13.7 KiB 13.7 KiB +71 B (+0.5%) 15.1 KiB
Claude Thread snapshot wire 7.1 KiB 7.1 KiB −7 B (−0.1%) 7.3 KiB
Claude Live turn WebSocket wire 6.6 KiB 6.6 KiB +78 B (+1.2%) 7.8 KiB
Claude Live turn WebSocket decoded 57.3 KiB 58.1 KiB +840 B (+1.4%) 66.4 KiB
Claude Live turn messages 8 8 0 (0.0%) 21

Baseline: a438388 · PR result: b302f53 · 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 7, 2026 04:19
@rynfar
rynfar merged commit e12ff8a into pylon Sep 7, 2026
22 checks passed
@rynfar
rynfar deleted the upstream/2026-09-06-stable-markdown branch September 7, 2026 04:39
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.

1 participant