fix(ui): use the info tone for unrecognized skip reasons in the audit feed - #8752
Conversation
… instead of ready skipReasonTone fell back to the green ready tone for any reason string outside the four enumerated skip reasons, so an unrecognized/legacy value from the API rendered as a healthy-looking pill in the audit feed. Mirror the established convention from contributor-quality-table-model (band: string degrades to a neutral pill): the fallback now returns info. Adds direct fallback-branch coverage and a render test asserting an unmapped reason never gets the ready tone; the four enumerated reasons keep their existing tones.
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
|
Tip ✅ LoopOver review result - approve/merge recommendedReview updated: 2026-07-26 02:54:09 UTC
Review summary Nits — 4 non-blocking
Decision drivers
Context & advisory signals — never blocks the verdict
Linked issue satisfactionAddressed Review context
Contributor next steps
Signal definitions
🧪 Chat with LoopOverAsk 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.
Full command reference: https://loopover.ai/docs/loopover-commands 🧪 Experimental — new and may change. Visual preview
Click any thumbnail to open the full-size screenshot. Before = production · After = this PR's preview deploy. Scroll preview
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.
|


Closes #8666
Problem
skipReasonTone(apps/loopover-ui/src/components/site/audit-feed-model.ts) falls back to"ready"— the green, healthy-looking tone — for any reason string outside the four enumerated skip reasons.SkippedPrAuditItem.reasonis a plainstringat the API boundary (the same intentional widening ascontributor-quality-table-model.ts'sband: string), so a new or legacy backend skip reason silently rendered in the audit feed as a green "ready" pill, implying a positive state for something actually unclassified — contrary to the sibling model's explicit "an unrecognized value degrades to a neutral pill" convention.Fix
The fallback branch now returns the neutral
"info"tone, mirroringcontributor-quality-table-model.ts's established convention. None of the four enumerated reasons map to"ready", so no enumerated reason's behavior changes — only the unrecognized-value fallback.Tests (new coverage for a branch that had none)
Added to
apps/loopover-ui/src/components/site/audit-feed.test.tsx, both red onmainbefore the fix:"info", not"ready"skipReasonTone("legacy_skip_reason")assertion (plus""), exercising the previously zero-coverage fallback branchexpected 'ready' to be 'info'<AuditFeed />with an unmappedreason: "legacy_skip_reason"item and asserts the pill's classes contain the info tone (text-mint) and not the ready tone (text-success)border-success/40 bg-success/10 text-successinfo/warn/degraded); existingsurface_offrender tests untouchedFull file run: 17/17 passing;
tsc --noEmitclean; prettier/eslint clean on both changed files;git diff --checkclean.UI Evidence
The
/app/auditskipped-PR audit feed, served locally (vitedev, preview session per the contributor skill) with the audit export API answered at the network boundary by a fixture that includes one unrecognized reason (legacy_skip_reason) alongside enumerated ones — the only way to exercise this fallback, since it is unreachable while the backend only emits the enumerated reasons. Look at theLEGACY SKIP REASONpill on PR #38: before, it renders in the green "ready" tone (identical to a healthy state); after, it renders in the neutral "info" (mint) tone likeBOT AUTHOR. Enumerated pills (SURFACE OFF,BOT AUTHOR,MISSING AUTHOR) are identical in both columns. The UI is a dark-mode-only build, so the Light and Dark rows (captured under emulatedprefers-color-scheme) render identically by design.