panel-to-panel focus traversal via F6 / Shift+F6 (T-105)
Each SlotHost now owns a FocusScopeNode and registers it with FocusTracker on mount. The render is wrapped in FocusScope + FocusTraversalGroup so Tab stays within a panel and slot-level focus is observable. When a slot's scope gains focus, SlotHost pushes (slot, activeContributionId) to FocusTracker — this collapses the parallel-tracker model the consultant flagged. FocusTracker keeps its setActive surface for explicit callers (palette, etc.) but slot-scoped tab activation feeds it automatically. Two new intents, two new bindings: FocusNextPanelIntent → F6 FocusPreviousPanelIntent → Shift+F6 (VS Code convention; preset YAML.) The cycle skips slots without a registered scope, so a layout that hides the context panel doesn't strand focus on a missing target. Fewer than two registered → no-op. SlotHost split into a stateful outer (scope + registry) and a stateless `_SlotBody` (the existing slot-specific rendering), keeping the build straightforward. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -30,6 +30,13 @@ bindings:
|
||||
- intent: focus.previous
|
||||
keys: shift+tab
|
||||
|
||||
# Panel-to-panel cycling (sidebar → workspace → context).
|
||||
# VS Code convention.
|
||||
- intent: focus.nextPanel
|
||||
keys: f6
|
||||
- intent: focus.previousPanel
|
||||
keys: shift+f6
|
||||
|
||||
# -- Command palette --------------------------------------------------
|
||||
- intent: palette.open
|
||||
keys: [ctrl+shift+p, meta+shift+p]
|
||||
|
||||
Reference in New Issue
Block a user