Skip to content

fix(approvals): treat DeepSeek permission prompts as terminal-only alerts - #610

Merged
Ark0N merged 2 commits into
Ark0N:masterfrom
Hugo-DDT:fix/deepseek-approval-alert-only
Oct 13, 2026
Merged

Ark0N merged 2 commits into
Ark0N:masterfrom
Hugo-DDT:fix/deepseek-approval-alert-only

Conversation

@Hugo-DDT

Copy link
Copy Markdown
Contributor

Summary

Fixes the functional part of #598.

DeepSeek Harness (hooks: 'supervised') raises Approvals Inbox items, but the answer route correctly refuses keystrokes for those dialogs. Despite that, Web Push still attached Approve/Deny actions whenever the inbox setting was on (even with no approvalId), and the desktop drawer / mobile NEEDS YOU strip still rendered Approve/Deny — so users got buttons that always fail.

Changes

  • Tag supervised-hook inbox items with answerInTerminal: true (capability-gated via hooks === 'supervised', not a mode-id branch).
  • Omit approvalId from push for supervised-hook sessions (same capability check).
  • Only attach push Approve/Deny actions when an approvalId is present.
  • Desktop and mobile UIs show “Answer in the terminal” / Open session instead of Approve/Deny for answerInTerminal items.
  • Answer route refuses based on item.answerInTerminal (same behavior as before for DeepSeek).

Docs gaps from #598 are intentionally left for a follow-up.

Test plan

  • Red before fix / green after (Node 22):
    • ships no Approve/Deny actions when the inbox is on but approvalId is absent — failed without fix (actions still shipped), passed with fix
    • creates an answerInTerminal inbox item and omits approvalId from push — failed without fix (answerInTerminal missing), passed with fix
  • npx vitest run --config config/vitest.ci.config.ts test/push-payload-host-title.test.ts test/routes/approval-routes.test.ts test/cli-registry-no-id-branching.test.ts test/mobile-overview.test.ts test/approval-inbox.test.ts → 134 passed
  • npx tsc --noEmit clean for changed TS

…erts

Supervised-hook CLIs (DeepSeek Harness) raise Approvals Inbox items whose
answer route refuses keystrokes, but push notifications and the mobile/desktop
UI still offered Approve/Deny. Mark those items answerInTerminal, omit
approvalId (and therefore push actions) for supervised hooks, and show
"Answer in the terminal" / Open session instead of broken buttons.

Fixes Ark0N#598 (functional part; docs gaps left for a follow-up).
Copilot AI balanced review requested due to automatic review settings October 12, 2026 08:17

Copilot AI 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.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@Ark0N
Ark0N merged commit 9faf567 into Ark0N:master Oct 13, 2026
Ark0N pushed a commit that referenced this pull request Oct 13, 2026
Ark0N pushed a commit that referenced this pull request Oct 13, 2026
…time fix)

format:check failed on src/web/server.ts and src/web/public/approvals-ui.js;
both assignments fit on one line at printWidth 120.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@Ark0N

Ark0N commented Oct 13, 2026

Copy link
Copy Markdown
Owner

Thanks @Hugo-DDT, shipped in 1.41.1. Your Prettier follow-up matched the fix I had made at merge, and I merged it as well so this PR shows as merged. Follow-ups if you want them: codeman tui still offers y approve · n deny for answerInTerminal items, and the hint text is not styled or translated yet.

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.

3 participants