US02-05: Build the Static Application Shell #58
Reference in New Issue
Block a user
Delete Branch "us/US02-05-build-the-static-application-shell"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Adds the reusable browser shell primitives Phase B views build on.
What
frontend/js/store.js— observable store (get/set/subscribe)frontend/js/events.js— job activity adapter: SSE preferred, polling fallback, sharing the eventseqas cursor so a transport switch never drops or repeats an eventfrontend/js/api.js—cancellable()(AbortController) + job endpoints; aborted requests reject with codecancelledphoto_pipeline/api/routes/jobs.py— SSE now emits defaultmessageevents with the type in the JSON payload instead ofevent: <type>, so a browserEventSourceconsumes the open-ended type set (state:*,claimed, …) viaonmessagewithout enumerating it.event: donesentinel and resumableid:cursors unchanged.Acceptance
index.html/CSS/modular JS ✓ (pre-existing, extended)/api/v1✓ (test asserts JSON-only)Tests
frontend/js/tests/in-browser unit suite (15 assertions: api errors + cancellation, store transitions, routing, SSE→polling fallback) — no JS toolchain; served over the app's static mount, driven by playwrighttests/e2e/test_frontend_shell.py— unit suite + asset loading, deep-link + reload restore, JSON-only/api/v1, clean console/network🤖 Generated with Claude Code