Skip to content

fix: scope expand/collapse hotkey to active split#2667

Merged
gbirman merged 1 commit into
mainfrom
macro-czaGycnY8pGYTVnzGmeqt-fix-expand/collapse-item-not-always-correctly-working
Apr 20, 2026
Merged

fix: scope expand/collapse hotkey to active split#2667
gbirman merged 1 commit into
mainfrom
macro-czaGycnY8pGYTVnzGmeqt-fix-expand/collapse-item-not-always-correctly-working

Conversation

@gbirman
Copy link
Copy Markdown
Contributor

@gbirman gbirman commented Apr 20, 2026

Summary

  • The h/l expand/collapse hotkey in the soup view queried the DOM globally for [data-entity-id], so when multiple splits were open it always matched the first split's toggle button regardless of which split's hotkey fired.
  • Scope the lookup to the split that owns the hotkey via [data-split-id="${splitHandle.id}"], then find the entity inside it.

The h/l expand/collapse toggle queried the DOM globally, so it always
matched the first split's toggle button instead of the split that
registered the hotkey. Scope the query to the split container via
splitHandle.id.
@macro-application
Copy link
Copy Markdown

@github-actions
Copy link
Copy Markdown

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 20, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 13774f7a-fc30-43e3-a1c8-1f17bccdfb5e

📥 Commits

Reviewing files that changed from the base of the PR and between 4e9678a and d8d9c8c.

📒 Files selected for processing (1)
  • js/app/packages/app/component/next-soup/soup-view/use-soup-navigation-hotkeys.ts

📝 Walkthrough

Summary by CodeRabbit

  • Bug Fixes
    • Improved focus detection in split views to correctly identify elements within the active split container, enhancing navigation behavior when working with multiple split panes.

Walkthrough

Modified getCollapsibleToggle to scope DOM lookups for focused entities to the active split container by querying for the split container element first using splitHandle.id, then searching for the entity within it, returning undefined if either element is not found.

Changes

Cohort / File(s) Summary
Hotkey Navigation Scoping
js/app/packages/app/component/next-soup/soup-view/use-soup-navigation-hotkeys.ts
Modified getCollapsibleToggle to scope DOM lookups by splitHandle.id, ensuring the focused entity is searched within the active split container rather than at the document level.

Possibly related PRs

🚥 Pre-merge checks | ✅ 2
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title follows conventional commits format (fix:) and is 49 characters, well under the 72-character limit.
Description check ✅ Passed The description clearly explains the bug fix and the scoping change, directly related to the changeset modifications.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@gbirman gbirman merged commit fd0aabb into main Apr 20, 2026
24 checks passed
@gbirman gbirman deleted the macro-czaGycnY8pGYTVnzGmeqt-fix-expand/collapse-item-not-always-correctly-working branch April 20, 2026 15:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant