Skip to content

Update table row affordances for components #59

Description

@a-effort

Update tools, resources and prompts drawer table row interactions for consistency with ServersTable: the row is inert, and each thing you can act on is its own control.

Proposed change

Make the three drawer tables match that model.

Rows become inert: drop onClick, onKeyDown, tabIndex, cursor-pointer and the row-level focus-visible ring. The stopPropagation() calls in the cell controls (7 in ResourcesTable, 8 in ToolsTable, 5 in PromptDefinitionTable) exist only to defend against the row handler and come out with it.

Selection moves to the name cell: a ghost button that calls onSelect*, hover-underlined, keyboard-activatable natively. PromptDetailsPanel already uses a button named after the item for this (PromptDetailsPanel.test.tsx:142). Alternative worth weighing: a "View details" item in the row's overflow menu, which is literal ServersTable parity but costs a menu round-trip per row when the rail is already on screen.

ID / URI text joins its copy button: currently a muted <span> beside an icon-only button, so hovering the text does nothing. Moving it inside the button gives the whole cell one hover lift, text-muted-foregroundtext-foreground, as in ServersTable.tsx:241-266. Add transition to the schema and overflow triggers so they animate the same way.

Net effect: every interactive target has a visible hover state that works by text contrast (4.74:1 → 19:1). More on contrast ratios in #58.

Files

  • src/components/tools/ToolsTable.tsx
  • src/components/resources/ResourcesTable.tsx
  • src/components/prompts/PromptDefinitionTable.tsx

Test impact

10 tests assert row-click, row-keyboard or cursor-pointer behaviour (3 resources, 5 tools, 2 prompts) and need repointing at the name button. ToolDetailsPanel.test.tsx:476 reaches for the row via .closest("tr") and clicks it (same fix).

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions