Skip to content

feat(workbench): redesign the settings dialog on one row-and-group system - #6670

Merged
Astro-Han merged 4 commits into
rust-previewfrom
feat/settings-redesign
Nov 6, 2026
Merged

Astro-Han merged 4 commits into
rust-previewfrom
feat/settings-redesign

Conversation

@Astro-Han

@Astro-Han Astro-Han commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

Summary

The settings dialog grew page by page: each page had its own layout, buttons were stacked in columns, every page carried its own Refresh, and the same title was repeated in the rail, the header and the page. This redesigns all seven pages and their subpages around one system, agreed in the team's before/after review, and records it in DESIGN.md so later pages follow it.

  • One kit. SettingsPage.tsx holds the parts every page is built from: body with a fixed footer, lede, section, row, switch, select, side-by-side choices, inputs, text area, search, buttons, problem and confirmation. Pages add no layout of their own.
  • One structure. Rows put the label on the left and the control on the right, grouped on surface over the panel's background. The title, section names, row text and notes share one left edge.
  • Controls by purpose. Switches and selections apply on change; typed values wait for Save in the footer, which appears on a saved item only once something changed. Destructive commands are a danger row at the end of an item's page, not per-row buttons in lists.
  • The shell. The rail names the page; the title row repeats it at the root, adds Back when nested and holds the page's one action (SettingsPageNavigation.action). Operation errors and notices show once under the title.
  • No Refresh buttons. A page reads when it opens and when the window returns to the foreground (PageOwner.refresh), unless a draft or confirmation is open.

Behavior changes worth reviewing:

  • Connections: the models list is part of the connection page (no "Manage models" step). The default model is chosen on the root page, or with "Default for new conversations" on a model. "Connection enabled" and server-side compaction apply on change (through the same save as the form, so a compaction change rediscovers models); flipped while typed changes are unsaved, they join that Save.
  • Skills: Update and Delete are on a skill's page; updating stays on that page and shows the new SKILL.md. MCP: Delete is on the server's page; deleting returns to the list.
  • Terminal: the dialog's content starts on whole cells (the 1-point border left every row one point off, so the title sat on the border row and single-row buttons were hit on the row below). Settings buttons use the terminal's two-row control height.
  • A failed first read shows Retry in place on every page. The terminal maps focus in/out to the window lifecycle, so the foreground read also runs there.
  • General: interface scale is a menu of presets (75–200%) that applies on change; the free-form percentage field with its Preview/Save/Cancel buttons is gone.
  • Strings the old pages used and nothing uses now are removed from the settings catalog.

Before and after

Same data, window size and theme; left is rust-preview at the base commit, right is this PR.

Before After
Connections & models before Connections & models after
Connection before Connection after
General before General after
MCP servers before MCP servers after

Verification

  • node --test products/maka/workbench/tests/*.test.mjs: 107 passed (the compaction test now expects the switch to apply on change and rediscover models after reopening; new tests cover a switch joining unsaved typing and a foreground read landing under an open model draft).
  • cargo nextest run -p maka-cli -p maka-desktop-shell --features maka-cli/desktop-tests -E 'binary(integration)': 70 passed, 1 skipped. The real-host tests for connections, catalog association, skills, MCP and external agents follow the new pages (open the item's page to delete or update; switch sections instead of Refresh; choose the install location from its menu).
  • tsc over the workbench UI, biome format, cargo fmt --check, clippy on the touched test crate.
  • Checked in the desktop app: every page in dark and light, a wide window and a narrow one (tabs on top); the provider picker, a new and a saved connection, a model, General's subpages, MCP's editor, Network, Plugins and a plugin's page, Skills.
  • Not run: the full just check.

AI use

  • No generative tool made a substantive contribution
  • Generative tooling made a substantive contribution

Tool(s) and scope: Claude Code wrote the kit, the page rewrites, the DESIGN.md section and the test updates, and checked them in the desktop app; a human directed the design and reviewed the result.

Checklist

  • Tests cover the change and fail without it
  • Format, typecheck and the affected suites pass locally

Does this PR entail a change in behavior?

  • Yes — described under Summary above
  • No

…stem

Each settings page had grown its own layout: stacked buttons, a Refresh
per page, the title repeated in the rail, header and body, and lists
carrying per-row commands. Rebuild all seven pages and their subpages
from one kit (SettingsPage.tsx) and record the rules in DESIGN.md so new
pages follow them.

Rows put the label left and the control right, in groups on `surface`;
the title, section names, row text and notes share one left edge.
Switches and selections apply on change, typed values wait for Save in
a fixed footer, and destructive commands are a danger row on the item's
own page. The title row holds the page's one action
(SettingsPageNavigation.action). Pages read on open and when the window
returns to the foreground instead of offering Refresh.

The connection page now lists its models, and the default model is
chosen on the root page or on a model. Updating a skill stays on its
page; deleting an MCP server from its page returns to the list.

In the terminal the dialog's one-point border left every row one point
off the cell grid, which put the title on the border row and made
one-row buttons hit the row below; the content now starts on whole
cells and settings buttons use the terminal's two-row control height.

Generated-by: Claude Code
…ocus

A connection switch committed through its own update path: a failed
read-back closed the editor and dropped unsaved typed text, and turning
server-side compaction on skipped the model rediscovery Host requires
after a configuration change. A switch on a clean saved connection now
saves through saveConnection; with unsaved typing it joins that draft.

A failed first read on General, global instructions, MCP servers and
Skills now shows Retry where the data would be, as DESIGN.md requires.
Segmented choices report their selected state to assistive technology.
The terminal shell maps focus changes to the environment lifecycle so
the foreground refresh that replaced Refresh runs there too. A
foreground read no longer replaces the basis under an open removal
confirmation, and model metadata reads have their own generation so a
default-model change cannot leave them loading.

DESIGN.md no longer promises a leave-with-unsaved-changes prompt that
only Connections implements.

Generated-by: Claude Code
Giving model metadata reads their own generation stopped opening a
model draft from cancelling an in-flight foreground connection read.
When that read landed it advanced the connection basis under the open
draft, so saving the model wrote its older override values over a
change saved elsewhere without a conflict. The foreground read now
leaves the basis alone while a model draft is open, as it already does
for unsaved connection edits and an open confirmation.

Generated-by: Claude Code
Retry on General, MCP servers and Skills read again but left the old
error under the title after the read succeeded; their foreground read
now clears it first, as Plugins already did. A plugin whose settings
could not be read shows Retry instead of an empty page, and a skill
whose document could not be read returns to the library with the
error instead of loading forever.

DESIGN.md now says a switch that sets something outside a form, such
as the default model on a model page, applies on change.

Generated-by: Claude Code
@Astro-Han
Astro-Han marked this pull request as ready for review November 6, 2026 13:40
@Astro-Han
Astro-Han merged commit 5934e0c into rust-preview Nov 6, 2026
30 of 35 checks passed
@Astro-Han
Astro-Han deleted the feat/settings-redesign branch November 6, 2026 13:40
M4n5ter pushed a commit that referenced this pull request Nov 9, 2026
Only Connections asked before dropping an edit, and only on Back. The
General, MCP server and plugin editors dropped typed changes on Back,
and a section switch or Close either dropped them (MCP) or kept them
without saying so.

Settings pages may now hold the dialog's exits behind a prompt: Back,
Escape, a section switch in the rail and Close each ask once ("Keep
editing" / "Discard changes") while a page has unsaved changes, and
leave only after Discard. General, MCP servers, Plugins, Network and
Connections share one prompt state and the existing confirmation copy.
Footer Cancel and Discard buttons still drop a draft without asking,
and an untouched missing global AGENTS.md does not count as a change.

Restore the DESIGN.md rule that #6670 held back until this existed.

Fixes #6672

Generated-by: Claude Code
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.

2 participants