fix(ui): ratchet-clean apps/ui components batch 2/5 (17 files, 47 violations)#8191
Conversation
…lations) Closes JSONbored#8168 Converts every `no-restricted-syntax` design-guardrail warning in the 17 listed `src/components/metagraphed/**` files to its named token, following the recipe merged in JSONbored#8177 (packages/ui-kit) and mirrored by JSONbored#8186 (batch 1). Zero behavioral change — the touched sizes are homogenized onto the type scale (≤2px snaps), matching JSONbored#8177's intent. - 41 text snaps → `mg-type-*`: sans <12px → `mg-type-caption`; non-uppercase mono numeric → `mg-type-data`/`mg-type-data-sm` (nearest mono step), dropping the now-redundant `font-mono`/`leading-relaxed`. - 1 radius: `rounded-[1px]` → `rounded` (base; `rounded-sm` is off-scale). - 1 external link: the standalone "open" anchor → `<ExternalLink bare>` (the icon-only opt-in JSONbored#8177 added), routing through `safeExternalUrl` with identical rendering. - 1 chip: dropped an `!text-[10px]` override so the cluster uses the Chip primitive's own size, matching the sibling overflow chip. Five sites have no token/primitive equivalent and carry a documented `eslint-disable` (per JSONbored#8172's flag-don't-invent guidance): - 2× `scroll-mt-32` — anchor scroll-margin, not layout spacing; the guardrail's `mt` matcher flags it and no on-scale step equals 8rem. - 1× 20px mono latency stat — the scale tops out at `mg-type-data` (11px). - 1× the Open-URL anchor inside a Radix `<TooltipTrigger asChild>` — must stay a raw `<a>` because `<ExternalLink>` has no `forwardRef`. - 1× the snippet language switcher (`role="tablist"`) — a segmented control, not a card shell, so `<Panel>` would impose card semantics. This batch does not touch `RATCHETED_DIRS` — that belongs to whichever batch clears the last file in `src/components/metagraphed/**`. `npx eslint <each file>` reports 0 `no-restricted-syntax`; `tsc --noEmit`, `prettier --check`, and `vitest run src/components/metagraphed` (180 tests) are clean.
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #8191 +/- ##
=======================================
Coverage 97.82% 97.82%
=======================================
Files 415 415
Lines 28893 28893
Branches 10850 10850
=======================================
Hits 28265 28265
Misses 141 141
Partials 487 487 🚀 New features to boost your workflow:
|
|
Warning ⏸️ LoopOver review result - manual review recommendedReview updated: 2026-07-26 05:28:38 UTC
Review summary Nits — 7 non-blocking
Decision drivers
Context & advisory signals — never blocks the verdict
Linked issue satisfactionPartially addressed 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 · Diff highlights exactly what changed. 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 #8168
Converts every
no-restricted-syntaxdesign-guardrail warning in the 17 listedsrc/components/metagraphed/**files to its named token, following the recipe merged in #8177 (packages/ui-kit) and mirrored by #8186 (batch 1). Zero behavioral change — the touched sizes are homogenized onto the type scale (≤2px snaps), the same intent as #8177.npx eslint <each file>reports 0no-restricted-syntax;tsc --noEmitis clean (only the pre-existingposthog-jsenv gaps inanalytics.ts/vite.config.tsremain, untouched here);prettier --checkis clean;vitest run src/components/metagraphedpasses (180 tests). This batch does not touchRATCHETED_DIRS— per the issue, that belongs to whichever batch clears the last file insrc/components/metagraphed/**.What changed
mg-type-*: sans<12px→mg-type-caption; non-uppercase mono numeric →mg-type-data/mg-type-data-sm(nearest mono step), dropping the now-redundantfont-mono/leading-relaxed.rounded-[1px]→rounded(base;rounded-smwas eliminated from the approved scale).<ExternalLink bare>(the icon-only opt-in prop fix(ui-kit): ratchet-clean src/components (16/19 files, 38/43 violations) #8177 added), routing throughsafeExternalUrlwith identical rendering.!text-[10px]override so the cluster uses theChipprimitive's own size — matching its sibling overflow chip, which never had the override.Documented
eslint-disable(per #8172's "flag, don't invent" guidance)Five sites have no token/primitive equivalent:
scroll-mt-32(endpoint-detail-drawer,endpoint-operational-list) — anchor scroll-margin (8rem sticky-header clearance for deep-linked rows), not layout spacing; the guardrail'smtmatcher flags it as a false positive and no on-scale step equals 8rem.endpoint-operational-list) — the type scale tops out atmg-type-data(11px); no large-numeric token exists.<TooltipTrigger asChild>(endpoint-list) — must stay a raw<a>because<ExternalLink>is a plain function component (noforwardRef) and can't receive the ref the Slot injects.endpoint-snippet,role="tablist") — a segmented control, not a card shell, so<Panel>would impose card padding/semantics. The rule'srounded+border+bg-cardmatcher is a false positive here.Screenshots
Representative route:
/endpoints— it renders the bulk of the touched components (priority strip, operational list, glance, kind tabs, chip cluster, uptime bar, detail drawer, card list, snippet). The token snaps are ≤2px and theExternalLink bare/ chip-size changes are visual no-ops, so before/after are intentionally near-identical. The only visible deltas are live probe values (latency / degraded counts refresh between the two captures) — not from this change.before
after
before
after
before
after
before
after
before
after
before
after