Files
multica/packages
Bohan-J ba4fc9b284 perf(issues): make the URL rewrite to the identifier cost no extra request
Opening an issue from an in-app link fetched it twice.

In-app links still carry the UUID, so the route lands on the UUID URL,
loads the issue, then rewrites the address bar to the identifier. That
rewrite is a navigation: the route re-renders with the identifier as its
segment, `useCanonicalIssue` sees a non-UUID, and its resolution query
misses on an identifier-keyed cache entry nothing has filled — so it
re-fetches an issue already in hand. Measured across the rewrite: 2
requests for one issue open.

Mirror the loaded row into its identifier-keyed entry, the reverse of the
`initialData` hop that already covers the identifier-first direction.
Both directions now hold at one request. The `??` keeps a
realtime-patched entry intact, and only `.id` is ever read back out of
that entry, which never changes.

Co-authored-by: multica-agent <github@multica.ai>
2026-07-30 14:46:11 +08:00
..