Skip to content

feat(ui): design tokens 4/5 — semantic border-radius scale#8102

Merged
JSONbored merged 2 commits into
mainfrom
design-tokens-4-radius-scale
Jul 25, 2026
Merged

feat(ui): design tokens 4/5 — semantic border-radius scale#8102
JSONbored merged 2 commits into
mainfrom
design-tokens-4-radius-scale

Conversation

@JSONbored

Copy link
Copy Markdown
Owner

Summary

Phase 1 audit + proposed table posted as a comment on #7843 (occurrence census across both packages, archetype→radius mapping with two justified adjustments and one documented exception carve-out). Phase 2 (this PR) executes the approved sweep:

  • rounded-smrounded (35 sites), rounded-lgrounded-md (60 sites) — mechanical, exact-token renames via perl -pi, verified with an occurrence-count check (0 remaining of either class) and a duplicate-collision check (no rounded rounded/rounded-md rounded-md artifacts).
  • packages/ui-kit/src/components/metagraphed/page-section.tsx's muted-tone rounded-2xlrounded-xl<PageSection> is a general page-content wrapper (used in gaps.tsx, schemas.tsx, the health dashboard), not hero-specific, so it belongs in the "large surface" tier next to drawers/modals. -health-page.tsx's sectionRing() active-state ring (which outlines whichever <PageSection> a deep-link scrolled to) moves to rounded-xl in lockstep so the ring stays visually paired with its section.
  • Confirmed rounded-2xl is otherwise confined to the homepage hero family (hero-feature-row.tsx, -index-page.tsx) and the documented .mg-card-glow/.mg-card-glow-accent detail-page KPI-panel pattern (accounts.$ss58.tsx and validators.$hotkey.tsx hardcode ~21 raw rgba(...) shadow colors instead of the design system's color-mix idiom #6398 — already an explicit ESLint exemption elsewhere in the same config, not new drift).
  • Left the 10 dense-grid rounded-[1px]/rounded-[2px] micro-radius sites (heatmaps, status mosaic, endpoint-uptime bar) as a documented residual rather than force-fitting them into the scale — every named step is visually far larger and would materially change these per-cell fills. Matches the existing residual-worklist convention the z-index rule already uses for the compare-drawers' z-[1]/z-[2] sites.
  • Adds a warn-tier no-restricted-syntax rule to both eslint.config.ts files flagging rounded-(sm|lg|3xl) and arbitrary rounded-[…]. Caught and fixed a real self-match false positive during development: the rule's own message text initially spelled out rounded-sm/rounded-[…] as literal examples, which matched the very selector it was documenting inside the config file itself — same root-cause class as the existing hex-color rule's GitHub-issue-reference false positive. Rewrote both messages to describe the violation without a literal contiguous match.
  • Documents the approved 5-step radius table in apps/ui/CONTRIBUTING.md (rounded-full / rounded / rounded-md / rounded-xl / rounded-2xl, with the two exceptions above called out).

Test plan

  • tsc --noEmit clean in both packages
  • eslint . in both packages: 0 errors (388 warnings in apps/ui, 43 in ui-kit — 9 are the documented dense-grid residual, the rest pre-existing and unrelated)
  • prettier --check clean on all touched files
  • vitest run: 1464/1464 passing in apps/ui, 98/98 passing in ui-kit
  • Live-browser check: /subnets renders correctly with no console errors attributable to this change (one pre-existing, unrelated hydration warning about FinancialTrendCell's dynamic text-[10px] USD/pct timing, not touched here); confirmed rounded-md computes to a real 10px border-radius across 218 live elements on the page, proving the class swap compiles and applies correctly, not just present as dead text.

Closes #7843.

@superagent-security

Copy link
Copy Markdown

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

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Jul 25, 2026

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
metagraphed-ui 21ee4ac Commit Preview URL

Branch Preview URL
Jul 25 2026, 02:48 AM

@codecov

codecov Bot commented Jul 25, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.71%. Comparing base (6acdac7) to head (21ee4ac).
⚠️ Report is 1 commits behind head on main.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #8102   +/-   ##
=======================================
  Coverage   97.71%   97.71%           
=======================================
  Files         282      282           
  Lines       27614    27614           
  Branches    10831    10831           
=======================================
  Hits        26984    26984           
  Misses        141      141           
  Partials      489      489           
🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@loopover-orb loopover-orb Bot added the gittensor:bug Gittensor-scored bug fix or unsolicited PR — scores a 0.05x multiplier. label Jul 25, 2026
@loopover-orb

loopover-orb Bot commented Jul 25, 2026

Copy link
Copy Markdown
Contributor

Warning

⏸️ LoopOver review result - manual review recommended

Review updated: 2026-07-25 03:00:24 UTC

68 files · 1 AI reviewer · no blockers · CI green · clean

⏸️ Suggested Action - Manual Review

  • Touches a guarded path — held for manual review: This PR changes guardrail-protected path(s): apps/ui/CONTRIBUTING.md (matched apps/ui/**), apps/ui/eslint.config.ts (matched apps/ui/**), apps/ui/src/components/metagraphed/analytics/coverage-matrix.tsx (matched apps/ui/**), apps/ui/src/components/metagraphed/analytics/incidents-timeline.tsx (matched apps/ui/**), apps/ui/src/components/metagraphed/analytics/network-pulse-band.tsx (matched apps/ui/**), and 50 more.

Review summary
Mechanical, correctly-scoped design-token sweep: `rounded-sm`→`rounded` and `rounded-lg`→`rounded-md` renames plus one justified `rounded-2xl`→`rounded-xl` adjustment on `PageSection`/`sectionRing`, backed by two new ESLint `no-restricted-syntax` warn-rules (mirrored in both `eslint.config.ts` files) and a CONTRIBUTING.md radius table. The full `apps/ui/eslint.config.ts` content confirms `RADIUS_RULES` is correctly spread into the `src/**` rules array, and the self-match hazard noted in the comments is real but avoided (messages don't contain literal `rounded-X` substrings). This is a token-rename PR with no behavioral logic, so the 0-test-file ratio is expected and not a defect.

Nits — 8 non-blocking
  • The `ui` CI check failed with no detail provided; per the base-branch-status guidance this can't be attributed to a specific content defect from what's given here — worth checking before merge, but not a code defect per se.
  • The linked issue Design tokens 4/5: semantic border-radius scale (~832 sites) #7843 covers a ~832-site sweep and this PR is flagged as only partial coverage — confirm the remaining `rounded-sm`/`rounded-lg` occurrence count is genuinely zero (per the PR's own described verification step) rather than a partial pass, since the external history flags 'partial' issue coverage.
  • `dialog.tsx`/`sheet.tsx`/`command.tsx` (shadcn primitives) also had their `rounded-sm`→`rounded` renames applied — worth double-checking these don't diverge from upstream shadcn's own class names in a way that complicates future upstream syncs.
  • Since this is a pure mechanical rename with an automated occurrence-count + duplicate-collision verification already described in the PR body, no further diff-level changes seem needed.
  • Consider whether the eslint rule's dense inline comments (multiple paragraphs per rule) could be trimmed per the repo's comment-density convention, though this matches the style of the adjacent existing rules (Z_INDEX_RULES, GLASS_SURFACE_RULES) so it's consistent, not a deviation.
  • PR author also opened the linked issue — Link an issue that was opened by a different contributor, or provide a rationale for why this self-authored issue represents genuine discovery work.
  • Code changes lack test evidence — Add focused regression tests or explain why existing coverage is sufficient.
  • Touches a guarded path — held for manual review — A maintainer must review and merge this change.

Decision drivers

  • ✅ Code review — No blockers (1 reviewer)
  • ⚠️ Gate result — Not blocking (Advisory; not blocking this PR.)
Context & advisory signals — never blocks the verdict
Signal Result Evidence
Linked issue ✅ Linked #7843
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: 13 registered-repo PR(s), 13 merged, 271 issue(s).
Contributor context ✅ Confirmed Gittensor contributor JSONbored; Gittensor profile; 13 PR(s), 271 issue(s).
Linked issue satisfaction

Addressed
The PR mechanically sweeps rounded-sm→rounded and rounded-lg→rounded-md across both packages, adds warn-tier ESLint guardrails against the eliminated classes and arbitrary rounded-[…] in both eslint.config.ts files, and documents the approved radius table in apps/ui/CONTRIBUTING.md, matching the issue's Phase 2 asks; it also justifies its two deviations (page-section.tsx to rounded-xl, dense-grid

Review context
  • Author: JSONbored
  • Role context: owner (maintainer lane)
  • Public audience mode: oss maintainer
  • Lane context: Repository is configured for direct PR review.
  • Public profile languages: not available
  • Official Gittensor activity: 13 PR(s), 271 issue(s).
  • PR-specific overlap: none found.
Contributor next steps
  • Start here: Treat this as maintainer-lane context rather than normal contributor-lane activity.
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
/-about-page desktop before /-about-page
before /-about-page
after /-about-page
after /-about-page
diff /-about-page
diff /-about-page
/-about-page mobile before /-about-page (mobile)
before /-about-page (mobile)
after /-about-page (mobile)
after /-about-page (mobile)
diff /-about-page (mobile)
diff /-about-page (mobile)
/-accounts-ss58-page desktop before /-accounts-ss58-page
before /-accounts-ss58-page
after /-accounts-ss58-page
after /-accounts-ss58-page
diff /-accounts-ss58-page
diff /-accounts-ss58-page
/-accounts-ss58-page mobile before /-accounts-ss58-page (mobile)
before /-accounts-ss58-page (mobile)
after /-accounts-ss58-page (mobile)
after /-accounts-ss58-page (mobile)
diff /-accounts-ss58-page (mobile)
diff /-accounts-ss58-page (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)
/-about-page before /-about-page (scroll)
before /-about-page (scroll)
after /-about-page (scroll)
after /-about-page (scroll)
/-accounts-ss58-page before /-accounts-ss58-page (scroll)
before /-accounts-ss58-page (scroll)
after /-accounts-ss58-page (scroll)
after /-accounts-ss58-page (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 added the manual-review Gittensor contributor context label Jul 25, 2026
…m/rounded-lg eliminated)

Sweeps all ~832 border-radius sites across both packages to the approved
5-step scale (rounded-full / rounded / rounded-md / rounded-xl /
rounded-2xl), per the audited + approved table posted to #7843:

- rounded-sm -> rounded (35 sites)
- rounded-lg -> rounded-md (60 sites)
- page-section.tsx's muted-tone rounded-2xl -> rounded-xl, matching
  <PageSection>'s "large content shell" tier alongside drawers/modals
  (it's a general page wrapper, not hero-specific); -health-page.tsx's
  sectionRing() active-state ring moves in lockstep to stay visually
  paired with the section it outlines
- rounded-2xl confirmed confined to the homepage hero family and the
  documented .mg-card-glow/.mg-card-glow-accent detail-page KPI-panel
  pattern (#6398) -- no other sites found
- 10 dense-grid rounded-[1px]/rounded-[2px] micro-radius sites
  (heatmaps, status mosaic, uptime bar) kept as a documented residual --
  every named step is visually far larger and would change these grids

Adds a warn-tier ESLint guardrail (both configs) flagging
rounded-(sm|lg|3xl) and arbitrary rounded-[...], with messages that
deliberately avoid spelling out the banned classes as contiguous tokens
(a literal self-match false positive against the rule's own config file
otherwise). Documents the approved table in apps/ui/CONTRIBUTING.md.

Closes #7843.
CI's "Build packages/ui-kit (drift check)" caught the compiled
dist/{index.js,index.cjs} bundle drifting out of sync with the source
files touched by the #7843 radius sweep (page-section.tsx,
chart-skeleton.tsx, donut.tsx, stat-with-spark.tsx, treemap-mini.tsx,
methodology-callout.tsx, query-bar.tsx, ui/dialog.tsx, ui/sheet.tsx,
ui/command.tsx) -- packages/ui-kit/dist is a committed runtime bundle
(see packages/ui-kit/.gitignore) so apps/ui's Cloudflare Workers Builds
deploy never depends on rebuilding a sibling workspace package first.

Rebuilt via `npm run build --workspace=packages/ui-kit` and verified
`git diff --exit-code -- packages/ui-kit/dist` is clean afterward,
matching the CI check exactly.

Part of #7843.
@JSONbored
JSONbored merged commit 41ddc9b into main Jul 25, 2026
11 checks passed
@JSONbored
JSONbored deleted the design-tokens-4-radius-scale branch July 25, 2026 03:11
@JSONbored JSONbored mentioned this pull request Jul 25, 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 or unsolicited PR — scores a 0.05x multiplier. manual-review Gittensor contributor context

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Design tokens 4/5: semantic border-radius scale (~832 sites)

1 participant