Adds a single on401 hook in api/client.ts that the session store installs at module load. Before, the *OrEmpty wrappers caught 401 and silently returned empty pages — a mid-session expiry left the UI rendering as "logged in but no bookmarks/collections/etc." until the user reloaded. With the hook, session.user flips to null on the first 401, so the layout re-renders the login affordance and the *OrEmpty helpers keep working for genuine anonymous browsing. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1.6 KiB
1.6 KiB