Skip to content

feat(ui): add autonomy-level control + readiness badge to settings - #318

Merged
OBenner merged 2 commits into
developfrom
feat/ui-autonomy-level-control
Jun 10, 2026
Merged

feat(ui): add autonomy-level control + readiness badge to settings#318
OBenner merged 2 commits into
developfrom
feat/ui-autonomy-level-control

Conversation

@OBenner

@OBenner OBenner commented Jun 8, 2026

Copy link
Copy Markdown
Owner

Context

The Electron settings UI surfaced runtime modes and fallback toggles, but not the ADR-006 autonomy knob (AUTO_CODE_AUTONOMY). This adds it as the primary autonomy control in the AI Provider settings, plus a compact per-provider readiness badge — the UI half of the autonomy work.

What changes

  • Types (shared/types/settings.ts): AutonomyLevel = 'off' | 'claude' | 'safe' | 'bold'; autonomyLevel on ProviderSettings + AIProviderConfig.
  • .env sync (settings-handlers.ts): read/write AUTO_CODE_AUTONOMY through every existing provider-settings path — fresh + incremental .env generation, both load handlers, and the update handler — mirroring the proven AUTO_CODE_RUNTIME_FALLBACK wiring exactly.
  • ProviderSettingsSection.tsx: a Select for off/claude/safe/bold with per-level descriptions, placed right under the provider picker. Plus a compact per-provider readiness badge that reuses the connection-test autonomous-readiness status — green ready / amber warming / red blocked / muted otherwise. getReadinessBadgeClass is exported and unit-tested.
  • i18n: settings:aiProvider.autonomyLevel.* added to en and fr.

Safety

The UI only surfaces the knob — the direct-API promotion gate stays enforced under safe (only providers with recorded evidence are promoted). Default remains claude.

Verification

  • tsc --noEmit0 errors
  • biome check — clean
  • Tests — 22 component tests (incl. new getReadinessBadgeClass) + 78 settings-suite tests pass.

Detailed readiness diagnostics already existed in this section (per provider, after a connection test); this PR adds the missing level selector and a compact at-a-glance badge.

🤖 Generated with Claude Code

The Electron settings UI exposed runtime modes and fallback toggles but
not the ADR-006 autonomy knob (AUTO_CODE_AUTONOMY). Add it as the primary
autonomy control in the AI Provider section.

- types: AutonomyLevel = 'off'|'claude'|'safe'|'bold'; autonomyLevel field
  on ProviderSettings + AIProviderConfig.
- .env sync (settings-handlers): read/write AUTO_CODE_AUTONOMY through every
  existing provider-settings path (fresh + incremental .env generation, both
  load handlers, the update handler), mirroring AUTO_CODE_RUNTIME_FALLBACK.
- ProviderSettingsSection: a Select for off/claude/safe/bold with per-level
  descriptions, plus a compact per-provider readiness badge that reuses the
  connection-test autonomous-readiness status (green ready / amber warming /
  red blocked / muted). getReadinessBadgeClass exported + unit-tested.
- i18n: settings:aiProvider.autonomyLevel.* in en + fr.

Verified: tsc --noEmit clean, biome clean, 22 component tests + 78 settings
tests pass. The evidence gate stays enforced under `safe` — the UI just
surfaces the knob.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Signed-off-by: Oleg Miagkov <mrobenner@gmail.com>
Aligns the en/fr autonomy-level descriptions with PR-7: safe ships the
hardened transactional mutating-subagent surface; bold's distinction is
skipping the evidence gate.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Signed-off-by: Oleg Miagkov <mrobenner@gmail.com>
@coderabbitai

coderabbitai Bot commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

@OBenner, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 59 minutes and 14 seconds. Learn how PR review limits work.

Your organization has run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: da2a3b83-c02d-4285-a789-96f6cbf9ef14

📥 Commits

Reviewing files that changed from the base of the PR and between 7e5cd91 and aad9a40.

📒 Files selected for processing (6)
  • apps/frontend/src/main/ipc-handlers/settings-handlers.ts
  • apps/frontend/src/renderer/components/settings/ProviderSettingsSection.test.tsx
  • apps/frontend/src/renderer/components/settings/ProviderSettingsSection.tsx
  • apps/frontend/src/shared/i18n/locales/en/settings.json
  • apps/frontend/src/shared/i18n/locales/fr/settings.json
  • apps/frontend/src/shared/types/settings.ts
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/ui-autonomy-level-control

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@sonarqubecloud

Copy link
Copy Markdown

@OBenner
OBenner merged commit 0e05f6e into develop Jun 10, 2026
19 checks passed
OBenner added a commit that referenced this pull request Jun 10, 2026
Phase D / PR-7 — the final step of "mutating subagents -> safe" (stacked
on the PR-6 gate requirement). The protocol is no longer scaffolded:

- children are write-scope confined with runtime enforcement (#319),
- they stage mutations and export changesets without touching the shared
  workspace (#320),
- the parent applies each child transactionally with per-child rollback
  and baseline verification (#322),
- real conflicts are never auto-applied — they block finish until the
  parent resolves explicitly (#323),
- the whole mechanism is covered by the deterministic
  subagent_merge_probe (PR-5) which the promotion gate now requires
  (PR-6).

With that evidence chain in place, AutonomyLevel.SAFE now defaults
mutating_subagents_enabled=True. bold's remaining distinction is skipping
the evidence gate. The explicit AUTO_CODE_MUTATING_SUBAGENTS=false
override still opts out (covered by a new test), per ADR-006 precedence.

ADR-006's level table updated. The .env.example and UI level descriptions
live on the still-open #309/#318 branches and are updated there.

Tests: safe-level expectations flipped (autonomy level + direct-API
runtime policy grant); explicit env opt-out covered. 694 passed across
the affected surface.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Signed-off-by: Oleg Miagkov <mrobenner@gmail.com>
OBenner added a commit that referenced this pull request Jun 10, 2026
Phase D / PR-7 — the final step of "mutating subagents -> safe" (stacked
on the PR-6 gate requirement). The protocol is no longer scaffolded:

- children are write-scope confined with runtime enforcement (#319),
- they stage mutations and export changesets without touching the shared
  workspace (#320),
- the parent applies each child transactionally with per-child rollback
  and baseline verification (#322),
- real conflicts are never auto-applied — they block finish until the
  parent resolves explicitly (#323),
- the whole mechanism is covered by the deterministic
  subagent_merge_probe (PR-5) which the promotion gate now requires
  (PR-6).

With that evidence chain in place, AutonomyLevel.SAFE now defaults
mutating_subagents_enabled=True. bold's remaining distinction is skipping
the evidence gate. The explicit AUTO_CODE_MUTATING_SUBAGENTS=false
override still opts out (covered by a new test), per ADR-006 precedence.

ADR-006's level table updated. The .env.example and UI level descriptions
live on the still-open #309/#318 branches and are updated there.

Tests: safe-level expectations flipped (autonomy level + direct-API
runtime policy grant); explicit env opt-out covered. 694 passed across
the affected surface.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Signed-off-by: Oleg Miagkov <mrobenner@gmail.com>
OBenner added a commit that referenced this pull request Jun 10, 2026
…326)

* chore: retrigger CI after base retarget to develop

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Signed-off-by: Oleg Miagkov <mrobenner@gmail.com>

* feat(autonomy): enable mutating parallel subagents at the safe level

Phase D / PR-7 — the final step of "mutating subagents -> safe" (stacked
on the PR-6 gate requirement). The protocol is no longer scaffolded:

- children are write-scope confined with runtime enforcement (#319),
- they stage mutations and export changesets without touching the shared
  workspace (#320),
- the parent applies each child transactionally with per-child rollback
  and baseline verification (#322),
- real conflicts are never auto-applied — they block finish until the
  parent resolves explicitly (#323),
- the whole mechanism is covered by the deterministic
  subagent_merge_probe (PR-5) which the promotion gate now requires
  (PR-6).

With that evidence chain in place, AutonomyLevel.SAFE now defaults
mutating_subagents_enabled=True. bold's remaining distinction is skipping
the evidence gate. The explicit AUTO_CODE_MUTATING_SUBAGENTS=false
override still opts out (covered by a new test), per ADR-006 precedence.

ADR-006's level table updated. The .env.example and UI level descriptions
live on the still-open #309/#318 branches and are updated there.

Tests: safe-level expectations flipped (autonomy level + direct-API
runtime policy grant); explicit env opt-out covered. 694 passed across
the affected surface.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Signed-off-by: Oleg Miagkov <mrobenner@gmail.com>

* chore: retrigger CI after base retarget to develop

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Signed-off-by: Oleg Miagkov <mrobenner@gmail.com>

* chore: retrigger CI on develop base

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Signed-off-by: Oleg Miagkov <mrobenner@gmail.com>

---------

Signed-off-by: Oleg Miagkov <mrobenner@gmail.com>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant