fix(activity-feed-v2): show comments-disabled states and bump activity-feed to 2.4.0 - #4756
Conversation
Includes peer bumps required by activity-feed 2.4.0: blueprint-web 16.20.5, blueprint-web-assets 5.7.12, collaboration-popover 2.2.21, readable-time 2.2.21, threaded-annotations 4.8.4, user-selector 2.2.22. Lockfile deduplicated.
…mment is false Wire can_comment into ActivityFeed.Root and hide the editor when comments are disabled.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
WalkthroughActivityFeedV2 now reads ChangesActivity feed comment permissions
Estimated code review effort: 2 (Simple) | ~10 minutes Sequence Diagram(s)sequenceDiagram
participant File as File permissions
participant ActivityFeedV2
participant Root as ActivityFeed.Root
participant Editor as Comment editor
File->>ActivityFeedV2: Provide permissions.can_comment
ActivityFeedV2->>Root: Set areCommentsDisabled
ActivityFeedV2->>Editor: Render editor when canComment is true
Possibly related PRs
Suggested labels: Suggested reviewers: Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
…s unset Treat missing file/permissions as comments disabled, and update tests to cover those cases while explicitly enabling comments where the editor is exercised.
There was a problem hiding this comment.
🧹 Nitpick comments (1)
src/elements/content-sidebar/activity-feed-v2/__tests__/ActivityFeedV2.test.tsx (1)
222-233: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winAssert the enabled root prop.
The enabled test checks editor visibility but not
lastRootProps.areCommentsDisabled. Add an assertion that the prop isfalse; otherwise a regression could mark permitted feeds as disabled while this test still passes.Proposed test assertion
expect(screen.getByTestId('activity-feed-editor')).toBeVisible(); + expect(lastRootProps.areCommentsDisabled).toBe(false);🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@src/elements/content-sidebar/activity-feed-v2/__tests__/ActivityFeedV2.test.tsx` around lines 222 - 233, Add an assertion in the enabled ActivityFeedV2 test to verify lastRootProps.areCommentsDisabled is false, alongside the existing visibility assertions. Use the test’s existing root-props capture mechanism and preserve the current rendering setup.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In
`@src/elements/content-sidebar/activity-feed-v2/__tests__/ActivityFeedV2.test.tsx`:
- Around line 222-233: Add an assertion in the enabled ActivityFeedV2 test to
verify lastRootProps.areCommentsDisabled is false, alongside the existing
visibility assertions. Use the test’s existing root-props capture mechanism and
preserve the current rendering setup.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 05cf7909-641f-4d1f-aeec-1ab1346bcda1
📒 Files selected for processing (2)
src/elements/content-sidebar/activity-feed-v2/ActivityFeedV2.tsxsrc/elements/content-sidebar/activity-feed-v2/__tests__/ActivityFeedV2.test.tsx
…enting is enabled
Merge Queue Status
This pull request spent 12 minutes 29 seconds in the queue, including 12 minutes 14 seconds running CI. Required conditions to merge
|
Summary
file.permissions.can_commentis false, Activity Feed v2 passesareCommentsDisabledto@box/activity-feedand hides the local composer so the feed shows the comments-disabled empty state / footer instead of the editor.can_commentis unset.@box/activity-feedto 2.4.0 (addsareCommentsDisabledsupport) and the peer versions it requires.Description
Bumps
@box/activity-feedto 2.4.0, along with the peer versions activity-feed 2.4.x requires.@box/activity-feed@box/threaded-annotations@box/blueprint-web@box/blueprint-web-assets@box/collaboration-popover@box/readable-time@box/user-selectorRanges updated in both
devDependenciesandpeerDependencies; lockfile deduplicated so each bumped package resolves to a single version.Testing
can_comment: falsesetsareCommentsDisabledand does not render the editorSummary by CodeRabbit