Repository navigation
FEAT: add balanced, none and required confirmation modes - #101
Merged
Merged
Conversation
There was a problem hiding this comment.
🟡 Changes recommended
Unresolved critical confirmation defects allow quota-consuming launches without a visible prompt and block strict-action confirmation in narrow terminals.
5 open issues
Keep confirmation controls visible at narrow terminal widths · New Show armed state for built-in Run Scope launches · New Display the child thread as the prompt answer destination · New Preserve profile session ID when confirming Skip · New Avoid masking public answers when final answer is secret · New
What changed in this PR
Adds a launch-scoped confirmation policy across terminal and browser controls, making narrow actions immediate by default while retaining review for higher-impact changes.
Changes:
- Replaces
--no-confirmwith--confirmation balanced|none|require, while always confirming quota-reset redemption. - Adds strict terminal action reviews and browser policy handling, and prioritizes advertised Approve Once choices.
- Updates documentation, browser assets, contracts and regression coverage.
| File | Description |
|---|---|
web/tests/browser.spec.ts |
Tests browser confirmation modes and action scope. |
web/src/SessionCommands.svelte |
Applies policy to session-command review controls. |
web/src/SessionActions.svelte |
Adds scope-based reviews and trigger-deletion confirmation. |
web/src/contracts.generated.ts |
Exposes confirmation mode in the browser contract. |
web/src/confirmation.ts |
Defines browser confirmation presentation policy. |
README.md |
Documents modes, migration and interaction changes. |
main.go |
Validates and passes launch policy to both interfaces. |
main_web_test.go |
Tests mode propagation, isolation and invalid flags. |
main_test.go |
Updates terminal launch test signatures. |
main_logging_test.go |
Updates logging test launch signatures. |
internal/web/state.go |
Publishes confirmation mode with a balanced default. |
internal/web/server.go |
Accepts policy options and reports active mode. |
internal/web/dist/index.html |
References the updated browser bundle. |
internal/web/control_commands_test.go |
Preserves server-ticket checks in none mode. |
internal/ui/quota_step_down.go |
Applies policy to quota-profile confirmation. |
internal/ui/quota_reset_test.go |
Verifies reset confirmation remains mandatory. |
internal/ui/monitor.go |
Renders strict action reviews. |
internal/ui/monitor_schedule_panel.go |
Reviews trigger deletion and applies Send now policy. |
internal/ui/monitor_read.go |
Avoids read acknowledgments during action reviews. |
internal/ui/monitor_queue.go |
Adds strict queue-edit review and deletion policy. |
internal/ui/monitor_prompt.go |
Reviews replies and active-turn actions. |
internal/ui/monitor_profile.go |
Adds strict profile-skip review. |
internal/ui/monitor_history_test.go |
Selects strict mode for approval-history tests. |
internal/ui/monitor_filter_test.go |
Retains guarded Close All test coverage. |
internal/ui/monitor_commands.go |
Makes command footer labels policy-aware. |
internal/ui/monitor_commands_test.go |
Migrates command tests to the new modes. |
internal/ui/monitor_commands_interaction_test.go |
Updates picker and repeated-key policy tests. |
internal/ui/monitor_close_all.go |
Makes Close All immediate outside strict mode. |
internal/ui/monitor_close_all_test.go |
Explicitly tests strict Close All behavior. |
internal/ui/monitor_approval.go |
Applies approval-scope policy and button sizing. |
internal/ui/monitor_approval_test.go |
Updates approval interaction expectations. |
internal/ui/model.go |
Prioritizes reviews and applies benchmark launch policy. |
internal/ui/confirmations.go |
Provides the launch-scoped mode setter. |
internal/ui/confirmations_test.go |
Migrates opt-out regression tests. |
internal/ui/confirmation_modes_test.go |
Covers modes, review binding, masking and geometry. |
internal/ui/benchmark.go |
Shares benchmark confirmation arming logic. |
internal/ui/action_review.go |
Implements expiring, cancellable strict action reviews. |
internal/confirmation/policy.go |
Defines modes and action-scope classification. |
internal/confirmation/policy_test.go |
Tests policy decisions and mode parsing. |
internal/codex/approval_options.go |
Moves advertised Approve Once choices first. |
internal/codex/approval_options_test.go |
Tests approval-choice ordering. |
Review effort: Balanced
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


One-time approvals and other narrow actions currently inherit extra review steps intended for broader changes. This PR makes the default policy balanced and exposes one explicit mode option in both terminal and web interfaces.
--confirmation none--confirmation require--confirmation balancedexplicitly selects the default. The previous--no-confirmoption is removed; replace it with--confirmation none. No compatibility alias is retained.Resulting behaviour
Implementation
Validation
Linux CI verifies all seven README TUI screenshots. Refresh the approval image and its manifest hashes for the compact immediate-action buttons; the other six scenes are unchanged.
Full Go race/coverage suite passes; exhaustive terminal presentation checks pass separately for all 17 locales.
125 browser tests pass with installed Chrome, including real-server simulated approvals, independent profile reviews, all three modes, one-time versus broader grants, replies and trigger deletion.
Frontend type/format checks, production build, generated browser contract, Go vet, Windows application build and Windows terminal-test compilation pass.
Regression coverage includes stale capabilities, changed payloads/targets, expiry/cancellation, repeated keys, secret-first and secret-last answers, child destinations, selected/non-selected partial-row Skip, translated wrapping, long drafts, mouse hit geometry and compact approval buttons.
All four production duplication scans pass without raising the baseline. The normalised 50-token scan improves from 145 to 142 clone pairs, 1,505 to 1,467 duplicated lines, and 10,928 to 10,660 duplicated tokens. Other production scans are unchanged.
These checks use fake Codex clients and daemon fixtures; no live model work or managed-policy approval was launched for validation.