Skip to content

fix: show error state when repository status fails to load#1434

Open
The-AarushiSingh wants to merge 1 commit into
sourcebot-dev:mainfrom
The-AarushiSingh:fix-repo-indexed-guard-error-state-clean
Open

fix: show error state when repository status fails to load#1434
The-AarushiSingh wants to merge 1 commit into
sourcebot-dev:mainfrom
The-AarushiSingh:fix-repo-indexed-guard-error-state-clean

Conversation

@The-AarushiSingh

@The-AarushiSingh The-AarushiSingh commented Jul 11, 2026

Copy link
Copy Markdown

What changed

Replaced the placeholder return null error branch in RepoIndexedGuard with an inline error state using the shared Alert component.

This provides users with feedback when the repository status request fails instead of rendering a blank page.

Testing

Verified the component builds successfully.

Confirmed the change does not affect the existing loading, polling, or notification behavior.


Note

Low Risk
UI-only error handling in AskGH; no changes to API calls, auth, or indexing logic.

Overview
When the repo-status query in RepoIndexedGuard fails, users now see a centered destructive Alert (“Unable to load repository status”) instead of a blank page from the previous return null placeholder.

Imports add the shared Alert components and AlertCircle icon; indexing spinner, polling, and ready notifications are unchanged.

Reviewed by Cursor Bugbot for commit 0879eff. Bugbot is set up for automated code reviews on this repo. Configure here.

Summary by CodeRabbit

  • Bug Fixes
    • Added a visible error alert when repository information cannot be loaded.
    • The alert advises refreshing the page or trying again shortly.

@coderabbitai

coderabbitai Bot commented Jul 11, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 684f7596-9bf9-4c81-86e6-9ff42c2b39bc

📥 Commits

Reviewing files that changed from the base of the PR and between 53360a8 and 0879eff.

📒 Files selected for processing (1)
  • packages/web/src/app/(app)/askgh/[owner]/[repo]/components/repoIndexedGuard.tsx

Walkthrough

RepoIndexedGuard now renders a destructive alert with retry guidance when the repository indexing query enters an error state, using new alert UI primitives and an AlertCircle icon.

Changes

Repository indexing guard

Layer / File(s) Summary
Render indexing error alert
packages/web/src/app/(app)/askgh/[owner]/[repo]/components/repoIndexedGuard.tsx
Adds alert imports and replaces the error-state placeholder with a destructive alert containing an icon, title, description, and refresh/retry guidance.

Estimated code review effort: 2 (Simple) | ~5 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly matches the main change: replacing the blank error path with an inline repository status error state.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

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.

1 participant