Skip to content

feat(activity-feed-v2): add resin fileid and task modal instrumentation#4687

Open
jackiejou wants to merge 5 commits into
box:masterfrom
jackiejou:resin-instrumentation-activity-feed-v2
Open

feat(activity-feed-v2): add resin fileid and task modal instrumentation#4687
jackiejou wants to merge 5 commits into
box:masterfrom
jackiejou:resin-instrumentation-activity-feed-v2

Conversation

@jackiejou

@jackiejou jackiejou commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Summary

Improves resin instrumentation for the V2 activity feed so click events can be attributed to the file and surface they occurred on.

  • File id on the feed wrapper: the ActivityFeedV2 wrapper div now carries data-resin-fileid alongside the existing data-resin-feature="activityfeedv2". Resin resolves events by walking DOM ancestors and collecting data-resin-* attributes, so every event fired from inside the feed (comment post, reply, resolve, task actions, version/profile/mention links) now inherits the file id.
  • Task modal portal anchoring: the task modal renders through a portal on document.body, severing it from the feed wrapper in the DOM. Modal.Content now carries its own data-resin-feature="activityfeedv2" and data-resin-fileid (threaded via a new optional fileId prop) so modal events (post, cancel, datepicker) are fully attributed.
  • Task datepicker target: the TaskFormV2 DatePicker now carries data-resin-target with the same activityfeed-taskdatepicker value its V1 counterpart used, restoring that signal. The blueprint DatePicker spreads unknown props onto its rendered root, so the attribute lands in the DOM without any blueprint change.

Also adds id to the local ActivityFeedV2File type; the full file object is already passed from ActivitySidebar.

Known limitation

Dropdown menus rendered by the feed's inner components portal outside this wrapper and carry only their own component/feature attributes; they do not inherit fileid from this change. That will be addressed separately in the packages that own those portal roots.

Tests

  • New/extended assertions for the wrapper fileid, the modal content feature/fileid, the fileId prop forwarding, and the datepicker target
  • yarn test --watchAll=false --testPathPattern="activity-feed-v2": 343 tests passing
  • tsc and ESLint clean

Summary by CodeRabbit

  • New Features
    • Added enhanced tracking metadata to the activity feed wrapper and task modal, including the related file identifier.
    • Added resin target tracking to the task due-date picker.
    • Activity feed file data now supports an optional identifier.
  • Tests
    • Expanded coverage to validate the added tracking metadata (including file identifier) for the activity feed, task modal, and due-date picker.

Tag the feed wrapper with data-resin-fileid so descendant events carry
the file id. Anchor the portaled task modal with its own feature and
fileid attributes. Restore the task datepicker resin target from V1.
@jackiejou jackiejou requested review from a team as code owners July 9, 2026 23:31
@coderabbitai

coderabbitai Bot commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

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: 3c7cc3c6-1007-47a5-b3f0-8e2e3abafe20

📥 Commits

Reviewing files that changed from the base of the PR and between 35efc1f and 559ad19.

📒 Files selected for processing (1)
  • src/elements/content-sidebar/activity-feed-v2/task-modal-v2/TaskFormV2.tsx
✅ Files skipped from review due to trivial changes (1)
  • src/elements/content-sidebar/activity-feed-v2/task-modal-v2/TaskFormV2.tsx

Walkthrough

Activity Feed v2 now exposes resin metadata for the current file, forwards its identifier to TaskModalV2, and tags the task due-date picker with a configured resin target. Tests cover feed, modal, and form attributes.

Changes

Activity Feed Resin Metadata

Layer / File(s) Summary
Feed file identity propagation
src/elements/content-sidebar/activity-feed-v2/types.ts, src/elements/content-sidebar/activity-feed-v2/ActivityFeedV2.tsx, src/elements/content-sidebar/activity-feed-v2/__tests__/ActivityFeedV2.test.tsx
ActivityFeedV2File supports an optional ID, which is rendered on the feed container and forwarded to TaskModalV2 in create and edit modes.
Task modal and form resin metadata
src/elements/content-sidebar/activity-feed-v2/task-modal-v2/*
TaskModalV2 renders feature and file metadata, while the due-date DatePicker receives the configured resin target; tests verify both additions.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

Suggested reviewers: ahorowitz123, jmcbgaston, mrscobbler

Poem

A bunny tags the feed with care,
File IDs hop through modal air.
The date picker wears its mark,
Resin trails glow in the dark.
Tests nod twice: “The path is clear!”

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description doesn't follow the repository template and omits the required ready-to-merge merge-queue guidance section. Replace it with the repo's template or include the ready-to-merge instructions and merge-queue checklist in the required format.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed It clearly summarizes the main change: adding Resin file IDs and task modal instrumentation to Activity Feed V2.
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.
✨ 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.

@JChan106 JChan106 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.

lgtm

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.

4 participants