Repository navigation
refactor(collaboration, types)!: retire the zero-consumer useMentionNotifications hook and MentionNotification - #29732
Conversation
…otifications hook and MentionNotification The hook kept a client-side list of mention notifications that no console surface reads: the bell reads server sys_notification rows through useInboxBell. MentionNotification in @object-ui/types had the hook as its only reader, so both leave their barrels together. Co-Authored-By: Claude <[email protected]> Claude-Session: https://claude.ai/code/session_01QsR2jSoUd7Uhw6ei5FFLD1
|
Contract-review-claim: session_01QsR2jV5sBSzCYNEDgpYLJw · head 9be84e1 · 2026-11-03T03:05Z Generated by Claude Code |
|
director#1 · zhuangjianguo · session_01QsR2jV5sBSzCYNEDgpYLJw Contract reviewServed-tier: Read-only; nothing built or run here. CI on ① Derived judgments
② Semver level
③ Boundary flags
④ Design judgment
Must-fix (1):
Should-fix: none. Implemented-by: VERDICT: FAIL Generated by Claude Code |
…archResult entry The pending CommentSearchResult changeset of the same release says MentionNotification stays exported; this entry now says it leaves here. Co-Authored-By: Claude <[email protected]> Claude-Session: https://claude.ai/code/session_01QsR2jSoUd7Uhw6ei5FFLD1
|
Contract-review-claim: session_01QsR2jV5sBSzCYNEDgpYLJw · head d92625f · 2026-11-03T03:08Z Generated by Claude Code |
|
director#1 · zhuangjianguo · session_01QsR2jV5sBSzCYNEDgpYLJw Contract reviewServed-tier: Re-review of the one must-fix in record 6594389562. Read-only; nothing built or run. The six-file diff against ① Derived judgments
② Semver level
③ Boundary flags
④ Design judgment
No must-fix. No should-fix. Implemented-by: VERDICT: PASS Generated by Claude Code |
|
domain:ui#5 · zhuangjianguo · session_01QsR2jQjvWkZ7is6GXbC6DB 席位核对 — ACCEPT ·
|
Requested by Steedos · project thread
Part of #25921. The umbrella stays open; this is one batch of it.
Clause-②: no (narrowing)
Metadata-protocol: none
维护者速读
@object-ui/collaboration里没有任何使用者的useMentionNotifications钩子(连同两个配置/结果类型),以及@object-ui/types里只被它读取的MentionNotification接口。sys_notification,经useInboxBell),这个前端内存版钩子从未被接上;留着它会让人(和 AI)误以为提及通知走的是它。.changeset/25921-collab-mention-notifications.md(迁移说明)、ui/packages/types/src/views.ts(删除的接口)、ui/packages/collaboration/src/index.ts(barrel 行)。git grep -w -e useMentionNotifications -e MentionNotification -- ui packages apps examples content应只剩 changeset 与 QA 清单里的历史文字,无代码命中。What changes
ui/packages/collaboration/src/useMentionNotifications.ts(97 lines) and its barrel lines (useMentionNotifications,MentionNotificationsConfig,MentionNotificationsResult).MentionNotificationinterface fromui/packages/types/src/views.tsand its barrel line inui/packages/types/src/index.ts.ui/packages/types/src/__tests__/record-id-string-survivors-10078.test.ts: doc comment only. It namedMentionNotification.recordIdwhile recounting which ids an earlier ruling covered; it now describes that interface as retired. The test pinsRecordSubscription.recordIdandDataSourceMutationEvent.idonly, so no assertion moves..changeset/25921-collab-mention-notifications.md: patch for both packages, BREAKING paragraph, one FROM/TO line per retired name, ADR-0087 markernot-required (runtime-export-retired ...)naming all four operands.Tests
Premise census on
origin/main1c1a5d4 (git grep -l -w -F NAME, excluding**/CHANGELOG.md, lockfiles and.changeset/**):ui/packages/collaborationuseMentionNotificationsdocs/qa/platform-checklist/areas/records-forms.jsononly (prose)MentionNotificationsConfigMentionNotificationsResultMentionNotificationui/packages/typesdefinition, barrel and the 10078 test comment onlyuseRealtimeSubscription(positive control)hotcrm and docs.objectos.ai: 0 hits for
MentionNotification(case-insensitive substring). No string or dynamicimport()of the module path, and neither package README names the hook or the type.After the change (head 4d64f54). Two later merges of main brought no file of
collaborationortypes: d6bab30 none underui/, 9be84e1 onlyui/packages/fields(lookup cell). Readings:turbo run type-checkfor@object-ui/types,@object-ui/collaboration,@object-ui/app-shell,@object-ui/consolewith their^buildclosure: 74 of 74 tasks successful (lock VERDICT command-exit 0, 12m23s).vitest run packages/collaboration/ packages/types/ --maxWorkers=2fromui/: Test Files 394 passed (394), Tests 10545 passed (10545)..d.ts: a temporary probe in app-shell importing the retired names answeredTS2305 Module '"@object-ui/types"' has no exported member 'MentionNotification'andTS2305 ... '"@object-ui/collaboration"' has no exported member 'useMentionNotifications', whileCommentEntryfrom the same entry still resolved. Probe deleted.pnpm --dir ui run check:readme-exports: census line0 fabricated, 0 stale omission(s); exit 1 only on the known prerequisite (packages/clidist unbuilt:@object-ui/cliimportsserve/init).MentionNotificationsConfig0,MentionNotificationsResult0,MentionNotification0,useMentionNotifications1 (the QA checklist prose), controluseRealtimeSubscription72.Acceptance notes
docs/qa/platform-checklist/areas/records-forms.jsonL3265 (asource[]line saying the hook "is exported but the console does not consume it") is now stale: the hook is no longer exported. Left untouched per the claim's file surface; L3299 is a history row and stays as written..changeset/25921-types-comment-search-result.mdsaysMentionNotification"stay[s] exported unchanged". This PR makes that sentence untrue for the release that consumes both. Not edited here (editing a pending25921-*changeset reds Check Changeset); the seat may want to amend it in a docs-only follow-up before the release.Verification
Derived gates (dispatch-gates --commands, head 4d64f54): 35 commands
33 of 33 run in a loop exited 0, among them
check-adr-0087-registration --base origin/main,check-changeset-no-major --base origin/main,check-sdui-manifest(and--self-test),check-comment-mask-corpus,check-empty-changeset,check:published-files,check:type-check-coverage,check:undeclared-dep-imports,check:test-source-alias,check:cross-package-test-inputs,check:nul-bytes. The other two ran under the verify lock:pnpm --dir ui exec vitest run scripts/(Test Files 170 passed, 2 skipped; Tests 4977 passed, 2 skipped; VERDICT command-exit 0) andpnpm check:type-check-debt(VERDICT command-exit 0).Against this PR body:
check-changeset-no-majorexit 0,check-adr-0087-registrationexit 0 (all fourruntime-export-retiredoperands verified as retired from their entries),check-closing-keyword-parityexit 0,check-partof-closing-keywordexit 0.check-platform-checklist --changed-from origin/main: 0 anchored files in the change set.Dogfood battery (head d6bab30)
Closure build plus
pnpm --filter @objectstack/dogfood testunder the verify lock: Test Files 401 passed, 3 skipped (404); Tests 3310 passed, 28 skipped (3338); VERDICT command-exit 0. The final head 9be84e1 adds only the main merge described under Tests.Generated by Claude Code