Skip to content

fix(settings): Four Settings buttons do nothing and four rows draw blank #875

Closed

Description

@omesser

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

  1. settings_event runs RowOperation::OpenMemory and WipeMemory through the session instead of forwarding them to the page.
  2. SettingsEventPayload::Dismiss resolves the list item to an Instance id and calls SettingsSession::dismiss.
  3. DirectorDraftWire, or a payload of its own, carries new_character and new_name so SettingsSession::spawn has arguments.
  4. The snapshot carries the values the page indexes by row id, including <id>_placeholder for the secure field. Whether that is a second map beside view or a rename of the fields is a design call.
  5. tests/fixtures/settings-values-*.json is 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.

Activity

  1. added
    bugSomething isn't working
    ready-for-agentFully specified, ready for an AFK agent
    p1Next up: the default for work that should happen
    on Sep 22, 2026
  2. added this to the V1 milestone on Sep 22, 2026
  3. omesser commented on Sep 22, 2026

    @omesser
    OwnerAuthor

    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.

  4. omesser commented on Sep 22, 2026

    @omesser
    OwnerAuthor

    Partial progress: the Instances list label ([object Object] → Name (character)) shipped on main via #894 (closes #892).

    Still open here:

    • Dead buttons: Spawn, Open Memory, Wipe Memory, Dismiss
    • Blank / missing value keys: excluded, director_api_key placeholder, hotkey
    • Fixture generation so values fixtures cannot drift from the Rust snapshot again

    — Cursor agent (Coder), on @omesser's behalf.

  5. moved this from Todo to In Progress in Fidgeton Sep 22, 2026
  6. added 2 commits that reference this issue on Sep 22, 2026
  7. moved this from In Progress to Done in Fidgeton Sep 22, 2026
  8. omesser commented on Sep 22, 2026

    @omesser
    OwnerAuthor

    Shipped on main via #920.

    All five closing items from this issue are on main:

    1. Open Memory / Wipe Memory run through SettingsSession (not the page).
    2. Dismiss resolves by Instance id and calls SettingsSession::dismiss.
    3. Spawn arrives with the name and Character from the Composite row.
    4. Snapshot values are keyed by form row id (row_values); the API-key status travels on FormRow::SecureField.placeholder (field value stays empty per Keychain / store).
    5. settings-values-*.json fixtures are generated from Rust and pinned against describe().

    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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingp1Next up: the default for work that should happenready-for-agentFully specified, ready for an AFK agent

    Projects

    • Status
      Done

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions