mirror of
https://github.com/HKUDS/DeepTutor.git
synced 2026-12-04 02:39:54 +08:00
Turning pages in an EPUB, PDF or Markdown moved the header's counter and left the outline behind: the sidebar stayed on whichever row was last clicked — chapter one, for a reader who never clicked one — while the document was eighty sections further along (#1447). The workspace owns `activeLocator` because the outline panel is what needs it, and only the rendered document knows where the reader is. The media stage has always reported it up through `onLocatorChange`. The document surface had no such prop: `handleVisibleLocator` set its own state and wrote the viewport, both of which stay inside `ReaderPane`, so nothing the workspace reads ever moved. Giving it the same seam the media stage has makes both branches say the same thing to the same listener. Scrolling the active row into view is deliberately not part of this. The highlight being wrong was the defect; a panel that scrolls itself while the reader is browsing it is a separate decision, and not obviously the right one. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>