Skip to content

fix(ui): degrade an unrecognized skip reason to neutral 'info' tone, not 'ready' (#8666) - #8717

Closed
RealDiligent wants to merge 1 commit into
JSONbored:mainfrom
RealDiligent:fix/critical-issue-skip-reason-tone-8666
Closed

fix(ui): degrade an unrecognized skip reason to neutral 'info' tone, not 'ready' (#8666)#8717
RealDiligent wants to merge 1 commit into
JSONbored:mainfrom
RealDiligent:fix/critical-issue-skip-reason-tone-8666

Conversation

@RealDiligent

Copy link
Copy Markdown
Contributor

Problem

Closes #8666.

apps/loopover-ui/src/components/site/audit-feed-model.ts's skipReasonTone fell back to "ready" — a green, healthy-looking tone — for an unrecognized reason string. None of the four enumerated reasons map to "ready"; it existed solely as the fallback for an unrecognized value. SkippedPrAuditItem.reason is typed as plain string, so if the backend emits a new or legacy skip reason, the audit feed silently displays it as a successful-looking "ready" pill rather than flagging it as unclassified.

The sibling contributor-quality-table-model.ts degrades an unrecognized enum-like value to the neutral "info" tone; skipReasonTone diverged from that established convention.

Fix

Change the fallback branch from "ready" to "info". Behavior for the four enumerated reasons is unchanged.

Tests

A new direct test in audit-feed.test.tsx's "audit feed helpers" block (the file's convention for model-function tests) asserts each enumerated reason maps to its expected tone (info/warn/degraded) and that an unrecognized reason returns "info", not "ready". Reverting the source change makes it fail. All 16 tests in the file pass; git diff --check clean.

@RealDiligent
RealDiligent requested a review from JSONbored as a code owner July 26, 2026 00:31
@superagent-security

Copy link
Copy Markdown
Contributor

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

…ne, not 'ready'

audit-feed-model.ts's skipReasonTone fell back to 'ready' (a green, healthy-looking tone) for an
unrecognized reason string. None of the four enumerated reasons map to 'ready' -- it existed solely
as the unrecognized-value fallback, so a new or legacy backend skip reason silently rendered as a
successful-looking pill. The sibling contributor-quality-table-model uses the neutral 'info' tone for
the same unrecognized-enum-like-string situation; match that convention.

Change the fallback to 'info'. The four enumerated reasons are unchanged. Adds a direct test asserting
each enumerated reason's tone plus that an unrecognized reason returns 'info' (not 'ready').
@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 00:39:31 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 small, well-scoped fix: the fallback branch in skipReasonTone changes from the misleading green 'ready' tone to the neutral 'info' tone, matching the established convention in contributor-quality-table-model. The added test correctly exercises all four enumerated reasons plus the unrecognized fallback, and it demonstrably fails if the source change is reverted since it explicitly asserts not.toBe('ready') and toBe('info'). The change is minimal, correctly traced to the fallback branch itself (not a downstream symptom), and directly closes #8666.

Nits — 3 non-blocking
  • The inline comment at audit-feed-model.ts:128-131 is a bit verbose for a one-line fallback change; a shorter comment referencing the convention would suffice.
  • SkippedPrAuditItem.reason remains typed as plain string rather than SkippedPrAuditReason | string, so the type system still won't catch new unenumerated reasons at compile time — worth a follow-up but out of scope here.
  • Consider tightening SkippedPrAuditItem.reason's type in a follow-up to make unrecognized reasons more visible at the type level, though that's a separate concern from this tone fix.

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

Addressed
The fallback branch was changed from "ready" to "info" while leaving the four enumerated reason mappings untouched, and a new direct test on skipReasonTone covers both the enumerated values and asserts the unrecognized-reason fallback returns "info" (not "ready").

Review context
  • Author: RealDiligent
  • 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: 329 PR(s), 37 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 <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
/ desktop before /
before /
after /
after /
diff /
diff /
/ 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 · Diff highlights exactly what changed.

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.

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