Skip to content

fix(app): auto-accept toggle disabled when no session is open #48237

Closed as duplicate

Description

@johnhenry030888

Description

The Settings → General auto-accept permissions switch is greyed out whenever no session is open (home / new-session / draft views). Possibly the same family as #37617 / #45159 / #31137 — this report adds a root-cause analysis and a tested fix design: createPermissionScopeController resolves its directory only from session lineage, and the settings dialog never forwards the route directory it already computes.

Reproduction

  1. Open the app with no session (home / new-session view)
  2. Go to Settings → General
  3. The auto-accept permissions switch is disabled (no directory context)
  4. Open any session → the switch works (session lineage supplies the directory)

Environment

  • opencode v1.18.29 (source build), Linux; likely all platforms / distributions
  • No session open (home / draft views)

Suggested fix

Add a fallbackDirectory to the controller (session lineage first, route directory otherwise) and thread directory() from DialogSettings through SettingsGeneralV2. With no session, the switch reflects and writes the directory-level flag, which new sessions already inherit on submit (submit.ts shouldAutoAccept → enableAutoAccept). The switch stays disabled only when no directory is known at all. Tested locally (3 files, +25/−9); patch available on request.

Activity

  1. johnhenry030888 commented on Sep 9, 2026

    @johnhenry030888
    Author

    Closing: filed here by tooling mistake (wrong venue — intended for sst/opencode). No action needed, apologies for the noise.

  2. johnhenry030888 commented on Sep 9, 2026

    @johnhenry030888
    Author

    Correction to my earlier comment: this venue is correct — sst/opencode redirects here (canonical repo, confirmed). The duplicate #48238 is closed. Apologies for the confusion.

  3. johnhenry030888 commented on Sep 9, 2026

    @johnhenry030888
    Author

    Body reshaped to the Bug Report template (Description / Reproduction / Environment) per the compliance check. Cross-linking the same-symptom family: #37617, #45159, #31137.

  4. github-actions commented on Sep 9, 2026

    @github-actions
    Contributor

    Thanks for updating the issue! It now follows the Bug Report template with a clear description, reproduction steps, and environment info. The needs:compliance label has been removed.

  5. neriousy commented on Oct 1, 2026

    @neriousy
    Member

    Closing as a duplicate of #31137. Same root cause: the settings dialog gets no directory, so the auto-accept toggle is disabled (here when no session is open). Tracking in #31137.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions