Effect deps included `theme`, causing the bridge to re-fire on every
client-side theme change and call setTheme(session.user.theme). Because
the PUT to /api/me/theme does not refresh the better-auth session,
session.user.theme stays at the pre-change value and clobbers the new
selection — toast says "Theme updated" but UI stays on the prior theme.
Sync only on session identity change (sign-in / sign-out). Matches the
planning intent ("on session load and after sign-in").
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>