fix(tui): auto-approve background tab permissions - #44009
Conversation
|
Thanks for your contribution! This PR doesn't have a linked issue. All PRs must reference an existing issue. Please:
See CONTRIBUTING.md for details. |
|
The following comment was made by an LLM, it may be inaccurate: Based on my search, I found one potentially related PR: PR #42310: fix(opencode): cascade auto permissions to subagent sessions This PR appears to be related because it also addresses auto-permission handling for child/subagent sessions, which is similar in scope to the current PR's approach of extending auto-approval to background tabs and their child sessions. However, #42310 focuses on cascading permissions to subagent sessions in the opencode package, while #44009 (the current PR) moves the auto-approval responder to the tab context in TUI. These may be complementary changes rather than duplicates. |
Issue for this PR
Closes #44007
Type of change
What does this PR do?
Moves the existing auto-approval responder from the selected session route to the tab context. Auto mode now handles the selected session, open background tabs, and their child sessions. Permission state for open session families is refreshed after reconnect.
The responder remains event-driven and scoped to sessions owned by the current TUI tabs; it does not poll or scan all server sessions.
How did you verify your code works?
bun test test/context/session-tabs.test.tsx(12 passed)bun typecheckinpackages/tuiScreenshots / recordings
No visual change. The regression test reproduces a permission request arriving for a background tab and verifies that auto mode replies without selecting it.
Checklist