feat: Polish onboarding, tour and branch checkout flows#2047
Open
charlesvien wants to merge 9 commits intomainfrom
Open
feat: Polish onboarding, tour and branch checkout flows#2047charlesvien wants to merge 9 commits intomainfrom
charlesvien wants to merge 9 commits intomainfrom
Conversation
Member
Author
This stack of pull requests is managed by Graphite. Learn more about stacking. |
Contributor
Prompt To Fix All With AIFix the following 2 code review issues. Work through them one at a time, proposing concise fixes.
---
### Issue 1 of 2
apps/code/src/main/services/git/service.ts:307-318
**Heuristic can report the wrong error cause**
`getStatus` is called only after the checkout has already failed, so the presence of local changes isn't proof that they caused the failure. If checkout fails for an unrelated reason — e.g., the branch name doesn't exist locally (stale branch list), a git configuration error, or the saga returns an error for any other cause — but the working tree also happens to have modified files, `hasLocalChanges` will be `true` and a `PRECONDITION_FAILED` is thrown with "uncommitted changes would be overwritten". The user stashes their work, retries, and gets a completely different failure. Tying the error code to the presence of unrelated local changes produces actively misleading UX.
### Issue 2 of 2
apps/code/src/renderer/App.tsx:161-166
**Unhandled rejection if `disableFocus` throws**
The `onData` handler is `async` but has no `try/catch`. If `disableFocus` (or the underlying `runDisableFocusSaga`) throws instead of returning `{success: false}`, the exception propagates as an unhandled promise rejection and the toast is never shown. The result check only handles the "graceful failure" path; the exceptional path is uncovered. Wrapping in `try/catch` and showing a toast in the `catch` block would close this gap, in line with the project convention of always handling async failures.
Reviews (1): Last reviewed commit: "surface dirty-tree error on branch check..." | Re-trigger Greptile |
k11kirky
approved these changes
May 6, 2026
7bbd3cb to
23df09d
Compare
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.

Problem
A grab-bag of onboarding and first session UX nits.
Changes
How did you test this?
Manually
Publish to changelog?