Add a shared, byte-oriented terminal display update boundary without
enabling v2 transport. References, output-first updates, and snapshots
reuse the existing terminal registry and the same model, renderer, and
read-only view.
- Add tri-state terminal patches for command, cwd, decoded output
snapshots, exit information, and metadata. Keep terminal, snapshot,
exit, and content-reference metadata in their own scopes; consume
appended bytes without another raw-output history store.
- Create display placeholders for unseen v2 tool-content terminal
references. Existing v1 missing references remain errors.
Native/client-owned terminals, including no-PTY wrappers, reject display
patches.
- Keep append separate from replacement. Replacement rebuilds the
emulator/parser at the latest requested bounds, preserves configuration
and entity/view identity, and invalidates selection, search, hover,
scrolling, and cursor blinking.
- Stamp parser events with the output generation so queued old titles
cannot resurface. Drop all obsolete internal events, including
historical resizes, rather than applying them to the new screen.
- Preserve legacy first-Created/first-Exit behavior through independent
event markers. Late creation fills a placeholder without replacing its
renderer; pending legacy bytes drain before later snapshots. Reported
command values and explicit clears outrank caption fallbacks.
## Review guide
1. [Shared model and decoded patch
types](https://github.com/zed-industries/zed/blob/99eb1f22a5f3210d00b4253582c589b60d4a0cb2/crates/acp_thread/src/terminal.rs#L427),
then [registry/upsert entry
points](https://github.com/zed-industries/zed/blob/99eb1f22a5f3210d00b4253582c589b60d4a0cb2/crates/acp_thread/src/acp_thread.rs#L6768):
identity, metadata, output/exit independence, and legacy compatibility.
2. [Renderer
replacement](https://github.com/zed-industries/zed/blob/99eb1f22a5f3210d00b4253582c589b60d4a0cb2/crates/terminal/src/terminal.rs#L2007):
configuration/bounds, parser reset, process isolation, and stale-event
invalidation.
3. [View
invalidation](https://github.com/zed-industries/zed/blob/99eb1f22a5f3210d00b4253582c589b60d4a0cb2/crates/terminal_view/src/terminal_view.rs#L1211)
and the rendered tool-card regression: the existing read-only view
survives replacement and completion changes.
Release Notes:
- N/A
f2cdf3d5bdBen Brandt committed on 9/30/2026, 1:05:18 PM· committed by GitHubparent749a1df