Skip to content

feat(yasgui): redesign the settings and make request settings global - #248

Merged
MathiasVDA merged 1 commit into
mainfrom
claude/project-thread-qo2f6b
Oct 28, 2026
Merged

MathiasVDA merged 1 commit into
mainfrom
claude/project-thread-qo2f6b

Conversation

@MathiasVDA

Copy link
Copy Markdown
Collaborator

Requested by Mathias · project thread

Redesigns the settings modal after the settings window of textfold, as agreed in the proposal.

Shell

  • Pages are grouped in the navigation (Querying, Your data, Assistant, Help), each with an icon. The header and footer stay in place while the page scrolls.
  • Each setting is a row: its name and one line about it on the left, the control on the right. Controls are switches, segmented choices and selects; the building blocks are in settingsUi.ts.
  • Changes apply at once. Save and Cancel are gone. The footer shows "Saved" after a change, and Done or Esc closes the settings. Forms whose fields belong together (an AI service, endpoint authentication) keep their own Save.
  • New General page:
    • Theme: Light, Dark or System. System is new; it uses ThemeManager.getPreference() and followSystem().
    • Editor themes.
    • Requests.
    • Before running a query: format, check CONSTRUCT variables, IRI hover.
  • openSettings("request") still works and opens General.
  • On small screens the settings fill the screen, and the navigation becomes a row of pages.

Global request settings

  • Request method, Accept headers and custom headers are stored as requestSettings in the persisted config.
  • A change is applied to every open tab. addTab merges the settings into new tabs, so tabs opened later get them too.
  • A tab config passed to addTab, such as a share link, still wins.
  • The formatter, auto-format and the CONSTRUCT check now apply to every tab as well, and are kept across reloads (editorSettings). Before, they were per editor and lost on reload.

Settings → AI

  • Services stay cards, with a radio for the default.
  • The service form has:
    • A searchable, grouped Provider list (Combobox.ts).
    • The base URL, filled in from the provider. Once edited it shows "Changed", with a reset link.
    • A Get a key link per provider.
    • A show/hide button and Forget key for the API key.
    • Fetch models, which replaces Test connection, and a searchable Model list. Recommended models come first and any model id is accepted. Embedding, speech and image models are hidden.
    • A "Make this the default service" switch.
  • CORS: listModels now flags a request that got no answer at all (AiRequestError.unreachable). In that case the form offers the provider's known models and explains what to do: a proxy, OpenRouter, or the CORS setting of Ollama or LM Studio.
  • Gemini's models/ id prefix is dropped.
  • Services store providerId. Existing services are matched by their base URL, so no migration is needed.

Other

  • The QueryBrowser "Add workspace" button opens openSettings("workspaces") instead of clicking the third nav button.
  • The user guide and developer guide are updated, and there is a changeset (minor for yasgui).

Testing

  • Unit tests: 1756 passing. New tests cover unreachable vs. refused model lists, the Gemini prefix, provider lookup and chat-model filtering.
  • Checked in a browser with Playwright:
    • Changing GET in tab 1 changes tab 2 and a new tab 3.
    • "Saved" appears after a change.
    • Adding an Ollama service with a typed model saves it as the default.
    • Esc in a dropdown closes only the dropdown.
  • Not tested: real provider model lists. The cloud environment can't reach most AI APIs. The bundled recommended model ids are best guesses and are worth a look.

Generated by Claude Code

The settings follow the settings window of textfold: pages grouped in the
navigation with icons, each setting a row with one line about it and its
control on the right, a fixed header and footer, and changes that apply at
once (the footer says "Saved"; Done closes). A new General page holds the
theme (Light, Dark or System), the editor themes, the request settings and
what happens before a query runs.

Request method, Accept headers and custom HTTP headers now apply to every
tab, including tabs opened later. The formatter, auto-format and the
CONSTRUCT check apply to every tab too and are kept across reloads.

Settings > AI keeps the services as cards and gets a form with a provider
list that fills in the base URL (still editable, with a reset), a link to
get an API key, and Fetch models with a searchable model list. When a
browser can't read a model list (CORS), the provider's known models are
offered and the form explains what to do.
@MathiasVDA MathiasVDA self-assigned this Oct 28, 2026
@MathiasVDA
MathiasVDA merged commit 0ac3b21 into main Oct 28, 2026
2 checks passed
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