You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Skip fetch and re-render when switching to a cached tab
Tab clicks, popstate, and close-tab fallback used to funnel through
ldh:DocumentNavigate, which always re-fetches the RDF document and
replaces the pane's document-body via XSLT. For a tab whose pane is
already in the DOM and whose RDF document is already in
LinkedDataHub.contents[$uri], this is wasted work and a visible latency
hit on every tab swap.
Add ldh:TabSwitch: aborts any in-flight DocumentNavigate, syncs the
address bar, optionally pushes history state, applies ldh:ActivateTab
(CSS toggle), refreshes the sidebar via ldh:NavigationUpdate, scrolls
to top. No fetch, no XSLT re-render; block factories ran on first
render and the rendered DOM (including map instances cached under
LinkedDataHub.contents[$uri].map) stays intact.
Gate on ixsl:contains(LinkedDataHub.contents, $uri). Cache presence
implies a prior rdf-document-response populated both the entry and the
pane DOM, so block.xsl mousemove handlers will find what they expect
(the invariant f726423 was protecting). Server-rendered initial
panes do not populate the cache, so the local tab on a ?uri=<external>
initial load still falls through to DocumentNavigate.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
<!-- proxied tab: $uri is the external target (?uri=…); local tab: $uri is the bare document URI (no query string) - matches data-uri / document-body/@about, so the cache key downstream stays consistent -->
1033
1089
<xsl:variablename="uri"select="if (map:contains($query-params, 'uri')) then xs:anyURI(map:get($query-params, 'uri')) else ac:absolute-path($href)"as="xs:anyURI"/>
<!-- if the closed tab was active, navigate to the fallback's URI (ldh:RenderTab will activate after fetch) -->
1127
+
<!-- if the closed tab was active, switch to the fallback's URI (ldh:TabSwitch if cached, otherwise ldh:DocumentNavigate -> RenderTab will activate after fetch) -->
0 commit comments