fix(ui): remove misleading full-row click affordance from the neuron table#4949
Conversation
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
1 similar comment
|
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 #4949 +/- ##
=======================================
Coverage 97.93% 97.93%
=======================================
Files 163 163
Lines 19389 19389
Branches 7364 7364
=======================================
Hits 18989 18989
Misses 53 53
Partials 347 347 🚀 New features to boost your workflow:
|
|
Warning 🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨 ⏸️ Gittensory review result - manual review recommendedReview updated: 2026-07-13 00:33:56 UTC
⏸️ Suggested Action - Manual Review
Review summary Nits — 7 non-blocking
Review context
Contributor next steps
Signal definitions
[BETA] Chat with GittensoryAsk Gittensory 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://gittensory.aethereal.dev/docs/gittensory-commands Visual preview
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.
|

Closes #3952
What
In
neuron-table.tsx, every<tr>in the metagraph/validator table had anonClickhandler plus acursor-pointerclass covering the whole row, implying the entire row drills into a per-UID snapshot. In reality only the small nested UID<button>was ever keyboard-reachable — a keyboard or screen-reader user relying on the row's visual full-row affordance had no way to trigger it except by specifically finding that one small button. Mouse users could click anywhere in the row; keyboard users effectively could not.Why option (b), not (a)
The issue's own deliverable offered two paths: (a) make the
<tr>itself keyboard-operable (role="button"+tabIndex+onKeyDown), or (b) drop the row-level affordance and make the existing nested button the sole, honestly-signposted entry point — with (a) preferred only if it can be done without invalid nested-interactive markup. The row already contains a nested<button>(UID) and a nested<Link>(hotkey) — giving the<tr>an interactive role/tabIndex on top of those would nest two more interactive elements inside another interactive element, which is invalid ARIA structure regardless ofstopPropagationbookkeeping. So this PR takes (b).Changes
apps/ui/src/components/metagraphed/neuron-table.tsx: removed the row'sonClickand conditionalcursor-pointerclass — the row itself no longer claims to be clickable. The UID<button>(already the real, keyboard-focusable entry point) now gets a persistentunderline(not just on:hover) usingcurrentColorso it visually reads as the click target at rest, independent of hover or focus, instead of implying the whole row is one. Also removed the two now-deadonClick={(e) => e.stopPropagation()}handlers on the hotkey<Link>s, which only existed to stop the row's own (now-removed) click handler from double-firing.Screenshots
before
after
before
after
before
after
before
after
before
after
before
after
Each pair is a fixed-viewport capture (never full-page) of the
/subnets/19?tab=metagraphneuron table, from two separate dev servers (before= the merge-base commit,after= this branch) — the visible difference is the UID column gaining a persistent underline, honestly signposting it as the sole click target instead of the whole row falsely appearing clickable.Keyboard interaction (supporting evidence)
The underline/affordance change above is a static, at-rest difference, so no motion-only behavior needs a recording here. For completeness, verified via Playwright:
<tr>has noroleortabindexattribute (confirmed directly against the DOM) — no invalid nested-interactive markup introduced.<button>, unconditionally in the tab order: focusing it directly and pressingEnterfiresonSelectand updates the URL to?uid=<n>.Tabfrom the UID button moves cleanly to the next natural focusable element in the row (the hotkey link) — no focus trapping or double-activation from the removedstopPropagationcalls.Acceptance criteria
neuron-table.tsxappears in the diffrole/tabindexboth absent on the row)Testing
npx tsc --noEmit: no new errors (2 pre-existing, unrelated errors reproduce identically on a cleanmaincheckout).npx eslinton the changed file: clean aside from pre-existing CRLF noise unrelated to this change.