From 8c674c04478fb74c485cf72e7ac93d3c81645b6f Mon Sep 17 00:00:00 2001 From: Doxa Maps Date: Sat, 3 Oct 2026 05:26:59 +0000 Subject: [PATCH] Posterverse: don't overwrite a link to a tab that arrives with the manifest The first-paint write is skipped when the address names a tab the shell doesn't know yet (a row that only resolves once the manifest is in). Writing tab 0 there would replace the link before applyManifest could honour it; applyManifest's own first-paint replace writes the honoured tab. --- plugin-designs/posterverse/posterverse.vue | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/plugin-designs/posterverse/posterverse.vue b/plugin-designs/posterverse/posterverse.vue index 1a0eac95f..39d7c95e7 100644 --- a/plugin-designs/posterverse/posterverse.vue +++ b/plugin-designs/posterverse/posterverse.vue @@ -227,8 +227,12 @@ export default defineComponent({ mounted() { this.watchHostLang() // Paint the rail at once; the manifest completes the rows in the background and re-drives the mount. - // First paint is a REPLACE, so a reload or a shared link keeps the tab without adding a Back step. - this.select(this.initialIndex(), { firstPaint: true }) + // First paint is a REPLACE, so a reload or a shared link keeps the tab without adding a Back step. If the + // address names a tab that only arrives with the manifest (a provisional row), write nothing yet: writing + // tab 0 here would overwrite the link, and applyManifest's own first-paint replace writes the honoured tab. + const want = this.requestedTab() + const known = !want || this.tabs.some((t) => t.id === want) + this.select(this.initialIndex(), { firstPaint: true, fromHistory: !known }) // Back / Forward re-apply the tab from the address and never write (writing would lose Forward). this._offAddress = onAddressChange(({ tab }) => { const i = this.tabs.findIndex((t) => t.id === tab)