Repository navigation
fix(plugin-detail): the discussion header shows no count when a feed read was refused - #27844
Conversation
…read was refused Claude-Session: https://claude.ai/code/session_01Utp6Cagj5WeiH9xGApkpYm Co-authored-by: Claude <noreply@anthropic.com>
… count Claude-Session: https://claude.ai/code/session_01Utp6Cagj5WeiH9xGApkpYm Co-authored-by: Claude <noreply@anthropic.com>
…t takes them Claude-Session: https://claude.ai/code/session_01Utp6Cagj5WeiH9xGApkpYm Co-authored-by: Claude <noreply@anthropic.com>
|
domain:ui#4 · os-bill · session_01Utp6CbDAucNyQ4UtzCJKyh 席位核对ACCEPT · head
Generated by Claude Code |
Requested by Bill · project thread
维护者速读
(0)这样的条数,只显示「Discussion」;折叠按钮也不再写Show Discussion (0)。RecordActivityTimeline.tsx标题里的计数 span;RecordChatterPanel.tsx的showLabel;新测试文件。pnpm --dir ui exec vitest run packages/plugin-detail/src/__tests__/RecordChatterPanel.refusedReadCount-27820.test.tsx,预期 7 条全部通过。Fixes #27820
Clause-②: no
Metadata-protocol: none
What changes
RecordActivityTimelinedraws its heading's(N)count only when neither of the feed's reads was refused. The signal is the existingactivityDenied/commentsDeniedprops, the same ones that draw the refusal line; no second permission check.RecordChatterPanel's collapsed inline toggle readsdetail.openDiscussion("Open discussion panel", an existing key) instead ofShow Discussion (N)under the same condition.@object-ui/plugin-detailpatch.Tests
ui/packages/plugin-detail/src/__tests__/RecordChatterPanel.refusedReadCount-27820.test.tsx, through the realenpack and therecord:chatterblock under a hostDiscussionContext(the record page's mount):Discussion, refusal line shows;(0), with 3 shows(3);Show Discussion (0).Readings at head 64fcb00
pnpm --dir ui exec vitest run --reporter=verbose packages/plugin-detail/(under os-verify-lock): VERDICT command-exit 0, Test Files 339 passed / 1 skipped (340), Tests 3085 passed / 18 skipped (3103). Run on the fix commit 97c4beb; the later commit 64fcb00 changes only the new test's item type.pnpm --filter @object-ui/plugin-detail run type-check(both the src and the test tsconfig): VERDICT command-exit 0 at 64fcb00; the new file: Tests 7 passed (7).git restore --source=359e935donRecordActivityTimeline.tsxandRecordChatterPanel.tsx, mutation shown on disk (the count'sactivity-countmarker 1 → 0,showLabel3 → 0), new file run: VERDICT command-exit 1, Tests 4 failed / 3 passed (7). The four refused cases went red (first one:expected 'Discussion(0)' to be 'Discussion'), the three controls stayed green. Restored withgit checkout HEAD --,git diff HEADempty,git status --porcelainempty.Acceptance notes
main(359e935d): the(0)is drawn byRecordActivityTimeline's heading (({filtered.length})), whichRecordChatterPanelmounts withtitleLabel={t('detail.discussion')}on both its sidebar and inline paths.DetailView's Discussion tab trigger draws no count. The new refused-read cases go red onmain's component (the ablation under Tests).Show Discussion (0)is the same claim in the same panel and uses an existing key, soClause-②: noholds and no i18n key was added.RecordDetailView.tsx(theapiHandlerin fix(console): a declared same-origintype: 'api'click goes through the action door #27793) is untouched.Verification
Derived gates at head 64fcb00
node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstack: 34 commands, each run and recorded ascommand :: exit codebefore any pipe; all 34 exit 0, includingnode scripts/check-sdui-manifest.mjs. Reconciliation with--ran: 34 derived, 34 run, 0 NOT-MEASURED, 0 UNRUN.pnpm check:new-line-citations(underui/): 0 new citations. Every other family is left to this PR's CI check-runs.Generated by Claude Code