fix(activity-feed-v2): Hide inline task actions for multi-file tasks#4717
Conversation
WalkthroughTask transformation now exposes the number of linked files. ChangesTask action gating
Estimated code review effort: 2 (Simple) | ~10 minutes 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 |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
src/elements/content-sidebar/activity-feed-v2/__tests__/transformers.test.ts (1)
372-392: 🔒 Security & Privacy | 🔵 Trivial | ⚡ Quick winAdd coverage for paginated task links.
The tests only cover a complete collection (
next_marker: null). Add a case with one entry and a non-null marker to ensure the chosen multi-file behavior remains safe.🤖 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__/transformers.test.ts` around lines 372 - 392, Add a test alongside the existing transformTaskToProps fileCount cases using a single task_links entry and a non-null next_marker, then assert the expected safe multi-file behavior for result.fileCount. Keep the existing complete-collection and missing-task_links coverage unchanged.
🤖 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__/transformers.test.ts`:
- Around line 372-392: Add a test alongside the existing transformTaskToProps
fileCount cases using a single task_links entry and a non-null next_marker, then
assert the expected safe multi-file behavior for result.fileCount. Keep the
existing complete-collection and missing-task_links coverage unchanged.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: cf1e3887-bb4a-41be-b776-fe931fd638f5
📒 Files selected for processing (4)
src/elements/content-sidebar/activity-feed-v2/FeedItemRow.tsxsrc/elements/content-sidebar/activity-feed-v2/__tests__/FeedItemRow.test.tsxsrc/elements/content-sidebar/activity-feed-v2/__tests__/transformers.test.tssrc/elements/content-sidebar/activity-feed-v2/transformers.ts
Merge Queue Status
This pull request spent 12 seconds in the queue, including 1 second running CI. Required conditions to merge
|
Summary
transformTaskToPropsnow passesfileCount(fromtask_links.entries.length) to theTaskItemcomponent, which already hides the inline footer actions and surfaces "View Task Details" when a task spans more than one file.FeedItemRowadditionally omits theonApprove/onComplete/onRejectcallbacks for multi-file tasks so the inline update path cannot be reached.Test Plan
transformerstests coveringfileCountderived fromtask_linksentries andundefinedwhentask_linksis missingFeedItemRowtest asserting the action callbacks are omitted for a task linked to two filesactivity-feed-v2suite passes (353 tests) andtscis cleanSummary by CodeRabbit
New Features
Bug Fixes
Tests