Skip to content

test(windows): Settings e2e + fill Win32 renderer gaps #631

Closed

Description

@omesser

Why

Native Settings is three renderers. Win32 has more mod tests than GTK and an existing scripts/verify-settings-win.ps1 (#392: window opens, tab switch, label-wipe). That script does not cover the AI tab, freeze/unfreeze, disclosure, or clip/scroll (#601). Comments in the renderer still said frozen cannot change while the window lives — a P0-class lie if a user switches AI source. We need a diligent Windows pass: extend tests and e2e.

Sister issues: macOS AppKit, Linux GTK (same epic). This ticket owns Win32 Settings only.

Related: #601 (clip, no scroll, row bars bleed — fix or explicitly block e2e until reachable), #625 (runtime freeze — verify Win32 WM_ENABLE / ES_READONLY on draw), #548 / #593 (disclosure toggle).

Two workstreams

1. Complete missing tests (automated)

Extend scripts/verify-settings-win.ps1:

  • Keep existing open + tab-switch + label persistence.
  • AI tab: section titles present in child windows.
  • No Harness: Base URL / Model edits are enabled.
  • With Harness (or after picking Harness · … if commit works on Win32 — see fix(settings): Windows text fields — generic commit + honour frozen (X11 parity) #461 if picks still do not commit): HTTP rows disabled.
  • Runtime switch to Model API in the same HWND: rows enabled without relaunch.
  • Screenshot + log under .verify/settings-win-<stamp>/.
  • Assert clip: Launch / last Presence row GetWindowRect is inside parent client (or skip with #601 still open).

Win32 How-to-test in older PRs often said “cannot compile here.” Run this script on DESKTOP-UQIE144 (or CI windows job if HWND automation is stable).

2. Live e2e verification (must run on Windows)

Build tip under test (ai-buddy.exe). Throwaway HOME.

Walk every tab (Presence, Character, AI, Privacy, Development):

File bugs as separate issues; link them here.

Done when

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

Activity

  1. added
    ready-for-agentFully specified, ready for an AFK agent
    windowsRun the Windows compile job on this pull request
    p1Next up: the default for work that should happen
    on Sep 11, 2026
  2. added this to the V1 milestone on Sep 11, 2026
  3. omesser commented on Sep 11, 2026

    @omesser
    OwnerAuthor

    Sisters: macOS #629, Linux #630. Clip/scroll #601; freeze class #625; existing script scripts/verify-settings-win.ps1; Settings PR #593.

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

  4. moved this from 👷 Todo to 🏗 In Progress in Fidgeton Sep 16, 2026
  5. omesser commented on Sep 16, 2026

    @omesser
    OwnerAuthor

    Implemented via PR #768.

    Unit tests (8 new Win32 mod tests in settings_window::tests):

    • ai_tab_section_order_matches_director_sections — AI tab sections match director_sections() order
    • disclosure_present_on_ai_and_source_sections — AI and AI source sections have disclosure text
    • status_present_when_env_owned — Base URL / Model rows show status when env-owned
    • http_rows_have_frozen_field — Base URL / Model / API key rows have frozen field
    • env_owned_rows_stay_frozen_across_describe_calls — Env-owned freeze state persists
    • base_url_picker_frozen_with_base_url_field — Base URL picker follows field's frozen state
    • frozen_can_change_while_window_lives — Frozen changes when Harness attaches/detaches

    E2e script (scripts/verify-settings-win.ps1 + scripts/ax-settings-win.ps1):

    • AI tab section titles (AI, AI source, Model / API, Last user turn) — via UI Automation dump
    • Disclosure control presence and expansion — via UI Automation
    • Freeze/unfreeze on AI source switch (Model API → Harness → Model API) — via UI Automation inspect + Win32 API interaction

    Removed false comments claiming frozen cannot change while window lives (lines 1866, 2088).

    Head SHA: b7c9e2f9749e462aaccab56b587ea8f9f9ed2c02

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

  6. added 6 commits that reference this issue on Sep 16, 2026
    eff8f40
    e481371
    5f318cb
    4fe9151
    812dfdd
    08d8721
  7. omesser commented on Sep 16, 2026

    @omesser
    OwnerAuthor

    Progress from merged #768 (08d8721 on main)

    Shipped on main (does not close this issue — Spec leftover remains):

    Win32 unit tests (CI windows job):

    • AI tab section order, disclosure presence, env-owned status/freeze, picker freeze with Base URL
    • frozen can change while the window lives (Harness attach/detach)
    • apply_enabled_states HWND proof: Edit → EM_SETREADONLY / ES_READONLY; Button/Checkbox → WM_ENABLE / IsWindowEnabled freeze and unfreeze
    • Removed false comments that said frozen cannot change while the window lives

    Machine-local e2e: scripts/verify-settings-win.ps1 + scripts/ax-settings-win.ps1 (managed UI Automation); documented in docs/DEVELOPMENT.md. DESKTOP-UQIE144 PASS for Presence/Director/Development tabs, AI tab structure + disclosure, Model API ↔ Harness source switch (see #768).

    Still open on this ticket:

    • Full live e2e walk of every tab (Presence → Development) with the Done-when live-pass comment / filed bugs
    • Layout/clip assert blocked on #601 (this PR did not absorb layout)
    • Screenshot + log under .verify/settings-win-<stamp>/ if still required by the script checklist

    Leaving open until that remainder is honest.

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

  8. omesser commented on Sep 22, 2026

    @omesser
    OwnerAuthor

    #706 Step 9 deletes the Win32 Settings renderer this e2e epic owned.

    The leftover on this ticket after #768 was a live walk of the native HWND (every tab, clip/scroll blocked on #601). That window is gone. Settings is the webview; Windows smoke is scripts/verify-settings-webview-phase2-win.ps1, not verify-settings-win.ps1.

    #871

    — Grok Build agent, on @omesser's behalf.

  9. moved this from In Progress to Done in Fidgeton Sep 22, 2026
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

    p1Next up: the default for work that should happenready-for-agentFully specified, ready for an AFK agentwindowsRun the Windows compile job on this pull request

    Projects

    • Status
      Done

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions