Skip to content

feat(settings): global agent env stage selector - #442

Merged
mergify[bot] merged 2 commits into
mainfrom
claude/w5-02b3-fe-env-stage
Oct 5, 2026
Merged

mergify[bot] merged 2 commits into
mainfrom
claude/w5-02b3-fe-env-stage

Conversation

@Cuarroc

@Cuarroc Cuarroc commented Oct 5, 2026 •

Copy link
Copy Markdown
Owner

In den Einstellungen gibt es jetzt unter „Allgemein“ eine Auswahl „Umgebung der Agenten“ (Streng, Erlaubnisliste, Erbt alles). Sie gilt für alle Projekte, Standard ist „Streng“, und eine Änderung wirkt nur bei neuen Starts und Neustarts. Schlägt das Speichern fehl, springt die Auswahl zurück und eine Fehlermeldung erscheint.

Report

What changed

  • src/lib/ipc.ts: getAgentEnvIsolation / setAgentEnvIsolation over the existing get/set_agent_env_isolation commands (unknown value reads as strict).
  • SettingsView.tsx / GeneralTab.tsx: radio group, optimistic update with rollback and role="alert" on failure; read through refreshGlobalSettings (useRefreshOnResume), same pattern as the digest switch. Help text: applies to new starts/respawns only, inherit is the weakest stage, coordinators stay strict.
  • Tests: three new component tests in SettingsView.test.tsx.

Evidence

Architecture drift: no new findings.

NICHT ABGEDECKT

  • #[cfg(windows)] tests / Windows lane (runs in the merge queue).
  • GUI not launched; no screenshot, the layout of the new fieldset is unchecked visually.
  • The backend PUT verdict-token path is not exercised here (Tauri command used, no HTTP).

Review disposition

Reviewer: kimi-k3 (Ollama kimi-k3:cloud), tier B. Candidate SHA 685c665; fix commit 788abcd (delta is test-only). Architecture drift checked: the pattern copies handleToggleDigest / refreshGlobalSettings and the Tauri command shape in main.rs:744-756; no second pattern.

  • F1 (high, backend commands missing): rejected - get_agent_env_isolation / set_agent_env_isolation exist in src-tauri/src/main.rs:744,751, registered at main.rs:3906-3907, arg key stage matches (merged in feat(env): global agent env stage via API, command and every spawn #438).
  • F2 (medium, out-of-order rollback / refresh race): rejected, follow-up - identical to the existing digest switch (SettingsView.tsx:171-186); a second pattern would be drift. If wanted, fix both switches together in a separate package.
  • F3 (medium, read path untested): accepted - 788abcd adds "shows the stored stage when it is not the default" (red-first against merge base: OK).
  • F4 (low, hint text unproven): rejected - backed by profiles.rs:57-71 (coordinators strict) and main.rs:748 (applies at next spawn).
  • F5 (low, mockReset drops default): rejected - all three tests set their implementations; no live failure.
  • F6 (low, describe options overload): rejected - already used at SettingsView.test.tsx:92, DiffView.test.tsx:85; vitest ^4.1.11.
  • F7 (low, other GeneralTab render sites): rejected - only SettingsView.tsx renders it (grep).

🤖 Generated with Claude Code

Radio group in the general tab for inherit | allowlist | strict (default
strict), read on open and on focus, optimistic with rollback and alert on
a failed save.

Test-First: src/components/SettingsView.test.tsx::selects strict when opened
Test-First: src/components/SettingsView.test.tsx::saves the chosen stage exactly once
Test-First: src/components/SettingsView.test.tsx::restores the previous stage and shows an alert when the save fails

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@Cuarroc
Cuarroc marked this pull request as ready for review October 5, 2026 03:55
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

Test-First: src/components/SettingsView.test.tsx::shows the stored stage when it is not the default

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@Cuarroc Cuarroc added the review-ok Pipeline: review disposition complete, no open high finding label Oct 5, 2026
@Cuarroc

Cuarroc commented Oct 5, 2026

Copy link
Copy Markdown
Owner Author

@Mergifyio queue

@mergify mergify Bot added the queued label Oct 5, 2026
@mergify mergify Bot mentioned this pull request Oct 5, 2026
12 tasks done
@mergify
mergify Bot merged commit 801f4ec into main Oct 5, 2026
11 checks passed
@mergify

mergify Bot commented Oct 5, 2026

Copy link
Copy Markdown
Contributor

Merge Queue Status

This pull request spent 13 minutes 48 seconds in the queue, including 13 minutes 32 seconds running CI.

Required conditions to merge

@mergify
mergify Bot deleted the claude/w5-02b3-fe-env-stage branch October 5, 2026 04:44
@mergify mergify Bot removed the queued label Oct 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

review-ok Pipeline: review disposition complete, no open high finding

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant