Repository navigation
fix(app-shell,plugin-detail): the record activity panel says "no permission to view activity" when its read is refused, instead of an empty list (objectui#11195) - #11217
Conversation
…on state, not an empty feed (objectui#11195) The record page's feed reads (sys_activity, sys_comment) and the record:activity block's self-fetch landed every failure on the empty state, so a 401/403 read as "No activity recorded". Each read's refusal is now judged by one shared verdict (isRefusedFeedRead, over the existing classifyLoadError) and carried to the timeline, which renders a localized no-permission notice instead of the empty state. A 404 or any other failure keeps the empty state; a refusal is never retried. Claude-Session: https://claude.ai/code/session_011p7ikEivgXefNDaE5S5Uec Co-authored-by: Claude <noreply@anthropic.com>
…d surfaces (objectui#11195) RecordDetailView's discussion panel and the record:activity block's self-fetch: a 403 envelope and a 401 show the no-permission state and are not retried; a 200 with zero rows, a 404 and a 500 do not. A refused sys_comment beside answered activity keeps the rows and names the withheld half. Claude-Session: https://claude.ai/code/session_011p7ikEivgXefNDaE5S5Uec Co-authored-by: Claude <noreply@anthropic.com>
… (objectui#11195) Claude-Session: https://claude.ai/code/session_011p7ikEivgXefNDaE5S5Uec Co-authored-by: Claude <noreply@anthropic.com>
…n spreading over them (objectui#11195) Claude-Session: https://claude.ai/code/session_011p7ikEivgXefNDaE5S5Uec Co-authored-by: Claude <noreply@anthropic.com>
…tivity-refused-state
|
changeset-claim-re-read
|
✅ 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
|
Contract reviewServed-tier: Inputs: card #11195 (body, triage The head's merge. ① Derived judgments
② Semver levelThe diff publishes a new value export on Clause-②: the line must read ③ Boundary flags
Findings
Everything else in ①–③ is right at this head; the code, tests, docs and i18n need no change. Implemented-by: VERDICT: FAIL Generated by Claude Code |
…surfaces (objectui#11195) The change adds the export isRefusedFeedRead to @object-ui/plugin-detail and two optional members to @object-ui/react's DiscussionContextValue (and to RecordActivityTimelineProps / RecordChatterPanelProps), so those two packages declare minor; app-shell and i18n stay patch. Claude-Session: https://claude.ai/code/session_011p7ikEivgXefNDaE5S5Uec Co-authored-by: Claude <noreply@anthropic.com>
✅ 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
|
Contract reviewServed-tier: Re-record after The delta. ① Derived judgmentsUnchanged from ② Semver level
③ Boundary flagsUnchanged from Implemented-by: VERDICT: PASS Generated by Claude Code |
Fixes #11195
Clause-②: yes (widening)
What was wrong
An invited member of a hosted AI-built app opened a record (objectstack-ai/cloud#2485). The server refused the record's
sys_activityread with a 403, and the activity panel showed an empty list with no message. The member could not tell "no activity" from "not allowed to see activity".Every feed read ended in a catch that treated any failure as an empty answer:
RecordDetailView(the console record page): both feed reads,sys_activityandsys_comment, ended in an empty.catchhandler, andPromise.allSettledthen counted the failed read as answered. A 403 landed on "No comments yet".record:activity(plugin-detail): the self-fetch's.catchset the feed to[]for every failure, so a 403 landed on "No activity recorded".What changed
isRefusedFeedRead(err)in plugin-detail'srecordActivityFeed.ts, exported from the package barrel besideactivityRowToFeedItem. It is theforbiddenandunauthorizedkinds of the existingclassifyLoadErrorread classifier (@object-ui/react), and it reads no status or code of its own. Both surfaces call it.RecordDetailViewkeeps a verdict per source. Each read records "refused or not" under the same per-record key the rows use (feedRefusalByRecord), so a refusal on one record never reaches another. An answered read clears it. The host passesactivityDenied/commentsDeniedon itsDiscussionContextProvider.DiscussionContext(@object-ui/react) gains the two optional membersactivityDenied/commentsDenied, in the provider's memo list as primitives.record:activityrecords its self-fetch's refusal in state besidefetched. With a host context it shows the host's two flags instead. Hostitemscarry no refusal.record:chatter/record:discussionpass the context's flags throughRecordChatterPanelto the timeline.RecordActivityTimelinetakesactivityDenied/commentsDenied. With no rows, a refusal replaces the empty state: a lock and a left-aligned sentence, not the centred inbox glyph. With rows on screen, the rows stay and the notice sits above them. Only the i18n sentence is rendered: no status, no server message, no object name.detail.activityAccessDeniedanddetail.commentsAccessDenied, in all ten locale packs and inDETAIL_DEFAULT_TRANSLATIONS. No existing key fit:attachmentsAccessDeniednames attachments.minorfor plugin-detail and react, which gain published surface (plugin-detail's root exportisRefusedFeedReadand the optionalactivityDenied/commentsDeniedonRecordActivityTimelineProps/RecordChatterPanelProps; react'sDiscussionContextValuegains the same two optional members);patchfor app-shell and i18n. Therecord:activitysection of the plugin-detail guide gains "When the read is refused".Decisions the card left open, and what this PR does
sys_commentbeside an answeredsys_activity. The comment half of the same panel gets the same treatment. The activity rows stay on screen, and the notice above them reads "You don't have permission to view comments on this record." Both refused, with no rows, shows both lines.RecordAttachmentsPanel, whosedeniedstate does not claim a 401. The verdict's docblock records why.network);OBJECT_API_DISABLED/OBJECT_API_METHOD_NOT_ALLOWED(api-disabled: a property of the object, not of the caller); a 400; a 500. The panel has no error state, so a 500 still settles on the empty state. See Acceptance notes.Verification (head
df5a91cb4, after mergingorigin/mainat9419df198)RecordDetailView.feedRefusal-11195.test.tsx(7 tests) andrecord-activity.refusedRead-11195.test.tsx(10 tests). They cover: a 403 envelope and a 401 show the no-permission state with no retry; the 200-zero-rows control shows the empty state; a 404 and a 500 do not show "no permission"; a refused comment read keeps the activity rows; the host-context path; and the verdict's refused and not-refused sets.RecordDetailView*suites, therecord-activity*/record-chatter*renderer suites,all-locales-key-parity,en-zh-key-parityanddefaults-maps-mirror-en-pack: 49 files, 355 tests passed.2fbe2df5f):packages/plugin-detail/whole: 226 files passed (1 skipped), 2245 tests passed. TheRecordDetailView*suites plusdefaults-maps-mirror-en-pack,widget-dom-leak-sweep,palette-discussion-alias, apps/consolerecord-block-record-reachandpackages/react/src/context: 57 files, 653 tests passed.packages/i18n/whole: 74 files passed, 1216 tests passed (13 skipped).type-check:@object-ui/plugin-detail,@object-ui/app-shell,@object-ui/reactand@object-ui/i18nall exit 0 (dependency closure built first,@object-ui/app-shell^...).eslinton the 21 changed ts/tsx files: 0 errors.check-changeset-presence(1 changeset, 4 released packages),check:control-bytes,check:new-line-citations(0 new),check:i18n-keys,check:i18n-drift(2 keys added, 0 en values changed),check:i18n-dead-keys,check:changeset-claims,check:pending-changeset-literals,markdown-test-inputs --audit,check:doc-types,check:doc-fences,check:doc-example-ids,check:phantom-deps,check:self-import,check:test-path-roots,check:vi-mock-specifiers.check:doc-snippets/check:doc-examples(exit 2, precondition not met: packages outside this diff's closure are unbuilt; the docs edit adds prose and no code fence). The rootscripts/__tests__/suite was not run: the shared verify lock queued for over an hour. This diff edits no script and adds no test that reads markdown. CI runs it.Ablation (one leg, at the shared verdict, head
df5a91cb4)isRefusedFeedReadwas made to answer "not refused" for every rejection, which turns a refusal back into the empty list on both surfaces. The mutation went throughablation-replace.mjs: the anchor was hit 1 time and went to 0, the marker went from 0 to 1, and the blob changed. The subject reaches the tests through the vitest source alias for@object-ui/plugin-detail, so no build sat in between.git diff HEADis empty.Acceptance notes (not filed; observations only)
RecordAttachmentsPanel'sunavailablestate is the house shape for one. The triage said this case "is reported"; it is out of this card's scope.DiscussionContextValue.erroris declared, but no host sets it and no renderer reads it.sys_commentread is refused, the comment composer still renders. Whether the member may WRITE a comment they may not READ is a server question; this PR does not change the composer.Generated by Claude Code