Skip to content

[FEATURE]: Configurable defaults for web/desktop UI display toggles (showStatus, showCustomAgents, etc.) #38156

Closed as not planned

Description

@ntoporcov

Summary

Provide a way to seed the web/desktop UI's Settings.general.* display toggles (Server Status, Custom Agents, File Tree, Navigation, Search, Terminal, etc.) from a config file instead of relying purely on per-browser localStorage.

Background

The Settings interface in packages/app/src/context/settings.tsx defines a set of display toggles for the web/desktop UI:

general: {
  autoSave: boolean
  releaseNotes: boolean
  followup: "queue" | "steer"
  showFileTree: boolean
  showNavigation: boolean
  showSearch: boolean
  showStatus: boolean          // Server Status panel
  showTerminal: boolean
  showReasoningSummaries: boolean
  shellToolPartsExpanded: boolean
  editToolPartsExpanded: boolean
  showCustomAgents: boolean    // Custom agents in the UI
  mobileTitlebarPosition: "top" | "bottom"
  ...
}

These are persisted to localStorage via persisted(), so first-time users on any new browser / device / origin always land on the hardcoded defaults (mostly false), with no server-side way to change them.

There's precedent for scoping UI config separately from server/runtime config — tui.json (opencode.ai/tui.json) exists specifically for TUI-only display prefs (theme, keybinds, mouse, attention). There is no equivalent for the web/desktop app.

Motivation

Any team or deployment that wants to standardize the opencode web UI across users currently has no server-side lever for it — every new browser/device resets to the hardcoded defaults. Common cases:

  • Teams standardizing the UI across an org
  • Deployments where users regularly hit fresh origins and don't want to re-toggle preferences each time
  • Users who simply want to preserve a default layout without hand-editing localStorage

Concretely, I keep having to manually flip on Show Server Status and Show Custom Agents because the defaults don't fit my workflow, and there's no config knob for it.

Proposed API

Either extend opencode.json with a web (or app) section:

{
  "web": {
    "defaults": {
      "general": {
        "showStatus": true,
        "showCustomAgents": true,
        "showFileTree": true
      }
    }
  }
}

Or introduce web.json mirroring the tui.json pattern:

// web.json
{
  "$schema": "https://opencode.ai/web.json",
  "general": {
    "showStatus": true,
    "showCustomAgents": true
  }
}

I'd lean toward web.json for symmetry with tui.json, but happy to defer to maintainers.

Semantics suggestion: config values act as the default when nothing is in localStorage, so users can still override in the UI. (An enforce: true variant could be added later for managed-settings scenarios, matching the existing macOS managed-preferences pattern.)

Alternatives considered

  • Inject localStorage before app load. Works, but requires knowing the exact internal keys, which are implementation details subject to change.
  • URL query params. Possible, but pollutes URLs and doesn't survive navigation.
  • Fork. Overkill for what's ultimately a config plumbing gap.

Related

Happy to send a PR if a maintainer sanity-checks the preferred shape.

Activity

  1. github-actions commented on Sep 20, 2026

    @github-actions
    Contributor

    To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.

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