Skip to content

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

Closed
rsnetworkinginc wants to merge 1 commit into
JSONbored:mainfrom
rsnetworkinginc:fix-skip-reason-tone-fallback-8666
Closed

fix(ui): use the info tone for unrecognized skip reasons in the audit feed#8726
rsnetworkinginc wants to merge 1 commit into
JSONbored:mainfrom
rsnetworkinginc:fix-skip-reason-tone-fallback-8666

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.

… 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 01:15:29 UTC

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

✅ Suggested Action - Approve/Merge

  • safe to merge

Review summary
This is a narrow, well-targeted one-line fix: skipReasonTone's fallback branch now returns 'info' instead of 'ready' for any skip reason string outside the four enumerated values, preventing an unrecognized/legacy reason from rendering as a misleading green 'ready' pill. The change is correct — none of the four enumerated reasons map to 'ready', so no existing behavior changes, only the unclassified fallback. Tests directly exercise the changed branch both at the unit level (skipReasonTone) and through the rendered component (asserting text-mint not text-success), which is solid, targeted coverage for a one-line change.

Nits — 3 non-blocking
  • The inline comment in audit-feed-model.ts:128-130 is a bit verbose for a one-line fallback change; a shorter note would suffice.
  • No test explicitly reasserts formatSkipReason's independent fallback path in combination with the new tone (minor, since formatSkipReason itself is untouched).
  • Consider trimming the 3-line comment above the fallback return to a single line summarizing the API-boundary widening rationale.

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

Addressed
The diff changes skipReasonTone's fallback branch from "ready" to "info" exactly as required, leaves the four enumerated reason mappings untouched, and adds a new direct unit test plus a rendered-component test asserting the fallback yields the info tone and not the ready tone for an unrecognized reason.

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: 55 PR(s), 3 issue(s).
  • PR-specific overlap: none found.
Contributor next steps
  • Keep the PR focused and include validation evidence before maintainer review.
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 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): skipReasonTone's fallback for an unrecognized skip reason renders a misleading 'ready' (green) tone

1 participant