Skip to content

feat(lib-vuetify): add realtime websocket to notification queue#9

Merged
BatLeDev merged 1 commit into
mainfrom
notif-queue-consolidation
Jun 12, 2026
Merged

feat(lib-vuetify): add realtime websocket to notification queue#9
BatLeDev merged 1 commit into
mainfrom
notif-queue-consolidation

Conversation

@BatLeDev

Copy link
Copy Markdown
Member

Consolidate the realtime notification queue (proven in data-fair's local fork) into the shared @data-fair/lib-vuetify-events lib so data-fair and portals share one source.

  • DfNotificationQueue.vue: subscribe to user:<id>:notifications over WebSocket (@data-fair/lib-vue/ws) and prepend pushed notifications live; refresh(size) reloads the list on menu open and only refreshes the unread count on close.
  • eventsUrl prop now means the events service root: REST hits ${eventsUrl}/api/notifications and the WS connects to ${eventsUrl}/api/ (same base as REST, so it reaches the API/ws-server even in split UI/API topologies).
  • sender typed as Emitter (adds @data-fair/lib-common-types peer dependency).
  • dev.vue passes the new $eventsUrl (service root) instead of $apiPath.
  • New e2e test asserts a pushed event appears in the open bell without reload.

Why: the realtime version only lived in data-fair's local fork (which overrode this lib via a vite alias); portals carried a separate static fork. This makes the lib the single canonical source.

Regression risks:

  • Breaking prop-contract change: eventsUrl must now be the events service root (not the /api base), and consumers must route /events/api/ to the events service. Verified end-to-end in data-fair and portals — realtime push works through nginx with no extra config.
  • New @data-fair/lib-common-types peer dependency; consumers must provide it.
  • No version bump in this PR; the 0.3.0 release is a separate follow-up commit on main.

@BatLeDev
BatLeDev merged commit eb8ade8 into main Jun 12, 2026
4 checks passed
@BatLeDev
BatLeDev deleted the notif-queue-consolidation branch June 12, 2026 10:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant