fix(shared): legacy conv-key migration query used .eq(null) instead of .is(null)

PostgREST translates .eq('col', null) to `col = NULL` which is always false
in SQL. The migration silently returned zero rows -> setupNewUserIdentity
fired but re-wrapped nothing -> users could set a PIN but every send threw
'Awaiting key'. Switching to .is('col', null) emits `col IS NULL` and the
migration finally finds its work.

Also makes the migration trigger idempotent and re-fires it on:
  - every successful loadOrUnlockUserKey
  - AuthContext startup when the user-key is already cached
so users stuck on 0.18.0 auto-recover the moment they install 0.18.1.

PinInput: focused + active-slot now show a brand-coloured ring, glow, and
a blinking caret so users see where the next keystroke lands.
This commit is contained in:
byGalax
2026-05-16 00:15:15 +02:00
parent d9377fc52a
commit 6caa674c19
5 changed files with 54 additions and 13 deletions
@@ -26,7 +26,7 @@ describe('migrateOwnLegacyBundles', () => {
return {
select: () => ({
in: () => ({
eq: () => Promise.resolve({
is: () => Promise.resolve({
data: [
{
conversation_id: 'conv-1',