Skip to content

fix(ui): remove misleading full-row click affordance from the neuron table#4949

Merged
JSONbored merged 2 commits into
JSONbored:mainfrom
philluiz2323:fix/neuron-table-row-keyboard-operable
Jul 13, 2026
Merged

fix(ui): remove misleading full-row click affordance from the neuron table#4949
JSONbored merged 2 commits into
JSONbored:mainfrom
philluiz2323:fix/neuron-table-row-keyboard-operable

Conversation

@philluiz2323

Copy link
Copy Markdown
Contributor

Closes #3952

What

In neuron-table.tsx, every <tr> in the metagraph/validator table had an onClick handler plus a cursor-pointer class 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 of stopPropagation bookkeeping. So this PR takes (b).

Changes

  • apps/ui/src/components/metagraphed/neuron-table.tsx: removed the row's onClick and conditional cursor-pointer class — the row itself no longer claims to be clickable. The UID <button> (already the real, keyboard-focusable entry point) now gets a persistent underline (not just on :hover) using currentColor so 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-dead onClick={(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

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

Each pair is a fixed-viewport capture (never full-page) of the /subnets/19?tab=metagraph neuron 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:

  • The <tr> has no role or tabindex attribute (confirmed directly against the DOM) — no invalid nested-interactive markup introduced.
  • The UID button is a native <button>, unconditionally in the tab order: focusing it directly and pressing Enter fires onSelect and updates the URL to ?uid=<n>.
  • Tab from 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 removed stopPropagation calls.

Acceptance criteria

  • neuron-table.tsx appears in the diff
  • A keyboard-only user can reach and activate the row's drill-in action via Tab + Enter, without needing to specifically target a misleadingly-implied full-row affordance — the sole entry point (the UID button) is now honestly the only thing that looks and behaves like a click target
  • No invalid nested-interactive-element ARIA structure introduced — verified via the DOM (role/tabindex both absent on the row)
  • Mouse-click behavior on the UID button is unchanged; the row's other cells no longer falsely suggest clickability
  • Before/after screenshots for all 3 viewports × 2 themes included above

Testing

  • npx tsc --noEmit: no new errors (2 pre-existing, unrelated errors reproduce identically on a clean main checkout).
  • npx eslint on the changed file: clean aside from pre-existing CRLF noise unrelated to this change.
  • Diff is 3 insertions / 9 deletions in a single file across two commits.

@philluiz2323 philluiz2323 requested a review from JSONbored as a code owner July 12, 2026 12:24
@superagent-security

Copy link
Copy Markdown

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

1 similar comment
@superagent-security

Copy link
Copy Markdown

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

@codecov

codecov Bot commented Jul 12, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.93%. Comparing base (7f90522) to head (37b5faf).

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:
  • 📦 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 12, 2026
@loopover-orb

loopover-orb Bot commented Jul 12, 2026

Copy link
Copy Markdown
Contributor

Warning

🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨

⏸️ Gittensory review result - manual review recommended

Review updated: 2026-07-13 00:33:56 UTC

1 file · 1 AI reviewer · no blockers · readiness 100/100 · CI green · clean

⏸️ Suggested Action - Manual Review

  • Touches a guarded path — held for manual review: This PR changes guardrail-protected path(s): apps/ui/src/components/metagraphed/neuron-table.tsx (matched apps/ui/**).

Review summary
The AI review returned non-blocking notes for this change but did not include a separate narrative summary. Review the nits below before deciding this PR.

Nits — 7 non-blocking
  • The `Download CSV` link's `onClick={(e) => e.stopPropagation()}` is now dead code since the row-level onClick was removed — could be cleaned up for consistency with the other removed stopPropagation calls.
  • No test coverage was added for this UI change; a simple render test confirming the row has no onClick/cursor-pointer and the UID button is focusable would guard against regression.
  • Consider removing the now-unnecessary `onClick={(e) => e.stopPropagation()}` on the CSV download `<a>` tag in the same cleanup pass.
  • Add a focused unit/RTL test asserting the `<tr>` has no click handler and the UID `<button>` is reachable via Tab, to lock in the accessibility fix.
  • `apps/ui/src/components/metagraphed/neuron-table.tsx`: the component comment still says rows drill into the per-UID snapshot, but after this change only the UID button does, so the comment should be tightened to avoid preserving the old affordance in docs.
  • 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.
Signal Result Evidence
Code review ✅ No blockers 1 reviewer
Linked issue ✅ Linked #3952
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: 1092 registered-repo PR(s), 666 merged, 123 issue(s).
Contributor context ✅ Confirmed Gittensor contributor philluiz2323; Gittensor profile; 1092 PR(s), 123 issue(s).
Gate result ⚠️ Not blocking Advisory; not blocking this PR.
Review context
  • Author: philluiz2323
  • Role context: outside_contributor
  • Public audience mode: oss maintainer
  • Lane context: Repository is configured for direct PR review.
  • Public profile languages: not available
  • Official Gittensor activity: 1092 PR(s), 123 issue(s).
  • PR-specific overlap: none found.
Contributor next steps
  • Keep the PR focused and include validation evidence before maintainer review.
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.
[BETA] Chat with Gittensory

Ask 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.

  • @gittensory ask &lt;question&gt; answers contribution-quality Q&A with source citations and freshness.
  • @gittensory chat &lt;question&gt; answers in natural prose from cached decision-pack facts via local inference (maintainer/collaborator; read-only).
  • A plain-language @gittensory mention with a real question is routed to the closest matching read-only command automatically -- no exact syntax required.

Full command reference: https://gittensory.aethereal.dev/docs/gittensory-commands

Visual preview
Route Viewport Before (production) After (this PR's preview) Diff
/ desktop before / after /
/ mobile before / (mobile) after / (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

@JSONbored JSONbored merged commit ef45593 into JSONbored:main Jul 13, 2026
10 checks passed
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

Development

Successfully merging this pull request may close these issues.

Neuron/validator table rows are clickable via onClick but not keyboard-operable

2 participants