Goal
When a node is focused via click in SemanticFrame, MapFrame, Timeline etc., the TextFrame should automatically scroll to that node's text position — both in normal mode and in pinned comparison mode.
What to do
- Add
data-node-id attributes to each rendered chunk/annotation span in TextFrame
- On
selectionStore.focused change: document.querySelector([data-node-id="${focused}"])?.scrollIntoView({ behavior: 'smooth', block: 'nearest' })
- For documents (parent nodes): scroll to the document heading
- Smooth scroll, not instant jump
- If the focused node is not in the current TextFrame's scope (e.g. wrong pinned doc), do nothing
Acceptance criteria
- Clicking a chunk on the map scrolls TextFrame to that chunk's text
- Works in both pinned and unpinned mode
- No jarring instant jumps
Goal
When a node is focused via click in SemanticFrame, MapFrame, Timeline etc., the TextFrame should automatically scroll to that node's text position — both in normal mode and in pinned comparison mode.
What to do
data-node-idattributes to each rendered chunk/annotation span in TextFrameselectionStore.focusedchange:document.querySelector([data-node-id="${focused}"])?.scrollIntoView({ behavior: 'smooth', block: 'nearest' })Acceptance criteria