0d1828294a
The scoped find captures the foreground chat surface at bar-open time and marks it `data-find-root`. A keep-alive tab flip — clicking another session tab in the same stack — hides that surface with `data-pane-hidden` and activates an unmarked one, without a pathname change, so the FindBar (which only closes on a route change) stays open. Every subsequent query then resolved no visible `data-find-root`, reporting 0/0 while the surface on screen contained the text; Cmd+G / Cmd+Shift+G became no-ops. currentFindScope now re-targets when every marked root is hidden: it re-resolves to the foreground chat surface, clears the old surface's highlights and marker (so they do not resurface when its tab is revisited), stamps `data-find-root` on the new surface, and re-arms the re-render watcher there. The normal case is unchanged — the scope stays on the captured surface while it remains visible. Also restores the missing trailing newline in store/find-in-page.ts. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>