Skip to content

[M4] Comparison mode: pin TextFrame to a specific document #40

Description

@Korede-TA

Goal

Allow two TextFrames to be pinned to specific documents for side-by-side comparison. Selecting a chunk in any visualization frame highlights it in both panels.

What to do

  • Add pinnedDocId: NodeId | null to per-pane config in view-store.frameConfigs
  • TextFrame: when pinnedDocId is set, ignore global focused node and instead scope to chunks of that document
    • Show document title at top with a "📌 pinned" indicator + unpin button
    • Chunk list is scrollable; currently focused chunk is highlighted in place
  • "Pin to document" button in TextFrame toolbar (FrameContainer menu): opens document picker dropdown
  • Default comparison layout preset: { direction: 'row', first: 'text', second: 'text' } with each pane pinned to a different doc
  • Add comparison to layout presets in layout-store

ScrollTo integration (depends on #41)

  • When selection changes and the newly focused node belongs to the pinned document, scrollTo that chunk within the panel

Acceptance criteria

  • Two TextFrames can be open simultaneously, each pinned to a different document
  • Selecting a chunk in SemanticFrame highlights it in the correct pinned panel
  • Unpin button restores global focus mode

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions