Skip to content

feat(desktop): support machine-level desktop settings#33083

Open
anduimagui wants to merge 2 commits into
anomalyco:devfrom
anduimagui:desktop-json
Open

feat(desktop): support machine-level desktop settings#33083
anduimagui wants to merge 2 commits into
anomalyco:devfrom
anduimagui:desktop-json

Conversation

@anduimagui

@anduimagui anduimagui commented Jun 20, 2026

Copy link
Copy Markdown

Issue for this PR

Refs #28425

Related context: #28444, #29812, #27487, #13336

Type of change

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

What does this PR do?

Adds a desktop-only machine config file at ~/.config/opencode/desktop.json for settings that should be version-controllable or applied before the normal persisted app settings store is read.

This currently supports desktop overrides for:

  • General settings: autoSave, releaseNotes, followup, showFileTree, showNavigation, showSearch, showStatus, showTerminal, showReasoningSummaries, shellToolPartsExpanded, editToolPartsExpanded, showSessionProgressBar, showCustomAgents, and newLayoutDesigns.
  • Permissions: permissions.autoApprove.
  • Sounds: sounds.agentEnabled, sounds.agent, sounds.permissionsEnabled, sounds.permissions, sounds.errorsEnabled, and sounds.errors.

The desktop main process reads desktop.json, logs the resolved path and load result during startup, and exposes the normalized config through the preload bridge. The renderer passes that config through the platform context so shared app settings can use it as a desktop override without knowing about Electron file paths.

The config contract now lives in @opencode-ai/app/desktop-config as an Effect schema-backed module. Unknown keys are ignored, wrong primitive types are dropped, and missing or malformed files return undefined so a bad optional desktop config does not block startup.

The docs now list ~/.config/opencode/desktop.json alongside the existing global and TUI config files.

How did you verify your code works?

  • bun test src/desktop-config.test.ts from packages/app
  • bun typecheck from packages/app
  • bun test src/main/desktop-config.test.ts from packages/desktop
  • bun typecheck from packages/desktop
  • Push hook ran bun turbo typecheck successfully

Screenshots / recordings

N/A

Checklist

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

@anduimagui anduimagui force-pushed the desktop-json branch 3 times, most recently from 795d9e1 to 4bafee6 Compare June 20, 2026 10:26
@anduimagui anduimagui changed the title feat(desktop): add desktop config file feat(desktop): support machine-level desktop settings Jun 20, 2026
@anduimagui anduimagui marked this pull request as ready for review June 20, 2026 14:29
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.

1 participant