Skip to content

feat(chat): adopt upstream rendering and client sync improvements - #507

Merged
rynfar merged 27 commits into
pylonfrom
upstream/2026-09-12-web-perf
Sep 12, 2026
Merged

feat(chat): adopt upstream rendering and client sync improvements#507
rynfar merged 27 commits into
pylonfrom
upstream/2026-09-12-web-perf

Conversation

@rynfar

@rynfar rynfar commented Sep 12, 2026

Copy link
Copy Markdown
Collaborator

Large conversations repeatedly reparse completed Markdown and code, rebuild HTTP handlers and publish each streamed event separately. This ports the frozen upstream chat and client improvements: completed content and code-line DOM are reused, thread switches hold a bounded painted timeline, remote requests build only their needed API group, and queued stream events publish as a batch while preserving snapshot/revert/delete ordering.

The same dependency group adds expandable question-answer tool rows, image zoom/pan, touch copy controls, available-width model labels, environment search descriptions, Linux terminal middle-click paste, unpriced usage and live countdowns, diff palettes, platform Open icons, and sidebar/panel presentation fixes.

Pylon adaptations retain Prime/provider admission and session controls, typed message-ID rewind and rollback safeguards, per-turn reported costs, image resource resolution, worker cleanup, and reduced-motion/background/focus gates. Held content from a different thread disables mutation callbacks and live work status, uses its environment/path context, and does not cache ephemeral preview URLs. Remote cookie, bearer and DPoP refresh/retry behavior remains intact.

Owning cycle: #497. Frozen range: 6c583620ff7ad3235b135af7107c0543467eecfa..4a4c6dd2adc350a68ba18bb28b24b5a7e4660dab. All 26 assigned sources below are adopted with Pylon adaptations; none deferred. Companion mobile source 2ebc9fa4ed24e389eef24039f27c73ae6633858f contributes the userInput.ts Hermes-compatible sort hunk here; its remaining hunks are owned by the mobile lane.

Full upstream source Behavior Outcome
50f918c57a2df85bd97612b958386aaca035dcab fix(web): allow expanding duplicate tool call commands (#10981) Adopted
8d8189e67dc091ffb91df451c9a957bbd68a5364 feat(web): zoom and pan expanded images (#10869) Adopted
b7b3ef1e6fcb5c22a9790d2578fe8af7ce396835 fix(ui): use available space for composer model names (#11002) Adopted
385cc0a4c669aeae786ad47bfe3ecbbc352eff24 fix(web): show message copy buttons on touch devices (#11020) Adopted
d1eeb16247a0bd2eca8bbbfa5ab777e096af949c fix(web): middle-click pastes in the terminal on Linux (#11018) Adopted
bb5e824c9fcbd76c93ef15b304f89f8b6999f32c feat: add blue and orange diff color palette (#10671) Adopted
21a5ccf881abc3aa8b5ea9de4a65edbb6ceadbda fix(web): prevent seams in the topbar scroll fade (#10914) Adopted
21d744039bf76c072c875886ee497e391a0dd430 fix(web): fit provider update text inside sidebar notices (#11034) Adopted
502131adff7494d1a1797b4fe518870f7e8431fd fix(web): collapse a tool call by clicking its expanded label (#11017) Adopted
c52b8d96e4b34201f19b5e5bb12c6b2a77bfaa9a feat(command-palette): show environments in search results (#10722) Adopted
27eb79dc719d70a99db495b0cb20bd6e3ac10b8d fix(chat): fold question answers into tool activity (#11014) Adopted
48654c1182c41dbd5e99ef0d6620a13ba2400f26 fix(usage): flag unpriced model activity instead of showing $0.00 (#11021) Adopted
8fc253605e6d203c3654dbb1ce22fa1fd6fa0767 perf(web): format minimap previews only when opened (#11181) Adopted
a9dabbf100d1f6c0b2ed7b5e879d469ac14fd186 perf(web): reuse completed Markdown prefixes while streaming (#11193) Adopted
d7d7f8f3eb7bf593925281eb62348e15a91252b8 perf(web): resume syntax highlighting from completed lines (#11196) Adopted
8078c532ceeee5cb951325031f216171507f3d5e perf(web): preserve completed code-line DOM while streaming (#11198) Adopted
211618fd9fe39d3dde01171a6856ce9f633571c9 perf(web): huge-thread switch no longer blanks the chat pane (#11169) Adopted
fb3d165d33b155038de717851207d25fb52fe65e fix(web): show platform file manager icons in Open menu (#11228) Adopted
2b7d3a45e6ee9454e4dd46aaf0276ca05d8555d3 perf(web): avoid scanning chat history for sidebar backgrounds (#11206) Adopted
6e8931d75615ec020e602e97df2694b0541a6272 perf(client): reduce remote request and message sync overhead (#11029) Adopted
e1c94f703f05b43f2935d09ed1ef882d0ee13ff8 fix(web): refresh usage limit countdowns without switching tabs (#11187) Adopted
e145c5f22a10d7433420b447537ed3f29a66d7d9 perf(client-runtime): speed up message sync on desktop and mobile (#11302) Adopted
867eb9bffc1e46ce0f7493ae760f9eb9d9dec3a8 fix(web): themed panel toggles show their disabled state (#11188) Adopted
50791a0530a9c4eed7924dbfedf2fcf430d4ed98 fix(web): use branch wording in commit dialogs (#11281) Adopted
8a2d5f545ae1f76d08a6a6515f6b6c383cada5ad fix(test): drain worker broadcasts before restoring browser globals (#11349) Adopted
38827789c4de97955315b459cb3b0b8207f692d8 fix(web): keep sidebar scroll position when pinning threads (#10757) Adopted

Validation: 605 focused changed-file tests pass (including 54 terminal tests under the web Vite configuration); 50 projection/question-folding/stream-lifecycle regressions pass; 317 existing web/mobile work-log, timeline, session and remote authorization integration tests pass. Typechecks pass for web, mobile, desktop, server (t3), client-runtime, contracts and shared. Targeted lint passes with existing warnings; all changed files formatted, frozen lockfile install and diff whitespace checks pass. Added explicit server projection idempotence/choice-slimming and shared folding tests. Initial failures were an outdated usage useState mock after adding countdown state, an upstream benchmark fixture's not-yet-integrated PR array, and invoking the WASM terminal suite without the web configuration; all are corrected in final verification.

UI evidence limitation: this turn has no browser/computer-use authorization, so final integrated Pylon screenshots/video have not been captured. Existing render/DOM-identity tests verify the affected rendering paths. Upstream reference evidence is available in thread switching #11169, question folding #11014, and image zoom #10869; these are upstream evidence, not Pylon verification. No end-to-end performance numbers or native UI rendering are claimed. Peer adversarial review and final-head CI are required before merge.

Model: GPT-6. Harness: Codex.


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.

Yash-Singh1 and others added 27 commits September 12, 2026 00:13
(cherry picked from commit 50f918c57a2df85bd97612b958386aaca035dcab)
(cherry picked from commit 8d8189e67dc091ffb91df451c9a957bbd68a5364)
(cherry picked from commit b7b3ef1e6fcb5c22a9790d2578fe8af7ce396835)
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
(cherry picked from commit 385cc0a4c669aeae786ad47bfe3ecbbc352eff24)
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
(cherry picked from commit d1eeb16247a0bd2eca8bbbfa5ab777e096af949c)
(cherry picked from commit bb5e824c9fcbd76c93ef15b304f89f8b6999f32c)
(cherry picked from commit 21a5ccf881abc3aa8b5ea9de4a65edbb6ceadbda)
(cherry picked from commit 21d744039bf76c072c875886ee497e391a0dd430)
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
(cherry picked from commit 502131adff7494d1a1797b4fe518870f7e8431fd)
(cherry picked from commit c52b8d96e4b34201f19b5e5bb12c6b2a77bfaa9a)
(cherry picked from commit 27eb79dc719d70a99db495b0cb20bd6e3ac10b8d)
…1021)

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
(cherry picked from commit 48654c1182c41dbd5e99ef0d6620a13ba2400f26)
(cherry picked from commit 8fc253605e6d203c3654dbb1ce22fa1fd6fa0767)
(cherry picked from commit a9dabbf100d1f6c0b2ed7b5e879d469ac14fd186)
(cherry picked from commit d7d7f8f3eb7bf593925281eb62348e15a91252b8)
(cherry picked from commit 8078c532ceeee5cb951325031f216171507f3d5e)
Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: Julius Marminge <juliusmarminge@users.noreply.github.com>
(cherry picked from commit 211618fd9fe39d3dde01171a6856ce9f633571c9)
(cherry picked from commit fb3d165d33b155038de717851207d25fb52fe65e)
(cherry picked from commit 2b7d3a45e6ee9454e4dd46aaf0276ca05d8555d3)
(cherry picked from commit 6e8931d75615ec020e602e97df2694b0541a6272)
Co-authored-by: Exotic <118054752+extoci@users.noreply.github.com>
(cherry picked from commit e1c94f703f05b43f2935d09ed1ef882d0ee13ff8)
…1302)

(cherry picked from commit e145c5f22a10d7433420b447537ed3f29a66d7d9)
(cherry picked from commit 867eb9bffc1e46ce0f7493ae760f9eb9d9dec3a8)
(cherry picked from commit 50791a0530a9c4eed7924dbfedf2fcf430d4ed98)
…#11349)

(cherry picked from commit 8a2d5f545ae1f76d08a6a6515f6b6c383cada5ad)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
(cherry picked from commit 38827789c4de97955315b459cb3b0b8207f692d8)
Adapt held timelines to message-ID rollback and retain mobile session controls and reported costs. Add projection/folding regressions, maintain worker teardown tracking, and adjust fixtures to the Pylon contract.

Includes packages/client-runtime/src/work-log/userInput.ts Hermes sort compatibility from upstream 2ebc9fa4ed24e389eef24039f27c73ae6633858f; other source hunks belong to the mobile lane.
@vercel

vercel Bot commented Sep 12, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
pylon-marketing Ready Ready Preview Sep 12, 2026 6:24am UTC

@github-actions github-actions Bot added vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. size:XXL labels Sep 12, 2026
@github-actions

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 14.1 KiB 14.1 KiB +31 B (+0.2%) 15.1 KiB
Codex Thread snapshot wire 7.2 KiB 7.2 KiB +2 B (+0.0%) 7.3 KiB
Codex Live turn WebSocket wire 6.9 KiB 6.9 KiB +29 B (+0.4%) 7.8 KiB
Codex Live turn WebSocket decoded 58.8 KiB 58.8 KiB 0 B (0.0%) 66.4 KiB
Codex Live turn messages 10 10 0 (0.0%) 21
Claude Total thread wire 14.1 KiB 14.1 KiB +7 B (+0.0%) 15.1 KiB
Claude Thread snapshot wire 7.2 KiB 7.2 KiB 0 B (0.0%) 7.3 KiB
Claude Live turn WebSocket wire 6.9 KiB 6.9 KiB +7 B (+0.1%) 7.8 KiB
Claude Live turn WebSocket decoded 59.7 KiB 59.7 KiB 0 B (0.0%) 66.4 KiB
Claude Live turn messages 10 10 0 (0.0%) 21

Baseline: f3402be · PR result: aa29544 · 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: 115.6 KiB
  • Claude decoded thread snapshot: 116.3 KiB

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

@rynfar

rynfar commented Sep 12, 2026

Copy link
Copy Markdown
Collaborator Author

Adversarial review completed by the independent devices lane on head aa29544: no blocking findings after checking grouped HTTP/auth retries, endpoint routing, message deletion/revert/pagination ordering, incremental Markdown invalidation, held-thread isolation, tool folding, remote palette targets and media. 972 focused tests, seven consumer typechecks, scoped lint/format and all final-head CI checks passed. Final Pylon visual/native evidence remains unperformed as recorded in the PR. Landing under the standing upstream-cycle approval.

@rynfar
rynfar merged commit ca34d8b into pylon Sep 12, 2026
19 checks passed
@rynfar
rynfar deleted the upstream/2026-09-12-web-perf branch September 12, 2026 06:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XXL 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.