Skip to content

Clarify focus manager isolation design for multi-pane editing #644

Closed

Description

@malibio

Summary

The single focusManager instance is shared by ALL panes, which may cause unexpected focus behavior when editing nodes across panes.

Background

Identified in the multi-tab reactivity investigation (Issue #631).

Current Behavior

  • Single focusManager instance shared by all panes
  • If Pane A focuses node-5, Pane B might also try to focus node-5
  • Unclear if this is intended (synchronized focus) or a bug

Question to Resolve

Should focus be synchronized across panes or isolated per-pane?

Option A: Synchronized Focus (Current)

  • Clicking node in any pane focuses it everywhere
  • Pro: Consistent editing experience
  • Con: Can't edit different nodes in different panes simultaneously

Option B: Isolated Focus (Per-Pane)

  • Each pane has independent focus state
  • Pro: Edit different nodes in split view simultaneously
  • Con: More complex focus management

Acceptance Criteria

  • Document the intended design decision (synchronized vs isolated)
  • If synchronized: Add code comments explaining this is intentional
  • If isolated: Implement per-pane focus state
  • Add focus isolation tests

Test Case

Open split panes (left/right)
Left pane: Click on node-5 → editing
Right pane: Viewing different tree

Expected (isolated): Right pane does NOT enter edit mode for node-5
Expected (synchronized): Right pane also shows node-5 as editing

Priority

LOW - Design clarification needed but not blocking functionality

Related

Activity

  1. added
    enhancement
    on Nov 23, 2025
  2. malibio commented on Dec 4, 2025

    @malibio
    CollaboratorAuthor

    This has been addressed through refactoring. The focusManager now tracks editingPaneId alongside editingNodeId, and components check both values before entering edit mode. This implements Option B (Isolated Focus) - each pane has independent focus state.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementui

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions