Skip to content

feat(tui): inspect and steer focused subagent sessions - #238

Merged
danielkov merged 4 commits into
mainfrom
feat/tui-subagent-focus
Sep 21, 2026
Merged

danielkov merged 4 commits into
mainfrom
feat/tui-subagent-focus

Conversation

@danielkov

Copy link
Copy Markdown
Contributor

Summary

Add keyboard and mouse navigation from the root subagent roster into a focused child transcript, with capability-gated text steering and an explicit return to the main session. The root session continues running and retains its roster, transcript, draft, and scroll position.

Impact

Use Ctrl+G to focus the roster, arrows and Enter to open a child, or click its row. Escape or Back to main returns without interrupting either session. Inspection and steering support direct children; descendants remain visible in the root roster but show an unsupported inspection notice.

Technical details

Load only the focused transcript

The owning runtime records child updates to an ephemeral disk spool. The TUI loads only the selected child's history and follows new updates through ordered cursor reads, releasing the transcript when focus changes. Replay and live reads share a cursor, and session, generation, focus-epoch, and cursor checks reject stale responses. Small drafts and scroll state survive focus changes.

Spool history survives child re-prompts but is not a durable session archive. Inherited or resumed history can be partial. Oversized records and unsupported content produce visible omission notices; queue or storage failures are isolated from execution and reported explicitly.

Restricted, generation-safe steering

The child composer accepts text only for active direct children advertising compatible steering. Requests use the existing steering path with registry and actor generation checks; they never fall back to root prompts or new child turns. Root-only commands remain unavailable in child focus mode.

@kit-code-agent kit-code-agent 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.

Closing a streaming child can invalidate retained inspection history, and pasting a media path while inspecting a child can mutate the hidden root composer. Focused-child rendering also retains root terminal hyperlink destinations.

Comment thread src/acp_child/transcript.rs Outdated
Comment thread src/tui/app.rs
Comment thread src/tui/ui.rs

@kit-code-agent kit-code-agent 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.

Three previously reported issues remain: closing a streaming child can invalidate its retained inspection history when a late update arrives (P2); pasting a media path while focused on a child can mutate the hidden root composer (P2); and focused-child rendering uses root terminal hyperlink metadata, allowing incorrect link destinations (P3).

@danielkov

Copy link
Copy Markdown
Contributor Author

Addressed all three review findings in this push: late updates after transcript sealing no longer invalidate retained history; focused-child terminal paste routes as text before attachment classification; native hyperlink metadata and obscuring state now come from the visible transcript. Added close-while-streaming, event-level paste (steerable/read-only), and backend-output hyperlink regressions. Validation: 13 transcript tests, the real close-streaming regression, 4 focused-child tests, formatting, and diff checks pass.

@kit-code-agent kit-code-agent 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.

The previous findings are addressed. One remaining issue suppresses terminal-native child links when a literal slash draft triggers completion state that the child view does not render.

Comment thread src/tui/mod.rs Outdated
@danielkov

Copy link
Copy Markdown
Contributor Author

Addressed the follow-up link-suppression finding: child views render no completion overlays, so their native links no longer inherit root-style completion suppression. Extended the backend regression with a retained /model child draft. All four focused-child tests, formatting, and diff checks pass.

@kit-code-agent kit-code-agent 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.

No issues found. The changes look good to merge.

@danielkov
danielkov merged commit 4e1b401 into main Sep 21, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant