Skip to content

v0.8.66: Correct approval UI copy for session-scoped approvals #3766

Description

@Hmbown

Why this matters

The approval modal currently tells users that a / option 2 means "always" or "Approve always for this kind", but the runtime only approves matching tool calls for the current TUI session. That is a trust-boundary copy bug: users should be able to understand exactly how long an approval lasts before they press the key.

Current behavior

The compact approval controls hardcode the second action as "always":

  • crates/tui/src/tui/widgets/mod.rs:1760-1772

The full approval option also uses the ApprovalOptionApproveAlways label:

  • crates/tui/src/tui/widgets/mod.rs:1876-1879
  • crates/tui/src/tui/widgets/mod.rs:1898-1899

But the runtime maps that option to a session-scoped decision:

  • crates/tui/src/tui/approval.rs:1200-1204

And the TUI handler stores the tool/grouping keys in the in-memory session approval set:

  • crates/tui/src/tui/ui.rs:9505-9512

Focused test evidence also matches session-scoped behavior:

  • crates/tui/src/tui/approval.rs:2665benign_a_two_approves_for_session

Desired behavior

  1. The compact and full approval UI should say "for session" / "this session" instead of "always" / "Approve always" for session-scoped approval.
  2. Keyboard hints can stay the same (a, option 2) as long as the label is honest.
  3. The copy should remain localized enough that non-English users are not told the approval is permanent.
  4. Any docs/help text that describes the approval option should use the same session-scoped wording.

Repro or evidence

Open an approval prompt that offers the second approval option. The UI presents option 2 / a as always/permanent, while ApprovalOption::ApproveAlways maps to ReviewDecision::ApprovedForSession and is stored only in app.approval_session_approved.

Acceptance criteria

  • Compact approval controls no longer render "always" for the session-scoped option.
  • Full approval option text no longer renders "Approve always" for the session-scoped option.
  • The chosen label clearly communicates current-session scope.
  • Existing approval behavior remains session-scoped; do not accidentally persist this approval.
  • Focused approval tests pass, including benign_a_two_approves_for_session.
  • Add or update a rendering/copy test so this wording cannot regress.

Related

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingdocumentationImprovements or additions to documentationrelease-blockerMust be fixed before the next releasesecuritySecurity, isolation, permissions, or trust-boundary worktuiTerminal UI behavior, rendering, or interactionuxUser experience, interaction, or presentation polishv0.8.66Targeting v0.8.66

    Projects

    Status
    Done

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions