Repository navigation
fix: show an error, not the welcome, when issue radar repos fail to load - #47906
winnythedev wants to merge 1 commit into
Conversation
Issue Radar's page folded a failed /repos read into an empty list, and an empty list opens the first-run welcome carousel. A 5xx, an expired sign-in or a request that never reached the backend therefore told a person with connected repositories to connect their first one. Render ErrorNotice (with Ask agent) when the read failed and nothing is cached, before the first-run branch. A failed background refetch over a cached list keeps the workspace, and a list that loads empty still shows the welcome. This mirrors the fix in the app repository so the wheel copy core still ships carries it too: KiroCrewCaptain/kirocrew-app-issue-radar#19
Design Review (Opus 5.5) — ✅ PASSDesign-level review of Design-Verdict: PASS The fix is a small render guard in the right place, the app repository already merged the same change, and the screenshots show this revision. Notes
[DESIGN-REVIEWED] 3d26db6 Description read[DESCRIPTION-READ] d881009e778c3056fe3335ab9e683da4d46326712b568a471fd6040e732af0c6 That sha256 names everything this verdict read: the PR description, plus the 1 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with |
First Principles Review (Opus 5.5) — ✅ PASSPremise-level review of First-Principles-Verdict: PASS Nothing blocks. The fix works on the cause: a failed read was being treated as an empty list. It reuses the shared Notes
What this change shipsInventory (3 items) — 2 justifiedIntent: when Issue Radar can't read its repository list, the person sees that the read failed, not a prompt to connect repositories they already have. This is a FIX.
[FIRST-PRINCIPLES-REVIEWED] 3d26db6 Description read[DESCRIPTION-READ] 182a67159bab2c32054e908dce126f958c8d9faadf13faea2081b84f7fe38806 That sha256 names the PR description this verdict read. Recompute it with |
UX Review (Opus 5.5) — ✅ PASSUX-level review of UX-Verdict: PASS Nothing blocks. The change reuses the app's existing Notes
[UX-REVIEWED] 3d26db6 Description read[DESCRIPTION-READ] 8585aa3999720c2a68f8e2061775a9dd299d2ec73afc78f79172774f58d37230 That sha256 names everything this verdict read: the PR description, plus the 6 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with |
Opus 5.5 Review — ✅ no blocking findingsReviewed Verdict parsed from the review's SHA-scoped output markers for commit False positive or not applicable? A repository writer can comment: |
GPT 6.1 Review — ✅ no blocking findingsGPT 6.1 completed its review of This comment is updated in place on each push. Review detailsNo findings. False positive or not applicable? A repository writer can comment: |
Problem / Motivation
Goal: When Issue Radar cannot read its repository list, the page says the read failed instead of showing the first-run welcome.
When the repository list fails to load (a 5xx, an expired sign-in, or a request that never reaches the backend) and nothing is cached, the Issue Radar page shows the first-run welcome carousel, as if every connected repository were gone, and invites the person to connect them again.
Why it matters
A person with connected repositories is told they have none and is pushed into the connect flow, while the real problem (the backend is down or the sign-in expired) is never shown. Core still ships this page as the wheel copy of the adopted Issue Radar app, so every install that runs the wheel copy carries the bug until the copy is gone.
Not a goal
What changed (motivation → approach → change)
/reposread renders<WelcomeCarousel/>.website/src/apps/issue-radar/IssueRadarPage.tsxreadsreposQuery.data?.repos ?? [], so a failed read becomes an empty list, and an empty list is the first-run branch.issueRadarApi.repos()already throws on a failed response, so the failure reachesreposQuery.isError, which the page never read.ErrorNotice(withaskAgent, the read's error message) whenreposQuery.isError && repos.length === 0. This is the same noticeviews/OverviewView.tsxandcomponents/PrList.tsxshow for a failed list. A failed background refetch over a cached list keeps the workspace; a list that loads empty still shows the welcome.website/scripts/capture-issue-radar-repos-load-failure.mjsis the offline harness that made the screenshots below.App repo: KiroCrewCaptain/kirocrew-app-issue-radar#21
The app pull request merged as KiroCrewCaptain/kirocrew-app-issue-radar@4928f81.
Backwards compatibility
Compatible: only the render branch for a failed read with nothing cached changes; every loaded state renders as before.
Removes nothing: the diff adds one render branch, one test file and one capture script; nothing is hidden, deleted or renamed.
Tests
New
website/src/apps/issue-radar/IssueRadarPage.reposLoadFailure.test.tsxdrives the real page with its heavy children mocked:Failed to fetch) shows the error notice;On base the first two fail (the page renders the welcome) and the other three pass; with the fix all 5 pass. The test waits on query state, with no sleeps or timers.
Proof: not provable -- frontend test (prove.py runs Python only)
Gate on Linux x86_64: the issue-radar vitest files plus every file naming
IssueRadarPage(95 files, 1,687 tests),npx tsc -p tsconfig.app.json --noEmit, eslint on the touched files,CarriedMockAnswerRatchetandchatSlice.ownershipall pass;npm run buildpasses. Root:check_comment_history.py,check_brand_name.py,check_agent_sdk_boundary.py,check_file_line_cap.py, the flake pattern ratchet andsemgrep scan --config semgrep/ --baseline-commit <merge-base> --error(1.78.0) pass.scripts/local-gate.py --tree-scans: the related frontend tests pass; the related backend shards fail only on host-only tests (child Python with a scrubbed environment cannot load this host'slibffi, and the host lacks thepytest_splitplugin), none of which this website-only diff reaches.Review (multi-model interrogate)
Independent reviewers read the full diff against CI's own GPT and Opus lane contracts, then one final re-check of the finished diff.
ErrorNoticecall sites for failed lists in this app carry none either; out of this goal.Manual verification
N/A — unit coverage sufficient: the page's render branches are driven by the vitest file above, and the screenshots below show the built SPA.
Real-machine verification
Machine: own computer, Linux x86_64.
Before (main):
npx vitest run src/apps/issue-radar/IssueRadarPage.reposLoadFailure.test.tsx-> 2 failed, 3 passed (the 5xx andFailed to fetchcases render the welcome).After (head): the same command -> 5 passed.
Cleanup: own computer, nothing to delete. No live run was done: no gateway was started; the fix is proven by vitest on the real page and by the built SPA served offline.
Screenshots / video
/reposanswers 503 with nothing cached, before (the welcome) and after (the error notice):Real first run (the list loads empty), unchanged
Captured from the built SPA by
website/scripts/capture-issue-radar-repos-load-failure.mjs, every/api/**answered from fixtures.Related Issues
Part of KiroCrewCaptain/kirocrew-app-issue-radar#19
Overlap: open maintainer PR #47721 (pin issue-radar 0.1.4 and delete its core copy) removes
website/src/apps/issue-radar/entirely. If #47721 lands first, this mirror is moot. No other open PR touches these files.Sibling sweep
Swept: git grep -n "WelcomeCarousel" -- website/src/apps/issue-radar/
Siblings: none -- the welcome is rendered from IssueRadarPage only; the other failed lists (OverviewView, PrList) already render ErrorNotice
Pattern harvest
Rule candidate: review-prompt
Pattern: a failed query folded into an empty default (
data?.x ?? []) that then selects an empty-state or onboarding branchChecklist
feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...); PR Hygiene does not count commitsContribution License Agreement
Contributions are accepted under the project's Apache-2.0 license.