Skip to content

fix: restore permission recovery and consistent connection controls - #197

Merged
Blankll merged 8 commits into
masterfrom
codex/permission-controls-consistency
Oct 28, 2026
Merged

Blankll merged 8 commits into
masterfrom
codex/permission-controls-consistency

Conversation

@Blankll

@Blankll Blankll commented Oct 26, 2026 •

Copy link
Copy Markdown
Member

Data Studio permission denials could appear as muted activity, and reopening a conversation reconstructed failed or rejected calls as successful. The agent could also continue after a blocked action without a clear recovery state. Connection editing expanded legacy SSH settings inline instead of using the existing compact tunnel-item pattern.

This change:

  • Shows persistent blocked, rejected, failed, and unavailable-outcome notices with the connection, required action, and recorded decision source. Policy denials pause further agent work; Review permissions edits the blocked connection, including inherited denials, and Retry request starts a fresh checked turn. Global defaults remain in Settings; Save and Back to chat share one footer row.
  • Refreshes backend-resolved action permissions in each agent turn, including Manage, so a connection grant replaces a stale planning snapshot. The prompt requires a fresh tool result before reporting a retry failure and distinguishes application AI defaults from operating-system privileges. Raw denial diagnostics are collapsed and earlier blocked calls are labeled as previous attempts.
  • Restores persisted tool-call statuses and correlated results in history. Missing or interrupted outcomes are never presented as successful.
  • Aligns Ask/Auto instructions with application enforcement: permitted reads run automatically, ordinary writes follow the mode, and deletes/DDL require confirmation unless a saved rule applies. Approval never overrides a permission denial.
  • Restores the existing settings radio pattern for access levels, including Custom, and uses compact action switches with inheritance labels. Connection AI controls are grouped separately from SSL/SSH.
  • Gates AI permission editing with the existing local Ultimate entitlement in the UI and native save command. Community connection edits preserve saved decisions, and deleted-connection permission cleanup remains nonfatal.
  • Keeps legacy SSH tunnels as compact items, with details opened explicitly in a separate editor with Save/Cancel. Conversion to a reusable profile remains manual and preserves authentication and proxy settings; adding profile hops is guarded until conversion to avoid silently bypassing the inline tunnel. Saved hops support drag and keyboard reordering, and sorting is reinitialized when the chain is remounted.
  • Records two file-scoped design-detector exceptions for the existing semantic blockquote border and non-bouncing typing-dot pulse.

Validation:

  • Permissions/runtime validation: 812 frontend tests passed before the SSH follow-up
  • SSH follow-up: 89 component and connection-store tests passed, covering manual conversion, credential/proxy preservation, cancellation, conversion failures, and reordering
  • 596 Rust library tests passed; 1 ignored
  • Production frontend build and lint passed
  • Native macOS app bundle built, signature verified, and launch checked
  • Light/dark and English/Chinese UI checked, including the compact layout and permission-review/retry interactions
  • End-to-end runtime test confirms a denied DDL call is recorded without execution or a second model request

Already dispatched work is not undone. Legacy history whose permission source was never recorded shows a generic permission reason.

…n editing

- access levels use the shared radio pattern with a short scope
  description inside each option; Custom edits the same values as the
  presets instead of forming a separate layer
- connection-level custom actions expose Use default (Allow/Deny);
  system defaults use switches for binary actions
- MCP service settings and shared AI defaults live in separate cards
- per-connection permission editing requires the local Ultimate
  entitlement: inline upgrade prompt, draft stripped on save, and
  save_ai_permissions enforced in Rust with a cleanup carve-out that
  only clears decisions of connections that no longer exist
Option containers keep only their title so the picker takes roughly
half the height in the connection dialog; a single short description
below the group follows the selected access level and serves as the
shared aria-describedby target.
@Blankll Blankll changed the title Restore consistent AI permission controls and gate per-connection editing fix: restore consistent AI permissions and Data Studio recovery Oct 27, 2026
@Blankll Blankll changed the title fix: restore consistent AI permissions and Data Studio recovery fix: restore permission recovery and consistent connection controls Oct 27, 2026
The test's loop token accounting rebuilt the o200k_base encoder for every
counted message, which can exceed the 10s loop timeout on CI runners
(ubuntu failed on 4 consecutive commits). Use an Anthropic-family model so
counting takes the cheap character heuristic, and give the test its own
session id so the per-session tokenizer cache cannot pin another family.
@Blankll
Blankll merged commit 9732962 into master Oct 28, 2026
3 checks passed
@Blankll
Blankll deleted the codex/permission-controls-consistency branch October 28, 2026 07:13
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