Repository navigation
Add a setup window that checks for claude and gh on first launch - #78
Merged
Merged
Conversation
The project instructions now say the maintainer decides every real choice, with a recommendation and the reason, and that new code takes the shape of similar existing code.
A fresh install opens a setup window before the main window. It lists claude (required) and gh (optional), says whether each is found, and links to their install pages. Continue stays off until claude is found. Nothing is installed. Settings has a Check setup button, and the missing-claude toast offers the same window again. Every check first reads the PATH again, from the registry on Windows and from the login shell on macOS, so a tool installed since Claudiu started is found without a restart. The window gives its claude path back to the main window, which saves it. The Done event is delivered before the window is removed, so a path typed in a reopened window is not lost. Refs #57
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This branch was successfully deployed
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
src/app/setup.rsholds the window.main.rsopens the main window throughopen_main_window.platform::reload_pathreads the PATH again before each check. Windows reads the registry. macOS runs the login shell and reads its PATH between markers, with a 5 second limit.github::cligetsAuthState,Gh::auth_statusandcheck_auth.Store::is_first_launchdecides whether the window shows.sign_in_to_githubso both windows share it.The branch also carries two commits that are not part of #57: the project instructions in
CLAUDE.md, and an ellipsis for the top bar's folder path.Evidence
Before the fix, a test for closing the reopened window failed. The Done event never reached the main window, so a path typed there was lost:
After: 251 tests pass, 17 ignored. I also drove the debug build on Windows through first launch, the path field, Continue, Settings > Check setup, signing in, and Close. The maintainer checked the missing
claudeandghstates by hand with a temporary switch, which is removed in this PR.Not run: anything on macOS. CI runs the tests there for this PR.
Risk
Easy to undo. It adds a window and a few functions, and the only saved setting it touches is
claude_path. Existing users already have a state file, so they never see the window.The macOS login-shell code has not run on a Mac. It starts an interactive login shell on every check and gives up after 5 seconds, leaving the PATH as it was. The Windows reload changes this process's PATH with
set_var, which std documents as safe on Windows.Refs #57