Skip to content

fix(app-shell): an inbox message the signed-in user caused does not pop - #10521

Merged
objectstack-fleet[bot] merged 1 commit into
mainfrom
claude/issue-8667-inbox-own-receipts
Sep 25, 2026
Merged

objectstack-fleet[bot] merged 1 commit into
mainfrom
claude/issue-8667-inbox-own-receipts

Conversation

@objectstack-fleet

Copy link
Copy Markdown
Contributor

Fixes #8667

Clause-②: no

What this changes

The inbox arrival announcement (objectui#7011: an in-page toast in a visible tab, a desktop notification in a hidden one) now skips a message the signed-in user caused themselves. This is the fifth design constraint of objectui#7011, the one that could not be built until sys_inbox_message carried an actor.

The card's four steps, in order:

  1. mergeInboxRows (hooks/sharedUserFeeds.ts) maps the new column field by field: actor_id: typeof m.actor_id === 'string' ? m.actor_id : null. The row literal stays explicit, with no spread.
  2. InboxNotification (layout/inboxGrouping.ts) declares actor_id?: string | null, and DECLARED_KEYS in sharedInboxFeed.rowShape.test.tsx gains actor_id.
  3. claimInboxArrivals (hooks/inboxArrivals.ts) adds one clause to the arrival filter: !causedBy(row, key). The row still enters the seen set, because ids is the whole window and the seen update is unchanged.
  4. The pins use concrete, distinct actor ids (u_alice as the reader, u_bob as someone else) and assert each direction once.

Re-adding an actor field after objectui#5203

This puts an actor field back on InboxNotification after objectui#5203 retired actor_name. That retirement rested on "no column to map from". The column now exists:

  • objectstack main declares actor_id (a lookup to sys_user) on sys_inbox_message.
  • The inbox channel writes actor_id: n.actorId ?? null (objectstack#16974).

So the reason no longer holds for an actor ID. It still holds for a NAME: nothing on the row carries a display name. actor_name therefore stays retired, and both objectui#5203 pins are unchanged:

  • the type pin in inboxGrouping.test.ts;
  • the "does not carry actor_name" case in the row-shape suite.

The header comments in inboxGrouping.ts and the row-shape suite now say this.

Measured before writing (the dispatch's mechanism hypotheses)

  • H1 (locations): all four symbols are where the card names them, at BASE bc4efba.
  • H2 (bare id or expanded object): the value is a bare string id.
    • This client's sys_inbox_message read (useSharedInboxFeed) passes no $expand.
    • Without $expand, the adapter takes the client.data.find path, and convertQueryParams adds no expansion.
    • Upstream, ObjectQL.find expands related records only under if (ast.expand && Object.keys(ast.expand).length > 0 …). So the read returns the string the inbox channel stored.
    • On a digest row the value is null: the dispatcher sets no actorId on a collapsed group.
    • So the comparison is string to string. A non-string value maps to null ("no known actor"), the same test the upstream dispatcher applies (typeof p.actorId === 'string' ? p.actorId : undefined).
  • H3 (the current user id): useInboxArrivalNotifier reads useAuth().user?.id from @object-ui/auth and passes it as the first argument of claimInboxArrivals. It is the same id useSharedInboxFeed filters sys_inbox_message.user_id by. The hook-level pin covers that wiring through the u_alice auth mock.

Null and absent actors (the unlock ruling)

Both mean "no known actor", and both announce as before:

  • null: a digest row;
  • an absent actor_id: a server older than the column.

causedBy answers yes only for a string equal to the signed-in user id. Pinned three ways:

  • a row with actor_id: null announces;
  • a row with no actor_id key announces, and the case asserts the key is really absent;
  • in the row-shape suite, a raw row without actor_id produces the same DECLARED_KEYS set, with actor_id null.

Tests (at HEAD 9f24501)

  • Baseline at BASE bc4efba, before any edit (re-verifying the four already-pinned constraints, per triage): inboxArrivals, useInboxArrivalNotifier, sharedInboxFeed.rowShape and inboxGrouping gave 4 files, 43 tests passed.
  • Same four files after the change: 4 files, 50 tests passed. The 7 new tests are 5 pure, 1 row-shape and 1 hook-level.
  • pnpm exec vitest run packages/app-shell/src/hooks/ packages/app-shell/src/layout/: 83 files, 674 tests passed.
  • pnpm turbo run type-check --filter @object-ui/app-shell --concurrency=2: 30 of 30 tasks successful. tsc -p tsconfig.test.json --listFilesOnly lists all seven edited files, so the @ts-expect-error pin and the new tests are in the checked program.
  • eslint on the six changed TS files: exit 0; the JSON output counts 6 files, 0 errors, 0 warnings. The effective config (eslint --print-config) has no parserOptions.project or projectService, so linting is not type-aware and this diff cannot move a verdict on an untouched file. The repo-wide pnpm lint is left to CI.
  • Gates, all exit 0:
    • check:control-bytes, check:test-path-roots, check:vi-mock-specifiers, check:vi-mock-inherit, check:vi-mock-override-shape
    • check:new-line-citations (0 new)
    • check:changeset-claims, check:pending-changeset-literals, check-changeset-presence, check-changeset-no-major, check-changeset-overwrite
    • check:spec-symbols, check:i18n-keys, check:side-effects-array, check:unreferenced-sources, check:doc-example-readers
    • check-governed-queue-guard --test on the diff answers "An ordinary pull request".
  • check:changeset-claims reports that the pending 6730-shared-activity-type-bucket.md names hooks/sharedUserFeeds.ts. That paragraph is about mapActivityRows, which this diff does not touch. I re-read it and it still holds.

Reverse verification (one-shot, on the committed tree, every leg restored)

Each mutation went through ablation-replace.mjs, whose anchor must hit and whose write and restore are checked on disk. The direction was predicted before the run. Vitest covered the arrival, hook and row-shape suites (42 tests).

Leg Mutation Predicted Observed
A drop the !causedBy(row, key) clause red on the two suppression pins and hook constraint 4; the remembered, null and absent cases stay green 3 failed, 39 passed: exactly those three
B leave self-caused ids out of the seen set red on "still REMEMBERS" only 1 failed, 41 passed
C producer maps actor_id: null red on the row-shape mapping case only 1 failed, 41 passed
D causedBy reads a null or absent actor as "me" red on both controls and every pre-existing announce case 19 failed, 23 passed, both controls among them

After every leg, git hash-object equals the HEAD blob for both mutated files, and git diff HEAD is empty.

Acceptance notes

  • Docs: content/docs/guide/notifications.md describes the shared inbox feed but states none of the arrival rules, so no guide text changed.
  • Exports: InboxNotification is not exported from the @object-ui/app-shell barrel. Its one reader outside the package, apps/console/src/inbox-arrival-preview.tsx, imports it by source path and builds rows without actor_id, so it is unaffected.
  • Numbering: the hook suite keeps the objectui#7011 numbering. The new block is its "constraint 4", placed between the existing constraint 2 and constraint 5 blocks.

Dispatched by the domain:ui seat 5 PM; session https://claude.ai/code/session_01KUxVUa7e39aNjhkKi1gsoy.


Generated by Claude Code

The inbox feed maps sys_inbox_message.actor_id (a bare sys_user id: the
read passes no $expand) onto InboxNotification.actor_id, field by field.
claimInboxArrivals skips a new unread row whose actor equals the
signed-in user id, and still records it as seen. A null actor (digest
row) and an absent column (older server) announce as before.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KUxVUa7e39aNjhkKi1gsoy
@github-actions

Copy link
Copy Markdown
Contributor

changeset-claim-re-read

⚠️ 1 pending changeset(s) describe a file this change touches

Their bodies publish verbatim into the CHANGELOG at the next release, so this is a request to re-read them against your diff — addressed here because you are the one seat that can answer it without re-deriving anything.

⛔ Nothing here blocks, and nothing here is a verdict on your change. This gate exits 0, is not a required context, and judges name resolution, never meaning: it asked whether a pending body names a file you touched. "Is this sentence still true?" is the one question it will not answer, and the one you are being asked to answer.

.changeset/6730-shared-activity-type-bucket.md

  • names hooks/sharedUserFeeds.ts → packages/app-shell/src/hooks/sharedUserFeeds.ts — edited by this change

    mapActivityRows in hooks/sharedUserFeeds.ts — the feed behind the AppHeader bell's Activity tab, Home's activity card and the exported ActivityFeed panel — carried the third hand-written reading of that column in this repo, and it bucketed every value outside created / deleted / commented / mentioned as update. That is not a missing decision; it is a wrong one stated out loud: a scheduled meeting, a login, a nightly system rollup and an author's contract_countersigned all rendered as "somebody updated this record".

Read the paragraph, not the line: both false halves of the objectui#8617 claim sat in one paragraph, and correcting either alone would have left it asserting the same wrong thing.

If a claim did go false, correct the body. That is precedented and prose-only, frontmatter untouched; check-changeset-overwrite.mjs will report the correction as its own case 2 ("correcting a declaration on purpose … legitimate"), which is the intended shape — one gate asks for the read, the other records the write.

Not covered, stated so nobody reads this as more: a born-false claim that spells no line address at all (objectui#9495 coordinated one by ORDINAL — "a grep finds that member first" — and deciding that means reading what the sentence means), a claim spelled as a symbol or a package rather than a backticked file name, and a file named ambiguously.

Compared the checked-out tree with 59636b3a6 (merge-base with origin/main): 6 file(s) changed outside .changeset/, read against 1421 pending declaration(s) that publish a body (2002 pending in total). · run

@github-actions

Copy link
Copy Markdown
Contributor

✅ Console Performance Budget

Metric Value Budget
Eager closure (gzip, 329 chunks) 3044.6 KB 3104.5 KB
Main entry chunk (gzip) 147.8 KB 350 KB
Entry file index-CZu2uZyc.js —
Status PASS —

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

Package Size Gzipped
app-shell (consoleActionDispatch.js) 0.20KB 0.19KB
app-shell (index.js) 16.68KB 6.20KB
app-shell (runtime-config.js) 20.68KB 7.36KB
app-shell (types.js) 0.01KB 0.04KB
app-shell (urlParams.js) 10.06KB 3.86KB
auth (ActiveOrganizationStorage.js) 27.95KB 10.04KB
auth (AuthContext.js) 0.31KB 0.24KB
auth (AuthGuard.js) 2.07KB 1.00KB
auth (AuthProvider.js) 40.18KB 10.59KB
auth (AuthShell.js) 3.49KB 1.40KB
auth (ForgotPasswordForm.js) 12.21KB 3.45KB
auth (LoginForm.js) 18.15KB 5.39KB
auth (PreviewBanner.js) 0.90KB 0.50KB
auth (RegisterForm.js) 6.65KB 2.22KB
auth (SocialSignInButtons.js) 9.61KB 3.89KB
auth (UserMenu.js) 3.41KB 1.23KB
auth (auth-gate-events.js) 1.29KB 0.66KB
auth (authStyles.js) 5.04KB 1.72KB
auth (createAuthClient.js) 40.21KB 10.80KB
auth (createAuthenticatedFetch.js) 8.52KB 3.45KB
auth (index.js) 3.63KB 1.64KB
auth (invitation-status.js) 1.22KB 0.70KB
auth (org-roles.js) 6.66KB 2.78KB
auth (phone-identifier.js) 1.11KB 0.66KB
auth (types.js) 0.59KB 0.35KB
auth (useAuth.js) 5.30KB 1.02KB
auth (useWorkspaceAdminStatus.js) 11.08KB 4.58KB
collaboration (CommentThread.js) 27.13KB 7.95KB
collaboration (LiveCursors.js) 3.17KB 1.27KB
collaboration (PresenceAvatars.js) 6.49KB 2.64KB
collaboration (PresenceProvider.js) 2.79KB 1.13KB
collaboration (index.js) 1.68KB 0.73KB
collaboration (useCollaborationTranslation.js) 6.05KB 2.52KB
collaboration (useCommentSearch.js) 1.98KB 0.88KB
collaboration (useConflictResolution.js) 7.75KB 1.86KB
collaboration (useMentionNotifications.js) 1.81KB 0.68KB
collaboration (usePresence.js) 6.33KB 1.84KB
collaboration (useRealtimeSubscription.js) 7.91KB 2.01KB
components (index.js) 544.62KB 130.17KB
core (index.js) 9.22KB 3.71KB
create-plugin (index.js) 27.94KB 9.51KB
data-objectstack (index.js) 223.86KB 62.25KB
fields (index.js) 256.68KB 65.01KB
i18n (LocalizationContext.js) 1.76KB 0.96KB
i18n (builtinAggregateLabels.js) 0.86KB 0.49KB
i18n (currency.js) 2.59KB 1.22KB
i18n (fallbackInterpolation.js) 6.25KB 2.77KB
i18n (i18n.js) 8.87KB 3.64KB
i18n (index.js) 5.24KB 2.27KB
i18n (pickLocalized.js) 9.86KB 3.95KB
i18n (provider.js) 39.40KB 12.91KB
i18n (useDisplayLocale.js) 3.52KB 1.76KB
i18n (useObjectLabel.js) 34.34KB 9.17KB
i18n (useSafeTranslation.js) 5.60KB 2.33KB
layout (index.js) 39.28KB 11.09KB
mobile (MobileProvider.js) 0.92KB 0.49KB
mobile (ResponsiveContainer.js) 0.94KB 0.38KB
mobile (breakpoints.js) 1.51KB 0.70KB
mobile (createOfflineDataSource.js) 5.61KB 1.75KB
mobile (index.js) 1.99KB 0.87KB
mobile (offlineQueue.js) 3.91KB 1.35KB
mobile (pwa.js) 0.97KB 0.49KB
mobile (serviceWorker.js) 1.48KB 0.62KB
mobile (serviceWorkerSource.js) 3.41KB 1.48KB
mobile (useBreakpoint.js) 1.54KB 0.65KB
mobile (useGesture.js) 6.96KB 1.98KB
mobile (useOfflineSync.js) 1.99KB 0.72KB
mobile (usePullToRefresh.js) 6.62KB 2.45KB
mobile (useResponsive.js) 0.72KB 0.42KB
mobile (useSpecGesture.js) 5.52KB 2.10KB
mobile (useTouchTarget.js) 1.01KB 0.54KB
permissions (MePermissionsProvider.js) 13.52KB 4.88KB
permissions (PermissionContext.js) 0.31KB 0.25KB
permissions (PermissionGuard.js) 0.89KB 0.45KB
permissions (PermissionProvider.js) 6.24KB 2.16KB
permissions (discardProofCache.js) 1.04KB 0.55KB
permissions (evaluator.js) 8.33KB 3.07KB
permissions (index.js) 0.93KB 0.41KB
permissions (store.js) 0.91KB 0.42KB
permissions (useFieldPermissions.js) 1.28KB 0.53KB
permissions (usePermissions.js) 4.83KB 2.27KB
plugin-ai (index.js) 16.01KB 3.93KB
plugin-calendar (index.js) 51.22KB 14.56KB
plugin-charts (index.js) 74.95KB 20.88KB
plugin-chatbot (index.js) 198.36KB 47.20KB
plugin-dashboard (index.js) 133.59KB 35.39KB
plugin-designer (index.js) 216.25KB 44.39KB
plugin-detail (index.js) 232.25KB 61.40KB
plugin-editor (index.js) 2.23KB 1.05KB
plugin-form (index.js) 146.50KB 37.51KB
plugin-gantt (index.js) 168.43KB 41.50KB
plugin-grid (index.js) 215.49KB 58.91KB
plugin-kanban (index.js) 49.30KB 15.39KB
plugin-list (index.js) 114.55KB 28.29KB
plugin-map (index.js) 21.83KB 7.07KB
plugin-markdown (index.js) 13.88KB 4.80KB
plugin-report (index.js) 43.55KB 11.99KB
plugin-timeline (index.js) 30.64KB 8.94KB
plugin-tree (index.js) 10.52KB 3.69KB
plugin-view (index.js) 88.00KB 21.97KB
providers (DataSourceProvider.js) 0.75KB 0.39KB
providers (MetadataProvider.js) 1.37KB 0.59KB
providers (ThemeProvider.js) 1.90KB 0.85KB
providers (UploadProvider.js) 11.66KB 3.50KB
providers (index.js) 0.45KB 0.23KB
providers (types.js) 0.01KB 0.04KB
react-runtime (index.js) 5.62KB 2.34KB
react (LazyPluginLoader.js) 4.47KB 1.63KB
react (SchemaRenderer.js) 114.58KB 37.60KB
react (data-invalidation.js) 5.05KB 2.08KB
react (index.js) 4.03KB 1.86KB
react (schema-input.js) 4.25KB 2.04KB
react (spec-input.js) 0.20KB 0.18KB
sdui-parser (body-dialect.js) 4.78KB 2.09KB
sdui-parser (codegen.js) 6.58KB 2.74KB
sdui-parser (dashboard-widget-options.js) 3.08KB 1.30KB
sdui-parser (index.js) 5.78KB 2.56KB
sdui-parser (input-type.js) 2.84KB 1.40KB
sdui-parser (kanban-quick-add.js) 3.89KB 1.87KB
sdui-parser (parse.js) 25.28KB 7.80KB
sdui-parser (provenance.js) 3.66KB 1.82KB
sdui-parser (types.js) 0.28KB 0.23KB
sdui-parser (validate.js) 18.27KB 6.20KB
types (ai.js) 4.11KB 2.06KB
types (api-types.js) 0.20KB 0.18KB
types (app.js) 2.87KB 1.00KB
types (base.js) 0.20KB 0.18KB
types (blocks.js) 0.20KB 0.18KB
types (complex.js) 2.93KB 1.49KB
types (crud.js) 0.20KB 0.18KB
types (dashboard-filter-alias.js) 6.23KB 2.74KB
types (data-display.js) 3.75KB 1.85KB
types (data-protocol.js) 0.20KB 0.19KB
types (data.js) 0.20KB 0.18KB
types (designer.js) 1.85KB 0.85KB
types (disclosure.js) 0.20KB 0.18KB
types (error-code.js) 1.54KB 0.88KB
types (expression.js) 0.20KB 0.18KB
types (feedback.js) 0.20KB 0.18KB
types (field-types.js) 0.20KB 0.18KB
types (form.js) 0.20KB 0.18KB
types (http-inflight.js) 8.87KB 3.73KB
types (http-retry.js) 4.32KB 2.02KB
types (icon-key-migration.js) 4.26KB 1.63KB
types (index.js) 4.74KB 2.25KB
types (layout.js) 0.20KB 0.18KB
types (managed-by.js) 0.19KB 0.18KB
types (mobile.js) 5.00KB 2.39KB
types (navigation.js) 0.20KB 0.18KB
types (objectql.js) 0.20KB 0.18KB
types (overlay.js) 0.20KB 0.18KB
types (permissions.js) 0.20KB 0.18KB
types (plugin-scope.js) 0.20KB 0.18KB
types (record-components.js) 0.20KB 0.19KB
types (record-semantics.js) 1.28KB 0.67KB
types (registry.js) 0.20KB 0.18KB
types (reports.js) 0.20KB 0.18KB
types (select-option.js) 0.20KB 0.19KB
types (spec-report.js) 5.05KB 1.93KB
types (spec-ui-namespace.js) 0.20KB 0.19KB
types (strict-authoring-face.js) 17.15KB 6.32KB
types (system-fields.js) 3.33KB 1.54KB
types (theme.js) 6.28KB 2.87KB
types (ui-action.js) 8.11KB 3.32KB
types (views.js) 0.20KB 0.18KB
types (widget.js) 0.20KB 0.18KB

Size Limits

  • ✅ Core packages should be < 50KB gzipped
  • ✅ Component packages should be < 100KB gzipped
  • ⚠️ Plugin packages should be < 150KB gzipped

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

Contract review

Served-tier: CONTRACT_REVIEW_TIER
Head-sha: 9f245014c484471d7b30767b1bf9258ed173f6af

Reviewed in isolation from the card (objectui#8667 body and its 4 comments), the rulings it cites (objectstack#16974 with its 9 comments, incl. the director ruling 5643392717; objectui#7011; objectui#5203), the PR body, the 7-file diff against merge-base bc4efba732a31acd206066104a3210d1ec9379ed, objectui AGENTS.md and .changeset/config.json, and the upstream objectstack main object/channel/dispatcher sources read over REST. Line numbers are at the head. The os-dev-report comment was not used as evidence.

① Derived judgments

Behaviour and surface changes the diff introduces

  1. Arrival filter gains a fourth clause — packages/app-shell/src/hooks/inboxArrivals.ts:143-145 filters !known.has(row.id) && !row.is_read && !causedBy(row, key); causedBy at :158-160 is typeof row.actor_id === 'string' && row.actor_id === userId. RIGHT against card step 3, verbatim 「actor 等于当前用户则不进 arrivals(仍要记入 seen 集)」: ids at :129 is the whole window and the seen update at :146 is untouched, so a suppressed row is remembered. RIGHT against the unlock (5818703956) constraint 「null 与 undefined 都走「照样弹」」: neither value satisfies the string test, so a digest row or a pre-column server announces as before.
  2. Producer maps the column field by field — packages/app-shell/src/hooks/sharedUserFeeds.ts:749 adds actor_id: typeof m.actor_id === 'string' ? m.actor_id : null inside the explicit literal (:730-750), satisfies InboxNotification kept, no spread. RIGHT against card step 1 「逐字段映射,⛔ 不要改成 {...m} 展开」 and the unlock's 「逐字段映射 actor_id,⛔ 不改成展开」. One divergence from the unlock's described mechanism (「映射结果为 undefined」): an absent key maps to null, not undefined. Same announce outcome by clause 1, and the exact key-set pin requires the key to exist on every row; acceptable, not a defect.
  3. Declaration — packages/app-shell/src/layout/inboxGrouping.ts:85 adds actor_id?: string | null with a doc block (:73-84). RIGHT against card step 2. The interface is package-internal (see ③ Clause-②).
  4. DECLARED_KEYS gains actor_id — packages/app-shell/src/hooks/__tests__/sharedInboxFeed.rowShape.test.tsx:97. RIGHT against card step 2 「同步更新 sharedInboxFeed.rowShape 的 DECLARED_KEYS」.
  5. Pins with concrete, distinct actor ids, both directions — packages/app-shell/src/hooks/__tests__/inboxArrivals.test.ts:127-184: USER = 'u_alice' (:48), OTHER = 'u_bob' (:130); :132-142 suppresses the reader's row and announces the other person's in one call; :144-155 shows the same row silent to its actor and news to a different reader. Hook level: packages/app-shell/src/hooks/__tests__/useInboxArrivalNotifier.test.tsx:305-330 with u_alice from the file's auth mock (:63) and u_bob. RIGHT against card step 4 「pin 用具体且可区分的 actor id 两个方向各断言一次」.
  6. The unlock's added control 「行里没有 actor_id」 — inboxArrivals.test.ts:175-184 asserts Object.hasOwn(legacy, 'actor_id') is false before announcing it; sharedInboxFeed.rowShape.test.tsx:157-171 feeds LEGACY_ROW (:88-89, key deleted) and asserts the same key set with actor_id null. Null digest control at inboxArrivals.test.ts:166-172. RIGHT; both asks met.
  7. The unlock's 「在 PR 里写明这一点」 (re-adding an actor after objectui#5203) — stated in the PR body section "Re-adding an actor field after objectui#5203", and recorded in source at inboxGrouping.ts:37-44 and sharedInboxFeed.rowShape.test.tsx:16-24. RIGHT. actor_name stays retired: the type pin layout/__tests__/inboxGrouping.test.ts:89 is not in the diff and the actor_name case (rowShape:173-185) is unchanged.
  8. Triage's 「re-verify the four already-pinned constraints」 (5620059105) — no pre-existing it( body is edited in any of the three test files (the diff adds blocks only, apart from fixture and DECLARED_KEYS), and CI's full test matrix is green at the head.

Missing asks: none. The card's four steps and the unlock's two additions are each present at the lines above.

Done but not asked: header-comment rewrites in inboxArrivals.ts:18-19, 37-45, 116-119, inboxGrouping.ts:21-44, rowShape:9-24, 56-66 (documentation of this same change; no behaviour), and a mutable inboxRows fixture (rowShape:92, 110, 127) that exists to serve the asked legacy control. All inside the claim's declared file surface; nothing outside it.

Existing pins the diff edits or deletes

  • DECLARED_KEYS (the objectui#5203 key-set pin): the expected set gains exactly the asked key; the assertion form (Object.keys(row).sort() exactly equal, rowShape:146 and :168) is unchanged. Load-bearing flip, predicted by triage on objectstack#16974 (5595376267): 「一旦 objectui 侧把 actor_id 映进 UI shape,那个键集就变了,该 pin 会 RED … 后续单必须同笔更新该 pin 的期望键集」. Not weakened: RAW_ROW (:68-81) still carries unmapped user_id, delivery_id, severity, actor_name, so a {...m} pass-through still reddens both key-set cases and the actor_name case.
  • RAW_ROW gains actor_id: 'u_zhangsan' (:73), distinct from user_id: 'u1', so the mapping assertion at :154 cannot be satisfied by copying the wrong column.
  • No pin deleted; the remaining edits to existing text are comment tense (「declares no actor column」 to 「then had no actor column」), which is now the true statement.

Can the new pins fail

  • inboxArrivals.test.ts:132-142: lit by m2 (u_bob) required in the output; dropping the causedBy clause yields ['m3','m2'], red.
  • :144-155: a causedBy that ignored the reader (compared to a constant) reds the Bob half; a dropped clause reds the Alice half.
  • :157-166: seen must equal ['m2','m1'] (:161) and the actor-less re-poll must be empty (:164); excluding suppressed ids from ids reds both.
  • :166-172 null and :175-184 absent: red if causedBy read a missing actor as "me"; both also expect ['m2'], so an "announce nothing" implementation reds them too (lit).
  • rowShape:157-171: red on a producer that emits undefined (toBeNull at :170), a constant null (:154 in the sibling case), or a spread (key set).
  • useInboxArrivalNotifier.test.tsx:309-329: a dropped clause reds not.toHaveBeenCalled() at :315; excluding self rows from seen makes the third render announce two groups and reds the m3 title at :326-328; the m3 toast at :325 is the lit leg, and the file's "instrument controls" block (:200) proves the toast spy can reach 1.

Correctness of the mechanism, checked at the layers this repo owns: the feed's read (sharedUserFeeds.ts:840-844) passes no $expand; the adapter takes the populate route only for a non-empty $expand (packages/data-objectstack/src/index.ts:3338), so the lookup arrives as the stored id. Upstream objectstack main declares actor_id as a sys_user lookup on sys_inbox_message with the digest-null description (packages/services/service-messaging/src/objects/inbox-message.object.ts:74-79), the inbox channel writes actor_id: n.actorId ?? null (inbox-channel.ts:201), and the dispatcher applies the same string test the producer comment cites (dispatcher.ts:348). The comparand is the same useAuth().user?.id on both sides (useInboxArrivalNotifier.ts:82-83, 137; sharedUserFeeds.ts:829-841). The one upstream claim I did not read (ObjectQL expanding only under ast.expand) fails in the safe direction: an expanded object maps to null at :749 and announces as before.

② Semver level

.changeset/8667-inbox-own-receipts-silent.md:2 declares '@object-ui/app-shell': patch. Correct:

  • AGENTS.md:168 requires a changeset when a fixed-group package's src/ changes; @object-ui/app-shell is in fixed[0] and six src/ files change. Present.
  • AGENTS.md:271 forbids major; minor is for breaking or feature work. This restores a declared constraint of an already-shipped feature (objectui#7011's fifth), touches no export, no accept set and no published type (see ③), so patch is the right level. Not a docs-only change, so the empty-frontmatter rule does not apply.

Changeset prose, sentence by sentence:

  1. "The inbox arrival announcement … no longer fires for a message the signed-in user caused themselves" — TRUE (inboxArrivals.ts:144; the claim precedes both the toast and desktop branches, useInboxArrivalNotifier.ts:137).
  2. "Assigning yourself a task … still lands in the inbox and still counts on the bell badge; it just does not pop" — TRUE; the feed rows and useInboxBell's unread count are untouched, and claimInboxArrivals has exactly one caller, the notifier.
  3. "The inbox feed now maps the actor_id column that sys_inbox_message carries since objectstack#16974 onto InboxNotification.actor_id" — TRUE (sharedUserFeeds.ts:749; upstream object :74).
  4. "It is a bare sys_user id, because the feed reads that lookup without expanding it" — TRUE (:840-844; adapter :3338).
  5. "The arrival filter then skips a new, unread row whose actor is the signed-in user's id" — TRUE (:143-145).
  6. "The skipped row is still remembered as seen, so a later poll does not announce it either" — TRUE (:129, :146; pinned inboxArrivals.test.ts:157-166).
  7. "Only a concrete id equal to the signed-in user's suppresses" — TRUE (:158-160).
  8. "A digest row carries no actor (null), and a server that predates the column sends no actor_id at all; both announce exactly as before" — TRUE (:749 maps both to null; :159 never matches; pinned both ways).

Docs/README prose added by the diff: none (no content/docs/** or README file in the file list). Code-comment claims spot-checked: inboxGrouping.ts:22-23 "the arrival announcer the bell mounts" — TRUE (useInboxBell.ts:178); sharedUserFeeds.ts:744-746 digest-null and "same test the upstream dispatcher applies" — TRUE (upstream dispatcher.ts:299, 348).

One imprecision in the PR body, not a falsehood: "both objectui#5203 pins are unchanged" names the actor_name case as the second pin, whereas triage's second 5203 pin is the key-set pin, whose expected set this diff does change (as it had to). The PR body states that change one section earlier.

③ Boundary flags

  • PR body flags answered. Docs: content/docs/guide/notifications.md:224-237 describes the feed and its two surfaces and states no arrival rule, so no guide text is owed — agreed. Exports: InboxNotification is unreachable from the public entry — src/layout/index.ts exports neither InboxPopover nor inboxGrouping, src/index.ts:135-149 names neither, and package.json exports only . and ./styles.css; the one outside reader apps/console/src/inbox-arrival-preview.tsx:71 imports by source path and builds rows through a Partial helper (:89) with zero actor mentions, so the optional member leaves it unaffected — agreed. Numbering: the hook suite has constraint 1 (:224), 2 (:268), new 4 (:305), 5 (:332), and objectui#7011 lists 自己触发的不弹 fourth — agreed. H1/H2/H3 verified above. The 6730-shared-activity-type-bucket.md paragraph concerns mapActivityRows, untouched here — agreed. No open questions are posed in the PR body.
  • Observation, outside this diff's surface: the pending empty-frontmatter .changeset/inbox-actor-name-retired-5203.md says in the present tense that sys_inbox_message "declares no actor column". It publishes nothing (check-changeset-claims.mjs:476, 507 exclude empty-frontmatter bodies) and sits outside the claimed file surface; noted for the seat, not a defect of this PR.
  • CI at head 9f24501: 43 check-runs — 40 success, 3 skipped (Test (coverage), Test (coverage shard), dependabot), 0 failure, 0 in progress. Type Check, Lint, all 8 test shards, Test (dist pins), Build & E2E, Changeset Declaration / Bump Policy / Claim Re-read / Overwrite Report / Fixed Group Check, Spec Main Shape Gate and Governed Surface Queue Guard are among the successes. No re-poll needed.
  • Draft: yes (draft: true).
  • Clause-②: no — holds. No accept set moves (no zod, spec or check:spec-symbols registry change; the @object-ui/app-shell:InboxNotification waiver at scripts/check-spec-symbol-derivation.mjs:671 is untouched). No published export moves: the only type that changes is InboxNotification, re-exported by layout/InboxPopover.tsx:47 but InboxPopover itself is not exported from layout/index.ts or src/index.ts, so nothing reaches dist/index.d.ts. The externally observable change is runtime behaviour of the announcer (fewer pops), which is the fix.
  • Main moved under the PR's files? No. Merge-base bc4efba; main is now 6881e9e (11 commits); git log bc4efba..main over the 7 PR files is empty, and the app-shell files main did touch (environment/*, studio-design/* tests) are disjoint. GitHub's recorded base.sha 59636b3a is a descendant of bc4efba on main; the PR's stated BASE bc4efba is the true merge-base.

Implemented-by: claude/issue-8667-inbox-own-receipts
Reviewed-by: session_01KUxVUa7e39aNjhkKi1gsoy

VERDICT: PASS

@objectstack-fleet
objectstack-fleet Bot marked this pull request as ready for review September 25, 2026 07:47
@objectstack-fleet
objectstack-fleet Bot added this pull request to the merge queue Sep 25, 2026
Merged via the queue into main with commit e2a17a5 Sep 25, 2026
45 checks passed
@objectstack-fleet
objectstack-fleet Bot deleted the claude/issue-8667-inbox-own-receipts branch September 25, 2026 07:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

app-shell: 站内信到达提醒缺「自己触发的不弹」—— 等收件箱行带上 actor

2 participants