Uh oh!
There was an error while loading. Please reload this page.
fix(react): repoint useClientNotifications to ADR-0030 client surface - #1440
Merged
Conversation
The `useClientNotifications` bridge hook called `client.notifications.*`
with signatures that no longer exist on `@objectstack/client@7.x`:
- `registerDevice(token, platform)` → SDK takes a single
`RegisterDeviceRequest` object (`{ token, platform }`).
- `markAsRead(id)` → no single-id method; SDK is `markRead(ids[])`.
The hook keeps its single-id public API and adapts to the batch call.
These helpers are the stable transport contract for ADR-0030 (Notification
Convergence): server-side they route to the L5 `sys_inbox_message`
materialization and the `sys_notification_receipt` read-state spine. The
changeset also records the cut-over runbook (deploy framework → run the
idempotent `migrateSysNotificationToEvent` once → deploy the objectui repoint).
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>The latest updates on your projects. Learn more about Vercel for GitHub. |
Uh oh!
There was an error while loading. Please reload this page.
Contributor
✅ Console Performance Budget
📦 Bundle Size Report
Size Limits
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What & why
Cross-repo cut-over for framework ADR-0030 — Notification Convergence. The objectui-side bell repoint (
sys_notification→sys_inbox_message+sys_notification_receipt) and the receipt-upsert mark-read path already landed in #1429. This PR closes the remaining objectui item: the SDK consumer.useClientNotifications(the only objectui surface that touchesclient.notifications.*) called the SDK with signatures that no longer exist on@objectstack/client@7.x, so it would throw at runtime:registerDevice(token, platform)→ SDK takes a singleRegisterDeviceRequestobject → nowregisterDevice({ token, platform }).markAsRead(id)→ no single-id method; SDK ismarkRead(ids: string[])→ nowmarkRead([id])(kept the friendly single-id hook API).These helpers are the stable transport contract; server-side ADR-0030 routes them to the L5
sys_inbox_messagematerialization and thesys_notification_receiptread-state spine.Cut-over runbook (in the changeset)
objectui is frontend-only and cannot run the server-side data migration. The new changeset records the operational order so whoever deploys runs it:
emit()+ producers).migrateSysNotificationToEvent({ driver, data })once (from@objectstack/metadata/migrations; idempotent,not_applicableon fresh installs) — server/data-engine step, not a Console step.Verification
tsc --noEmit+ eslint clean on the changed package (remaining lint warnings are pre-existing in untouched lines).sys_inbox_message+ adeliveredsys_notification_receiptfor a test user →delivered → readin place (same row id, no duplicate) and cleared the badge to 0.🤖 Generated with Claude Code