Repository navigation
fix(setup): resolve fresh-user setup, binary detection, and bootstrap dead ends - #1555
Merged
Merged
Conversation
…ication Refs #1553 - Parse the last non-empty line of login-shell stdout so noisy .zprofile banners do not break command -v detection, and scan ~/.local/share/mise/shims, ~/Library/pnpm, ~/.npm-global/bin, and ~/.claude/local. - Add an 8s timeout to probeExecutable (killing Gatekeeper/XProtect stalls) and evict failed probes from execProbeCache so Retry re-probes cleanly. - Resolve bundled tools via resolveBundledTool instead of isBundledArchiveAvailable so unrunnable bundled binaries fall back to system PATH or manual/install flows, and honor valid manual overrides above bundled binaries. - Deduplicate concurrent in-flight checkPrerequisites() calls on startup.
…athPicker UX Refs #1553 - Sync newly discovered providers from setup:check and setup:set-tool-path into providerEnablement and broadcast provider-enablement:changed so PathPickerModal updates without an app restart. - When zero providers are enabled in PathPickerModal, show an inline Open Setup action and open a Terminal tab instead of silently submitting DEFAULT_PROVIDER ('claude'). - Prevent Enter inside SetupGate's manual path input from closing the dialog via DialogActions, expand leading ~/ in setup:set-tool-path, expose Change Path... on Found/Bundled provider rows, and render the error + Retry state when requested with check === null.
…tighten SetupGate Enter Refs #1553 Address PR review findings: - Add { force?: boolean } and monotonic checkGeneration to checkPrerequisites() so post-mutation callers never coalesce onto a stale pre-mutation check and older checks cannot clobber newer write-backs or toolchain state. - Add monotonic detectionGeneration guard in providerEnablement.ts so an older in-flight detectInstalledKinds() cannot overwrite a newer syncDetectedProvidersFromCheck(). - Keep mitmdump on lazy isBundledArchiveAvailable so fresh startup does not block on extracting an 87 MB tarball, while continuing to probe bare-binary opencode via resolveBundledTool. - Guard SetupGate manual path Enter with busy === null and hide DialogActions' Enter key chip while editing a path.
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.
Summary
Fixes the highest-impact fresh-user onboarding and setup dead ends found in our day-1 audit:
PathPickerModal—setup:checkandsetup:set-tool-pathnow sync newly detected providers intoproviderEnablementand broadcastprovider-enablement:changed(no restart required to see newly installed CLIs in⌘T). When 0 providers are enabled,PathPickerModaloffers Open Setup and a Terminal option instead of silently submittingclaude.probeExecutablenow has an 8s timeout (SIGKILLon hang) and evicts rejected entries fromexecProbeCacheso Retry works after clearing quarantine without restarting.prerequisites.tsprobes bundledopencodeviaresolveBundledTool(while keeping 87 MBmitmdumptarball extraction lazy) and honors valid manual overrides above bundled tools.SetupGateUX fixes — Pressing Enter in the manual path input submits the path without closingSetupGate(data-owns-enter+confirmOnEnter={false});setup:set-tool-pathexpands~/;Change Path…is available onFound/Bundledprovider rows;SetupGaterenders error state + Retry whenrequested && erroreven ifcheck === null..zprofile& missing macOS bin dirs + check dedupe —binaryResolver.tsreads the last non-empty line ofzsh -lcstdout and adds~/.local/share/mise/shims,~/Library/pnpm,~/.npm-global/bin, and~/.claude/local; concurrentcheckPrerequisites()calls deduplicate with{ force: true }+ monotonic generation guards on post-mutation callers.Linked Issues
Fixes #1553
Plan & Review Disposition (one round, independent read-only reviewer)
Plan:
docs/plans/2026-11-27-fresh-user-setup-and-bootstrap.mdcheckPrerequisites()coalescing across setup mutations611fb24ed({ force: true }+checkGenerationguard)detectInstalledKinds()andsyncDetectedProvidersFromCheck()611fb24ed(detectionGenerationguard)mitmdumptarball extraction on fresh launch611fb24ed(keptmitmdumplazy viaisBundledArchiveAvailable)busy === nullguard & left↩chip visible611fb24edVerification
npm run typecheck: passed (0 errors).npx vitest run src/main/setup/ src/main/ipc/setup.test.ts src/renderer/src/features/setup/ src/renderer/src/features/path-picker/ src/renderer/src/components/ui/dialog-actions.renderer.test.tsx: 15/15 files, 89/89 tests passed.