Skip to content

fix: show an error, not the welcome, when issue radar repos fail to load - #47906

Open
winnythedev wants to merge 1 commit into
mainfrom
fix/issue-radar-repos-load-failure
Open

winnythedev wants to merge 1 commit into
mainfrom
fix/issue-radar-repos-load-failure

Conversation

@winnythedev

Copy link
Copy Markdown
Contributor

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)

  • Symptom: a failed /repos read renders <WelcomeCarousel/>.
  • Root cause: website/src/apps/issue-radar/IssueRadarPage.tsx reads reposQuery.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 reaches reposQuery.isError, which the page never read.
  • Change: before the first-run branch, render ErrorNotice (with askAgent, the read's error message) when reposQuery.isError && repos.length === 0. This is the same notice views/OverviewView.tsx and components/PrList.tsx show for a failed list. A failed background refetch over a cached list keeps the workspace; a list that loads empty still shows the welcome.
  • This is the same change as the app repository's fix, mirrored into core's wheel copy. website/scripts/capture-issue-radar-repos-load-failure.mjs is 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.tsx drives the real page with its heavy children mocked:

  • a 5xx shows the error notice, not the welcome or the workspace;
  • a request that never reaches the backend (Failed to fetch) shows the error notice;
  • a refetch that fails over a cached list keeps the workspace and shows no notice;
  • a list that loads empty still shows the welcome;
  • a list that loads with a repo still opens the workspace.

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, CarriedMockAnswerRatchet and chatSlice.ownership all pass; npm run build passes. Root: check_comment_history.py, check_brand_name.py, check_agent_sdk_boundary.py, check_file_line_cap.py, the flake pattern ratchet and semgrep 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's libffi, and the host lacks the pytest_split plugin), 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.

  • Found and dismissed (low): a failed refetch over a cached empty list shows the error rather than the welcome. The only in-tree invalidation on that path leaves the welcome right after, and the guard matches the app repository's fix, so the two copies stay the same change.
  • Found and dismissed (low): the notice has no retry control. The host ErrorNotice call sites for failed lists in this app carry none either; out of this goal.
  • The app repository's panel asked that the workspace assertions derive the expected identity from the fixture; both copies of the test do.

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 and Failed to fetch cases 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

/repos answers 503 with nothing cached, before (the welcome) and after (the error notice):

Before: a 503 shows the first-run welcome carousel
After: a 503 shows the error notice with Ask the agent

Real first run (the list loads empty), unchanged

After: an empty list still shows the welcome

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 branch

Checklist

  • A Conventional Commits title (feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...); PR Hygiene does not count commits
  • Existing tests pass and new tests added for new functionality
  • Self-review completed; code follows project style guidelines
  • Documentation updated (if applicable)
  • No secrets, credentials, or internal references in the diff

Contribution License Agreement

Contributions are accepted under the project's Apache-2.0 license.

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
@winnythedev
winnythedev requested review from a team and KiroCrewCaptain as code owners December 5, 2026 21:11
@winnythedev
winnythedev requested a review from CrysisDeu December 5, 2026 21:11
@github-actions github-actions Bot added the readiness: checking Automated validation is still running label Dec 5, 2026
@github-actions

github-actions Bot commented Dec 5, 2026

Copy link
Copy Markdown
Contributor

Design Review (Opus 5.5) — ✅ PASS

Design-level review of 3d26db693b7c326b7aaed5be4f88d6eec0c12029 — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS does not.

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 .github/scripts/pr-description-capture.sh over the same inputs; if it differs, the description or that evidence changed after this verdict was formed and any finding drawn from either is unproven.

@github-actions

github-actions Bot commented Dec 5, 2026

Copy link
Copy Markdown
Contributor

First Principles Review (Opus 5.5) — ✅ PASS

Premise-level review of 3d26db693b7c326b7aaed5be4f88d6eec0c12029 — why this exists and whether the shipped surface is the smallest honest version. Updated in place on each push. A BLOCK verdict blocks PR readiness; PASS does not.

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 ErrorNotice.

Notes

  • Item 3 — rides along: the capture script exists only to produce the PR screenshots, and nothing in the app runs it. Subtraction: delete website/scripts/capture-issue-radar-repos-load-failure.mjs, or keep it to match the existing per-PR capture-*.mjs scripts (992 of them).

What this change ships

Inventory (3 items) — 2 justified

Intent: 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.

  1. When the repository list fails to load and nothing is cached, the page shows an error notice instead of the first-run welcome — justified
  2. A new test file covers a failed read, an unreachable backend, a failed refetch over a cached list, an empty list and a loaded list — justified
  3. A new offline script captures screenshots of the failure and first-run states — rides along

[FIRST-PRINCIPLES-REVIEWED] 3d26db6

Description read

[DESCRIPTION-READ] 182a67159bab2c32054e908dce126f958c8d9faadf13faea2081b84f7fe38806

That sha256 names the PR description this verdict read. Recompute it with .github/scripts/pr-description-capture.sh; if it differs, the description changed after this verdict was formed and any finding drawn from the description is unproven.

@github-actions

github-actions Bot commented Dec 5, 2026

Copy link
Copy Markdown
Contributor

UX Review (Opus 5.5) — ✅ PASS

UX-level review of 3d26db693b7c326b7aaed5be4f88d6eec0c12029 — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS does not.

UX-Verdict: PASS

Nothing blocks. The change reuses the app's existing ErrorNotice for an async error state, and screenshots show both the 503 case and the empty first run.

Notes

  • The blind reader said "No retry or reload button -> I'm stuck except for asking the agent." The PR lists retry as a non-goal, so this is a follow-up rather than a fix here. A retry control next to "Ask the agent" would give the notice a way out besides the assistant.
  • The notice shows the backend's error text as-is, and the reader could make nothing of "backend" or "503". A plain-language lead line would help here, such as "Couldn't load your repositories". The raw detail can sit below it.

[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 .github/scripts/pr-description-capture.sh over the same inputs; if it differs, the description or that evidence changed after this verdict was formed and any finding drawn from either is unproven.

@github-actions

github-actions Bot commented Dec 5, 2026

Copy link
Copy Markdown
Contributor

Opus 5.5 Review — ✅ no blocking findings

Reviewed 3d26db693b7c326b7aaed5be4f88d6eec0c12029 — this comment is updated in place on each push.

Review details

No findings.

[OPUS-REVIEWED] 3d26db6

Verdict parsed from the review's SHA-scoped output markers for commit 3d26db693b7c326b7aaed5be4f88d6eec0c12029.

False positive or not applicable? A repository writer can comment:
/ai-review override fable 3d26db693b7c326b7aaed5be4f88d6eec0c12029 false-positive: <reason, 20 to 500 characters>

@github-actions

github-actions Bot commented Dec 5, 2026

Copy link
Copy Markdown
Contributor

GPT 6.1 Review — ✅ no blocking findings

GPT 6.1 completed its review of 3d26db693b7c326b7aaed5be4f88d6eec0c12029 and found no blocking issues.

This comment is updated in place on each push.

Review details

No findings.
[GPT-REVIEWED] 3d26db6

False positive or not applicable? A repository writer can comment:
/ai-review override gpt 3d26db693b7c326b7aaed5be4f88d6eec0c12029 false-positive: <reason, 20 to 500 characters>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

readiness: checking Automated validation is still running

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant