render-dom-lake: mark reused lakes to prevent SPA nav conflicts

After reusing an SSR lake element, set data-sx-lake-claimed attribute.
Subsequent dom-query uses :not([data-sx-lake-claimed]) to skip already-
reused elements, preventing SPA navigation from picking up stale lakes
from previous pages.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-04-02 15:30:50 +00:00
parent 547d271571
commit bea8779aea
11 changed files with 45 additions and 20 deletions

View File

@@ -501,7 +501,10 @@
"#sx-content")))
(if
(try-client-route (url-pathname href) target-sel)
(do (browser-push-state nil "" href) (browser-scroll-to 0 0))
(do
(save-scroll-position)
(browser-push-state nil "" href)
(browser-scroll-to 0 0))
(do
(log-info (str "sx:route server fetch " href))
(dom-set-attr link "sx-get" href)