fix(console): make the setup checklist's ✕ actually hide it (CHOO-2344) - #304
Merged
Conversation
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
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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-cachedonboardingsetting, and nothing broadcasts a settings change back to the renderer — so the value persisted to disk while the cache went on sayingshowChecklist: 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) returnguard — 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. Addedonboarding-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