Skip to content

feat(activity-feed-v2): tag wrapper with resin feature and bump deps#4648

Merged
mergify[bot] merged 3 commits into
box:masterfrom
jackiejou:feat/activity-feed-v2-resin-targets
Jun 24, 2026
Merged

feat(activity-feed-v2): tag wrapper with resin feature and bump deps#4648
mergify[bot] merged 3 commits into
box:masterfrom
jackiejou:feat/activity-feed-v2-resin-targets

Conversation

@jackiejou

@jackiejou jackiejou commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Tags the v2 ActivityFeed wrapper with data-resin-feature="activityfeedv2" 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.
  • Converts SidebarFileProperties.test.js from 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

  • Open the v2 activity feed in the sidebar and confirm the wrapper has data-resin-feature="activityfeedv2".
  • Confirm the v2 feed renders and behaves normally after the dependency bumps (filters, posting, replies, task modal, video timestamps).
  • yarn test --watchAll=false --testPathPattern="elements/content-sidebar/__tests__/SidebarFileProperties" passes.

Summary by CodeRabbit

  • Chores

    • Refreshed several Box package versions and peer version ranges to keep the app aligned with the latest compatible releases.
  • Bug Fixes

    • Updated activity feed markup metadata without changing the way the feed looks or behaves for users.

@jackiejou
jackiejou requested review from a team as code owners June 24, 2026 02:18
@coderabbitai

coderabbitai Bot commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Note

Reviews paused

It 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 reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 8530c3bb-47f3-43b9-8c31-bd0b47d95b53

📥 Commits

Reviewing files that changed from the base of the PR and between 3ae6d22 and 450e2eb.

⛔ Files ignored due to path filters (1)
  • yarn.lock is excluded by !**/yarn.lock, !**/*.lock
📒 Files selected for processing (1)
  • package.json
🚧 Files skipped from review as they are similar to previous changes (1)
  • package.json

Walkthrough

ActivityFeedV2 now includes a data-resin-feature="activityfeedv2" attribute on its root wrapper. package.json updates several @box/* dependency and peer dependency versions, including the @box/cldr-data peer range. SidebarFileProperties tests now use React Testing Library and explicit DOM assertions.

Changes

Content sidebar updates

Layer / File(s) Summary
ActivityFeedV2 resin attribute
src/elements/content-sidebar/activity-feed-v2/ActivityFeedV2.tsx
Adds data-resin-feature="activityfeedv2" to the ActivityFeedV2 root wrapper div.
Package version updates
package.json
Updates multiple @box/* entries in devDependencies and peerDependencies, and changes the @box/cldr-data peer constraint from >=34.2.0 to ^34.2.0.
SidebarFileProperties RTL assertions
src/elements/content-sidebar/__tests__/SidebarFileProperties.test.js
Replaces Enzyme and snapshot-based tests with React Testing Library assertions for item properties, anonymous uploader display, inline error rendering, and retention policy UI.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Possibly related PRs

Suggested reviewers

  • ahorowitz123
  • mrscobbler

Poem

A bunny peeks at the sidebar light,
A resin tag hops in just right.
Versions twinkle, tests now sing,
RTL makes the assertions spring. 🐇

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title matches the main changes: the new resin feature tag and dependency bumps, though it omits the test rewrite.
Description check ✅ Passed The description summarizes the code changes and includes a test plan, covering the main updates and verification steps.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

📥 Commits

Reviewing files that changed from the base of the PR and between 583058c and a6a5e84.

📒 Files selected for processing (2)
  • src/elements/common/interactionTargets.js
  • src/elements/content-sidebar/activity-feed-v2/ActivityFeedV2.tsx

Comment thread src/elements/common/interactionTargets.js
@jackiejou
jackiejou force-pushed the feat/activity-feed-v2-resin-targets branch from a6a5e84 to 85f130f Compare June 24, 2026 02:23
- 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).
@jackiejou
jackiejou force-pushed the feat/activity-feed-v2-resin-targets branch from 85f130f to b15ec4a Compare June 24, 2026 02:35
@jackiejou jackiejou changed the title feat(activity-feed-v2): add resin instrumentation targets feat(activity-feed-v2): tag wrapper with resin feature and bump deps Jun 24, 2026
@socket-security

socket-security Bot commented Jun 24, 2026

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

📥 Commits

Reviewing files that changed from the base of the PR and between 85f130f and b15ec4a.

⛔ Files ignored due to path filters (1)
  • yarn.lock is excluded by !**/yarn.lock, !**/*.lock
📒 Files selected for processing (2)
  • package.json
  • src/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

Comment thread package.json
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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
src/elements/content-sidebar/__tests__/SidebarFileProperties.test.js (1)

82-103: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick win

Assert the Extend button triggers the callback (Line 83).

This test confirms rendering, but it misses the interaction contract (openModal wiring). 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

📥 Commits

Reviewing files that changed from the base of the PR and between b15ec4a and 3ae6d22.

⛔ Files ignored due to path filters (1)
  • src/elements/content-sidebar/__tests__/__snapshots__/SidebarFileProperties.test.js.snap is excluded by !**/*.snap
📒 Files selected for processing (1)
  • src/elements/content-sidebar/__tests__/SidebarFileProperties.test.js

@mergify

mergify Bot commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

Queued — the merge queue status continues in this comment ↓.

@mergify mergify Bot added the queued label Jun 24, 2026
@mergify

mergify Bot commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

Merge Queue Status

  • Entered queue2026-06-24 17:35 UTC · Rule: Automatic strict merge · triggered by rule Automatic merge queue
  • Checks passed · in-place
  • Merged2026-06-24 18:32 UTC · at 450e2eb5297e9cb29ab9c49a1a8a4b99608d856d · squash

This pull request spent 56 minutes 23 seconds in the queue, including 56 minutes 7 seconds running CI.

Required conditions to merge

@mergify
mergify Bot merged commit c833428 into box:master Jun 24, 2026
10 of 11 checks passed
@mergify mergify Bot removed the queued label Jun 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants