Skip to content

Answer every pending agent approval from one Approvals inbox (#291) - #1697

Merged
currentbits merged 4 commits into
mainfrom
coder/unified-approval-inbox-every-pending-per-fd0b50
Oct 19, 2026
Merged

currentbits merged 4 commits into
mainfrom
coder/unified-approval-inbox-every-pending-per-fd0b50

Conversation

@currentbits

Copy link
Copy Markdown
Owner

Permission prompts were only visible inside the thread that raised them, and only the first prompt of each thread was shown. A new Approvals view (More menu, or "Open approvals" in the command palette) lists every pending prompt across all threads in one queue. You can answer each one there, or select several and answer them as a batch. Part of #291.

Changes

  • One queue across threads. Prompts are grouped by thread, oldest run first. Each row shows the command and any guardrail reason, and a risky row gets a red border. The list includes prompts queued behind the head of a thread, which the thread card never shows.
  • Answer inline or in a batch. Plain tool prompts get Allow, Allow for session and Deny on the row, plus checkboxes for batch Allow/Deny. Each answer targets its own requestId, so answering one row never moves an unrelated one. Allow for session is hidden wherever the thread card hides it (profile.ask rules, Codex prompts that don't offer it).
  • Rich prompts open their thread. Questions, typed input, plans, Codex file diffs and the CI workflow sign-off get "Open thread to answer", because their card is where you read the content.
  • Restored prompts show up too. Prompts restored after an app restart (Approval state must survive app restarts #349) appear in the inbox, with Allow for session hidden the same way the card hides it.
  • New prompts always reach the inbox. Before, only a thread's first prompt broadcast threads:changed. Claude and Codex now broadcast on every prompt, so a second prompt on a thread that's already waiting still reaches the inbox. OpenCode already did this.
  • New threads.pendingApprovals channel. It's read-only and classed as a read web scope. Answering still goes through threads.respondPermission, which needs steer.

Verification

  • npm run typecheck: clean, including the preload sync check.
  • npm run test:electron: 4982/4982 pass. Run with inherited CODER_* vars stripped to match CI.
  • Renderer suite: 3177/3177 pass, including the new test/approvalsView.test.tsx.
  • npx vite build: succeeds.
  • The new runner test covers two Codex threads with three queued prompts. Denying a non-head prompt leaves the other two pending, and a second prompt on an already-waiting thread still pushes threads:changed.
  • Not tested: I haven't clicked through the view in the running app. Dev mode returns an empty list.

Notes for reviewers

Not built here, though #291 mentions them:

The inline row also has no command editing and no picker for the always-allow rule (#479). Those stay on the thread card.


claude-opus-5-5 via Claude Code

🤖 Generated with Claude Code

Solenta and others added 2 commits October 19, 2026 10:05
Solenta-Message-Id: 1ed15998-a235-4276-a244-862554bb1820
…l-inbox-every-pending-per-fd0b50

# Conflicts:
#	electron/runner-permissions.js
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 19, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-19T10:11:35.378759Z 492d7f5 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 492d7f5113

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

return () => {
live = false;
};
}, [loadApprovals, threads]);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Refetch on every approval-change notification

When a second prompt arrives for a thread that is already awaiting input, the runner broadcasts threads:changed without changing any ThreadInfo field. applyThreads in src/useCoder.ts deliberately preserves the existing array identity for such no-op list pushes, so this threads dependency does not change and the inbox never reloads the new prompt. Consequently, an already-open inbox omits later concurrent prompts until some unrelated thread-row mutation occurs; use a notification generation/event rather than the reconciled list identity as the refetch trigger.

Useful? React with 👍 / 👎.

Comment on lines +140 to +144
<button
type="button"
className={styles.button}
disabled={picked.length === 0}
onClick={() => void answer(picked, "allow")}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Disable batch actions while selected rows are busy

During a multi-row batch, selected keys remain in picked until every sequential IPC call finishes, while busy disables only the per-row controls. The header Allow and Deny buttons therefore remain enabled throughout the operation, so clicking either again—especially with a long queue or over the web bridge—submits duplicate or conflicting responses for the same request IDs and reports spurious “no longer pending” failures. Disable both batch actions whenever any picked key is busy.

Useful? React with 👍 / 👎.

Willem and others added 2 commits October 19, 2026 12:31
The fixture's last step is the result line, and the replay CLI logs done
only after writing it. On a loaded macOS runner the thread can reach done
in that gap. The other replay scenarios already wait on replay.finished.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@currentbits
currentbits merged commit 624ff78 into main Oct 19, 2026
4 of 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