Skip to content

Reach the AI provider settings from the app menu #420

Description

@EtienneLescot

What

The app menu added in #414 (click the OpenScreen wordmark in the editor top bar) lists Keyboard Shortcuts, Check for Updates and About OpenScreen. It deliberately does not list the AI provider settings, even though that is the app's other settings surface and the obvious place a user would look for it.

Why it was left out

ProviderSettings is mounted at src/components/ai-edition/LeftPanel.tsx:1883, and LeftPanel only renders when mode === "edit" and the chat panel is open (src/components/ai-edition/NewEditorShell.tsx, the mode === "edit" && chatOpen branch).

An "AI Providers" item in the top-bar menu would therefore be dead:

  • in Media mode,
  • in Rec mode,
  • and in Edit mode whenever the chat panel is collapsed.

A menu item that works in one of three modes, conditionally, is worse than no item: the user learns the menu lies.

Its open state is a plain useState local to LeftPanel (LeftPanel.tsx:740), set from five call sites (:884, :1146, :1336, :1535, :1856). Nothing outside that component can open it.

What needs doing

Lift the dialog so it is reachable from anywhere in the editor, the way the shortcuts dialog already is:

  1. Move the <ProviderSettings /> mount out of LeftPanel up to NewEditorShell (or to src/App.tsx:140, next to ShortcutsConfigDialog, which is mounted unconditionally for windowType=editor).
  2. Lift the open state into a context, mirroring ShortcutsContext (src/contexts/ShortcutsContext.tsx:37/65/66 = isConfigOpen / openConfig / closeConfig). All five existing call sites then call the context's opener instead of the local setter.
  3. Add the menu item in AppMenu (src/components/ai-edition/v4/EditorTopBar.tsx), routed through TopBarActions like showAbout / checkForUpdates.
  4. Keep the contextual entry points in the AI panel. Two doors to one room is right here; configuring where you work is good UX. The menu item is the discoverable path, not a replacement.

Labels for the strings already exist: editor.providerSettings.title ("AI settings") and editor.chat.providerSettings ("Provider settings..."). Reuse one rather than adding a key, so the menu cannot drift from the dialog it opens — that is the rule the rest of the menu follows (its three current labels are all pre-existing common.actions / shortcuts keys shared with the native menu built in electron/main.ts).

Bigger picture

This is the first step of a settings unification worth doing on its own: today there is a "global" settings dialog covering only keyboard shortcuts, and an AI dialog covering only LLM providers, with nothing linking them. The end state is one Settings dialog with a sidebar of sections (General / Shortcuts / AI / Devices / About), where the app menu routes to sections rather than duplicating them. Doing step 1 above does not commit us to that, but it is the prerequisite either way.

Metadata

Metadata

Assignees

No one assigned

    Labels

    status: fixed in mainWork is merged into main but may not be in a downloadable release yet.status: pending releaseMerged change is waiting for a packaged desktop release.

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions