feat(activity-feed-v2): tag wrapper with resin feature and bump deps#4648
Conversation
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
Walkthrough
ChangesContent sidebar updates
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ 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 |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 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.
Inline comments:
In `@src/elements/common/interactionTargets.js`:
- Line 43: Fix the typo in the APPROVAL_FORM_ADD_TASK constant value by
correcting the misspelled word from `apporvalformaddtask` to
`approvalformaddtask`. This ensures the analytics target is properly aligned
with the other approvalform target family members and prevents analytics
fragmentation.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: e7c8ce4c-2791-44ee-b28a-ae1f77ed55ce
📒 Files selected for processing (2)
src/elements/common/interactionTargets.jssrc/elements/content-sidebar/activity-feed-v2/ActivityFeedV2.tsx
a6a5e84 to
85f130f
Compare
- Adds data-resin-feature="activityfeedv2" to the v2 ActivityFeed wrapper so v2 interactions can be distinguished from the existing v1 feed (activityfeed) in analytics. - Bumps @box/activity-feed to ^2.1.9 and @box/threaded-annotations to ^2.1.7, plus the peer requirements (@box/blueprint-web ^16.1.4, @box/blueprint-web-assets ^5.2.2, @box/collaboration-popover ^2.1.4, @box/readable-time ^2.1.4, @box/user-selector ^2.1.5).
85f130f to
b15ec4a
Compare
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 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.
Inline comments:
In `@package.json`:
- Line 303: The `@box/cldr-data` package has inconsistent version constraints
between peerDependencies and devDependencies. In the peerDependencies section,
change the version constraint for `@box/cldr-data` from `>=34.2.0` to `^34.2.0`
to match the devDependencies declaration and ensure the peer dependency range
aligns with the tested and intended compatibility contract.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: f3cc5c67-111c-4331-992f-dfe26013a2f9
⛔ Files ignored due to path filters (1)
yarn.lockis excluded by!**/yarn.lock,!**/*.lock
📒 Files selected for processing (2)
package.jsonsrc/elements/content-sidebar/activity-feed-v2/ActivityFeedV2.tsx
🚧 Files skipped from review as they are similar to previous changes (1)
- src/elements/content-sidebar/activity-feed-v2/ActivityFeedV2.tsx
Replaces Enzyme shallow/mount + snapshot assertions with React Testing Library queries against the rendered output. The four scenarios (default render, anonymous uploader, inline error, retention policy) are preserved without snapshots.
There was a problem hiding this comment.
🧹 Nitpick comments (1)
src/elements/content-sidebar/__tests__/SidebarFileProperties.test.js (1)
82-103: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick winAssert the Extend button triggers the callback (Line 83).
This test confirms rendering, but it misses the interaction contract (
openModalwiring). Add a click assertion so regressions in handler binding are caught.Suggested test enhancement
-import { render, screen } from '../../../test-utils/testing-library'; +import { fireEvent, render, screen } from '../../../test-utils/testing-library'; test('should render retention policy information when hasRetentionPolicy is set', () => { const onRetentionPolicyExtendClick = jest.fn(); @@ expect(screen.getByText('Policy')).toBeVisible(); expect(screen.getByText('test policy (1 year retention & auto-deletion')).toBeVisible(); expect(screen.getByText('Policy Expiration')).toBeVisible(); - expect(screen.getByRole('button', { name: 'Extend' })).toBeVisible(); + const extendButton = screen.getByRole('button', { name: 'Extend' }); + expect(extendButton).toBeVisible(); + fireEvent.click(extendButton); + expect(onRetentionPolicyExtendClick).toHaveBeenCalledTimes(1); });🤖 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/__tests__/SidebarFileProperties.test.js` around lines 82 - 103, The test in the test function 'should render retention policy information when hasRetentionPolicy is set' verifies the Extend button is visible but does not verify that clicking it triggers the onRetentionPolicyExtendClick callback. After the existing visibility assertions, add a click interaction on the Extend button using userEvent or fireEvent and then assert that the onRetentionPolicyExtendClick callback mock was called to catch regressions in handler binding.
🤖 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/__tests__/SidebarFileProperties.test.js`:
- Around line 82-103: The test in the test function 'should render retention
policy information when hasRetentionPolicy is set' verifies the Extend button is
visible but does not verify that clicking it triggers the
onRetentionPolicyExtendClick callback. After the existing visibility assertions,
add a click interaction on the Extend button using userEvent or fireEvent and
then assert that the onRetentionPolicyExtendClick callback mock was called to
catch regressions in handler binding.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 86b4b64f-c4af-43e6-b620-14b9e387a342
⛔ Files ignored due to path filters (1)
src/elements/content-sidebar/__tests__/__snapshots__/SidebarFileProperties.test.js.snapis excluded by!**/*.snap
📒 Files selected for processing (1)
src/elements/content-sidebar/__tests__/SidebarFileProperties.test.js
|
Queued — the merge queue status continues in this comment ↓. |
Merge Queue Status
This pull request spent 56 minutes 23 seconds in the queue, including 56 minutes 7 seconds running CI. Required conditions to merge
|
Summary
data-resin-feature="activityfeedv2"so v2 interactions can be distinguished from the existing v1 feed (activityfeed) in analytics.@box/activity-feedto^2.1.9and@box/threaded-annotationsto^2.1.7, plus the peer requirements:@box/blueprint-web^16.1.4,@box/blueprint-web-assets^5.2.2,@box/collaboration-popover^2.1.4,@box/readable-time^2.1.4,@box/user-selector^2.1.5.SidebarFileProperties.test.jsfrom Enzyme shallow/mount + snapshot assertions to React Testing Library queries and removes the snapshot file. The four scenarios (default render, anonymous uploader, inline error, retention policy) are preserved.Test plan
data-resin-feature="activityfeedv2".yarn test --watchAll=false --testPathPattern="elements/content-sidebar/__tests__/SidebarFileProperties"passes.Summary by CodeRabbit
Chores
Bug Fixes