Skip to content

fix(github-app-selector): Fix error handling#6654

Merged
regdocs merged 1 commit into
developfrom
fix-github-app-selector
Jun 11, 2026
Merged

fix(github-app-selector): Fix error handling#6654
regdocs merged 1 commit into
developfrom
fix-github-app-selector

Conversation

@regdocs

@regdocs regdocs commented Jun 10, 2026

Copy link
Copy Markdown
Member

No description provided.

@regdocs regdocs requested review from siduck and ssiyad as code owners June 10, 2026 04:10
@greptile-apps

greptile-apps Bot commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

Confidence Score: 2/5

The component renders a blank UI for new users (the primary onboarding path) and can still throw in certain error states; merging as-is leaves GitHub authorization broken for first-time users.

Both action buttons are now gated behind !!requiresReAuth, which evaluates to false/undefined whenever there is no "Bad credentials" error. A brand-new user who has never connected GitHub will reach the not-authorized branch with no error present, requiresReAuth returns undefined, and neither the buttons block nor the error-message block renders — the component is visually empty and the user has no path forward. Additionally, requiresReAuth still calls .messages.some() with a regular dot, so any error response that lacks a messages array (e.g. a network timeout) throws a TypeError before the template can display anything. These are not speculative edge cases; they are reachable on every first-visit and on any transient network failure.

dashboard/src/components/GitHubAppSelector.vue — specifically the requiresReAuth computed and the template block at lines 6–28.

Important Files Changed

Filename Overview
dashboard/src/components/GitHubAppSelector.vue Partial error-handling refactor: nests both action buttons inside a requiresReAuth guard that evaluates to undefined for new users, leaving the component blank in the primary onboarding case; requiresReAuth still throws when error.messages is absent.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[options resource loads] --> B{options.loading?}
    B -- yes --> C[Show LoadingText]
    B -- no --> D{options.authorized?}
    D -- yes --> E[Show repo/branch selectors]
    D -- no --> F{"!!requiresReAuth?"}
    F -- "true - Bad credentials error" --> G[Show Re-authorize + Connect buttons]
    F -- "false or undefined" --> H{"error.messages[0] truthy?"}
    H -- yes --> I[Show ErrorMessage only - no recovery action]
    H -- no --> J[Render nothing - new users land here]
Loading

Reviews (6): Last reviewed commit: "fix(github-app-selector): Show proper gh..." | Re-trigger Greptile

Comment thread dashboard/src/components/GitHubAppSelector.vue Outdated
Comment thread dashboard/src/components/GitHubAppSelector.vue
@codecov-commenter

codecov-commenter commented Jun 10, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 47.45763% with 31 lines in your changes missing coverage. Please review.
✅ Project coverage is 62.85%. Comparing base (5c0a5f4) to head (278e7a9).
⚠️ Report is 61 commits behind head on develop.

Files with missing lines Patch % Lines
dashboard/src/components/GitHubAppSelector.vue 47.45% 31 Missing ⚠️

❌ Your patch status has failed because the patch coverage (47.45%) is below the target coverage (75.00%). You can increase the patch coverage or adjust the target coverage.

Additional details and impacted files
@@             Coverage Diff              @@
##           develop    #6654       +/-   ##
============================================
+ Coverage    50.17%   62.85%   +12.67%     
============================================
  Files          990      117      -873     
  Lines        83021    18093    -64928     
  Branches       523      526        +3     
============================================
- Hits         41659    11373    -30286     
+ Misses       41330     6688    -34642     
  Partials        32       32               
Flag Coverage Δ
dashboard 62.85% <47.45%> (+0.06%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@ssiyad

ssiyad commented Jun 10, 2026

Copy link
Copy Markdown
Member

@greptileai rereview

@regdocs regdocs force-pushed the fix-github-app-selector branch from c6e6494 to 350bb5a Compare June 10, 2026 17:20
@regdocs

regdocs commented Jun 10, 2026

Copy link
Copy Markdown
Member Author

@greptileai rereview

Comment thread dashboard/src/components/GitHubAppSelector.vue
Comment thread dashboard/src/components/GitHubAppSelector.vue
@regdocs regdocs force-pushed the fix-github-app-selector branch from 350bb5a to 278e7a9 Compare June 11, 2026 03:52
@regdocs

regdocs commented Jun 11, 2026

Copy link
Copy Markdown
Member Author

@greptileai rereview

@regdocs regdocs merged commit 031c821 into develop Jun 11, 2026
12 checks passed
@regdocs regdocs deleted the fix-github-app-selector branch June 11, 2026 04:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants