Skip to content

Adopt the worksheet focus layer in the Simulate view tables - #9446

Draft
kube wants to merge 1 commit into
claude/fe-1545-sidebar-focus-layerfrom
claude/simulate-tables-focus-layer
Draft

Adopt the worksheet focus layer in the Simulate view tables#9446
kube wants to merge 1 commit into
claude/fe-1545-sidebar-focus-layerfrom
claude/simulate-tables-focus-layer

Conversation

@kube

@kube kube commented Aug 30, 2026

Copy link
Copy Markdown
Collaborator

🌟 What is the purpose of this PR?

Stacked on #9420. Adopt the worksheet keyboard-flow layer in the Simulate-mode tables — the scenarios, experiments, optimizations, and metrics lists share one Table component whose every row was its own Tab stop with no arrow keys, and whose single click opened the drawer with no way to select a row without opening it.

🔗 Related links

🔍 What does this change?

  • Table delegates row focus to useFocusStops: each table is one Tab stop with a roving tabindex, and ArrowUp/ArrowDown walk the rows.
  • Activation is select-first (useSelectFirstActivation): the first click selects (focuses) a row, a click on the selected row — or Enter/Space — calls onRowSelect and opens the drawer. The focused row shows the inset ring on any focus, not only :focus-visible, so pointer users see the selection.
  • The unused renderActions per-row action-column API is deleted (no caller existed).
  • Tables without onRowSelect (the optimization steps table) stay inert, as before.
  • All four Simulate views inherit the behaviour with no changes of their own.

Pre-Merge Checklist 🚀

🚢 Has this modified a publishable library?

This PR:

  • modifies an npm-publishable library and I have added a changeset file(s)

📜 Does this require a change to the docs?

The changes in this PR:

  • require changes to docs which are made as part of this PR

🕸️ Does this require a change to the Turbo Graph?

The changes in this PR:

  • do not affect the execution graph

⚠️ Known issues

  • Selecting a scenario row does not (yet) bind to the simulation's current scenario (SimulationContext.selectedScenarioId) — today that is only settable from the Simulation Settings picker. Select-first creates the natural slot for it; wiring it up is a product decision left for a follow-up.

🐾 Next steps

  • Decide whether first-click selection in the Scenarios list should set the current scenario, and wire it if so.
  • File the Linear ticket and retitle this PR once the Linear connector is reauthorized.

🛡 What tests cover this?

  • New table.test.tsx: one Tab stop with roving tabindex, arrow-key row walking, select-first click activation, Enter/Space activation, and inert rows without onRowSelect.
  • focus-flow.test.tsx (below in the stack) covers the underlying movement contract.

❓ How to test this?

  1. yarn dev, switch the top-bar mode to Simulate.
  2. Tab into the Scenarios list (one stop), walk rows with ArrowUp/ArrowDown.
  3. Click a row once — it selects (inset ring) without opening; click it again (or press Enter) — the drawer opens.
  4. Same behaviour in the Experiments and Optimizations tabs; the steps table inside an optimization drawer stays non-interactive.

The tables' visuals are unchanged apart from the focus ring; existing docs screenshots stay valid.

🤖 Generated with Claude Code

@kube kube self-assigned this Aug 30, 2026
@vercel

vercel Bot commented Aug 30, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
hash Ready Ready Preview Aug 30, 2026 12:30am
petrinaut Ready Ready Preview Aug 30, 2026 12:30am
petrinaut-docs Ready Ready Preview Aug 30, 2026 12:30am
1 Skipped Deployment
Project Deployment Actions Updated (UTC)
hashdotdesign-tokens Ignored Ignored Aug 30, 2026 12:30am

Request Review

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

Labels

area/infra Relates to version control, CI, CD or IaC (area) area/libs Relates to first-party libraries/crates/packages (area) type/eng > frontend Owned by the @frontend team

Development

Successfully merging this pull request may close these issues.

1 participant