Repository navigation
fix(plugin-detail): a record:chatter or record:discussion whose feed.types leaves out comment offers no comment composer - #34576
Conversation
…types leaves out comment offers no comment composer The chatter renderer now answers commentsShown with feedTypesAdmitComments, the predicate record:activity uses, under the same block name its applyFeedConfig call filters by, and RecordChatterPanel forwards it to the timeline. A feed.types without comment therefore draws no composer and no Comments-only option, and the author is told why once in development. Claude-Session: https://claude.ai/code/session_01ADHkmSYVw1sqCsaHSJS9JC Co-authored-by: Claude <noreply@anthropic.com>
…sed-types channel A record:discussion feed whose types names no comment now also raises the withheld-composer warning, which quotes the same types. The leg selects the unrecognised-entry message for its count and still holds every message under the block's own name. Claude-Session: https://claude.ai/code/session_01ADHkmSYVw1sqCsaHSJS9JC Co-authored-by: Claude <noreply@anthropic.com>
|
repo:objectstack#2 · os-steve · session_01ADHkmSYVw1sqCsaHSJS9JC Final head for L1 · 2026-11-17T02:27Z |
|
repo:objectstack#2 · os-steve · session_01ADHkmQtnGcx7hYEL11ptVs 席位核对L1 first review: ACCEPT · PR #34576 · card #34525 · area o2-B · L1-a2 · 2026-11-17T02:28Z Head-sha: Checklist
L2 and landing
|
|
repo:objectstack#2 · os-steve · session_01ADHkmSYVw1sqCsaHSJS9JC Landing · 2026-11-17T02:29Z
State change: ready for review + auto-merge, by area o2-B. #34525 closes through |
Requested by Steve · project thread
Fixes #34525
Clause-②: no
Metadata-protocol: none
repo:objectstack#2 · os-steve · session_01ADHkmSYVw1sqCsaHSJS9JC
维护者速读
record:chatter和record:discussion的feed.types不含comment时,不再显示评论输入框和「仅评论」筛选项;开发环境下对每个块提示一次原因和两种改法。判定与record:activity共用同一个函数feedTypesAdmitComments。record:activity已按此规则收掉输入框,但两个讨论块没有把判定传给时间线,时间线默认当作「能显示评论」,用户在这里发的评论保存后立刻被types过滤掉,看起来像丢了。feed.types写了且不含comment的讨论块;没写types或含comment的块、宿主自动追加的讨论区完全不变。RecordChatterPanel新增的commentsShown是可选 prop,不传即true。回滚即 revert 本 PR。ui/packages/plugin-detail/src/renderers/record-chatter.tsx(判定、开发期提示、传参);ui/packages/plugin-detail/src/RecordChatterPanel.tsx(新 prop 透传给两处时间线);ui/packages/plugin-detail/src/renderers/__tests__/recordFeedDiagnosticBlockName-9557.test.tsx(被迫改动的一条旧测试)。pnpm --dir ui exec vitest run packages/plugin-detail/src/renderers/__tests__/recordChatterFeedMembersLive-8934.test.tsx,预期 33 个全过,其中 8 个是本卡新增(两种块各 4 个)。What changes
record:activitywithholds the comment composer and the Comments-only filter when itstypesleaves outcomment(thecommentsShownprop onRecordActivityTimeline, computed byfeedTypesAdmitComments).record:chatterandrecord:discussionrender the same timeline throughRecordChatterPaneland filter their rows byfeed.typesthrough the sameapplyFeedConfig, but handed the timeline nocommentsShown, so it defaulted totrue: a feed authoredfeed: { types: ['task'] }still offered the composer, and a posted comment was stored and then filtered out of that same feed.renderers/record-chatter.tsx: computescommentsShownwithfeedTypesAdmitComments(feed?.types, blockName), the same predicate and the same block name itsapplyFeedConfigcall filters by, so the answer and the rows cannot disagree; hands it to the panel. Where the composer would otherwise have been offered (feed.showCommentInputnotfalse), it raiseswarnWithheldCommentComposeronce per block from an effect, in development only (the package's per-fileisDevBuildspelling), scopedBLOCK feedthe way this file's row-limit refusal is.RecordChatterPanel.tsx: one optional prop,commentsShown, forwarded to the timeline in both layouts (sidebar and inline). Absent meanstrue, so a host that composes the panel itself and does not filter byfeed.typesis unchanged..changeset/34525-chatter-comments-shown.md:@object-ui/plugin-detailpatch.A feed with no
types, or atypesthat includes'comment', renders exactly as before; the host's auto-appended discussion mounts the renderer with notypesand is unchanged.Tests
New top-level
describe.eachover both block names in the chatter feed harness,renderers/__tests__/recordChatterFeedMembersLive-8934.test.tsx(renderer resolved throughComponentRegistry, nodetypestated, real panel and timeline, a hostDiscussionContextwithonAddComment):types: ['task']draws no composer and no Comments Only option, renders only the task row, and warns once underBLOCK feed;types: ['task', 'comment']: composer and option stay, comments show, no warning;types: the same;showCommentInput: falsewithtypes: ['task']: no warning.Forced test edit (one):
renderers/__tests__/recordFeedDiagnosticBlockName-9557.test.tsx, legNO-FOREIGN-NAME. It mounts arecord:discussionwithfeed.types: ['crm_task']and counted every warning containingcrm_task; the new withheld-composer warning quotes the sametypes, so the count went 1 to 2. The leg now counts the unrecognised-entry channel it is about, and still holds every message containingcrm_taskunder[record:discussionwith no[record:activity].Pin run and ablations (fix commit 3da4e3c)
record-chatter.tsx, thecommentsShown={commentsShown}pass-through deleted throughscripts/ablation-replace.mjs(anchor 1 to 0, blob d6a89c65 to d4348647): Tests 2 failed, 31 passed; thetypes: [task]pin went red under bothrecord:chatterandrecord:discussion("expected TEXTAREA to be null"); the controls stayed green. Restored: blob equal to HEAD,git diff HEADempty.RecordChatterPanel.tsx, both forwards deleted (--expect 2, anchor 2 to 0): Tests 2 failed, 31 passed, the same two pins. Restored: blob equal to HEAD,git diff HEADempty.src(relative imports;@object-ui/reactmaps to itssrcthrough the root vitest alias table), so nodistrebuild sits between a mutation and the run.Acceptance notes
typesandshowCommentInput; on these two blocks both keys sit underfeed, which theBLOCK feedscope names. The text is shared withrecord:activityand was not forked.RecordChatterPaneldirectly pass their own items and do notypesfiltering, so the defaulttruekeeps them as they were.Verification
Local readings
turbo run build --filter='@object-ui/plugin-detail^...' --concurrency=2: Tasks 52 successful, 52 total (41 cached), lock VERDICT command-exit 0.pnpm --filter @object-ui/plugin-detail type-check(tsc --noEmit && tsc -p tsconfig.test.json) on 3da4e3c: exit 0.pnpm --dir ui exec vitest run --maxWorkers=2 packages/plugin-detail/on 9491764: Test Files 380 passed, 1 skipped (381); Tests 3414 passed, 18 skipped (3432); lock VERDICT command-exit 0. (The same run on 3da4e3c had the one forced failure named under Tests.)origin/main(1ccb445, no overlap with this surface) into f2700d9: closure rebuilt (Tasks 52 successful),type-checkexit 0, the two chatter pin files plusrecord-activity.test.tsxTests 67 passed (67), lock VERDICT command-exit 0.node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstackon f2700d9: 38 commands, each run, eachexit 0;--ranreconciliation: "38 derived famil(ies) accounted for — 38 run, 0 NOT-MEASURED".node ui/scripts/check-new-cross-file-line-citations.mjs: 0 new citations.eslint --no-inline-configon the four touched files: 0 errors.🤖 Generated with Claude Code
https://claude.ai/code/session_01ADHkmSYVw1sqCsaHSJS9JC