This repository was archived by the owner on Aug 6, 2026. It is now read-only.
Repository navigation
feat(code): show persistent error state for GitHub connect failures - #1998
Merged
k11kirky merged 1 commit intoMay 4, 2026
Conversation
This was referenced May 4, 2026
Contributor
Author
This was referenced May 4, 2026
k11kirky
marked this pull request as ready for review
May 4, 2026 11:58
Contributor
Prompt To Fix All With AIFix the following 1 code review issue. Work through them one at a time, proposing concise fixes.
---
### Issue 1 of 1
apps/code/src/renderer/features/inbox/components/list/GitHubConnectionBanner.tsx:44-45
**Redundant retry language in error label**
Most entries in `ERROR_MESSAGES` already end with "Please retry." or "Try again" phrasing. Appending `" Click to try again."` produces doubled retry prompts — e.g. `"GitHub returned an error during sign-in. Please retry. Click to try again."` — which reads awkwardly for the majority of error codes. Consider either stripping the retry CTA from the `ERROR_MESSAGES` strings or removing the suffix from the template literal.
Reviews (1): Last reviewed commit: "feat(code): show persistent error state ..." | Re-trigger Greptile |
Comment on lines
+44
to
+45
| const label = hasConnectError | ||
| ? `${describeGithubConnectError(error)} Click to try again.` |
Contributor
There was a problem hiding this comment.
Redundant retry language in error label
Most entries in ERROR_MESSAGES already end with "Please retry." or "Try again" phrasing. Appending " Click to try again." produces doubled retry prompts — e.g. "GitHub returned an error during sign-in. Please retry. Click to try again." — which reads awkwardly for the majority of error codes. Consider either stripping the retry CTA from the ERROR_MESSAGES strings or removing the suffix from the template literal.
Prompt To Fix With AI
This is a comment left during a code review.
Path: apps/code/src/renderer/features/inbox/components/list/GitHubConnectionBanner.tsx
Line: 44-45
Comment:
**Redundant retry language in error label**
Most entries in `ERROR_MESSAGES` already end with "Please retry." or "Try again" phrasing. Appending `" Click to try again."` produces doubled retry prompts — e.g. `"GitHub returned an error during sign-in. Please retry. Click to try again."` — which reads awkwardly for the majority of error codes. Consider either stripping the retry CTA from the `ERROR_MESSAGES` strings or removing the suffix from the template literal.
How can I resolve this? If you propose a fix, please make it concise.Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
jonathanlab
approved these changes
May 4, 2026
k11kirky
force-pushed
the
05-04-feat_code_show_persistent_error_state_for_github_connect_failures
branch
from
May 4, 2026 14:14
c7a6575 to
ed45726
Compare
k11kirky
force-pushed
the
05-04-feat_code_show_fast-path_github_sign-in_when_current_project_has_team_install
branch
from
May 4, 2026 14:14
a6ca4e0 to
0673016
Compare
Contributor
Author
k11kirky
changed the base branch from
05-04-feat_code_show_fast-path_github_sign-in_when_current_project_has_team_install
to
graphite-base/1998
May 4, 2026 14:47
k11kirky
force-pushed
the
05-04-feat_code_show_persistent_error_state_for_github_connect_failures
branch
from
May 4, 2026 14:56
ed45726 to
aa4423a
Compare
k11kirky
deleted the
05-04-feat_code_show_persistent_error_state_for_github_connect_failures
branch
May 4, 2026 15:04
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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
When a GitHub connection attempt fails, the error is shown as a toast notification that disappears quickly, leaving users with no clear indication of what went wrong or how to recover. Error codes returned from GitHub's OAuth flow are not translated into human-readable messages, making it difficult for users to understand and resolve the issue.
Changes
"error"state touseGithubUserConnect, replacing the previous behavior of silently resetting to"idle"and firing a toast on failureerrorobject and aresetfunction fromuseGithubUserConnectso callers can inspect and clear the errordescribeGithubConnectError, which maps known GitHub OAuth error codes (e.g.access_denied,invalid_state,installation_not_authorized) to plain-language messagesGitHubConnectionBannerto display the human-readable error message inline in the banner with a "Click to try again" prompt, resetting state on clickGitIntegrationStep(onboarding) to show the error message in red with "Try again" and "Dismiss" buttons instead of silently failing{ message, code }error objects throughuseGitHubIntegrationCallbackinstead of raw strings, enabling error-code-aware messaging across all connection surfaces