Skip to content

feat(ui): unify gittensory-ui and gittensory-miner-ui on one design system - #4973

Merged
JSONbored merged 4 commits into
mainfrom
feat/shared-ui-kit-4966-4967
Jul 11, 2026
Merged

feat(ui): unify gittensory-ui and gittensory-miner-ui on one design system#4973
JSONbored merged 4 commits into
mainfrom
feat/shared-ui-kit-4966-4967

Conversation

@JSONbored

Copy link
Copy Markdown
Owner

Summary

Extracts the gittensory-ui design system (46 shadcn/Radix components, tokens, utils) into a new shared package, @jsonbored/gittensory-ui-kit, and migrates gittensory-miner-ui onto it — replacing its hand-rolled dark palette and raw Tailwind classes with the same shared components and tokens the main site uses. Also ports gittensory-ui's token-enforcement ESLint rule into miner-ui so a contributor can't silently reintroduce ad hoc colors/spacing.

Closes #4966, Closes #4967.

Changes

Area Change
packages/gittensory-ui-kit/ (new) 46 components, theme.css, utils.ts, use-mobile hook — copied verbatim from gittensory-ui
apps/gittensory-ui/src/components/ui/* Converted to 1-line export * shims re-exporting from the shared package
apps/gittensory-ui/src/lib/utils.ts, src/hooks/use-mobile.tsx Same shim pattern
apps/gittensory-ui/src/styles.css Imports the shared theme.css; keeps only site-local marketing flourishes (hero glow, grid, gradient border)
apps/gittensory-miner-ui/src/routes/*.tsx Rebuilt on shared Card/Badge/Table components and design tokens instead of raw border-white/10/text-emerald-300/80-style classes; data-fetching logic unchanged
apps/gittensory-miner-ui/index.html Hardcoded class="dark" (matches gittensory-ui's current dark-only deployment — no toggle exists on either app yet)
apps/gittensory-miner-ui/eslint.config.js Added the same no-restricted-syntax token-enforcement rule gittensory-ui already has, scoped to src/routes/**
package-lock.json miner-ui's vite bumped ^7.3.1^8.1.3 to match gittensory-ui/dedupe the workspace tree

Scope

Validation

  • git diff --check
  • npm run actionlint (not run — no workflow changes in this PR)
  • npm run ui:typecheck (both apps)
  • npm run ui:test (both apps — 169 + 27 = 196/196 passing)
  • npm run ui:build (both apps, incl. gittensory-ui's SSR/Cloudflare nitro target)
  • npm run ui:lint (both apps — 0 errors)
  • npm audit --audit-level=moderate — 0 vulnerabilities
  • npm run test:coverage / test:workers / build:mcp / test:mcp-pack / ui:openapi:check — not run locally; this PR touches only apps/** and packages/gittensory-ui-kit/** (no src/**, no API/OpenAPI/wrangler changes), so these are unaffected. CI will confirm.
  • Manually verified the token-enforcement lint rule actually fires: temporarily reintroduced a raw Tailwind class in a miner-ui route, confirmed ui:lint failed, reverted.
  • Manually verified in a local dev-server preview: all 3 miner-ui routes (Overview/Run history/Portfolio) render the shared dark theme, lime accent, and token typography correctly; command palette/dialog interactions in gittensory-ui still work post-shim; no console errors.

If any required check was skipped, explain why:

  • actionlint/test:coverage/test:workers/build:mcp/test:mcp-pack/ui:openapi:check skipped locally because this PR has zero changes under src/**, .github/workflows/**, or any OpenAPI/wrangler surface — only apps/gittensory-ui/**, apps/gittensory-miner-ui/**, and the new packages/gittensory-ui-kit/**. CI runs these regardless and will catch anything I've misjudged.

Safety

  • No secrets, wallet details, hotkeys, coldkeys, PATs, private keys, trust scores, or private rankings anywhere.
  • Public GitHub text stays sanitized and low-noise.
  • N/A — no auth/cookie/CORS/GitHub App/Cloudflare/session changes.
  • N/A — no API/OpenAPI/MCP behavior changed.
  • miner-ui's three routes use their existing real local-API data-fetching (fetchRunStates, fetchPortfolioQueue) unchanged — no mock/demo fallback introduced.
  • UI Evidence screenshots below — verified visually via a local dev-server preview (screenshots shown directly to the maintainer during development) but not uploaded as GitHub-hosted images, since that requires a browser-authenticated drag-and-drop I don't have CLI access to. Neither Extract a shared design-system package for gittensory-ui and gittensory-miner-ui #4966 nor Migrate gittensory-miner-ui onto the shared design system #4967 carries the visual label. Happy to attach if wanted — just say the word and I can walk through it via browser automation, or attach them yourself from the screenshots already shared in this conversation.
  • No public docs/changelog changes needed.

UI Evidence

Not embedded as GitHub-hosted images (see Safety note above) — visually verified via local dev-server screenshots + an accessibility-tree snapshot confirming Card/Badge/Table/heading semantics render correctly, already shared with the maintainer directly during this session.

Notes

  • #4967 depended on #4966's package existing first; both are included in this single PR since they were always meant to ship together and splitting them would create an unmergeable stacked-branch dependency.
  • Both issues are maintainer-only/roadmap — owner-authored, not subject to the contributor one-shot gate.

)

Moves the 46 shadcn-style component primitives, design tokens, cn()
utility, and use-mobile hook out of apps/gittensory-ui into a new
@jsonbored/gittensory-ui-kit workspace package, so gittensory-ui and
gittensory-miner-ui can share one real design system instead of two.

gittensory-ui's own copies become thin re-export shims (matching the
existing gittensory-engine parity pattern) so none of the 84+ consumer
files needed changes. styles.css now imports the shared theme and
scans the new package's source for Tailwind class usage in addition
to its own. Verified pixel-identical rendering and working
Radix-based interactions (command palette) via local preview; full
typecheck/build/lint/test suite green.
…4967)

Replaces the hand-rolled dark palette and raw Tailwind classes in
gittensory-miner-ui's routes with the shared @jsonbored/gittensory-ui-kit
components and design tokens, so both apps render from a single UI system.

Moves .focus-ring/.hover-surface into the shared theme since both apps now
use them directly, keeping only site-specific marketing flourishes local
to gittensory-ui's stylesheet.
…4967)

Ports gittensory-ui's no-restricted-syntax ESLint rule into miner-ui's
routes, blocking raw text-size/leading/rounded/border Tailwind classes so a
contributor can't silently reintroduce the old hardcoded look. Also swaps
the remaining raw leading-none/leading-relaxed/tracking-tight in the three
route headings for the shared theme's token classes (or drops them, since
the base h1-h6 layer already sets font-family and letter-spacing).
@cloudflare-workers-and-pages

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 Updated (UTC)
❌ Deployment failed
View logs
gittensory-ui df317d4 Jul 11 2026, 06:18 AM

@JSONbored JSONbored self-assigned this Jul 11, 2026
@superagent-security

Copy link
Copy Markdown
Contributor

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

@codecov

codecov Bot commented Jul 11, 2026

Copy link
Copy Markdown

Codecov Report

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

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #4973   +/-   ##
=======================================
  Coverage   94.27%   94.27%           
=======================================
  Files         451      451           
  Lines       38900    38909    +9     
  Branches    14172    14178    +6     
=======================================
+ Hits        36674    36683    +9     
  Misses       1574     1574           
  Partials      652      652           
Flag Coverage Δ
shard-1 46.84% <ø> (+0.01%) ⬆️
shard-2 33.32% <ø> (+<0.01%) ⬆️
shard-3 31.41% <ø> (+<0.01%) ⬆️
shard-4 33.16% <ø> (+<0.01%) ⬆️
shard-5 33.54% <ø> (-0.01%) ⬇️
shard-6 45.25% <ø> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.
see 7 files with indirect coverage changes

🚀 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 — scores a 0.05x multiplier. label Jul 11, 2026
@loopover-orb

loopover-orb Bot commented Jul 11, 2026

Copy link
Copy Markdown
Contributor

Caution

🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥

🛑 Gittensory review result - fixes required

Review updated: 2026-07-11 06:27:52 UTC

111 files · 1 AI reviewer · no blockers · readiness 100/100 · CI failing · blocked

🛑 Suggested Action - Manual Review

Review summary
This PR extracts gittensory-ui's 46 shadcn/Radix components into a new @​jsonbored/gittensory-ui-kit workspace package and migrates gittensory-miner-ui onto it, replacing hand-rolled dark-mode Tailwind classes with shared tokens and adding the same token-enforcement ESLint rule to miner-ui. The bulk of the diff (sidebar.tsx, chart.tsx, theme.css, etc.) is a verbatim copy of already-shipped gittensory-ui code, so correctness risk there is low; the real risk surface is the wiring — the new package's exports map and the app-side shim files aren't shown in full, so subpath resolution for imports like '@​jsonbored/gittensory-ui-kit/components/card' and '/theme.css' can't be confirmed from what's visible here. The PR correctly links and closes #4966/#4967 as the review guide requires.

Nits — 7 non-blocking
  • packages/gittensory-ui-kit/package.json wasn't shown in full — confirm its `exports` map actually declares every subpath used by consumers (`/components/card`, `/theme.css`, `/hooks/use-mobile`, etc.), since the whole migration hinges on that resolving correctly and it isn't visible in this diff.
  • packages/gittensory-ui-kit/LICENSE adds a fresh AGPLv3 file for an internal workspace package consumed by a Cloudflare Worker deployment — confirm this matches the repo's actual root license and that you've considered AGPL's network source-disclosure clause before shipping it inside a hosted Worker.
  • The `vite` bump from `^7.3.1` to `^8.1.3` for gittensory-miner-ui (apps/gittensory-miner-ui/package.json) is an unrelated major-version dependency change bundled into a design-token-unification PR — worth splitting out or explicitly justifying, since major bumps carry their own compatibility risk independent of the token work.
  • 101 changed source files add 0 test lines (per the size/ratio data) — even though these are largely copied shadcn primitives, it's worth a one-line note on why no test coverage was needed for the new package.
  • apps/gittensory-miner-ui/eslint.config.js scopes the new `no-restricted-syntax` token rule to `src/routes/**` only — confirm that's intentional (vs. also covering any future local `src/lib` or `src/components` files that could reintroduce raw Tailwind classes).
  • 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.

CI checks failing

  • validate
  • validate-code
  • Build UI preview artifact
  • Workers Builds: gittensory-ui — Workers Builds: gittensory-ui
Signal Result Evidence
Code review ✅ No blockers 1 reviewer
Linked issue ✅ Linked #4966, #4967
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 (2 linked issues).
Validation posture ✅ 25/25 PR body includes validation/test evidence.
Contributor workload ✅ 10/10 Author activity: 48 registered-repo PR(s), 40 merged, 423 issue(s).
Contributor context ✅ Confirmed Gittensor contributor JSONbored; Gittensor profile; 48 PR(s), 423 issue(s).
Gate result ✅ Passing No configured blocker found.
Improvement ⚠️ ℹ️ None detected risk: low · value: none — No structural-improvement signals were detected for this PR. LLM value judgment: significant — Consolidating two hand-maintained UI stacks onto one shared, token-enforced design-system package is a substantial, well-targeted structural improvement that directly closes two linked issues and eliminates a whole class of drift between the two apps.
Linked issue satisfaction

Addressed
The PR extracts styles.css tokens and the 46 UI primitives into packages/gittensory-ui-kit (verbatim copy per description, including sidebar.tsx shown in the diff), converts gittensory-ui's local ui/, utils.ts, and use-mobile.tsx into shim re-exports of the shared package, and updates styles.css to import the shared theme.css while keeping only site-local decorative styles — matching the issue's e

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: 48 PR(s), 423 issue(s).
  • PR-specific overlap: none found.
Contributor next steps
  • 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.
Visual preview
Route Viewport Before (production) After (this PR's preview) Diff
/ desktop before / after /
/ mobile before / (mobile) after / (mobile)
/portfolio desktop before /portfolio after /portfolio
/portfolio mobile before /portfolio (mobile) after /portfolio (mobile)

Click any thumbnail to open the full-size screenshot. Before = production · After = this PR's preview deploy.

🟩 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 Gittensory, a quiet PR intelligence layer for OSS maintainers.

  • Re-run Gittensory review

@loopover-orb loopover-orb Bot added the manual-review Gittensor contributor context label Jul 11, 2026
…test/build

apps/gittensory-ui and apps/gittensory-miner-ui both import compiled output
from packages/gittensory-ui-kit/dist, which is gitignored like every other
workspace package's dist and does not exist on a fresh checkout. Nothing
built it before ui:lint/ui:typecheck/ui:test/ui:build ran, so CI's UI
typecheck failed with "has no exported member" against every shimmed
component on a clean npm ci (it only worked locally because a previous
manual build had left a stale dist sitting in the working tree).

Adds a ui:kit:build script, prepends it to the four ui:* composite scripts,
and adds an explicit "Build UI-kit package" CI step mirroring the existing
"Build engine package" step for gittensory-engine, which has the same
gitignored-dist-needs-building-first shape.
@JSONbored
JSONbored merged commit 8dcbe5b into main Jul 11, 2026
18 checks passed
@JSONbored
JSONbored deleted the feat/shared-ui-kit-4966-4967 branch July 11, 2026 06:32
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. manual-review Gittensor contributor context

Development

Successfully merging this pull request may close these issues.

Migrate gittensory-miner-ui onto the shared design system Extract a shared design-system package for gittensory-ui and gittensory-miner-ui

1 participant