Skip to content

fix(console): make the setup checklist's ✕ actually hide it (CHOO-2344) - #304

Merged
amaudruz merged 1 commit into
mainfrom
bug-fix/console-onboarding-dismiss
Aug 26, 2026
Merged

fix(console): make the setup checklist's ✕ actually hide it (CHOO-2344)#304
amaudruz merged 1 commit into
mainfrom
bug-fix/console-onboarding-dismiss

Conversation

@amaudruz

Copy link
Copy Markdown
Collaborator

Symptom

The ✕ on the sidebar's Setting up Switch checklist does nothing. The checklist stays on screen.

Cause

The dismiss handler wrote the setting with a raw rpc.appSettings.update(...) rather than the settings mutation that wraps it. The checklist's visibility is read from the react-query-cached onboarding setting, and nothing broadcasts a settings change back to the renderer — so the value persisted to disk while the cache went on saying showChecklist: true. The button worked; you just couldn't tell until the next launch.

The Settings → General toggle for the same setting was already going through the mutation, which is why that one worked.

Fix

Route the dismissal through useAppSettingsKey('onboarding').update, which writes the cache optimistically, invalidates on settle, and rolls back on failure. Both dismiss buttons (sidebar panel and welcome card) share this handler, so both are fixed.

Also drops the if (!onboarding) return guard — a silent no-op when the setting had not loaded. The mutation merges from the cache itself, so the value is no longer needed here.

Test

The existing checklist tests mount the presentational component with a stub onDismiss, so they asserted the button calls its prop and never touched the wiring. Added onboarding-checklist-dismiss.test.tsx, which mounts the hook against the app's query client and asserts the cached setting flips — verified failing against the old call and passing with the fix.

Console suite: 3239 tests green (323 files).

🤖 Generated with Claude Code

Dismissing the "Setting up Switch" checklist wrote the setting straight
over IPC instead of going through the settings mutation. The panel renders
from the cached `onboarding` setting and nothing broadcasts a settings
change back to the renderer, so the write persisted but the cache kept
saying `showChecklist: true` — the ✕ looked dead until the next launch.

Route the dismissal through the same mutation the Settings toggle uses, so
the cache is updated optimistically and invalidated. This also drops the
`if (!onboarding) return` guard, which silently did nothing when the
setting had not loaded; the mutation merges from the cache itself.

The existing tests mount the presentational panel with a stub `onDismiss`,
so they never touched the wiring. Add a test that mounts the hook and
asserts the cached setting flips, which fails against the old call.
@amaudruz
amaudruz merged commit b385d79 into main Aug 26, 2026
10 checks passed
amaudruz added a commit that referenced this pull request Aug 26, 2026
…10 (#305)

switch-console 0.31.0 → 0.31.1 (patch):
- fix(console): the setup checklist's ✕ now actually dismisses it (#304)

Connector plugins patched so the #302 configure-skill correction re-downloads:
switch-connector 0.9.8 → 0.9.9, switch-connector-codex 0.3.9 → 0.3.10. The
standalone feature list no longer claims the task protocol works (removed in
CHOO-1418); codex skill also fixes an mcp_servers → mcpServers reference.
opencode untouched (0.1.5).

No switch-core release: the doc-sync PR (#295) only touched a Teams README and a
test under core/, no shipping code — bundle pin stays at 0.21.0. agent-runtime
(0.3.2) and sidecar (1.9.4) unchanged. Contracts stay 1/1.

artifacts.yaml + generated modules regenerated; artifacts-check passes.
Authored all changelog entries (every [Unreleased] was empty).

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.

1 participant