Problem
Notes are keyed by the normalized URL of the tab's final landing page (pageId). When a clean, shareable URL redirects to a messier same-site URL (a locale path, session/variant params the tracker-stripper doesn't know), visitors land on a fragmented — sometimes per-visitor — page id and see "No notes yet", even though the page's natural shared address is the pre-redirect URL.
Agreed design (owner-confirmed via session Q&A)
- Offer gate — same site + cleaner only. The hint appears only when the tab reached the page via a redirect whose source URL (a) is http(s) and commentable (denylist-gated like everything else), (b) is same-site as the target (host-suffix relation, either direction), (c) normalizes to a different page id, and (d) is strictly cleaner — its normalized URL is shorter, i.e. the redirect added path/params. Cross-site hops (t.co / bit.ly shorteners) never prompt.
- Only in the empty state. The hint rides the "No notes yet" state (read succeeded, current view empty): "You were redirected here — this might not be the page's main address." plus a Show notes for
<cleaner URL> button.
- Accept = full switch. Accepting switches the panel to the cleaner page id — it shows that page's notes and the composer/votes post there — consolidating the thread under the shareable address (the same key the link-hover preview looks up). Navigating to a different page resets the panel to the tab's own page.
Mechanism
- The service worker records per-tab redirect provenance from
webNavigation.onBeforeNavigate / onCommitted (permission already held — no new install warning) into chrome.storage.session, so it survives SW recycles and dies with the browser session. client_redirect commits chain the provenance through JS/meta hops; closing the tab cleans the record up.
- The side panel reads the active tab's provenance on refresh and shows the hint when the empty state renders and the offer qualifies; a reload keeps the arrival story (and thus the hint), navigating elsewhere clears it.
- The decision logic (the per-tab navigation reducer + the same-site/cleaner offer rule) is a pure module,
client/src/redirect-provenance.mjs, unit-tested in client/test/; the UI contract lands as requirements §12 (dom + behavior + logic leaves).
Problem
Notes are keyed by the normalized URL of the tab's final landing page (
pageId). When a clean, shareable URL redirects to a messier same-site URL (a locale path, session/variant params the tracker-stripper doesn't know), visitors land on a fragmented — sometimes per-visitor — page id and see "No notes yet", even though the page's natural shared address is the pre-redirect URL.Agreed design (owner-confirmed via session Q&A)
<cleaner URL>button.Mechanism
webNavigation.onBeforeNavigate/onCommitted(permission already held — no new install warning) intochrome.storage.session, so it survives SW recycles and dies with the browser session.client_redirectcommits chain the provenance through JS/meta hops; closing the tab cleans the record up.client/src/redirect-provenance.mjs, unit-tested inclient/test/; the UI contract lands as requirements §12 (dom + behavior + logic leaves).