Skip to content

fix(ui): thread errorKind through dead-letter panel and app overview - #8780

Closed
nghetien wants to merge 2 commits into
JSONbored:mainfrom
nghetien:fix/issue-8668-a1-fix-ui-dead-letter
Closed

fix(ui): thread errorKind through dead-letter panel and app overview#8780
nghetien wants to merge 2 commits into
JSONbored:mainfrom
nghetien:fix/issue-8668-a1-fix-ui-dead-letter

Conversation

@nghetien

Copy link
Copy Markdown
Contributor

The dead-letter-queue panel and the app overview page were the only two of six useApiResource + ErrorState/StateBoundary call sites in apps/loopover-ui that never forwarded errorKind to the shared state-view components. Since ErrorState picks its icon (WifiOff vs AlertTriangle) based solely on that prop, both surfaces always showed the generic "something went wrong" treatment even when the failure was a genuine network/timeout issue, misleading users into thinking it was a data/server problem. The overview page also had no retry action wired up for that error state.

This threads resource.errorKind / overview.errorKind through at both call sites, matching the pattern already used by the four correct siblings (notification-readiness-card.tsx, app.operator.tsx, app.analytics.tsx, app.runs.tsx), and adds the missing onRetry handler to the overview's error state.

Added regression tests at both call sites asserting a network-kind failure renders the WifiOff icon (not AlertTriangle), a control case for a non-network kind, and a test that clicking retry on the overview error state re-triggers the fetch.

Closes #8668

Validation

  • npx turbo run build --filter=@loopover/engine/mcp/miner/ui-kit
  • npm run actionlint, npm run typecheck
  • npx turbo run lint --filter=@loopover/ui --filter=@loopover/ui-miner
  • npm test, npm run test:workers
  • npm run ui:typecheck, npm --workspace @loopover/ui run test, npm --workspace @loopover/ui-miner run test

nghetien added 2 commits July 26, 2026 10:14
The dead-letter-queue panel and the app overview page were the only two
of six useApiResource/ErrorState call sites that never forwarded
errorKind, so a network/timeout failure showed the generic
"something went wrong" icon instead of the offline-specific one. Also
add a missing onRetry handler to the overview's error state, matching
the other call sites.
@nghetien
nghetien requested a review from JSONbored as a code owner July 26, 2026 04:48
@superagent-security

Copy link
Copy Markdown
Contributor

Superagent didn't find any vulnerabilities or security issues in this PR.

@loopover-orb loopover-orb Bot added the gittensor:bug Gittensor-scored bug fix — scores a 0.05x multiplier. label Jul 26, 2026
@loopover-orb

loopover-orb Bot commented Jul 26, 2026

Copy link
Copy Markdown
Contributor

Tip

✅ LoopOver review result - approve/merge recommended

Review updated: 2026-07-26 04:54:34 UTC

4 files · 1 AI reviewer · no blockers · readiness 95/100 · CI green · clean

✅ Suggested Action - Approve/Merge

  • safe to merge

Review summary
This is a small, well-targeted fix that threads `errorKind` through the two remaining `useApiResource`+`ErrorState`/`StateBoundary` call sites that were missing it, matching the pattern already used elsewhere in the app, and adds a missing `onRetry` on the overview error state. The diff is minimal, the change is mechanical and low-risk, and it's backed by targeted regression tests asserting the `WifiOff` vs `AlertTriangle` icon and the retry click re-triggering `reload`. The `export` added to `AppOverview` is only to make it testable and matches the existing `SparkStat` export pattern in the same file.

Nits — 3 non-blocking
  • apps/loopover-ui/src/routes/app.index.test.tsx and dead-letter-queue-panel.test.tsx: the two errorKind tests are near-identical in shape across both files — consider extracting a small shared test helper for asserting the WifiOff/AlertTriangle icon swap given an errorKind, to cut duplication.
  • apps/loopover-ui/src/routes/app.index.tsx:178: no secondaryAction/onRefresh equivalent is wired for the overview error state, unlike DeadLetterQueuePanel's StateBoundary which also passes onRefresh — worth confirming that asymmetry is intentional since ErrorState supports it.
  • Consider adding a one-line comment near the errorKind prop in dead-letter-queue-panel.tsx explaining why it's conditioned on resource.status === 'error' (isMalformed doesn't have a kind), to preempt a future accidental removal of that guard.

Decision drivers

  • ✅ Code review — No blockers (1 reviewer)
  • ✅ Gate result — Passing (No configured blocker found.)
Context & advisory signals — never blocks the verdict
Signal Result Evidence
Linked issue ✅ Linked #8668
Related work ✅ No active overlap found No same-issue or scoped active PR overlap found.
Change scope ✅ 20/20 Low review scope from cached public metadata (1 linked issue).
Validation posture ✅ 25/25 PR body includes validation/test evidence.
Contributor workload ✅ 10/10 Author activity: 2 registered-repo PR(s), 0 merged, 0 issue(s).
Contributor context ✅ Confirmed Gittensor contributor nghetien; Gittensor profile; 2 PR(s), 0 issue(s).
Improvement ✅ Minor risk: clean · value: minor
Linked issue satisfaction

Addressed
The diff threads errorKind into both previously-broken call sites (dead-letter-queue-panel.tsx and app.index.tsx) exactly matching the sibling pattern, adds the missing onRetry handler to the overview error state, and includes new tests at both sites asserting WifiOff renders for network-kind failures versus AlertTriangle for other kinds, plus a retry-triggers-reload test.

Review context
  • Author: nghetien
  • Role context: outside_contributor
  • Public audience mode: oss maintainer
  • Lane context: Repository is configured for direct PR review.
  • Public profile languages: not available
  • Official Gittensor activity: 2 PR(s), 0 issue(s).
  • PR-specific overlap: none found.
Contributor next steps
  • Start here: Triage stale or unlinked PRs.
Signal definitions
  • Related work = same linked issue, overlapping active PRs, or title/path similarity.
  • Change scope = cached public metadata such as size labels, draft state, and review-burden hints.
  • Validation posture = whether the PR provides enough public validation/test evidence for maintainer review.
  • Contributor workload = public contributor activity and cleanup pressure, not a repo-wide quality failure.
  • Contributor context = public GitHub/Gittensor identity context; non-Gittensor status is not a blocker.
🧪 Chat with LoopOver

Ask LoopOver a question about this PR directly in a comment — grounded only in the same cached, public-safe facts shown above, never a new claim.

  • @loopover ask <question> answers contribution-quality Q&A with source citations and freshness.
  • @loopover chat <question> answers in natural prose from cached decision-pack facts via local inference (maintainer/collaborator; read-only).
  • A plain-language @loopover mention with a real question is routed to the closest matching read-only command automatically — no exact syntax required.

Full command reference: https://loopover.ai/docs/loopover-commands

🧪 Experimental — new and may change.

Visual preview
Route Viewport Before (production) After (this PR's preview) Diff
/app/test desktop before /app/test
before /app/test
after /app/test
after /app/test
/app/test mobile before /app/test (mobile)
before /app/test (mobile)
after /app/test (mobile)
after /app/test (mobile)
/app desktop before /app
before /app
after /app
after /app
/app mobile before /app (mobile)
before /app (mobile)
after /app (mobile)
after /app (mobile)

Click any thumbnail to open the full-size screenshot. Before = production · After = this PR's preview deploy.

Scroll preview
Route Before (production) After (this PR's preview)
/app/test before /app/test (scroll)
before /app/test (scroll)
after /app/test (scroll)
after /app/test (scroll)
/app before /app (scroll)
before /app (scroll)
after /app (scroll)
after /app (scroll)

A short scroll-through clip (desktop) — click either thumbnail to open the full animation. Evidence for scroll-linked behavior a single screenshot can't show.

🟩 Safe / merged · 🟦 Advisory · 🟨 Held for review · 🟥 Blocked / closed


💰 Earn for open-source contributions like this. Gittensor lets GitHub contributors earn for the work they already do — register to start earning →.

Checked by LoopOver, a quiet PR intelligence layer for OSS maintainers.

  • Re-run LoopOver review

@loopover-orb

loopover-orb Bot commented Jul 26, 2026

Copy link
Copy Markdown
Contributor

This pull request changes UI/visual code but its screenshot evidence is incomplete. Every required viewport × theme combination needs its own before/after image pair in a labeled table row (e.g. "Desktop · Light | before | after"). Still missing: Desktop · Dark, Tablet · Dark, Mobile · Dark.

Please resubmit with the remaining rows filled in.

See https://github.com/JSONbored/loopover/blob/main/.claude/skills/contributing-to-loopover/SKILL.md for the exact format and examples. This is an automated maintenance action.

@loopover-orb loopover-orb Bot closed this Jul 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gittensor:bug Gittensor-scored bug fix — scores a 0.05x multiplier.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(ui): dead-letter-queue panel and app overview never pass errorKind, showing the generic error icon instead of the offline one

1 participant