Repository navigation
Description
Why
#190 gives settings a native AppKit window because SPEC gives the webview to the sprite and chat. The live state already crosses a seam: SettingsView, SettingsPatch, and SettingsSession in src-tauri/src/settings.rs are platform-free. The form itself is not. src-tauri/src/platform/macos/settings_window.rs (~650 lines) is the headings, labels, help text, field order, frozen Launch row, and the AppKit widgets, in one file.
Linux and Windows cannot share that file. If each toolkit rebuilds the form from memory, three windows will drift: a checkbox that exists on macOS and not on GTK, help text that names WM_CLASS on one and localized app names on the other, Launch at login enabled on one and still labelled unimplemented on another.
The menu already solved this. menu::describe builds a MenuDescription of owned strings; menu::build turns it into tauri::menu on the main thread. Tray and sprite cannot disagree. Settings needs the same split before the second renderer is written.
Related: #18 (closed by #190), #190.
What to extract
A platform-free description of the form, not another copy of the live values. SettingsView stays the snapshot of current state. The description answers: which sections exist, in what order, which row is a checkbox / inspect line / popup / multiline text / button, what the label and help say, which rows are frozen, which SettingsPatch field or SettingsOp a control writes.
Match MenuEntry's depth. Do not invent a reactive widget tree, a forms crate, or an immediate-mode GUI. The deletion test: if GTK and Win32 both render from this description, deleting it means those two files each grow a private copy of the section list and the labels drift. If only AppKit exists, the description is premature — but the Linux settings issue is the second adapter, so the seam becomes real there.
Rows the AppKit window already has (keep this list the source of truth)
- Character: current package popup (switches every Instance)
- Instances: list, dismiss, spawn (package popup + name + New)
- Director: Director on, Ambient session wakes
- Inspect: last Character Prompt (plain text, not an editor)
- Do Not Disturb (its own heading — not under Hide; DESIGN: quiet is not gone)
- Hide: Go away, Hide in fullscreen apps, Hotkey field
- Memory: path (inspect), Open, Wipe (confirm)
- Excluded applications: help + multiline names
- Launch: Launch at login, disabled, labelled unimplemented until Build and distribute macOS and Linux packages #132 ships a bundle
Chat stays out. #17 owns that surface.
What stays where
SettingsSession/SettingsView/SettingsPatch/SettingsOp: unchanged interface. The AppKit controller already talks only to these. The description must not grow a second apply path.- AppKit widgets: stay in
platform/macos/settings_window.rs. That file shrinks to "map this description onto NSButton / NSTextField / …" plus show/refresh. - Tray, Menu, hide hotkey, autostart, updater: already Tauri plugins. Do not drag them into this description. Native toolkit work is the settings window only. Reimplementing the tray as
NSStatusItem/ StatusNotifier /NotifyIconbesidetray.rsis the divergence this issue exists to prevent.
Rejected
- A settings webview. SPEC: the webview is the sprite and chat.
- iced / egui / slint as a way to write the form once. They are not the platform's widgets; the tray already looks native because Tauri maps to them. Settings should too.
- A
SettingsToolkittrait withcheckbox()/heading()that every platform implements. That copies the toolkit into the interface. The description is data; each renderer is ordinary code that reads it.
Work
- Add something like
settings::form(name to fit) that returns the section/row list. Labels and help live there. Tests: the row ids and the frozen Launch row, so a renderer cannot drop Excluded applications or re-enable Launch without changing the description. - Teach the AppKit window to build from that list. Behaviour stays identical: same session, same inspect-only Character Prompt, same disabled Launch checkbox.
- Do not add a GTK or Win32 renderer here. Those are the Linux / Windows settings issues, which consume this description.
Acceptance
-
cargo test -p ai-buddy -- settingsstill covers apply, hotkey parse, and the view. - The AppKit window's sections and labels come from the shared description (grep the literal heading strings in
settings_window.rs— they should be gone or only used as test fixtures). - Launch at login is still frozen and still labelled unimplemented.
- No new GUI crate. No settings webview. No change to tray/menu/hotkey plugins.
Out of scope
Linux GTK window. Windows window. Enabling launch-at-login (#132). Typed hotkey display names (sibling issue). open vs xdg-open (sibling issue). Overlay / Perches (#186).
Activity
omesser commentedon Sep 2, 2026
Consumers: Linux window is #196, Windows window is #197. Keep tray/menu/hotkey on Tauri — Linux tray verify is #198.
refactor(settings): Complete form description TDD seam
refactor(settings): Describe the settings form as data, the way the m…
refactor(settings): Complete form description TDD seam
fix: Use actions map from description instead of hardcoded tables
refactor(settings): Describe the settings form as data, the way the m…
feat(settings): Add Director Completer fields to form description
feat(settings): Add Director Completer fields to form description
omesser commentedon Sep 2, 2026
Shipped on main via #205.
settings::form::describe()now owns the section/row list (including Director Completer fields), actions map, and frozen Launch row. AppKitsettings_window.rsbuilds from that description. No GTK/Win32 renderer in this PR (those stay #196 / #197). Acceptance for this issue is met.