pf_app/ui/src
Paul Trowbridge e31a60b18b Re-check the selected source and version against the live list
The selection is restored from localStorage, but it was only validated once
at mount. Deregistering the selected source left App holding an id that no
longer exists, so every subsequent call 404'd "Source not found" with no way
out but a reload — Setup.deleteSource clears its own selectedSource and never
tells App. Deleting the selected version had the same shape.

Move both checks into effects keyed on the lists themselves. A sourcesLoaded
flag keeps the source effect from firing against the initial empty array and
wiping the restored id before the fetch resolves.

Also coerce both refresh callbacks to an array. A 401 returns an error object,
and data.some() then threw inside an unhandled promise, stranding the
selection instead of clearing it.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
(cherry picked from commit e6e2faeb37)
2026-09-15 21:31:07 -04:00
..
assets Scaffold React/Vite/Tailwind UI with 3-step Setup → Baseline → Forecast flow 2026-04-25 16:28:45 -04:00
components Put the app behind a login 2026-09-14 22:20:25 -04:00
views Put the app behind a login 2026-09-14 22:20:25 -04:00
App.css Scaffold React/Vite/Tailwind UI with 3-step Setup → Baseline → Forecast flow 2026-04-25 16:28:45 -04:00
App.jsx Re-check the selected source and version against the live list 2026-09-15 21:31:07 -04:00
auth.jsx Put the app behind a login 2026-09-14 22:20:25 -04:00
index.css Fix period col dropdown dark mode: custom dropdown with theme-aware colors 2026-06-13 00:48:25 -04:00
main.jsx Put the app behind a login 2026-09-14 22:20:25 -04:00
theme.jsx Add light/dark mode with theme toggle 2026-04-25 23:29:25 -04:00