Skip to content

fix(ui): use the info tone for unrecognized skip reasons in the audit feed - #8752

Merged
loopover-orb[bot] merged 1 commit into
JSONbored:mainfrom
rsnetworkinginc:fix-skip-reason-tone-8666-v2
Jul 26, 2026
Merged

fix(ui): use the info tone for unrecognized skip reasons in the audit feed#8752
loopover-orb[bot] merged 1 commit into
JSONbored:mainfrom
rsnetworkinginc:fix-skip-reason-tone-8666-v2

Conversation

@rsnetworkinginc

Copy link
Copy Markdown
Contributor

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.reason is a plain string at the API boundary (the same intentional widening as contributor-quality-table-model.ts's band: 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, mirroring contributor-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 on main before the fix:

Deliverable Test Before (main) After
Fallback returns "info", not "ready" direct skipReasonTone("legacy_skip_reason") assertion (plus ""), exercising the previously zero-coverage fallback branch failed: expected 'ready' to be 'info' passes
Rendered pill is not the ready tone renders <AuditFeed /> with an unmapped reason: "legacy_skip_reason" item and asserts the pill's classes contain the info tone (text-mint) and not the ready tone (text-success) failed: pill rendered border-success/40 bg-success/10 text-success passes
Enumerated reasons unchanged asserts all six enumerated values keep their exact current tones (info/warn/degraded); existing surface_off render tests untouched passes passes

Full file run: 17/17 passing; tsc --noEmit clean; prettier/eslint clean on both changed files; git diff --check clean.

UI Evidence

The /app/audit skipped-PR audit feed, served locally (vite dev, 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 the LEGACY SKIP REASON pill 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 like BOT 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 emulated prefers-color-scheme) render identically by design.

Viewport · Theme Before After
Desktop · Light Desktop light before — legacy reason pill in green ready tone Desktop light after — legacy reason pill in neutral info tone
Desktop · Dark Desktop dark before — legacy reason pill in green ready tone Desktop dark after — legacy reason pill in neutral info tone
Tablet · Light Tablet light before — legacy reason pill in green ready tone Tablet light after — legacy reason pill in neutral info tone
Tablet · Dark Tablet dark before — legacy reason pill in green ready tone Tablet dark after — legacy reason pill in neutral info tone
Mobile · Light Mobile light before — legacy reason pill in green ready tone Mobile light after — legacy reason pill in neutral info tone
Mobile · Dark Mobile dark before — legacy reason pill in green ready tone Mobile dark after — legacy reason pill in neutral info tone

… 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-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 02:54:09 UTC

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

✅ Suggested Action - Approve/Merge

  • safe to merge

Review summary
This narrowly targets skipReasonTone's fallback in audit-feed-model.ts, changing an unrecognized skip reason from the green 'ready' tone to the neutral 'info' tone, matching the stated convention in contributor-quality-table-model.ts. The four enumerated reason branches are untouched, so existing behavior for known reasons is preserved — only the fallback for unmapped/legacy values changes. New tests directly exercise both the pure function and the rendered pill's class list (text-mint vs text-success), giving real coverage for a branch that previously had none.

Nits — 4 non-blocking
  • The screenshot evidence provided alongside this review shows no visible difference between before/after captures of the audit feed — likely because the capture fixture never included an unrecognized/legacy reason, but worth confirming the screenshots actually exercised the changed code path before relying on them as visual proof.
  • apps/loopover-ui/src/components/site/audit-feed-model.ts:128-131 — the inline comment explaining the widening rationale is a bit long for a one-line fallback; could be trimmed to just 'unrecognized reason degrades to neutral, never ready' since the fuller rationale lives in the PR description.
  • Consider whether `formatSkipReason`'s replaceAll('_',' ') fallback (used for the same unmapped-reason case) should also be covered by a dedicated test in this PR since it's part of the same code path being hardened.
  • Possible screenshot-table issue: pair 1 — Advisory only — verify the screenshot-table images against the stated change before deciding.

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 #8666
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: 58 registered-repo PR(s), 24 merged, 3 issue(s).
Contributor context ✅ Confirmed Gittensor contributor rsnetworkinginc; Gittensor profile; 58 PR(s), 3 issue(s).
Improvement ✅ Minor risk: clean · value: minor · LLM: minor
Linked issue satisfaction

Addressed
The diff changes skipReasonTone's fallback from "ready" to "info", leaving the four enumerated reason mappings untouched, and adds new tests directly exercising the fallback branch (both the pure function and the rendered pill) that assert the tone is "info" and not "ready".

Review context
  • Author: rsnetworkinginc
  • Role context: outside_contributor
  • Public audience mode: oss maintainer
  • Lane context: Repository is configured for direct PR review.
  • Public profile languages: TypeScript
  • Official Gittensor activity: 58 PR(s), 3 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 &lt;question&gt; answers contribution-quality Q&A with source citations and freshness.
  • @loopover chat &lt;question&gt; 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
/ desktop before /
before /
after /
after /
/ mobile before / (mobile)
before / (mobile)
after / (mobile)
after / (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)
/ before / (scroll)
before / (scroll)
after / (scroll)
after / (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 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LoopOver approves — the gate is satisfied and CI is green.

@loopover-orb
loopover-orb Bot merged commit 3919604 into JSONbored:main Jul 26, 2026
8 checks passed
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): skipReasonTone's fallback for an unrecognized skip reason renders a misleading 'ready' (green) tone

1 participant