Skip to content

fix(activity-feed-v2): load full assignee list when expanding task assignees - #4721

Merged
mergify[bot] merged 8 commits into
box:masterfrom
zhirongwang:fix/activity-feed-v2-load-all-assignees
Jul 26, 2026
Merged

fix(activity-feed-v2): load full assignee list when expanding task assignees#4721
mergify[bot] merged 8 commits into
box:masterfrom
zhirongwang:fix/activity-feed-v2-load-all-assignees

Conversation

@zhirongwang

@zhirongwang zhirongwang commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Tasks with more than 20 assignees only ever displayed the first page returned by the file activities endpoint: the assignee list's "Show more" button expanded the already-loaded entries but never fetched the rest, so the list appeared stuck at 20.
  • transformTaskToProps already set hasNextPage from assigned_to.next_marker, but no consumer supplied the onLoadAllAssignee callback that AssigneeList (from @box/activity-feed) needs to fetch the remaining assignees.
  • Wire onLoadAllAssignee through ActivityFeedV2FeedItemRowActivityFeed.List.Task, reusing the existing getTaskCollaborators fetch (/undoc/tasks/{id}/task_collaborators?role=ASSIGNEE&limit=1000) that the task edit modal already uses. This matches the legacy task card's expand behavior (activity-feed/task-new/Task.js).
  • Extract the assignee mapping into transformTaskAssignees so the initial transform and the load-all path share the same logic.

Test Plan

  • Unit tests added: FeedItemRow passes the original task to onTaskLoadAllAssignees and omits onLoadAllAssignee when no loader is provided; ActivityFeedV2 fetches via getTaskCollaborators and returns transformed assignees, and omits the loader when the prop is absent (all 237 tests in the three touched suites pass)
  • tsc and eslint clean
  • Verified in Storybook (Elements/ContentSidebar with live token) and in a linked webapp: clicking "Show more" on a 26-assignee task fires the task_collaborators?role=ASSIGNEE&limit=1000 request and renders all 26 assignees with loading state; "Show less" collapses back

Made with Cursor

Summary by CodeRabbit

  • New Features
    • Activity feed task rows can now load and display the complete assignee list when more assignees exist beyond the initial preview.
    • Assignee details are rendered consistently, including completed time, status, permissions, and avatars.
  • Bug Fixes
    • Improved handling for incomplete/paginated assignee data, with graceful avatar lookup failures and clear error reporting when assignee loading fails.
  • Tests
    • Added/extended tests for full assignee loading, avatar URL resolution, and error/no-callback behavior.

@coderabbitai

coderabbitai Bot commented Jul 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 Plus

Run ID: 966d00e2-1353-41d6-9bcd-7c0d10013bd9

📥 Commits

Reviewing files that changed from the base of the PR and between e88c508 and 71436a3.

📒 Files selected for processing (1)
  • 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

Walkthrough

Task assignee transformation is extracted into a reusable helper, then connected from ActivityFeedV2 through FeedItemRow to task entries. Tests verify complete-assignee loading, avatar resolution, error propagation, timestamp conversion, callback forwarding, and omission when unavailable.

Changes

Task assignee loading

Layer / File(s) Summary
Assignee transformation contract
src/elements/content-sidebar/activity-feed-v2/transformers.ts
Exports transformTaskAssignees and reuses it from transformTaskToProps to produce normalized assignee props.
Adapter callback wiring
src/elements/content-sidebar/activity-feed-v2/ActivityFeedV2.tsx, src/elements/content-sidebar/activity-feed-v2/FeedItemRow.tsx
Fetches complete collaborators through getTaskCollaborators, resolves missing avatars, transforms them, and forwards the loader to task entries.
Assignee loading validation
src/elements/content-sidebar/activity-feed-v2/__tests__/*
Verifies pagination flags, transformed collaborator results, avatar fallbacks, callback forwarding, error propagation, and callback omission.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Sequence Diagram(s)

sequenceDiagram
  participant ActivityFeedListTask
  participant FeedItemRow
  participant ActivityFeedV2
  participant getTaskCollaborators
  ActivityFeedListTask->>FeedItemRow: invoke onLoadAllAssignee(task)
  FeedItemRow->>ActivityFeedV2: invoke onTaskLoadAllAssignees(task)
  ActivityFeedV2->>getTaskCollaborators: fetch complete collaborators
  getTaskCollaborators-->>ActivityFeedV2: return collaborator entries
  ActivityFeedV2-->>ActivityFeedListTask: return transformed assignees
Loading

Possibly related PRs

Suggested labels: ready-to-merge

Poem

I’m a rabbit with assignees to load,
Hopping callbacks down the code road.
Avatars sparkle, names align,
Tests guard every hop in line.
The full list arrives with care!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly matches the main change: loading the full assignee list when expanding task assignees.
Description check ✅ Passed The description includes a clear summary and a test plan that covers the implemented behavior 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.
✨ 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.

@CLAassistant

CLAassistant commented Jul 24, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@zhirongwang zhirongwang self-assigned this Jul 24, 2026
@zhirongwang
zhirongwang marked this pull request as ready for review July 24, 2026 00:31
@zhirongwang
zhirongwang requested review from a team as code owners July 24, 2026 00:31
zhirongwang and others added 6 commits July 23, 2026 17:31
… fallback

Co-authored-by: Cursor <cursoragent@cursor.com>
…gnees' into fix/activity-feed-v2-load-all-assignees
Co-authored-by: Cursor <cursoragent@cursor.com>
… lookups

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Comment thread src/elements/content-sidebar/activity-feed-v2/ActivityFeedV2.tsx Outdated
…gnees

Co-authored-by: Cursor <cursoragent@cursor.com>
@mergify

mergify Bot commented Jul 26, 2026

Copy link
Copy Markdown
Contributor

Merge Queue Status

  • Entered queue2026-07-26 04:32 UTC · Rule: Automatic strict merge · triggered by rule Automatic merge queue
  • Checks skipped · PR is already up-to-date
  • Merged2026-07-26 04:32 UTC · at 71436a33d4a37e7859a57a7230d4c8691556f125 · squash

This pull request spent 9 seconds in the queue, including 1 second running CI.

Required conditions to merge

@mergify
mergify Bot merged commit b450323 into box:master Jul 26, 2026
10 of 11 checks passed
@mergify mergify Bot removed the queued label Jul 26, 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.

5 participants