Skip to content

feat(ui): redesign /agents as a numbered onboarding sequence - #8457

Open
JSONbored wants to merge 3 commits into
mainfrom
claude/agents-page-redesign-2382d1
Open

feat(ui): redesign /agents as a numbered onboarding sequence#8457
JSONbored wants to merge 3 commits into
mainfrom
claude/agents-page-redesign-2382d1

Conversation

@JSONbored

@JSONbored JSONbored commented Jul 27, 2026

Copy link
Copy Markdown
Owner

Summary

Redesigns /agents from seven equal-weight sections into a numbered 4-step
sequence, inspired by a comparable AI-agents page from another Bittensor
subnet (Allways/SN7) that reads top-to-bottom with graded weight and one
primary action per step.

What changed

  1. Hand off context — the copyable agent.md prompt is now shown as a
    live, scrollable preview next to the copy action (via a new server
    function, since agent.md has no CORS header for a client-side fetch),
    not just a link buried 13th of 13 in a flat table.
  2. Connect your client — MCP, SDK, skill, and chat install paths unified
    into one card instead of three co-equal "Or install the SDK" / "Or add
    the skill" / "Or drop into a chat" sections.
  3. Query the registry live — Ask and Search merged into one tabbed live
    card (was two separate, visually equal boxes) with the matching curl
    shown alongside the result.
  4. Deeper integrations — the flat 13-row resource link table replaced
    with a reasoned 2-col card grid (one-line "why" per resource).

Also adds a step prop to SectionHeading (packages/ui-kit) for the
numbered rail, and rebuilds packages/ui-kit/dist accordingly.

No new route; reuses the existing Bone & Ink tokens and components
throughout — no new visual language introduced.

Follow-up fixes (from review)

  • PageMasthead had a hard truncate on the h1 with no wrap fallback —
    every other masthead title is 1-2 words so this never visibly triggered
    until /agents' longer "Use AI to explore Bittensor" clipped to "Use AI to
    explore B..." on mobile. Now wraps instead of truncating; the live dot
    stays pinned to the title's first line. See
    apps/ui/src/components/metagraphed/primitives/page-masthead.tsx.
  • ShareButton (packages/ui-kit) kept its "Share view" label on every
    masthead (<ActionBar><ShareButton bare /></ActionBar>, ~20 pages) — on
    a narrow viewport that bordered text pill was the widest element in the
    masthead, worst next to a longer title. Now hides the label below sm
    and shows it at sm and up, everywhere at once (one component change,
    no per-page edits). See
    packages/ui-kit/src/components/metagraphed/share-button.tsx.

Validation

  • npm run lint --workspace=apps/ui — clean (0 errors; pre-existing warn-tier warnings elsewhere, none in touched files)
  • npm run format:check --workspace=apps/ui — clean
  • npm run typecheck --workspace=apps/ui — clean
  • npm test --workspace=apps/ui — 1630 passed, 1 skipped (207 files)
  • npm run test:e2e --workspace=apps/ui — 40 passed (responsive-overflow + others)
  • npm run build --workspace=apps/ui — succeeds
  • Bundle size budget — 339 KB / 340 KB (main is currently at 340/340; this PR is net -1 KB, not a regression)
  • packages/ui-kit rebuilt and dist committed, its own lint/typecheck/test all clean
  • Spot-checked the ShareButton change on /subnets (a second masthead consumer) at mobile width — icon-only, no layout break

Screenshots

Viewport · Theme Before After
Desktop · Light
before

after
Desktop · Dark
before

after
Tablet · Light
before

after
Tablet · Dark
before

after
Mobile · Light
before

after
Mobile · Dark
before

after

Closes #8455
Closes #8458
Closes #8467

Restructures the seven equal-weight sections into a graded 4-step
sequence (hand off context, connect your client, query the registry
live, deeper integrations), each with one primary action instead of
three competing "Or..." blocks. The copyable agent.md prompt is now
shown as a live preview instead of a buried link, and Ask/Search are
unified into one tabbed live-query card.

Adds a server-side proxy for agent.md since that asset has no CORS
header, and a `step` prop on SectionHeading for the numbered rail.

Closes #8455
@loopover-orb

loopover-orb Bot commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

Warning

⏸️ LoopOver review result - manual review recommended

Review updated: 2026-07-28 00:52:05 UTC

12 files · 1 AI reviewer · no blockers · CI green · dirty

⏸️ Suggested Action - Manual Review

  • Touches a guarded path — held for manual review: This PR changes guardrail-protected path(s): apps/ui/src/components/metagraphed/agent-connect-card.tsx (matched apps/ui/**), apps/ui/src/components/metagraphed/agent-context-card.tsx (matched apps/ui/**), apps/ui/src/components/metagraphed/agent-live-card.tsx (matched apps/ui/**), apps/ui/src/components/metagraphed/agent-resource-grid.tsx (matched apps/ui/**), apps/ui/src/components/metagraphed/primitives/page-masthead.tsx (matched apps/ui/**), and 3 more.

Review summary
This PR replaces /agents' flat 7-section layout with a numbered 4-step sequence, extracting four new focused components (AgentContextCard, AgentConnectCard, AgentLiveCard, AgentResourceGrid) and adding a `step` prop to the shared SectionHeading in ui-kit, with dist rebuilt accordingly. The new agentMarkdownQuery correctly routes agent.md through a server function to avoid a client-side CORS failure, and pins the fetch to DEFAULT_API_BASE rather than a client-controlled base to avoid an SSRF sink, which is a thoughtful detail. The refactor is a faithful decomposition of the previous inline JSX (verified against the full pre-change section structure implied by the diff) with no behavioral loss visible in the shown code.

Nits — 7 non-blocking
  • The curl strings in agent-live-card.tsx:10-11 and the API host in agent-resource-grid.tsx:87 hardcode `api.metagraph.sh` rather than deriving from a shared config constant, same as DEFAULT_API_BASE elsewhere.
  • Magic numbers like the `129 subnets` / `2,292 callable services` counts in agent-live-card.tsx are hardcoded prose rather than sourced from `res.summary`, which is already available and used in StatRail — these could drift out of sync with real data.
  • Test coverage is limited to agent-doc.functions.ts; the four new presentational components (agent-connect-card, agent-context-card, agent-live-card, agent-resource-grid) have no accompanying tests.
  • `RESOURCE_HINT` and `KIND_META` in agent-resource-grid.tsx are keyed by string literals with no compile-time guarantee they stay in sync with the resource `id`/`kind` values returned by the API.
  • Wire agent-live-card.tsx's stat copy to `res.summary` (already fetched in the parent) instead of hardcoded literals to avoid drift.
  • 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.
  • 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 #8455, #8458, #8467
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 (3 linked issues).
Validation posture ✅ 25/25 PR body includes validation/test evidence.
Contributor workload ✅ 10/10 Author activity: 14 registered-repo PR(s), 13 merged, 346 issue(s).
Contributor context ✅ Confirmed Gittensor contributor JSONbored; Gittensor profile; 14 PR(s), 346 issue(s).
Linked issue satisfaction

Partially addressed
The diff delivers requirements 1-5 well: a numbered 4-step sequence with a live scrollable agent.md preview, a unified connect card, a tabbed Ask/Search live card with matching curl, and a reasoned resource grid replacing the flat table. However, requirement 6 (a standard screenshot table across 3 viewports x 2 themes, before/after) is not present anywhere in the PR description or diff.

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: 14 PR(s), 346 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.

Decision record
  • action: hold · clause: guardrail_hold
  • config: 59bd16c87e936126a5193dcfc5172a76d28ebf989cfcf59d75b280cdc24e61a7 · pack: oss-anti-slop · ci: passed
  • record: beace11260b2aea6426ab69800c19a8aea97b705b6e641e8e8aa1c99a0f3170c (schema v5, head ddcd56b)
Visual preview
Route Viewport Before (production) After (this PR's preview) Diff
/-agents-page desktop before /-agents-page
before /-agents-page
after /-agents-page
after /-agents-page
/-agents-page mobile before /-agents-page (mobile)
before /-agents-page (mobile)
after /-agents-page (mobile)
after /-agents-page (mobile)

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

Scroll preview
Route Before (production) After (this PR's preview)
/-agents-page before /-agents-page (scroll)
before /-agents-page (scroll)
after /-agents-page (scroll)
after /-agents-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

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Jul 27, 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 ddcd56b Commit Preview URL

Branch Preview URL
Jul 28 2026, 12:08 AM

@superagent-security

Copy link
Copy Markdown

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

@codecov

codecov Bot commented Jul 27, 2026

Copy link
Copy Markdown

Codecov Report

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

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #8457   +/-   ##
=======================================
  Coverage   97.81%   97.81%           
=======================================
  Files         419      419           
  Lines       29074    29074           
  Branches    10931    10931           
=======================================
  Hits        28440    28440           
  Misses        143      143           
  Partials      491      491           
🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@JSONbored JSONbored self-assigned this Jul 27, 2026
@loopover-orb loopover-orb Bot added the manual-review Gittensor contributor context label Jul 27, 2026
Every existing masthead title is 1-2 words, so the h1's `truncate`
never visibly triggered until /agents' longer "Use AI to explore
Bittensor" hit it, clipping to "Use AI to explore B..." on mobile.
Removes the truncate and switches the live-dot row to items-start so
the dot stays pinned to the title's first line when it wraps.

Closes #8458
Every masthead renders <ActionBar><ShareButton bare /></ActionBar>,
and bare alone keeps the "Share view" label -- only iconOnly/connected
hid it. On a narrow viewport that bordered text pill was the widest,
loudest element in the masthead, most visible next to a longer title
(found via /agents, #8455/#8457). Share is a self-explanatory icon;
the label earns its place back at sm and up.

One component change fixes every masthead at once -- no per-page
changes needed. Desktop/tablet unchanged.

Closes #8467
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

manual-review Gittensor contributor context

Projects

None yet

1 participant