Skip to content

[Studio UI] Add Home/End key navigation to tree - #4051

Closed
idaiv wants to merge 4 commits into
2026.xfrom
fix/tree-home-end-keys
Closed

[Studio UI] Add Home/End key navigation to tree#4051
idaiv wants to merge 4 commits into
2026.xfrom
fix/tree-home-end-keys

Conversation

@idaiv

@idaiv idaiv commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Home key jumps to the first visible tree node, End to the last
  • Consolidated navigation functions into a single gotoNode helper
  • Standard WAI-ARIA tree keyboard pattern

Test plan

  • Focus any tree node
  • Press Home — verify focus moves to the first visible node
  • Press End — verify focus moves to the last visible node
  • Verify existing arrow up/down still works

🤖 Generated with Claude Code

Home jumps to the first visible node, End to the last. Consolidated
the four navigation functions (next/prev/first/last) into a single
gotoNode helper to stay within the file line limit.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copilot AI balanced review requested due to automatic review settings August 31, 2026 13:32
@idaiv idaiv added the Skip Milestone Check Exempts this PR from the mandatory milestone requirement label Aug 31, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Verdict: Needs changes. The PR directly adds the missing Home/End navigation at the owning tree-node component.

Changes:

  • Routes arrow and boundary navigation through gotoNode.
  • Adds Home/End focus behavior for visible nodes.
  • No public API or compatibility impact.

Assessment:

  • Root cause: Addressed directly at tree-node.tsx:169-202.
  • Call sites/boundary: All keyboard branches use the local helper.
  • Tests: Missing automated keyboard regression coverage.
  • Docs: No public API documentation change needed.
  • Remaining risk: Home/End and refactored arrow behavior remain manually verified only.
  • Findings: Missing tests and nonconforming array emptiness check at tree-node.tsx:197.

💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines +177 to +181
if (event.key === 'Home') {
gotoNode(event, 'first')
}

if (event.key === 'End') {
if (index > 0) {
nodesRefs!.current[nodeOrder!()[index - 1]].el.focus()
const order = nodeOrder!()
if (order.length === 0) return
idaiv and others added 3 commits August 31, 2026 13:38
Follow project convention: use lodash isEmpty() instead of direct
array length check in gotoNode.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@sonarqubecloud

Copy link
Copy Markdown

idaiv commented Sep 1, 2026

Copy link
Copy Markdown
Contributor Author

Superseded by #4048 which includes Home/End keys along with the full tree navigation rewrite.

@idaiv idaiv closed this Sep 1, 2026
@github-actions github-actions Bot locked and limited conversation to collaborators Sep 1, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Skip Milestone Check Exempts this PR from the mandatory milestone requirement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants