siftlode/frontend/src/lib
npeter83 3d8015f3a9 fix(history): stop the next overlay's first Back being swallowed after a button/ESC close
useBackToClose closes an overlay programmatically (X button or ESC) by
setting the module-global suppressPop=true and calling history.back(), so
the remaining overlays' popstate handlers ignore that synthetic pop. But
the flag was only ever reset by one of those handlers — when the closed
overlay had no overlay underneath it (the common single-player case),
nothing consumed it and suppressPop leaked true.

The next overlay's first real Back then hit the stale true, reset it and
returned early without closing — the Back was silently swallowed. Symptom
in the YouTube-search flow: close the player with the X button, open
another, press Back once -> nothing happens; a second Back closes it AND
discards the search results, dumping you on the normal feed.

Fix: register a one-shot popstate listener alongside suppressPop=true so
the flag is cleared on that very pop even when no overlay remains to
consume it. Nesting is unaffected (an underlying overlay still short-
circuits first and the one-shot is a redundant no-op).
2026-07-01 01:42:00 +02:00
..
api.ts feat(search): ephemeral results UX, count selector, channel blocklist (frontend) 2026-07-01 01:00:32 +02:00
chatDock.ts feat(messages): auto-open/flash dock on incoming + persist dock across reload 2026-06-25 22:46:54 +02:00
descriptionLinks.tsx refactor(player): extract description link-rendering into lib/descriptionLinks 2026-06-29 00:24:49 +02:00
e2ee.ts feat(messages): standalone Messages module + floating chat dock 2026-06-25 22:34:24 +02:00
errorDialog.ts refactor(frontend): adopt store/storage helpers; centralize persistence 2026-06-26 03:30:19 +02:00
format.ts refactor(i18n,format): translate ETA strings; consolidate time/duration formatters 2026-06-29 00:22:21 +02:00
hints.ts refactor(frontend): adopt store/storage helpers; centralize persistence 2026-06-26 03:30:19 +02:00
history.ts fix(history): stop the next overlay's first Back being swallowed after a button/ESC close 2026-07-01 01:42:00 +02:00
messagesSocket.ts feat(messages): auto-open/flash dock on incoming + persist dock across reload 2026-06-25 22:46:54 +02:00
messaging.ts fix(messages): gate on server key state, not just local unlock 2026-06-25 22:58:29 +02:00
notifications.ts refactor(frontend): adopt store/storage helpers; centralize persistence 2026-06-26 03:30:19 +02:00
onboarding.ts refactor(frontend): adopt store/storage helpers; centralize persistence 2026-06-26 03:30:19 +02:00
releaseNotes.ts chore(release): 0.18.0 2026-06-29 23:41:53 +02:00
sidebarLayout.ts refactor(frontend): adopt store/storage helpers; centralize persistence 2026-06-26 03:30:19 +02:00
storage.ts feat(frontend): add createStore factory + central localStorage registry 2026-06-26 03:30:19 +02:00
store.ts feat(frontend): add createStore factory + central localStorage registry 2026-06-26 03:30:19 +02:00
theme.ts refactor(frontend): adopt store/storage helpers; centralize persistence 2026-06-26 03:30:19 +02:00
urlState.ts fix(search): include Library source filter in shareable URL 2026-06-29 02:30:37 +02:00
useDebounced.ts fix(feed): stop search-box flicker (keepPreviousData + debounced query) 2026-06-29 02:19:18 +02:00
useDismiss.ts refactor(ui): useDismiss hook for outside-click/Escape close 2026-06-29 00:11:44 +02:00
useLiveQuery.ts fix(scheduler): show progress for any running job with reliable live updates 2026-06-19 02:43:46 +02:00
useUndoable.ts feat(playlists): sort + group-by-channel with reusable undo/redo 2026-06-15 21:52:28 +02:00
version.ts refactor(frontend): adopt store/storage helpers; centralize persistence 2026-06-26 03:30:19 +02:00