fix(ui): ratchet-clean apps/ui components batch 1/5 (17 files, 43 violations)#8186
Conversation
…lations) Converts each no-restricted-syntax violation to its named token per the eslint message, mirroring the recipe merged in JSONbored#8177 for packages/ui-kit: - text-[9-13px] one-offs -> mg-type-caption / mg-type-data-sm (+ the existing mg-type-micro/label idioms), dropping the now-redundant font-mono where the token supplies it. Non-uppercase mono numeric sites (uptime-timeline, coverage/registry/schema-drift) snap to mg-type-data-sm (nearest non-uppercase mono step); sans <12px prose/labels snap to mg-type-caption. This homogenizes a few previously-differentiated sizes onto the scale -- the batch's explicit intent, same as JSONbored#8177. - account-history-chart's bg-card/95 KPI shell -> .mg-glass (its exact 95% translucency tier, packages/ui-kit styles.css). - drift-activity's hand-rolled tablist shell -> <Panel as="div" flush>, same recipe JSONbored#8177 used for ActionBar/SegmentedToggle. As there, Panel's default `rounded` replaces the original `rounded-md` (a subtle 2px corner tightening on this small toggle). - 6 GitHub/Discord/RSS/openapi/api/raw external links -> <ExternalLink bare> (the icon-only opt-in prop JSONbored#8177 added), preserving their exact rendering while routing through safeExternalUrl; the schema-drift evidence link keeps its raw anchor (documented) because it needs onClick stopPropagation, which <ExternalLink> doesn't forward. Genuinely-missing-token residuals are documented eslint-disable, not forced onto a wrong token (per JSONbored#8172's own guidance): the heatmap/mosaic per-cell rounded-[1px]/[2px] micro-radii (CONTRIBUTING's documented viz residual -- the smallest named step, rounded/4px, would materially change these grids), the two 14px block-number displays (no mg-type-body utility exists), and the JSONbored#7842 bg-card/80 toggle track (no clean glass tier). This batch does not touch RATCHETED_DIRS (per the issue -- the ratchet-list update belongs to whichever batch clears the last file in the directory). Closes JSONbored#8167
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
|
Warning ⏸️ LoopOver review result - manual review recommendedReview updated: 2026-07-26 05:28:15 UTC
Review summary Nits — 8 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 · 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.
|
…lations) (#8191) Closes #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 #8177 (packages/ui-kit) and mirrored by #8186 (batch 1). Zero behavioral change — the touched sizes are homogenized onto the type scale (≤2px snaps), matching #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 #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 #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.




Closes #8167
Re-open of #8181 (gate one-shot-closed it for a missing screenshot table — code was
no blockers · CI green · clean). Same commit, now with the required 12-image table below.Mirrors the recipe merged in #8177 (packages/ui-kit) for the apps/ui half. Every
no-restricted-syntaxwarning in the 17 listed files is converted to its named token per the eslint message; the handful with no existing token equivalent are documentedeslint-disable(per #8172's "flag, don't invent ad hoc" guidance). This batch does not touchRATCHETED_DIRS— per the issue, that belongs to whichever batch clears the last file insrc/components/metagraphed/**.npx eslint <each file>reports 0no-restricted-syntax;tsc --noEmit,prettier --check, and vitest are clean (the 4 pre-existingstake-unstake-modal/take-management-modalfocus failures reproduce onmainunchanged — jsdom/Sheet, unrelated).What changed
mg-type-*: sans <12px →mg-type-caption; non-uppercase mono numeric →mg-type-data-sm(nearest non-uppercase mono;microwould force uppercase onto numbers), dropping the now-redundantfont-mono.<ExternalLink bare>(GitHub/Discord/RSS/openapi/api/raw icons+links) — the icon-only opt-in prop fix(ui-kit): ratchet-clean src/components (16/19 files, 38/43 violations) #8177 added; preserves exact rendering while routing throughsafeExternalUrl. schema-drift's evidence link keeps its raw anchor (documented) because it needsonClickstopPropagation, which<ExternalLink>can't forward.<Panel flush>(drift-activity tablist, fix(ui-kit): ratchet-clean src/components (16/19 files, 38/43 violations) #8177's ActionBar recipe) —roundedreplacesrounded-md(2px corner tightening); 1×bg-card/95→.mg-glass(its exact 95% tier).eslint-disablefor genuinely-missing tokens: 6 heatmaprounded-[1px]/[2px]micro-radii (CONTRIBUTING's viz residual), 2text-[14px]block numbers (nomg-type-bodyutility), the Design tokens 3/5: surface-translucency tiers for bg-card/NN glass surfaces #7842bg-card/80toggle, and the onClick evidence link.ui-kit dist
Uses
<ExternalLink bare>(added to ui-kit source in #8177).dist/index.d.tsis gitignored and rebuilt in CI, so apps/ui typechecks against fresh types — no dist changes committed here.Screenshots
Representative changed view (homepage — the touched
app-shellnav/footer is global). The token snaps are ≤2px and theExternalLink bare/ glass-tier swaps are visual no-ops, so before/after are intentionally near-identical (the proof of no regression).before
after
before
after
before
after
before
after
before
after
before
after