Skip to content

fix(tui): auto-approve background tab permissions - #44009

Open
AidenGeunGeun wants to merge 1 commit into
anomalyco:v2from
AidenGeunGeun:background-auto
Open

fix(tui): auto-approve background tab permissions#44009
AidenGeunGeun wants to merge 1 commit into
anomalyco:v2from
AidenGeunGeun:background-auto

Conversation

@AidenGeunGeun

Copy link
Copy Markdown
Contributor

Issue for this PR

Closes #44007

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

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 typecheck in packages/tui
  • repository pre-commit typecheck (33 packages passed)

Screenshots / 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

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

@github-actions

Copy link
Copy Markdown
Contributor

Thanks for your contribution!

This PR doesn't have a linked issue. All PRs must reference an existing issue.

Please:

  1. Open an issue describing the bug/feature (if one doesn't exist)
  2. Add Fixes #<number> or Closes #<number> to this PR description

See CONTRIBUTING.md for details.

@github-actions

Copy link
Copy Markdown
Contributor

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
#42310

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.

@AidenGeunGeun
AidenGeunGeun marked this pull request as ready for review August 22, 2026 00:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant