refactor(terminal): replace full TUI chat with inline CLI#165
Merged
Conversation
- stop activating mention slash and subagent autocomplete from printable triggers - collapse active autocomplete focus back into normal input handling - return a temporary system notice for slash command submissions
- route chat through an inline terminal session and keep fullscreen views on alternate screen - add live assistant handoff state for committed transcript and mutable live content - insert committed transcript rows into terminal history and redraw mutable live content - extract reusable chat row serializers for inline and fullscreen rendering
- add reusable screen_scroll helper for upward and downward terminal scrolling - move cursor and history bookkeeping behind shared terminal scroll handling - route viewport resize and history insertion through the shared scroll path
- add handoff-owned inline output state with stable ids and replay/static insert plans - route welcome, user, system, and assistant committed rows through the projection - render pending transcript rows with assistant live rows in one ordered live view - confirm static rows only after terminal insertion and backend flush - remove the legacy chat render pending transcript queue and down-scroll shrink path - add projection, serializer, terminal runtime, reset, and assistant handoff coverage
- gate handoff mirroring with hidden focused interaction rules - remove hidden child tools from live handoff state and turn-exit commits - keep inline permission and question focus changes synced with handoff state - add live viewport guards and regression tests for hidden child tools
- remove session-wide tool collapse state and Ctrl+O collapse handling - cap tool bodies to 15 rendered lines while keeping permission controls visible - render Bash with icon, label, indented dim content, and tail output - show one-line bodies for Read, Agent, Task, WebSearch, and WebFetch - use tail-only caps for Write diffs - ignore late handoff shadow updates after transcript commit without debug panics
- add downward screen scroll support and cursor/history bookkeeping - centralize mutable viewport geometry changes in the chat terminal session - scroll transcript history down when suggestions or interrupted live turns shrink the live area - cover prompt suggestion shrink, live assistant removal, and bidirectional scroll bookkeeping
- render the welcome overview in the live area while session metadata is still loading - reuse the welcome block state for loading and committed transcript output - restore the crab art with side-by-side overview fields and highlighted subscription
- subtract pending transcript rows from released viewport rows before scrolling history down - preserve viewport shrink cleanup while avoiding blank scrollback rows before static inserts land - add regression for static insert consumption during inline viewport shrink
- render command, file, and subagent autocomplete in the composer hint area - cap suggestions at five visible rows while preserving keyboard navigation - replace floating bordered dropdown with compact left-rail rows - show friendly empty-trigger hints for /, @, and & - dim autocomplete candidate text while keeping selection and match highlights prominent
- replace ambiguous "lines -1-2 +1-2" hunk labels with directional forms - emit "+ lines N..M" and "- lines N..M" for pure additions and deletions - collapse identical old/new ranges to a single "lines N..M" or "line N" - show range changes as "lines a..b → c..d" using ".." and an arrow - stop placing the terminal cursor in the inline composer to remove ghost cursors over tool output
- route slash submissions through the existing command executor flow - allow advertised slash commands to fall through to normal prompt submission - keep slash autocomplete interactive for empty argument queries - render slash autocomplete hints only when no candidates are available - use compact single-line autocomplete rail styling
- add /help as a fullscreen config Help tab with shortcuts, commands, and subagents sections - remove the old inline question-mark help overlay and related focus/layout state - introduce a slash command catalog for command usage, descriptions, and static options - reuse catalog metadata across dispatch, autocomplete, /docs commands, and Help commands
- rebuild inline transcript projection from resumed history after replay - suppress overview output for resumed sessions across static, live, and late status-snapshot paths - keep fresh and new sessions showing the overview normally - add resume and status snapshot regressions for inline transcript projection
- delete old Ratatui chat surface, layout, footer, todo panel, scrollbar, mouse, and viewport paths - remove full-chat render caches, viewport cache metrics, chat selection snapshots, and smooth-scroll state - keep inline terminal chat rendering as the only chat path and preserve fullscreen config, trusted, and session-picker views - drop obsolete tests tied to the retired chat surface and update remaining assertions for inline rendering - clean up dead-code allowances and pass fmt, clippy, test, and offline check
- replace diff hunk line ranges with colored added and removed counts - preserve body line numbers for rendered diff rows - keep diff count headers visible when large tool diffs are capped - update tool-call diff tests for count headers and truncation behavior
…footer regions - separate ComposerRows into input_rows and footer_rows with independent windowing and budget allocation - return three rects from MutableLayoutPlan::areas and render input and footer as separate widgets - clear the mutable viewport after history insertion causes a terminal scroll-up - update layout tests for three-region model and add static insert clear regression Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- preserve fractional retry_delay_ms values from the Agent SDK bridge - validate retry delays as finite non-negative numbers in Rust wire decoding - keep retry delay rounding at the UI display boundary - add bridge and Rust regressions for fractional retry delay events
- add TerminalReleaseGuard for child-process terminal handoff and restore - route /login and /logout through explicit release and return lifecycle events - suppress input/render handling while terminal ownership is released - clear the full visible inline screen before force-redraw transcript replay - keep child-process release mode aligned with chat-owned terminal capabilities
- add typed chat repaint and rebuild state for mutable viewport and full visible-screen rebuilds - route terminal return, session reset, auth completion, Ctrl-L, resize, and view transitions through surface-specific requests - remove app-wide force_redraw and needs_redraw from the render loop - consume chat rebuild requests in the terminal runtime before drawing the active surface - update tests to assert surface dirty state instead of global redraw flags
- remove stale selection state, snapshots, and overlay rendering - keep Ctrl+C as a quit shortcut under raw terminal mode - rely on terminal-native selection for copying static chat output
- replace ActiveView routing with SurfaceMode and FullscreenView - remove mirrored app.active_view state and synchronization helpers - preserve chat startup, trust screen, config, and session picker surface behavior - update tests to assert concrete surface modes directly
- remove custom inline terminal, history insertion, and screen scroll helpers - recreate chat sessions around ratatui inline viewport sizing and reset state - insert committed transcript rows with Terminal::insert_before before drawing live rows - clear prior mutable viewport rows explicitly during inline chat rebuilds
- keep slash command cleanup scoped to pending command UI state - move session reset ready transition into session lifecycle reset - keep auth-required flow explicit about returning to ready - add regressions for slash command errors during running and thinking turns
- replace serialized editor rows with direct tui-textarea rendering inside the inline viewport - split mutable composer layout into hint, editor, and footer regions - preserve native textarea cursor rendering and wrapping behavior - remove legacy composer measurement and input row serialization code - update tui-textarea-2 to crates.io 0.11.0
- reduce standard tool render cap from 15 rows to 10 - render Read bodies as head and tail content with a hidden-line marker - keep agent, web, and ExitPlanMode tools summary-only - update tool body cap tests for the shorter render limit
- remove raw crossterm row clearing from inline viewport reset - clear reset state through the ratatui inline terminal instead - keep mutable layout based on resolved inline viewport height - preserve requested content height when reconciling inline geometry - add regression coverage for required live rows near the terminal bottom
- write the post-session resume hint through an explicit line-boundary helper - log stderr write failures without changing successful exit behavior - add regression coverage for the exact resume hint output
- move welcome overview lines into a dedicated ui::welcome renderer - route inline welcome rows through the shared welcome renderer - remove stale generic message-row welcome rendering path - update handoff comments to document inline scrollback commit behavior
- add ChatTerminal owner state for inline viewport geometry, owned region clearing, queued history, and replay - move chat draw ordering behind draw_chat_frame so history flush and mutable rendering share one terminal transaction - rebuild visible chat history from handoff transcript source after resize, terminal desync, and visible rebuild requests - batch transcript row serialization for replay and confirm pending inline output IDs only after successful flush - add RenderedHistoryRows width metadata and owner-focused tests for replay batching and geometry behavior
- restrict bridge tool_use_summary updates to summary-oriented tools - ignore task lifecycle updates for concrete output tools like Bash, Read, and Write - extract failed XML error wrappers for failed tool summaries and bodies - preserve XML-like output for successful text tools and diff payloads - add bridge and renderer regression coverage for summary filtering and failed XML rendering
- consume OS-aware undo and redo shortcuts during autocomplete sync - enable crossterm keyboard enhancement for Command-key detection - restore keyboard enhancement state on shutdown and child-process release
- add a session boundary rebuild tier for replacement sessions - clear only tracked app-owned chat rows and reset committed output tracking - anchor the next inline viewport to the cleared session region - track Ratatui inline viewport scroll so owned row bounds stay accurate - cover rebuild priority, session replacement, viewport scroll, and cleared-region anchoring with tests
- render TodoWrite rows from raw input instead of reported content - remove todo panel focus state, shortcuts, help text, and navigation handling - cap long todo lists around the next unfinished item with plain omission markers - style completed todos as gray filled blocks and current todos in orange - add renderer coverage for raw input, status markers, and overflow anchoring
- add 45 second active-turn fallback refresh for context usage - reuse the TUI tick path shared with git context checks - reset the polling timer on event-driven context usage requests - cover idle, in-flight, thinking, and running refresh cases
- Keep pure assistant text runs live until completion or a tool/notice boundary - Coalesce live and committed assistant text while preserving explicit newlines - Insert transcript history through owned terminal-region plans with exact viewport movement - Replace welcome snapshots in place and replay inserted history when metadata changes - Add regression coverage for text runs, welcome replacement, and insert geometry
- Drop old assistant rendering from message_rows - Keep user/system row serialization on the inline chat path - Remove stale tool-call measurement/cache state - Simplify spinner and render invalidation state
- Embed spinner verbs as a static in-code list
- Store the selected verb on the live thinking indicator
- Preserve the selected verb across redraws and status resyncs
- Render {verb}... without loading a markdown asset
- Add tests for list integrity, persistence, and rendering
- derive inline transcript rendering from canonical app.messages - delete projection, shadow, replay, and app handoff machinery - move render-only thinking spinner state into UI ownership - keep terminal scrollback insertion as the only stable transcript sink - add source-ownership guardrails for canonical transcript rendering
- Replace resize reflow with source-backed purge replay for chat - Rebuild transcript rows from canonical messages after terminal resize - Defer unsafe native scrollback inserts when the inline viewport is full-height - Schedule a final purge replay after active-turn resize completion - Cover resize purge replay and insert safety paths with tests
- classify resize events by actual terminal geometry before requesting purge replay - defer chat resize purge after fullscreen only when terminal size really changed - reattach suspended inline chat sessions after fullscreen without resetting scrollback state - add regression coverage for same-size resize, fullscreen return, and resize replay paths
- wire clap `--version` output to `CARGO_PKG_VERSION` - add CLI metadata coverage for the generated version - keep version handling in clap before TUI startup
- Add item-level live row boundaries for assistant labels, text, tools, notices, and indicators - Keep pending permissions, questions, running tools, and streaming tails mutable - Rebuild the mutable viewport when inline interaction state changes - Preserve scrollback commit state during mutable viewport clears - Add regression coverage for active assistant row commitment and scrollback rebuild behavior
- add durable transcript output IDs for canonical messages and blocks - commit static history through pending width-tagged batches - confirm inserted transcript rows by output ID instead of row count - preserve mutable viewport filtering across pending, confirmed, and replayed history - remove stale source-pattern ownership guardrails
- cap tool content by wrapped physical rows - keep tool omission counts tied to source lines - preserve blank rows between assistant text blocks - prevent static transcript reinsertion of confirmed text - add regressions for wrapping, gaps, and history batching
- Start the service-status request after the first connected event - Avoid status checks before the bridge/session is ready - Surface connectivity failures as a warning message - Cover connectivity warning behavior with focused tests
- Exclude already-committed history output IDs from live row serialization - Clear the native Ratatui inline viewport after scrollback inserts and owned-region growth - Preserve live mutable rows without re-rendering committed assistant/tool prefixes - Add coverage for excluded live rows, inline insert behavior, and viewport clear behavior
- Resolve packaged claude-rs-bridge-node before falling back to node on PATH - Install and validate a renamed Node runtime during postinstall - Always append a bridge process guard prompt to SDK query options - Update bridge runtime resolution and system prompt tests
- Hide ToolSearch tool calls and results before they reach Rust session updates - Allow the wrapped SDK to execute ToolSearch without prompting or blocking it - Filter ToolSearch entries from resumed session history - Add bridge tests for live ToolSearch suppression and history replay
- Restore app status to Ready after replaying resumed history - Clear stale cancel and auto-submit flags from resume replay - Add regression coverage for immediate prompt submit after startup resume - Prevent idle resumed sessions from sending spurious cancel_turn commands
- Add shared system notice insertion for inline or standalone delivery - Route slash command errors through the notice path - Keep API retry and rate-limit notice upsert behavior intact - Cover active-turn and standalone slash error delivery with tests
srothgan
added a commit
that referenced
this pull request
May 21, 2026
* chore(input): disable autocomplete during inline chat migration
- stop activating mention slash and subagent autocomplete from printable triggers
- collapse active autocomplete focus back into normal input handling
- return a temporary system notice for slash command submissions
* feat(terminal): add inline chat surface runtime
- route chat through an inline terminal session and keep fullscreen views on alternate screen
- add live assistant handoff state for committed transcript and mutable live content
- insert committed transcript rows into terminal history and redraw mutable live content
- extract reusable chat row serializers for inline and fullscreen rendering
* refactor(terminal): centralize inline screen scrolling
- add reusable screen_scroll helper for upward and downward terminal scrolling
- move cursor and history bookkeeping behind shared terminal scroll handling
- route viewport resize and history insertion through the shared scroll path
* fix(render): unify inline transcript projection and static flush
- add handoff-owned inline output state with stable ids and replay/static insert plans
- route welcome, user, system, and assistant committed rows through the projection
- render pending transcript rows with assistant live rows in one ordered live view
- confirm static rows only after terminal insertion and backend flush
- remove the legacy chat render pending transcript queue and down-scroll shrink path
- add projection, serializer, terminal runtime, reset, and assistant handoff coverage
* fix(render): hide subagent child tools in inline handoff
- gate handoff mirroring with hidden focused interaction rules
- remove hidden child tools from live handoff state and turn-exit commits
- keep inline permission and question focus changes synced with handoff state
- add live viewport guards and regression tests for hidden child tools
* fix(ui): simplify tool rendering and tolerate late shadow updates
- remove session-wide tool collapse state and Ctrl+O collapse handling
- cap tool bodies to 15 rendered lines while keeping permission controls visible
- render Bash with icon, label, indented dim content, and tail output
- show one-line bodies for Read, Agent, Task, WebSearch, and WebFetch
- use tail-only caps for Write diffs
- ignore late handoff shadow updates after transcript commit without debug panics
* fix(terminal): reconcile inline viewport shrink with screen scroll
- add downward screen scroll support and cursor/history bookkeeping
- centralize mutable viewport geometry changes in the chat terminal session
- scroll transcript history down when suggestions or interrupted live turns shrink the live area
- cover prompt suggestion shrink, live assistant removal, and bidirectional scroll bookkeeping
* fix(ui): restore live welcome loading state
- render the welcome overview in the live area while session metadata is still loading
- reuse the welcome block state for loading and committed transcript output
- restore the crab art with side-by-side overview fields and highlighted subscription
* fix(terminal): account for pending static rows during viewport shrink
- subtract pending transcript rows from released viewport rows before scrolling history down
- preserve viewport shrink cleanup while avoiding blank scrollback rows before static inserts land
- add regression for static insert consumption during inline viewport shrink
* feat(input): rebuild autocomplete as composer hint rows
- render command, file, and subagent autocomplete in the composer hint area
- cap suggestions at five visible rows while preserving keyboard navigation
- replace floating bordered dropdown with compact left-rail rows
- show friendly empty-trigger hints for /, @, and &
- dim autocomplete candidate text while keeping selection and match highlights prominent
* fix(ui): clarify diff hunk headers and hide redundant terminal cursor
- replace ambiguous "lines -1-2 +1-2" hunk labels with directional forms
- emit "+ lines N..M" and "- lines N..M" for pure additions and deletions
- collapse identical old/new ranges to a single "lines N..M" or "line N"
- show range changes as "lines a..b → c..d" using ".." and an arrow
- stop placing the terminal cursor in the inline composer to remove ghost cursors over tool output
* fix(input): re-enable slash commands and refine autocomplete behavior
- route slash submissions through the existing command executor flow
- allow advertised slash commands to fall through to normal prompt submission
- keep slash autocomplete interactive for empty argument queries
- render slash autocomplete hints only when no candidates are available
- use compact single-line autocomplete rail styling
* feat(help): move help into config and centralize slash command metadata
- add /help as a fullscreen config Help tab with shortcuts, commands, and subagents sections
- remove the old inline question-mark help overlay and related focus/layout state
- introduce a slash command catalog for command usage, descriptions, and static options
- reuse catalog metadata across dispatch, autocomplete, /docs commands, and Help commands
* fix(resume): populate resumed transcripts without session overview
- rebuild inline transcript projection from resumed history after replay
- suppress overview output for resumed sessions across static, live, and late status-snapshot paths
- keep fresh and new sessions showing the overview normally
- add resume and status snapshot regressions for inline transcript projection
* refactor(render): remove legacy fullscreen chat code
- delete old Ratatui chat surface, layout, footer, todo panel, scrollbar, mouse, and viewport paths
- remove full-chat render caches, viewport cache metrics, chat selection snapshots, and smooth-scroll state
- keep inline terminal chat rendering as the only chat path and preserve fullscreen config, trusted, and session-picker views
- drop obsolete tests tied to the retired chat surface and update remaining assertions for inline rendering
- clean up dead-code allowances and pass fmt, clippy, test, and offline check
* fix(ui): show diff change counts in tool output
- replace diff hunk line ranges with colored added and removed counts
- preserve body line numbers for rendered diff rows
- keep diff count headers visible when large tool diffs are capped
- update tool-call diff tests for count headers and truncation behavior
* refactor(terminal): split composer layout into independent input and footer regions
- separate ComposerRows into input_rows and footer_rows with independent windowing and budget allocation
- return three rects from MutableLayoutPlan::areas and render input and footer as separate widgets
- clear the mutable viewport after history insertion causes a terminal scroll-up
- update layout tests for three-region model and add static insert clear regression
* fix(bridge): accept fractional api retry delays
- preserve fractional retry_delay_ms values from the Agent SDK bridge
- validate retry delays as finite non-negative numbers in Rust wire decoding
- keep retry delay rounding at the UI display boundary
- add bridge and Rust regressions for fractional retry delay events
* fix(terminal): route auth commands through release guard
- add TerminalReleaseGuard for child-process terminal handoff and restore
- route /login and /logout through explicit release and return lifecycle events
- suppress input/render handling while terminal ownership is released
- clear the full visible inline screen before force-redraw transcript replay
- keep child-process release mode aligned with chat-owned terminal capabilities
* refactor(render): replace global redraw flags with surface dirty state
- add typed chat repaint and rebuild state for mutable viewport and full visible-screen rebuilds
- route terminal return, session reset, auth completion, Ctrl-L, resize, and view transitions through surface-specific requests
- remove app-wide force_redraw and needs_redraw from the render loop
- consume chat rebuild requests in the terminal runtime before drawing the active surface
- update tests to assert surface dirty state instead of global redraw flags
* refactor(input): remove legacy app selection copy path
- remove stale selection state, snapshots, and overlay rendering
- keep Ctrl+C as a quit shortcut under raw terminal mode
- rely on terminal-native selection for copying static chat output
* refactor(render): remove duplicate active view state
- replace ActiveView routing with SurfaceMode and FullscreenView
- remove mirrored app.active_view state and synchronization helpers
- preserve chat startup, trust screen, config, and session picker surface behavior
- update tests to assert concrete surface modes directly
* refactor(terminal): replace custom inline terminal with ratatui viewport
- remove custom inline terminal, history insertion, and screen scroll helpers
- recreate chat sessions around ratatui inline viewport sizing and reset state
- insert committed transcript rows with Terminal::insert_before before drawing live rows
- clear prior mutable viewport rows explicitly during inline chat rebuilds
* fix(events): preserve active turn status on command errors
- keep slash command cleanup scoped to pending command UI state
- move session reset ready transition into session lifecycle reset
- keep auth-required flow explicit about returning to ready
- add regressions for slash command errors during running and thinking turns
* refactor(terminal): render inline composer with textarea widget
- replace serialized editor rows with direct tui-textarea rendering inside the inline viewport
- split mutable composer layout into hint, editor, and footer regions
- preserve native textarea cursor rendering and wrapping behavior
- remove legacy composer measurement and input row serialization code
- update tui-textarea-2 to crates.io 0.11.0
* refactor(tools): tighten compact tool body rendering
- reduce standard tool render cap from 15 rows to 10
- render Read bodies as head and tail content with a hidden-line marker
- keep agent, web, and ExitPlanMode tools summary-only
- update tool body cap tests for the shorter render limit
* fix(terminal): reconcile inline viewport geometry through ratatui
- remove raw crossterm row clearing from inline viewport reset
- clear reset state through the ratatui inline terminal instead
- keep mutable layout based on resolved inline viewport height
- preserve requested content height when reconciling inline geometry
- add regression coverage for required live rows near the terminal bottom
* fix(terminal): print resume hint on clean exit line
- write the post-session resume hint through an explicit line-boundary helper
- log stderr write failures without changing successful exit behavior
- add regression coverage for the exact resume hint output
* refactor(ui): consolidate welcome overview rendering
- move welcome overview lines into a dedicated ui::welcome renderer
- route inline welcome rows through the shared welcome renderer
- remove stale generic message-row welcome rendering path
- update handoff comments to document inline scrollback commit behavior
* refactor(terminal): route chat history through terminal owner
- add ChatTerminal owner state for inline viewport geometry, owned region clearing, queued history, and replay
- move chat draw ordering behind draw_chat_frame so history flush and mutable rendering share one terminal transaction
- rebuild visible chat history from handoff transcript source after resize, terminal desync, and visible rebuild requests
- batch transcript row serialization for replay and confirm pending inline output IDs only after successful flush
- add RenderedHistoryRows width metadata and owner-focused tests for replay batching and geometry behavior
* fix(tools): preserve concrete tool output from summaries
- restrict bridge tool_use_summary updates to summary-oriented tools
- ignore task lifecycle updates for concrete output tools like Bash, Read, and Write
- extract failed XML error wrappers for failed tool summaries and bodies
- preserve XML-like output for successful text tools and diff payloads
- add bridge and renderer regression coverage for summary filtering and failed XML rendering
* docs(readme): add custom slash commands
* fix(input): wire macOS command shortcuts into terminal modes
- consume OS-aware undo and redo shortcuts during autocomplete sync
- enable crossterm keyboard enhancement for Command-key detection
- restore keyboard enhancement state on shutdown and child-process release
* fix(terminal): reset inline chat surface on session replacement
- add a session boundary rebuild tier for replacement sessions
- clear only tracked app-owned chat rows and reset committed output tracking
- anchor the next inline viewport to the cleared session region
- track Ratatui inline viewport scroll so owned row bounds stay accurate
- cover rebuild priority, session replacement, viewport scroll, and cleared-region anchoring with tests
* refactor(todos): render TodoWrite items inline without focus
- render TodoWrite rows from raw input instead of reported content
- remove todo panel focus state, shortcuts, help text, and navigation handling
- cap long todo lists around the next unfinished item with plain omission markers
- style completed todos as gray filled blocks and current todos in orange
- add renderer coverage for raw input, status markers, and overflow anchoring
* fix(context): poll usage during long active turns
- add 45 second active-turn fallback refresh for context usage
- reuse the TUI tick path shared with git context checks
- reset the polling timer on event-driven context usage requests
- cover idle, in-flight, thinking, and running refresh cases
* docs(readme): document Agent SDK billing changes
* fix(terminal): stabilize inline chat transcript handoff
- Keep pure assistant text runs live until completion or a tool/notice boundary
- Coalesce live and committed assistant text while preserving explicit newlines
- Insert transcript history through owned terminal-region plans with exact viewport movement
- Replace welcome snapshots in place and replay inserted history when metadata changes
- Add regression coverage for text runs, welcome replacement, and insert geometry
* refactor(ui): remove legacy message rendering paths
- Drop old assistant rendering from message_rows
- Keep user/system row serialization on the inline chat path
- Remove stale tool-call measurement/cache state
- Simplify spinner and render invalidation state
* feat(ui): randomize thinking indicator verb
- Embed spinner verbs as a static in-code list
- Store the selected verb on the live thinking indicator
- Preserve the selected verb across redraws and status resyncs
- Render {verb}... without loading a markdown asset
- Add tests for list integrity, persistence, and rendering
* refactor(ui): remove legacy handoff transcript state
- derive inline transcript rendering from canonical app.messages
- delete projection, shadow, replay, and app handoff machinery
- move render-only thinking spinner state into UI ownership
- keep terminal scrollback insertion as the only stable transcript sink
- add source-ownership guardrails for canonical transcript rendering
* fix(terminal): stabilize chat resize purge replay
- Replace resize reflow with source-backed purge replay for chat
- Rebuild transcript rows from canonical messages after terminal resize
- Defer unsafe native scrollback inserts when the inline viewport is full-height
- Schedule a final purge replay after active-turn resize completion
- Cover resize purge replay and insert safety paths with tests
* fix(terminal): preserve inline chat across fullscreen return
- classify resize events by actual terminal geometry before requesting purge replay
- defer chat resize purge after fullscreen only when terminal size really changed
- reattach suspended inline chat sessions after fullscreen without resetting scrollback state
- add regression coverage for same-size resize, fullscreen return, and resize replay paths
* feat(cli): expose package version flag
- wire clap `--version` output to `CARGO_PKG_VERSION`
- add CLI metadata coverage for the generated version
- keep version handling in clap before TUI startup
* fix(ui): commit stable assistant rows during active turns
- Add item-level live row boundaries for assistant labels, text, tools, notices, and indicators
- Keep pending permissions, questions, running tools, and streaming tails mutable
- Rebuild the mutable viewport when inline interaction state changes
- Preserve scrollback commit state during mutable viewport clears
- Add regression coverage for active assistant row commitment and scrollback rebuild behavior
* fix(terminal): stabilize transcript history insertion
- add durable transcript output IDs for canonical messages and blocks
- commit static history through pending width-tagged batches
- confirm inserted transcript rows by output ID instead of row count
- preserve mutable viewport filtering across pending, confirmed, and replayed history
- remove stale source-pattern ownership guardrails
* fix(ui): preserve wrapped transcript rendering
- cap tool content by wrapped physical rows
- keep tool omission counts tied to source lines
- preserve blank rows between assistant text blocks
- prevent static transcript reinsertion of confirmed text
- add regressions for wrapping, gaps, and history batching
* fix(status): defer service status check until connected
- Start the service-status request after the first connected event
- Avoid status checks before the bridge/session is ready
- Surface connectivity failures as a warning message
- Cover connectivity warning behavior with focused tests
* fix(terminal): prevent stale inline viewport rows
- Exclude already-committed history output IDs from live row serialization
- Clear the native Ratatui inline viewport after scrollback inserts and owned-region growth
- Preserve live mutable rows without re-rendering committed assistant/tool prefixes
- Add coverage for excluded live rows, inline insert behavior, and viewport clear behavior
* fix(bridge): protect renamed sdk runtime process
- Resolve packaged claude-rs-bridge-node before falling back to node on PATH
- Install and validate a renamed Node runtime during postinstall
- Always append a bridge process guard prompt to SDK query options
- Update bridge runtime resolution and system prompt tests
* fix(agent-sdk): suppress ToolSearch bridge events
- Hide ToolSearch tool calls and results before they reach Rust session updates
- Allow the wrapped SDK to execute ToolSearch without prompting or blocking it
- Filter ToolSearch entries from resumed session history
- Add bridge tests for live ToolSearch suppression and history replay
* fix(resume): reset busy state after history replay
- Restore app status to Ready after replaying resumed history
- Clear stale cancel and auto-submit flags from resume replay
- Add regression coverage for immediate prompt submit after startup resume
- Prevent idle resumed sessions from sending spurious cancel_turn commands
* fix(notices): inline slash errors during active turns
- Add shared system notice insertion for inline or standalone delivery
- Route slash command errors through the notice path
- Keep API retry and rate-limit notice upsert behavior intact
- Cover active-turn and standalone slash error delivery with tests
* fix(agent-sdk): update Anthropic SDK dependencies
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
replace the old full-screen-style chat TUI with a terminal-owned inline TUI runtime that behaves like a persistent agent CLI: messages remain part of the terminal transcript, session boundaries preserve usable history, and the app no longer depends on a separate virtual chat viewport as the primary experience.
Inline agent CLI
Old TUI removal
Runtime behavior
Why
The old full TUI chat model kept the conversation inside an app-owned viewport instead of making the terminal transcript the source of truth. That made
claude-rsfeel less like a CLI agent and more like a separate terminal app: messages could disappear behind session changes, active turns had to be replayed into a virtual viewport, and resumed history had to be reconstructed through legacy rendering state.This branch makes the terminal runtime own chat output as inline terminal content. The canonical message stream now drives both live rendering and durable history insertion, so user prompts, assistant output, tool calls, notices, and resumed-session messages survive turn and session transitions in the same visible transcript.
The rest of the branch removes the old full TUI chat machinery and tightens the Agent SDK bridge boundary so runtime updates arrive as typed events that the inline agent CLI can render through the same message and tool-call structures as normal streaming turns.
Closes #
Validation
cargo fmt --all -- --checkcargo clippy --all-targets --all-features -- -D warningscargo test --offlinecargo check --offlinecargo test slash_command_error --offlinenpm.cmd --prefix agent-sdk testNotes