Repository navigation
Description
What this issue is
The webview Settings form renders four buttons that do nothing, and the page reads several value keys the snapshot never carries. Both gaps predate #871; that pull request only made them visible, because deleting the native renderers left the Rust that did the work with no caller and the dead-code lint found it.
The four dead buttons
settings/form.rs:1602-1604 puts three operations in the form's operation table, and the Instances list at settings/form.rs:1130 gives every row a Dismiss button. settings/controller.rs:116 turns each press into Outcome::Run, and main.rs hands the operation string to the page. src/settings.js:356 acts on copy_byo_snippet and copy_byo_token and drops everything else, so:
| Button | Where | What happens now |
|---|---|---|
| Spawn | Character tab | The page reloads the snapshot. No Instance appears. |
| Open Memory | Privacy tab | The page reloads the snapshot. No editor opens. |
| Wipe Memory | Privacy tab | The page reloads the snapshot. Memory is untouched. |
| Dismiss | Character tab, one per Instance | main.rs:803 answers Err("dismiss not yet implemented"), and the page shows "Could not save changes. Check your connection." |
The Rust that does each job exists and is correct. SettingsSession::open_memory, wipe_memory, spawn and dismiss are at settings.rs:1197-1217, and frame_loop.rs:565 and :576 still handle SettingsOp::Spawn and SettingsOp::Dismiss. Only the caller in settings_event is missing. #706 says this on purpose: "TCC, Keychain, opening and wiping Memory, spawning and dismissing are already SettingsSession methods in Rust. None of it moves to JavaScript."
Spawn needs one more thing than the other three. It takes the new_character popup and the new_name field, and DirectorDraftWire carries neither, so the press arrives with no name to spawn under.
The value keys the page cannot find
settings.js:440 sets currentValues = snapshot.view, so the page indexes the serialized SettingsView by form row id. SettingsView is a plain #[derive(Serialize)] keyed by Rust field name, and the two vocabularies only overlap by accident.
Measured against the committed fixture tests/fixtures/settings-snapshot-modelApi.json: 31 of the 44 value-carrying row ids are not SettingsView keys. Not all 31 are defects — a fresh-input row like new_name is meant to start empty, and a shortcut popup answers from SettingsView::popup_value instead. The four below are, and three of them are what the orphaned accessors produce.
| Row id | What the page reads | What the view carries | Effect |
|---|---|---|---|
excluded |
values["excluded"], newline-separated |
excluded_applications: Vec<String> |
The Excluded applications textarea draws blank. |
instances |
values["instances"], lines or an array of strings |
instances: Vec<InstanceRow>, objects |
Each list row renders the object, not Name (character). |
director_api_key |
values["director_api_key_placeholder"] (settings.js:182) |
nothing | The API key field shows no placeholder, so "Not set", "Set: len=… last=…", "Overridden by env" and "Unavailable: …" are all invisible. |
hotkey |
values["hotkey"] |
hide_hotkey: String |
The Hide/Show Toggle block draws blank. |
SettingsView::excluded_text, instance_lines and api_key_placeholder at settings.rs:513-546 produce exactly the first three. They have no caller for the same reason the buttons have no handler.
The live dump below shows the hotkey case: the Hide/Show Toggle row's block is an empty group.
AXStaticText||Hide/Show Toggle||true|false
AXGroup:AXEmptyGroup||||true|false
Why the tree is green
tests/settings.test.js drives controls() against tests/fixtures/settings-values-*.json, which are hand-written and carry "excluded": "Keynote\nzoom.us" and "instances": "BMO (bmo)\nBoo (ghost)". Those are the shape the page wants, not the shape settings_snapshot returns. The fixtures pin the page's contract against itself, so no test compares it with the Rust that has to satisfy it.
tests/fixtures/settings-snapshot-*.json is generated from the Rust FormDescription and is pinned in form.rs. Its sibling values file is not.
What would close this
settings_eventrunsRowOperation::OpenMemoryandWipeMemorythrough the session instead of forwarding them to the page.SettingsEventPayload::Dismissresolves the list item to an Instance id and callsSettingsSession::dismiss.DirectorDraftWire, or a payload of its own, carriesnew_characterandnew_namesoSettingsSession::spawnhas arguments.- The snapshot carries the values the page indexes by row id, including
<id>_placeholderfor the secure field. Whether that is a second map besideviewor a rename of the fields is a design call. tests/fixtures/settings-values-*.jsonis generated from the Rust side, the way the snapshot fixture already is, so the two contracts cannot drift again.
Steps 1 through 3 give SettingsSession::open_memory, wipe_memory, spawn, dismiss and SettingsOp::Spawn, Dismiss their callers back. Step 4 does the same for SettingsView::excluded_text, instance_lines and api_key_placeholder. All nine carry #[allow(dead_code)] and a comment pointing here until then.
Evidence
macOS, e3a08114 plus the dead-code commit, release build, accessibility dumps under /tmp/ai-buddy-verify-pr871-20260922-051727-36982/evidence.
— Claude Code agent, on @omesser's behalf.
Metadata
Metadata
Assignees
Labels
Projects
- StatusShow more project fieldsDone
Activity
fix(settings): Mark the orphaned Settings symbols rather than delete …
omesser commentedon Sep 22, 2026
Slicing the Instances row out as #892 so the
[object Object]label can land without waiting on Spawn / Dismiss / Memory.— Cursor agent, on @omesser's behalf.
omesser commentedon Sep 22, 2026
Partial progress: the Instances list label (
[object Object]→Name (character)) shipped on main via #894 (closes #892).Still open here:
excluded,director_api_keyplaceholder,hotkey— Cursor agent (Coder), on @omesser's behalf.
docs(settings): Trim the #875 comments to their constraint
docs(settings): Trim the #875 comments to their constraint
fix(windows): Add consent_checkboxes HashMap for webview form row bin…
omesser commentedon Sep 22, 2026
Shipped on main via #920.
All five closing items from this issue are on main:
SettingsSession(not the page).SettingsSession::dismiss.row_values); the API-key status travels onFormRow::SecureField.placeholder(field value stays empty per Keychain / store).settings-values-*.jsonfixtures are generated from Rust and pinned againstdescribe().Earlier slice #892 / #894 already fixed the Instances
[object Object]labels. Character dropdowns still listing only the value in force stays out of scope here and is tracked as #921.— Cursor agent (Coder), on @omesser's behalf.
fix(windows): Add consent_checkboxes HashMap for webview form row bin…