Skip to content

fix(app): reflect global permission:allow in Settings auto-accept toggle - #46226

Open
d-morrison wants to merge 1 commit into
anomalyco:devfrom
d-morrison:fix/settings-autoaccept-reflect-global-permission
Open

fix(app): reflect global permission:allow in Settings auto-accept toggle#46226
d-morrison wants to merge 1 commit into
anomalyco:devfrom
d-morrison:fix/settings-autoaccept-reflect-global-permission

Conversation

@d-morrison

@d-morrison d-morrison commented Aug 30, 2026

Copy link
Copy Markdown

Issue for this PR

Closes #38154

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

When permission is set to "allow" globally (in opencode.json / opencode.jsonc), the Settings -> Auto-accept permissions toggle previously showed off even though permissions were already auto-approved via config. The toggle is per-directory/session (permission.isAutoAccepting), so a global "allow" was invisible in the UI - new sessions appeared as toggle off after restart. Reported as bug family across #38154, #41069, #16258, #37617.

This makes accepting() return true when global permission is "allow" or {"*":"allow"} (via serverSync().data.config.permission), and disables the toggle when global auto-accept is active (global config overrides per-directory). deny rules still enforced - only allow is reflected.

How did you verify your code works?

  • opencode debug config shows permission: {"*":"allow"} loaded from ~/.config/opencode/opencode.jsonc:3
  • bun run typecheck in packages/app - passed (no new deps)
  • Manual: with global permission: "allow" Settings toggle now shows on and disabled; without it, per-directory behaviour unchanged (checked settings-general.tsx and settings-v2/general-controllers.ts)

Screenshots / recordings

No visual change except toggle state. With global permission: "allow" toggle shows on + disabled; without, existing enabled/disabled/checked states unchanged (same as #43193 coverage).

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

When permission is set to "allow" globally (in opencode.json),
the Settings -> Auto-accept permissions toggle previously showed
off/disabled even though permissions were already auto-approved
via config. This disconnect is reported across anomalyco#38154, anomalyco#41069,
anomalyco#16258, anomalyco#37617.

Make accepting() return true when global permission is "allow" or
{"*":"allow"}, and disable the toggle (global config overrides
per-directory auto-accept) so UI matches runtime.

Fixes the visual mismatch where a new session shows toggle off after
restarting with global auto-accept enabled.
@github-actions github-actions Bot added the needs:compliance This means the issue will auto-close after 2 hours. label Aug 30, 2026
@github-actions

Copy link
Copy Markdown
Contributor

The following comment was made by an LLM, it may be inaccurate:

The search results show related PRs to the current one (PR #46226), but they appear to be addressing similar but distinct issues:

Related PRs found (not direct duplicates):

  1. PR fix(app): enable directory auto-accept settings #42331 - fix(app): enable directory auto-accept settings

    • Addresses auto-accept settings functionality
  2. PR fix(app): enable scoped auto-accept settings #43193 - fix(app): enable scoped auto-accept settings

    • Addresses scoped auto-accept settings, likely a precursor or related work
  3. PR feat: restore auto-accept UI button in prompt input #23586 - feat: restore auto-accept UI button in prompt input

    • Earlier feature work on auto-accept UI elements

These appear to be related work in the same feature area (auto-accept permissions) but are distinct from PR #46226, which specifically addresses reflecting the global permission configuration in the Settings toggle UI.

No duplicate PRs found

@github-actions github-actions Bot removed the needs:compliance This means the issue will auto-close after 2 hours. label Aug 30, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Thanks for updating your PR! It now meets our contributing guidelines. 👍

d-morrison added a commit to Morrison-Lab/ai-config that referenced this pull request Aug 30, 2026
Do: fetch and follow external repo's CONTRIBUTING.md and .github/pull_request_template.md before opening PR
Don't: file with internal/generic template without checking required sections

Fixes compliance failure on anomalyco/opencode#46226 where PR body missed required template sections (needs:compliance).
d-morrison added a commit to Morrison-Lab/ai-config that referenced this pull request Aug 30, 2026
…ises (#2664)

* ums: capture GIA learnings — heredoc hook, chapter wiring, empty promises

- Security hook: don't heuristic-strip heredoc bodies; keep full scan
- Quarto new chapter: format block, navbar, index, WORDLIST + lychee
- Inline R: formatC with format="d" to avoid scientific notation
- No empty promises: don't use 'will' for future work without mechanism; daytb covers GIA checkpoint

* fix(plugin): use stable absolute path instead of extensionPath in hooks.json

* fix(ums): address review findings (daytb claim, em-dashes, sembr)

* fix(ums): apply sembr and do/dont formatting, use ascii dash

* fix(ums): fix antigravity.md headings and verification

* fix(ums): move quarto learnings to r-quarto.md to avoid max lines limit

* memorize: check external repo guidelines and PR template before filing

Do: fetch and follow external repo's CONTRIBUTING.md and .github/pull_request_template.md before opening PR
Don't: file with internal/generic template without checking required sections

Fixes compliance failure on anomalyco/opencode#46226 where PR body missed required template sections (needs:compliance).

* fix(hooks): block unsupported CI forecasts

* style: use standard markdown em-dashes in AGENTS.md

* style(ums): semantic line breaks for GIA additions
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.

Desktop 1.18.4: Settings "Auto-accept permissions" is disconnected from runtime auto-accept (toggle ON still prompts)

1 participant