This repository was archived by the owner on Nov 4, 2026. It is now read-only.
Repository navigation
feat(react)!: retire useClientNotifications, a second inbox poller with zero consumers (objectui#7389) - #10468
Merged
objectstack-fleet[bot] merged 1 commit intoSep 25, 2026
Conversation
…th zero consumers (objectui#7389) Removes the published `useClientNotifications` hook (and its `UseClientNotificationsOptions` / `UseClientNotificationsResult` types) from `@object-ui/react`, with its barrel export. The hook ran its own `setInterval` over `client.notifications.list` beside the shell's shared inbox feed; nothing mounted it. Follows the removal through its readers: - content/docs/guide/notifications.md: the "Server-side notifications" section now points at the shell's shared inbox feed (`AppHeader`'s bell, a `global:notifications` node) instead of teaching the hook. - sharedInboxFeed.cadence-7249.test.tsx: the header comment that named the hook as "the other candidate" records its retirement. - scripts/check-doc-example-types.mjs: drops the ledger row keyed on the deleted file's `@example`, which the gate would report as stale. - changeset: minor on @object-ui/react, BREAKING, migration = use the shell's shared inbox feed. Claude-Session: https://claude.ai/code/session_01BA3nKVUwKQJf8DBxrSVtNC
Contributor
✅ Console Performance Budget
The eager closure is every chunk the entry reaches through static imports — what the browser fetches and parses before the app renders. The entry chunk on its own is a small fraction of it. 📦 Bundle Size Report
Size Limits
|
objectstack-fleet
Bot
deleted the
claude/issue-7389-retire-use-client-notifications
branch
September 25, 2026 04:37
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 free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Fixes #7389
Clause-②: yes
Retires
useClientNotificationsfrom@object-ui/react, as ruled on the card (comment 5809224666, letter remove). Dispatched under PM claim 5826117848, PM sessionsession_01BA3nKVUwKQJf8DBxrSVtNC.What changed
packages/react/src/hooks/useClientNotifications.ts: the hook and its two exported types,UseClientNotificationsOptionsandUseClientNotificationsResult. Its private helpers (toSeverity,ClientBearingDataSource,hasGetClient,useResolvedClient) had no other reader and go with it. The hook had no tests of its own.export *line leavespackages/react/src/hooks/index.ts.content/docs/guide/notifications.mdno longer teaches the hook. It now points at the shell's shared inbox feed (sharedUserFeedsin@object-ui/app-shell) through the feed's two public surfaces: the header bell inAppHeader, and aglobal:notificationspage node. It also says the feed itself is not exported, and that a second poller beside the shell is the shape the feed exists to remove.sharedInboxFeed.cadence-7249.test.tsxcalled the hook "the other candidate" with "no call sites". It now records that the hook was retired and is no longer a candidate. Only the comment changes; no assertion does.scripts/check-doc-example-types.mjsdrops the ledger row keyed on the deleted file's@example. If kept, that row reads as STALE andcheck:doc-examplesexits 1 (measured below). This path is outside the claim's declared file surface; see "Surface" below..changeset/7389-retire-use-client-notifications.md:minoron@object-ui/react(nevermajor, per AGENTS.md section 9). It is marked BREAKING, and its migration is: use the shell's shared inbox feed.Consumer census (run before deleting, as the ruling requires)
No mount was found anywhere reachable. Every census had a positive control that had to light up:
git grep -lw useClientNotificationse6203d756(branch point), whole treepackages/react/CHANGELOG.md, the cadence pin comment and the doc-example ledger row. None of them mounts it.useSettledSchemaoverpackages/*/src/*,apps/*,examples/*: 25 filesea9d17fb6(main, re-read before opening this PR)338feda6(origin/main)SchemaRendererfound in.ts/.tsxcode087b7c5(shallow clone, read-only)@object-ui/imports foundgit ls-remoteexit 128 on credentials, REST 403)Reverse proof: the removal is real at a consumer's resolution path
The probe sits in
packages/components, where@object-ui/reactresolves throughnode_modulesto theexportsofpackages/react/package.jsonand then todist/index.d.ts. One probe imports the three removed names plus the live controluseSettledSchema. A second probe imports only controls (useSettledSchema,useNotifications). Both compile withtsc --noEmit --strict --ignoreConfig. Both legs ran from committed state under one lock hold, with an EXIT/INT/TERM trap for the restore:e6203d756. On disk: barrel line count 1, hook file present. React was rebuilt, anddist/hooks/index.d.tsthen had line count 1. Result: the removed-names probe exits 0, and the control probe exits 0.git diff HEADis 0 bytes, porcelain is empty, the barrel blob979a1a0d0equals HEAD's, and the hook file is absent. Thendistwas wiped and react rebuilt from HEAD: 0 dist files name the hook (132 emitted files, against 134 in leg B), and the control is present.useClientNotificationsgives TS2724, "has no exported member named 'useClientNotifications'. Did you mean 'useNotifications'?". The dispatch predicted TS2305. TS2724 reports the same absence; tsc uses that code when it can offer a spelling suggestion.UseClientNotificationsOptionsandUseClientNotificationsResultgive TS2305.await import('@object-ui/react')under plain Node frompackages/componentsgives'useClientNotifications' in m === false, anduseSettledSchemaanduseNotificationsare functions.Ledger ablation (why the
check-doc-example-types.mjsedit is required): the base row was re-inserted through a unique anchor (on disk, 0 rows went to 1).node scripts/check-doc-example-types.mjsthen exits 1 withSTALE LEDGER ROW packages/react/src/hooks/useClientNotifications.ts useClientNotifications #1, "no such example in the scan set". After the restore, blobe96381d17equals HEAD's andgit diff HEADis 0 bytes.Verification at
6308b6440(branch head)Heavy runs went through the shared verify lock. The closure was built first:
turbo run build --filter='./packages/*' --concurrency=2passed 39 of 39 tasks, and@object-ui/example-schema-catalogwas also built forapps/site.type-check, downstream direction (
@object-ui/reactplus its dependents, the consumer side):@object-ui/react, then all 27 dependents that declaretype-check(@object-ui/example-hello-worlddeclares none). All reportDonewith 0 errors:The first
apps/siteattempt hit TS2307 on the unbuilt@object-ui/example-schema-catalog. That is a prerequisite failure, not a reading; the re-run after building it exits 0.vitest, from the repo root:
pnpm exec vitest run packages/react/ packages/app-shell/src/hooks/:Test Files 140 passed (140),Tests 1703 passed (1703). 140 equals the tracked test-file count of the two paths (94 + 46).pnpm exec vitest run scripts/__tests__/:Test Files 179 passed, 2 skipped (181),Tests 5306 passed, 2 skipped (5308). This coverscheck-doc-example-types.test.ts, the edited script's own suite.Gates (exit 0 unless noted):
check:doc-examples: all 88 ledger rows match;check:doc-snippets: 673 of 673 blocks judged, 0 failed;check:readme-exports: OK, with 0 unbuilt packages;check:new-line-citations: 0 new;check-changeset-presence: 1 changeset declared;check:changeset-claims, also run with this body as--pr-body: nothing flagged;docs:check-links,check:unreferenced-sources,check:doc-types,check:doc-fences,check:doc-example-ids,check:doc-example-readers,check:control-bytes,check:published-dist,check-changeset-no-major,check-changeset-overwrite,check-changeset-fixed.check:node-esm-load(an extra, not in the dispatch list) exits 1. Six entries are NOT MEASURED: its provenance leg refusedauth,mobile,permissions,providers,react-runtimeandtypesas shared-turbo-cache replays from sibling worktrees.@object-ui/reactwas built by this tree and is among the 28 entries loaded.eslint, per-rule counts on the touched files, base against head. The base side was read via
git show e6203d756:PATH | eslint --stdin --stdin-filename PATH. Each--format jsonresult held one file, and none was reported as ignored.hooks/index.ts, the cadence test andcheck-doc-example-types.mjs:{}on both sides.@typescript-eslint/no-explicit-anyx4 andreact-hooks/set-state-in-effectx1, all warnings. They leave with the file.eslint.config.jsenables no type-aware linting (noparserOptions.projectorprojectService), so this diff cannot move a verdict on an untouched file. Repo-widepnpm lintis left to CI.Surface
The claim's file surface did not list
scripts/check-doc-example-types.mjs. The removal forces its one ledger row out, because the gate goes red on a row whose example is gone (measured above). The script reads the deleted file as text, the kind of reader that item 4 of the dispatch's mechanism list asked to update with the removal. The check is not weakened: the row goes because its subject no longer exists, and the gate's other 88 rows still match.Acceptance notes
Generated by Claude Code