SSE event bus improvements from audit recommendations #143
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feature/issue-140-sse-event-bus-improvements"
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?
This PR implements the recommendations from the SSE event bus audit (issue #140), with each recommendation in a separate commit for discussion.
Commit summary:
5c89b84- fix: session.ts SSE resource check uses wrong field (msg.type→msg.resource)32432e1- fix: align publicreport SSE resource prefix (frontend now listens forrmo:publicreportmatching backend)1a81d6b- feat: define missing ResourceTypes (TypeContact, TypeServiceRequest, TypeSync, TypeUpload, TypeUser)904bf49- feat: emit SSE events for contact resource updates (PublicReportUpdate + PublicReportNotification paths)8820fb7- feat: add Deleted event helper and frontend deleted handling55a7153- feat: add re-sync on SSE reconnection (subscribeReconnect)2b1ccd6- fix: clean up Sidebar SSE subscription on unmount0178f9d- refactor: use targeted URI fetch for review-task and site SSE eventsNote: RMO SSE integration was excluded per Eli's feedback.
The CI workflow (pnpm-build.yaml) was failing because: 1. actions/checkout@v4 does not initialize submodules by default 2. vue-maplibre-gl is a git submodule (hosted on GitHub) that must be built before the main frontend project can use it 3. vue-maplibre-gl has its own devDependencies (vite-plugin-dts, vite-plugin-banner, etc.) that pnpm doesn't install for file: dependencies unless the package is a workspace member Fix: - Add vue-maplibre-gl to pnpm-workspace.yaml so pnpm treats it as a first-class workspace member and installs its devDependencies - Add CI steps to init the submodule (with HTTPS URL redirect for GitHub) and run its build step before the main project build This follows the AGENTS.md documentation which states the submodule must be built ('yarn install && yarn build') before use.@ -154,3 +162,3 @@);const publicreport = createResourceStore<PublicReportDTO, PublicReport>("sync:publicreport","rmo:publicreport",this was correct before, sync and rmo both have their own namespaces and stores, this is the store for sync, not rmo.
review done, just one minor change.
Addressed the review comment — reverted ts/store/resource.ts back to sync:publicreport. The sync store shouldn't subscribe to the RMO namespace. RMO SSE handling (with proper rmo:publicreport store) can come in a separate PR when that integration is picked up.
Pushed as commit
cc5abec9.Oh, looks like this needs an update to avoid conflicts with main at .forgejo/workflows/golint.yaml
Merged main in and resolved the conflict in
.forgejo/workflows/golint.yaml. Kept the PR branch's stub-only approach for vue-maplibre-gl since the GitHub SSH probe in main's version is known dead code in CI.