Skip to content

perf(terminal): stream output and history - #9027

Open
StiensWout wants to merge 3 commits into
pingdotgg:mainfrom
StiensWout:t3code/terminal-output-streaming
Open

perf(terminal): stream output and history#9027
StiensWout wants to merge 3 commits into
pingdotgg:mainfrom
StiensWout:t3code/terminal-output-streaming

Conversation

@StiensWout

@StiensWout StiensWout commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

Large terminal sessions repeatedly rebuilt retained output in server and client memory, rewrote growing log files, and could leave slow remote subscribers with unbounded queued deltas. The small attach snapshot limited scrollback, reopening a shell could redraw its prompt through an unchanged PTY resize, and full-screen apps such as btop visibly tore because synchronized updates were painted between PTY chunks.

This makes terminal output a bounded stream end to end:

  • coalesces PTY output for up to 8 ms or 64 KB, caps the server pre-drain backlog at 4 MB, and pauses/resumes node-pty around a 2 MB low-water mark
  • appends durable history with an 8 MB target / 12 MB ceiling
  • starts web attaches with 64 KB, then requests and progressively renders up to 4 MB when the user reaches the top
  • wraps replay in explicit replay-start/replay-complete markers, retains byte-counted chunks with replay/live provenance in shared client state, and sends ordered append/reset/replay-append commands to native mobile renderers
  • honors DEC synchronized-output mode 2026 in the web/desktop Ghostty renderer, routes resize and device-pixel-ratio repaints through the same gate, and draws Unicode block elements to exact cell edges
  • keeps the normal shell on the host light/dark theme while applying dark defaults only during the standard alternate screen used by btop, vim, htop, and similar TUIs

This supersedes #8564, keeping its feature work and hardening the replay protocol against the delivery failures a full review pass found:

  • replay markers are only sent to clients that requested replayBytes, so released web and mobile clients whose bundled contracts predate the markers keep decoding the attach stream instead of failing on the first event
  • a replay-complete marker now latches the client out of every open replay instead of incrementing a counter, and the slow-consumer resync re-emits one after clearing the transport queue; a marker lost to backpressure or a transport hand-off can no longer leave the renderer permanently in replay mode with Ghostty's PTY writer detached (which silently ate DSR/DA query replies and hung full-screen apps)
  • the attach event buffer is byte-bounded at 4 MB instead of 32 events, so an extended 4 MB replay over a slow link no longer self-destructs into a 64 KB resync snapshot the moment the terminal produces a quarter second of live output
  • retained client chunks compact in place when the chunk budget fills, so ~1,000 small interactive writes no longer force a full renderer reset that snapped the viewport to the bottom and cleared the selection every few minutes of typing
  • each attach scan run seeds a distinct reset epoch, so a stream rebuilt by a connection hand-off can never alias a stale renderer cursor and silently freeze the web or mobile terminal
  • mobile defers the empty replay reset until the first history chunk arrives, so reconnects on flaky links no longer blank the native terminal while up to 4 MB re-feeds
  • the UTF-8 chunk splitter now lives once in packages/shared and is used by both the server batcher and the client chunk store, with a fast path that skips the decode round-trip for single-chunk writes

Verification for the hardening pass, on top of the original PR's browser and benchmark evidence:

  • 127 focused server, client-runtime, contracts, and mobile tests plus 91 focused web Ghostty/drawer tests, including new coverage for marker gating without replayBytes, completion latching after a lost marker, appending across chunk compaction, and resetting a cursor that falls inside a compacted chunk
  • typechecks for contracts, shared, client-runtime, server, web, and mobile
  • targeted lint and formatting for every touched file

Visual verification (carried from #8564; the rendering paths are unchanged by the hardening pass):

Before

Before full-screen exit

OpenCode block art before

After

btop in light app mode

Light shell restored after exit

OpenCode block art after

Review pass 2 (rebase onto main, bot findings, TUI validation)

Squash-rebased onto current main (carries lifecycleVersion from #9663 through the chunked reducer, and supersedes the line-capped BoundedTerminalHistory from #9703: durable history here is byte-bounded and append-only, so the per-chunk rebuild that PR removed no longer exists). A write queued behind a held mouse release now re-reads the session's process after acquiring the permit, so a restart during the hold can no longer send input to the stopped PTY. Browser validation on the rebased branch covered btop and htop in the light host theme, a 30k-line scrollback with the 4 MB extended replay after a reload, thread switching, a real mouse click on htop's Quit label, and re-attach while a TUI runs. That surfaced two real defects on top of the bot findings:

  • Re-attach left full-screen apps partially painted. The attach "wiggle" resized the PTY to cols-1 and back immediately; ncurses only reports KEY_RESIZE when the size it reads differs from the one it has, so the pair collapsed into a no-op. The intermediate size is now held for 100 ms.
  • Frames from a previous TUI leaked onto the primary screen. The replay prefix skipped any mode the retained tail mentioned. When the tail spanned an app's exit and relaunch, the older frames were replayed on the primary screen and reappeared under the shell after the new app quit. The server now tracks the DEC mode state at the first byte of each retained tail (advanced as caps drop its prefix) and prefixes exactly that state.
  • DECSTR (CSI !p) is no longer treated as a mode reset. Measured against the vendored libghostty-vt wasm: it leaves every tracked mode untouched, while RIS clears them all (matches @pnupu's note from fix(server): reset terminal modes a dead shell leaves in inherited history #9221).
  • Hidden thread drawers stay mounted as on main (bounded by the existing retention), and the surface skips painting while its mount has no size. Switching threads keeps the same Ghostty instance, scroll position, and extended history.
  • An app-owned drag stays captured and silent after tracking ends instead of falling through to selection handling; one-eighth block edges stay at least one pixel wide in narrow cells.
  • Mobile: the attach seed counts as a pending replay so reconnects keep the last frame, and a failed native command rebuilds the surface once instead of waiting for the next output.

After: htop fully repainted 3 s after a page reload, and a clean primary screen after quitting an htop that was relaunched inside the retained tail.

htop fully repainted after re-attach

clean primary screen after quitting a relaunched htop

Not covered here: native mobile rendering was typechecked and unit-tested only, not run on a device.

Feature work authored by GPT-5.6 Sol with the Codex harness; review passes and hardening by Claude Fable 5 and Claude Fable 5.1 with Claude Code, all through T3 Code.


Note

High Risk
Changes span server attach/replay protocol, session state shape (buffer → chunked output), and native mobile command paths; older clients or stale native binaries can mis-decode streams or lack streaming APIs.

Overview
Mobile native terminals now accept incremental output instead of rebuilding from a single initialBuffer prop. Android and iOS expose streamingRevision 2 with async write, writeReplay, and reset, queue up to 8 MiB of pending data before the surface exists, suppress PTY query replies during replay, and coalesce redraws. Ghostty scrollback is configured as 64 MiB (byte budget) so large 4 MiB replays fit.

NativeTerminalSurface switches from a flat buffer string to TerminalOutputState, gates on native streaming support, and queues reset / write / writeReplay commands with retry, deferred empty replay resets while history streams, and one-shot surface recovery on command failure. The thread route passes replayPending, replayPaused, and requests EXTENDED_TERMINAL_REPLAY_BYTES on attach when the binary supports it; buffer replay helpers only signal pause during font-layout transitions instead of hiding the whole buffer.

Server TerminalManager tests in this diff reflect the broader streaming work: byte-capped durable history and replay tails, replay-start / replay-complete only when replayBytes is set, PTY output batching and pause/resume under backlog, DEC mode prefixing for aged replay tails, attach resize wiggle for alternate-screen apps, and stricter mouse report handling when tracking ends.

Reviewed by Cursor Bugbot for commit 54c6751. Bugbot is set up for automated code reviews on this repo. Configure here.

Note

Stream terminal output and history as bounded replay and live chunks

  • Replaces the terminal string buffer with TerminalOutputState in terminalSession.ts, containing UTF-8-bounded chunks, ids, and replay/live delivery labels.
  • Server Manager.ts bounds history by bytes (64 MiB scrollback), adds PTY backpressure (pauseOutput/resumeOutput), and emits replay-start/replay-complete markers around snapshots.
  • Client rendering (Web and Mobile) consumes incremental output updates via a cursor and handles the replay lifecycle to display extended history (up to 4 MiB) when scrolling to the top.
  • terminal.ts adds optional replayBytes (64 KiB to 8 MiB) to TerminalAttachInput and includes the new replay boundary markers in TerminalAttachStreamEvent.
  • Risk: Attach stream consumers must handle the new replay-start/replay-complete event types and TerminalOutputState instead of the removed string buffer; native terminal modules must support streaming revision 2 for replay streaming.

Macroscope summarized 54c6751.

@github-actions github-actions Bot added vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. size:XXL 1,000+ changed lines (additions + deletions). labels Sep 1, 2026
Comment thread apps/web/src/terminal/ghostty/renderer.ts
Comment thread packages/client-runtime/src/state/terminalSession.ts
Comment thread apps/web/src/components/ThreadTerminalDrawer.tsx
Comment thread apps/server/src/ws.ts Outdated
@macroscopeapp

macroscopeapp Bot commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Not approved

Macroscope's review found this PR not approvable — This PR introduces a cross-platform terminal streaming and replay system that changes server PTY handling, persistence, transport contracts, web rendering, and native mobile behavior. It also changes product defaults and adds lint-suppression directives, so the scope and operational impact require human review.

Not approved because:

  • Per-PR cost limit exceeded (workspace setting). Approvability relies on correctness review in order to determine eligibility

Review your spending limits in Billing settings, or comment @macroscope-app review this PR to bypass the limit and review now. You can add or adjust custom eligibility rules. Learn more.

Comment thread apps/web/src/terminal/ghostty/surface.ts
Comment thread apps/web/src/terminal/ghostty/surface.ts
@StiensWout
StiensWout force-pushed the t3code/terminal-output-streaming branch from f27b60f to 0b654ec Compare September 1, 2026 11:08
Comment thread apps/server/src/terminal/Manager.ts Outdated
Comment thread apps/server/src/terminal/Manager.ts
Comment thread apps/server/src/terminal/Manager.ts
Comment thread apps/server/src/terminal/Manager.ts
Comment thread apps/web/src/components/ThreadTerminalDrawer.tsx
Comment thread apps/server/src/ws.ts
Comment thread apps/server/src/terminal/Manager.ts
Comment thread apps/server/src/terminal/Manager.ts
Comment thread apps/server/src/terminal/Manager.ts Outdated
Comment thread apps/server/src/terminal/Manager.ts Outdated
Comment thread apps/server/src/terminal/Manager.ts Outdated
Comment thread apps/server/src/terminal/Manager.ts
Comment thread apps/server/src/terminal/Manager.ts Outdated
Comment thread apps/web/src/terminal-links.ts Outdated
Comment thread apps/web/src/terminal/ghostty/surface.ts
@StiensWout
StiensWout force-pushed the t3code/terminal-output-streaming branch from 590087b to 4468db2 Compare September 1, 2026 12:15
Comment thread apps/server/src/terminal/Manager.ts Outdated
Comment thread apps/server/src/terminal/Manager.ts
@pnupu

pnupu commented Sep 2, 2026

Copy link
Copy Markdown

Heads-up on overlap: #9221 adds a small neutralizeInheritedHistory in Manager.ts for the same dead-process scenario your decModeResetSuffix handles (issue #9219, and #8574). It uses the same DEC mode table as this PR so it should absorb cleanly on rebase. Two things it covers that this PR currently does not, in case you want to fold them in: the Kitty keyboard stack (CSI > flags u push/pop/set, reset with CSI = 0 ; 1 u, which is what Codex CLI leaves behind), and DECSTR is deliberately not treated as a reset, since the vendored libghostty-vt leaves all of these modes unchanged on CSI ! p (measured against the wasm).

@StiensWout
StiensWout force-pushed the t3code/terminal-output-streaming branch from 06d2bfb to 9391da2 Compare September 3, 2026 07:16
Comment thread apps/web/src/terminal/ghostty/surface.ts Outdated
Comment thread apps/mobile/src/features/terminal/ThreadTerminalRouteScreen.tsx
Comment thread apps/web/src/components/ChatView.tsx Outdated
Comment thread apps/web/src/terminal/ghostty/renderer.ts Outdated

@cursor cursor Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes using high effort and found 2 potential issues.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 9391da2. Configure here.

Comment thread apps/web/src/components/ChatView.tsx Outdated
Comment thread apps/mobile/src/features/terminal/NativeTerminalSurface.tsx
StiensWout added a commit to StiensWout/t3code that referenced this pull request Sep 4, 2026
Large terminal sessions rebuilt retained output in server and client memory,
rewrote growing log files, and left slow remote subscribers with unbounded
queued deltas. This makes terminal output a bounded stream end to end:
coalesced PTY batches with backpressure, byte-bounded durable history,
explicit replay markers around attach history, chunked client retention,
native mobile append/reset commands, and DEC 2026 synchronized rendering.

Squashed rebase of pingdotgg#9027 onto main.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@StiensWout
StiensWout force-pushed the t3code/terminal-output-streaming branch from 9391da2 to 1f7be76 Compare September 4, 2026 15:53
@StiensWout

Copy link
Copy Markdown
Contributor Author

@pnupu thanks for the DECSTR measurement. I re-measured against the vendored wasm and it holds (DECSTR leaves all tracked modes untouched, RIS clears them), so this PR no longer treats CSI !p as a reset. The Kitty keyboard stack is left to #9221.

Comment thread apps/server/src/terminal/Manager.ts
StiensWout and others added 3 commits September 4, 2026 17:58
Large terminal sessions rebuilt retained output in server and client memory,
rewrote growing log files, and left slow remote subscribers with unbounded
queued deltas. This makes terminal output a bounded stream end to end:
coalesced PTY batches with backpressure, byte-bounded durable history,
explicit replay markers around attach history, chunked client retention,
native mobile append/reset commands, and DEC 2026 synchronized rendering.

Squashed rebase of pingdotgg#9027 onto main.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
- Hold the attach SIGWINCH wiggle for 100 ms: ncurses only reports
  KEY_RESIZE when the size it reads differs, so two immediate resizes were
  a no-op and full-screen apps stayed partially painted after re-attach.
- Track the DEC mode state at the start of the retained tail instead of
  skipping modes the tail mentions. A tail spanning an app's exit and
  relaunch painted the older frames on the primary screen.
- Stop treating DECSTR as a mode reset; the vendored libghostty-vt leaves
  every tracked mode untouched on a soft reset (measured against the wasm).
- Keep hidden thread drawers mounted (main behavior) and skip painting
  while a mount has no size, so switching threads keeps the surface.
- Hold an app-owned drag captured and silent after tracking ends instead
  of letting its pointerup fall through to selection handling.
- Keep one-eighth block edges at least one pixel wide in narrow cells.
- Mobile: treat the attach seed as a pending replay so reconnects keep the
  last frame, and rebuild the native surface once after a failed command.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…e process

A write waiting for the per-session permit captured the PTY process before
the wait. A restart during a held mouse release replaced that process, so
the queued input went to the stopped PTY and was lost. Re-read the session's
process after acquiring the permit and write to that one.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@StiensWout
StiensWout force-pushed the t3code/terminal-output-streaming branch from 1f7be76 to 54c6751 Compare September 4, 2026 16:00
@macroscopeapp

macroscopeapp Bot commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

Macroscope skipped reviewing this pull request. Per-PR cost limit exceeded (workspace setting).

Reviews on this PR have cost $44.21 so far. This review would add an estimated $9.31, bringing the total to $53.53 — above your per-PR limit of $50.00.

Tip

To get this pull request reviewed, you can:

  1. Comment @macroscope-app on this PR to request a manual review (monthly spend limits still apply).
  2. Exclude large or generated files from review by adding a pattern to your .macroscope/ignore.md — note that creating this file replaces Macroscope's built-in default ignores rather than extending them.
  3. Raise your cost limit in your workspace billing settings.

Turn off this reminder going forward

t3dotgg added a commit that referenced this pull request Sep 4, 2026
Keep bounded, byte-counted terminal chunks and append only unread output. Use UTF-16 cursors so compaction preserves live terminal replies. Reset on lifecycle changes or a real retained-data gap.

Keep the existing wire protocol, native buffer interface, and client retention limit. Native streaming and strict server replay byte bounds remain separate.

Continue the client helpers from #9027 at source head 9391da2.

Created with GPT-6 Astra (preview) in Codex.

Co-Authored-By: Wout Stiens <71498452+StiensWout@users.noreply.github.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
richardsolomou added a commit to richardsolomou/ras-code that referenced this pull request Sep 5, 2026
* feat(server): measure provider turn token usage (#9132)

(cherry picked from commit 1587f24)

* chore(upstream): record the provider turn token measurement

* chore(upstream): record the marketing motion skip

* perf(server): avoid full patches for checkpoint summaries (#9694)

(cherry picked from commit c163d50)

* chore(upstream): record the checkpoint summary change

* perf(web): defer diff workers until a code view opens (#9692)

(cherry picked from commit b3e1d88)

* chore(upstream): record the deferred diff workers

* chore(upstream): record the marketing font skip

* perf(server): stop rebuilding terminal history per chunk (#9703)

Append terminal history incrementally and materialize text for snapshots and coalesced disk writes.
Clear evicted line references without changing retained output.

Continues [#9357](pingdotgg/t3code#9357). The original contribution and author credit are preserved.
The current line limit and wire format stay unchanged. A strict byte limit remains separate work.

Created with GPT-6 Astra (preview) in Codex.

Co-authored-by: will <will@moondiner.com>

(cherry picked from commit 3bbbc1d)

* chore(upstream): record aligned changes through 3bbbc1d

* perf(server): use one query for buffered provider events (#9706)

(cherry picked from commit dffb4cd)

* chore(upstream): record the buffered event query

* perf(relay): avoid repeated activity decoding (#9708)

(cherry picked from commit c75299e)

* chore(upstream): record aligned changes through c75299e

* perf(web): stop continuous chat status animations (#9709)

(cherry picked from commit c7c1dfe)

* chore(upstream): record the chat status animation change

* fix(mobile): preserve saved work after storage read failures (#9710)

(cherry picked from commit 7839140)

* perf(web): stop replaying terminal buffers on rollover (#9707)

Keep bounded, byte-counted terminal chunks and append only unread output. Use UTF-16 cursors so compaction preserves live terminal replies. Reset on lifecycle changes or a real retained-data gap.

Keep the existing wire protocol, native buffer interface, and client retention limit. Native streaming and strict server replay byte bounds remain separate.

Continue the client helpers from pingdotgg/t3code#9027 at source head 9391da2b48439d1d7a2b01d169e785682bf8abb8.

Created with GPT-6 Astra (preview) in Codex.

Co-Authored-By: Wout Stiens <71498452+StiensWout@users.noreply.github.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

(cherry picked from commit da7e46d)

* feat(web): preview pull request links (#9631)

Co-authored-by: maria-rcks <254055478+maria-rcks@users.noreply.github.com>

(cherry picked from commit 9510390)

* perf(client): reduce thread-list update work (#9716)

(cherry picked from commit c66f15f)

* fix(server): settle inactive threads with open PRs (#9610)

(cherry picked from commit d536b05)

* fix(server): bound slow-client event buffers (#9715)

(cherry picked from commit 108f295)

* test(server): allow either valid file-search match (#9720)

(cherry picked from commit 8ccb933)

* chore(upstream): record aligned changes through 8ccb933

* fix(web): match provider settings layout for disconnected devices (#9619)

(cherry picked from commit 8357eef)

* chore(upstream): record the provider placeholder layout

* fix(web): keep the slash menu above the composer when vertical space is short (#9625)

(cherry picked from commit 120fab1)

* chore(upstream): record aligned changes through 120fab1

* fix(mobile): remove provider setup (#9721)

(cherry picked from commit 9eb4d71)

* chore(upstream): record the mobile provider setup removal

* perf(web): stop rendering hidden terminals (#9718)

Stop post-construction terminal snapshots, canvas paint, and cursor timers while a drawer or right panel is hidden. Keep parsing output and answering VT queries, then render current state once on reveal.

Cover delayed WASM initialization, selection behavior, zero-size mounts, and reveal with real-core headless tests. Keep the existing startup background fill.

Continue the zero-size guard from source commit eb5b68103506b1bb5bd81c3b9e27f11e349743c9 in the terminal streaming contribution.

Created with GPT-6 Astra (preview) in Codex.

Co-Authored-By: Wout Stiens <71498452+StiensWout@users.noreply.github.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>

(cherry picked from commit 5eab021)

* chore(upstream): record aligned changes through 5eab021

* fix(mobile): read file-backed image drafts before enabling them (#9713)

Accept file-backed image drafts and v4 outbox records while keeping current inline image creation and v3 outbox writes.

Retain image files during previews, uploads, and legacy inline reads. Preserve image MIME types and stop canceled sends after asynchronous reads.

The later file-backed writers remain held until new native runtime fingerprints contain these readers and the storage guards.

Continue Wout Stiens' mobile draft work with separate reader-only corrections. The original contribution remains unchanged.

Created with GPT-6 Astra (preview) in Codex.

Co-Authored-By: Wout Stiens <71498452+StiensWout@users.noreply.github.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
(cherry picked from commit c4353bc)

* chore(upstream): record the image draft rebase

* perf(server): replay only the selected thread (#9726)

Read only the selected thread's events when resuming its detail stream. Measure bounded row counts and serialized payload bytes before replay, using the existing aggregate index and a captured authoritative head.

Keep snapshot resets for oversized or invalid cursors. Reset recreated threads when a snapshot exists, and keep bounded replay for deleted threads whose snapshot is absent. Shell replay and the detail-event filter are unchanged.

Created with GPT-6 Astra (preview) in Codex.

(cherry picked from commit 50bfca4)

* fix(web): mute composer helper text (#9654)

(cherry picked from commit 7d5dc66)

* feat(web): unpin threads from the sidebar multi-select menu (#9651)

Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>

(cherry picked from commit c7bf311)

* chore(upstream): record aligned changes through c7bf311

* perf(web): reuse timeline rows while text streams (#9725)

Reuse ordered timeline entries and raw rows for safe streaming text updates. Keep full derivation for structural, metadata, activity, and control changes.

Preserve immutable attachment-preview objects when their current URLs are unchanged. Cover URL renewal/removal, completion, grouping, pagination, and earlier-row immutability.

Continue extoci's ordered timeline projection work with separate integration and attachment corrections. The original contribution remains unchanged.

Created with GPT-6 Astra (preview) in Codex.

Co-Authored-By: extoci <hi@extoci.lol>
(cherry picked from commit 19c1710)

* chore(upstream): record the timeline row reuse

* fix(relay): bound stalled push requests (#9734)

Give HTTP sends and response-body reads ten seconds each. Keep the existing typed transport errors, delivery records, and queue policy.

Abort stalled requests and let the next signed job run. JWT retrieval is outside these deadlines. Do not add retries for an uncertain response result.

Created with GPT-6 Astra (preview) in Codex.

(cherry picked from commit 088cc3f)

* perf(server): stop caching unused OpenCode tool parts (#9738)

Do not retain OpenCode tool parts after emitting their runtime events. The remaining cache readers need text, reasoning, or step-usage parts, not tool input and output.

Keep tool lifecycle events, output bytes, late-role assistant text, and usage handling unchanged. Add focused lifecycle coverage and verify retained memory through the real adapter.

Created with GPT-6 Astra (preview) in Codex.

(cherry picked from commit c8f77e0)

* chore(upstream): record aligned changes through c8f77e0

* fix(web): fold single trailing activity (#9739)

Co-authored-by: maria-rcks <254055478+maria-rcks@users.noreply.github.com>
(cherry picked from commit cfc9bf3)

* chore(upstream): record the trailing activity fold

* fix(web): show project settings for new threads (#9743)

(cherry picked from commit cbe93e8)

* perf(mobile): bound the parsed review cache (#9749)

Bound cached parsed review sections by eight entries and 4,194,304 full source characters. Evicted inactive parsed and native results can be collected. Raw patches, comments, and view state stay unchanged.

Prewarm only nearby sections that fit beside the selected section. Use actual retained source weights for normalized cache hits, and skip oversized prewarms.

Created with GPT-6 Astra (preview) in Codex.

(cherry picked from commit d6e29dc)

* perf(web): avoid repeated terminal metadata scans (#9747)

Build one ordered terminal metadata index per immutable snapshot. Reuse unchanged session wrappers and thread groups across consumers, with separate environment targets.

Keep numeric ordering, picker ties, attach state, and subscription lifetimes unchanged. Let retired snapshots and groups be collected.

Created with GPT-6 Astra (preview) in Codex.

(cherry picked from commit fec606f)

* perf(server): bound terminal history by bytes (#9748)

Keep at most 5,000 lines and 8 MiB of retained UTF-8 terminal history. Discard the oldest text at either limit while preserving complete live output.

Track bytes and newlines in small chunks. Join split surrogates before eviction. Restore only the needed file tail, handle short reads, and close the file before rewriting current or legacy history.

Created with GPT-6 Astra (preview) in Codex.

Co-authored-by: will <will@moondiner.com>

(cherry picked from commit cf9729d)

* feat(web): link pull request authors to profiles (#9627)

Co-authored-by: maria-rcks <254055478+maria-rcks@users.noreply.github.com>

(cherry picked from commit a76b898)

* fix(web): refine server update notice (#9744)

(cherry picked from commit 0de956e)

* perf(client): stop thread streams when unused (#9740)

Close a thread's live detail stream when its last consumer leaves. Retain a registry-local completed state and replay cursor for five idle minutes.

Keep warm lookup independent of collectible raw atom definitions. Preserve paging and deletion state, reject stale owners, and cache only completed data/cursor updates.

Skip repeated saves of unchanged data while retaining dirty-data flushes and failed-write retries. Verify real GC/remount behavior and focused lifecycle cases.

Created with GPT-6 Astra (preview) in Codex.

(cherry picked from commit d7cf8aa)

* perf(mobile): defer file preview highlighter startup (#9752)

(cherry picked from commit 77b655c)

* perf(server): skip history reads for metadata commands (#9758)

(cherry picked from commit 6365919)

* chore(upstream): record aligned changes through 6365919

* perf(web): defer image URL requests for thread history (#9760)

(cherry picked from commit 15eda89)

* fix(server): read thread history where the fork transcript needs it

The metadata-command split moved turn dispatch onto the message-free shell
read, which the fork and provider-handoff transcripts depend on, and left
two fork-only call sites pointing at the removed resolveThread.

* chore(upstream): record the deferred image URLs and the history-read split

* docs(upstream): typecheck after each adopt-aligned run

verify is the only check between its picks, so a removed export that only a
fork file used survives to whichever later commit happens to typecheck.

* fix(models): make GPT-6-Astra current (#9762)

(cherry picked from commit bc03c36)

* fix(web): stop empty diffs replacing pull requests (#9753)

(cherry picked from commit d115a96)

* fix(sidebar): mute background working threads (#9759)

(cherry picked from commit 45bd3b6)

* fix(web): reset automatic pull to default (#9763)

Co-authored-by: maria-rcks <254055478+maria-rcks@users.noreply.github.com>

(cherry picked from commit f6db420)

* fix(web): restore file comment focus in editable preview (#9061)

(cherry picked from commit 13427ec)

* chore(upstream): record aligned changes through 13427ec

* chore(upstream): defer the internal docs restructure

* chore(upstream): defer the user docs restructure

* fix(web): stop panel motion during navigation (#9766)

(cherry picked from commit cd71367)

* chore(upstream): record the panel motion suppression

* fix(web): open composer selectors below controls (#9767)

(cherry picked from commit 8e056a0)

* perf(server): skip unused Linux process detail reads (#9768)

(cherry picked from commit 163d86a)

* fix(server): remove retired Codex models after refresh (#9773)

(cherry picked from commit bfef973)

* chore(upstream): record aligned changes through bfef973

* test: stop path and platform tests depending on the host OS (#9564)

Co-authored-by: Claude Code <noreply@anthropic.com>
(cherry picked from commit cc60753)

* chore(upstream): record the host-independent path tests

* test(server): skip posix executable fixtures on a Windows host (#9565)

Co-authored-by: Claude Code <noreply@anthropic.com>
(cherry picked from commit 4701041)

* chore(upstream): record the Windows fixture skip

* test(mobile): assert cold-start highlighting per entry point

Comparing the two entry points' token arrays assumes both resolve the same
regex engine. Linux CI produced a different split for the same grammar and
theme, so each path is checked for the behaviour the test names instead.

---------

Co-authored-by: Theo Browne <me@t3.gg>
Co-authored-by: maria <maria@kuuro.net>
Co-authored-by: Guillermo Casanova <75276669+Gigioxx@users.noreply.github.com>
Co-authored-by: oliver <97427849+flamboh@users.noreply.github.com>
Co-authored-by: Igor Makowski <56691628+Mnigos@users.noreply.github.com>
Co-authored-by: Julius Marminge <julius0216@outlook.com>
Co-authored-by: Wout Stiens <71498452+StiensWout@users.noreply.github.com>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Co-authored-by: Jake Leventhal <jakeleventhal@me.com>
Co-authored-by: Gianmarco <gianmarcosimone89@gmail.com>
Co-authored-by: extoci <hi@extoci.lol>
Co-authored-by: maria-rcks <254055478+maria-rcks@users.noreply.github.com>
Co-authored-by: Shpetim <32248437+ShpetimA@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XXL 1,000+ changed lines (additions + deletions). 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