Skip to content

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

Draft
michaelbuckner wants to merge 1 commit into
anomalyco:devfrom
michaelbuckner:fix-auto-accept
Draft

fix(app): enable directory auto-accept settings#42331
michaelbuckner wants to merge 1 commit into
anomalyco:devfrom
michaelbuckner:fix-auto-accept

Conversation

@michaelbuckner

@michaelbuckner michaelbuckner commented Aug 13, 2026

Copy link
Copy Markdown

Issue for this PR

Fixes #31137

Type of change

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

What does this PR do?

V2 Settings already receives a session ID for active sessions, but draft and directory-backed new-session routes have no session ID even though the layout knows their active directory. That leaves the auto-accept switch disabled in those routes.

This passes the active route directory into General Settings and uses the existing directory-scoped auto-accept API when there is no session ID. Existing session behavior is unchanged. Settings with no active directory remains disabled and sends no permission request.

This does not add a global default or change auto-accept persistence or precedence. #39328 proposes that broader behavior separately.

How did you verify your code works?

  • PLAYWRIGHT_WORKERS=1 bun run test:e2e e2e/regression/remote-session-settings.spec.ts --grep "draft settings use directory auto-accept|settings without active scope keep auto-accept disabled|session settings use the remote server context" — 3 passed
  • bun run typecheck:e2e — passed
  • bun run build — passed
  • Repository pre-push bun typecheck with Bun 1.3.14 — 30/30 packages passed

The remote draft regression verifies the switch enables, toggles, and sends the permission request only to the correct server and directory. The no-active-scope regression verifies the switch remains disabled and sends no permission request.

Screenshots / recordings

No visual styling changes. The new Playwright coverage exercises the rendered Settings switch and its before/after enabled state; manual Chromium QA also covered 768×900 and 1280×720.

Before

draft-1280x720-before

After

draft-1280x720-after

Checklist

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

@github-actions

Copy link
Copy Markdown
Contributor

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

Potential related PRs found:

  1. PR feat(app): persist auto-accept permissions preference across sessions #39328feat(app): persist auto-accept permissions preference across sessions

  2. PR feat: restore auto-accept UI button in prompt input #23586feat: restore auto-accept UI button in prompt input

    • Related to auto-accept functionality but appears to be an earlier feature implementation.

Note: These are related PRs addressing different aspects of the auto-accept feature, not exact duplicates. PR #42331 is a targeted bug fix for draft/directory-backed sessions, while #39328 handles the broader persistence and precedence changes.

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.

[Web UI] "Auto-accept permissions" button is disabled when "New layout and design" is enabled.

1 participant