Skip to content

feat(activity-feed-v2): add TaskFormV2 with blueprint primitives and user-selector#4662

Merged
mergify[bot] merged 2 commits into
box:masterfrom
jackiejou:feat/task-modal-v2-form
Jun 30, 2026
Merged

feat(activity-feed-v2): add TaskFormV2 with blueprint primitives and user-selector#4662
mergify[bot] merged 2 commits into
box:masterfrom
jackiejou:feat/task-modal-v2-form

Conversation

@jackiejou

@jackiejou jackiejou commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds TaskFormV2, the assignee/message/due-date/completion-rule form for the V2 task modal. Built on @box/blueprint-web primitives (TextArea, Checkbox, DatePicker) and @box/user-selector's UserSelectorContainer, this replaces v1's PillSelectorDropdown + ContactDatalistItem assignee picker with an accessible user-selector that supports both users and groups.

This PR adds the form in isolation. It is not yet wired into the modal shell or ActivityFeedV2 — those land in the next PR (S-4), which will render <TaskFormV2> inside <Modal.Body> and render the modal's footer buttons targeting the form via form="task-form-v2".

Changes

  • task-modal-v2/TaskFormV2.tsx — functional component, exports TASK_FORM_V2_ID, TaskFormV2Props, TaskFormV2SubmitPayload. Owns its <form> element so the modal footer (S-4) can submit it via the form HTML attribute.
  • task-modal-v2/TaskFormV2.scss — minimal flex layout; Blueprint primitives own their own visual chrome.
  • task-modal-v2/messages.ts — i18n keys for labels, placeholders, errors, and the date-picker's required aria-labels.
  • task-modal-v2/__tests__/TaskFormV2.test.tsx — 13 RTL tests covering all S-3 acceptance criteria.

Design notes

  • Internal state holds UserContactType[], not TaskCollabAssignee[]. The mapper from PR feat(activity-feed-v2): add contact mapping utility for task modal v2 #4657 converts at the API boundary; everything inside the form stays in the user-selector shape. Completion-rule "any vs all" logic uses selectedUsers.some(u => u.type === 'group') and selectedUsers.filter(u => u.type === 'user').length > 1.
  • Form ID pattern for footer button targeting: the form exposes TASK_FORM_V2_ID = 'task-form-v2' so the modal's footer <Modal.Footer.PrimaryButton form="task-form-v2" type="submit"> (added in S-4) can submit it from a sibling DOM tree.
  • DatePicker is react-aria-components-based: values are DateValue (@internationalized/date), not native Date. The form converts at the seam (fromDate on init, toDate(localTimeZone) + end-of-day on submit) so the rest of the codebase only sees Date.
  • activityFeed.tasks.assignToGroup flag dropped as flagged in the plan. V2 uses one tooltip variant unconditionally (groups are always pickable).
  • DatePicker is mocked in tests because react-aria-components portals don't behave well under JSDOM without pointerEvents: 'none' workarounds. The mock preserves the form's behavior contract (label, value, onChange) while staying isolated.
  • UserSelectorContainer is mocked in tests because the container fetches from the live API and renders Radix popovers. The mock captures onSelectedUsersChange so tests can simulate selection.

Test plan

  • yarn test --testPathPattern="task-modal-v2" — 35/35 pass (8 shell + 14 mapper + 13 form)
  • npx eslint --max-warnings=0 src/elements/content-sidebar/activity-feed-v2/task-modal-v2/ — clean
  • npx stylelint "src/elements/content-sidebar/activity-feed-v2/task-modal-v2/**/*.scss" — clean
  • npx tsc --noEmit — clean

Scenarios covered in tests:

  • Renders assignee combobox + message field + date picker on mount
  • Hides completion-rule checkbox until at least one assignee is selected
  • Disables completion-rule checkbox when exactly one user is selected
  • Enables completion-rule checkbox when >= 2 users OR any group is selected
  • Required-field errors on submit for empty assignees + empty message
  • Calls onSubmit with the full payload when valid
  • Toggling completion-rule switches between ALL_ASSIGNEES and ANY_ASSIGNEE
  • Group selections flow through to the submit payload with type: 'group'
  • Seeds the message field from initialMessage (edit-mode prefill scaffolding)
  • Tags the form with data-resin-isediting correctly for create vs edit mode
  • isDisabled cascades to assignee selector + message field

Follow-ups

  • Wire TaskFormV2 into TaskModalV2 with edit-mode prefill and submit handling (next PR — S-4)
  • Switch ActivityFeedV2.tsx to render TaskModalV2
  • Manual a11y and visual smoke test pass

Summary by CodeRabbit

  • New Features
    • Added a v2 task modal form with assignee selection, message entry, due-date picker, and completion-rule controls.
    • Added v2 i18n labels/placeholders and improved date-picker accessibility text.
  • Bug Fixes
    • Validation errors now appear only after the first submit attempt.
    • Due-date submission preserves original time in edit mode and applies correct min-date/end-of-day normalization for new tasks.
  • UI / Styling
    • Refined modal sizing and body overflow behavior to prevent in-form content from expanding the modal beyond its max width.
  • Tests
    • Expanded coverage for rendering, disabled states, completion-rule visibility/enabled logic, min-date/time handling, and submit payload mapping.

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

coderabbitai Bot commented Jun 29, 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

Walkthrough

Adds TaskFormV2 for the task modal v2 with typed submit data, validation, assignee and due-date handling, modal/form styling, updated localized strings, and RTL tests.

Changes

TaskFormV2 Component

Layer / File(s) Summary
Types and messages
src/elements/content-sidebar/activity-feed-v2/task-modal-v2/TaskFormV2.tsx, src/elements/content-sidebar/activity-feed-v2/task-modal-v2/messages.ts
Defines TASK_FORM_V2_ID, TaskFormV2SubmitPayload, and TaskFormV2Props, and adds assignee, completion-rule, due-date, and message field strings.
State and submission
src/elements/content-sidebar/activity-feed-v2/task-modal-v2/TaskFormV2.tsx
Implements task form state, due-date conversion helpers, validation, and submit payload mapping.
Render and modal layout
src/elements/content-sidebar/activity-feed-v2/task-modal-v2/TaskFormV2.tsx, src/elements/content-sidebar/activity-feed-v2/task-modal-v2/TaskFormV2.scss, src/elements/content-sidebar/activity-feed-v2/task-modal-v2/TaskModalV2.scss
Wires the form controls into the component render and adds task form and modal layout styles for wrapping and overflow control.
RTL tests
src/elements/content-sidebar/activity-feed-v2/task-modal-v2/__tests__/TaskFormV2.test.tsx
Mocks the external controls and covers rendering, checkbox behavior, validation, submit payloads, edit mode, disabled state, and task type attributes.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested reviewers

  • zhirongwang
  • JChan106
  • kduncanhsu
  • tjiang-box

Poem

A bunny tapped the modal rim,
With carrots bright and spirits prim.
Assignees hopped, the due date spun,
The message typed, the checks were done.
TaskFormV2 now leaps along,
With tidy fields and testing song. 🐇

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title is concise and accurately describes the main change: adding TaskFormV2 with Blueprint primitives and the user selector.
Description check ✅ Passed The description is detailed and covers summary, changes, design notes, testing, and follow-ups, so it is sufficiently complete.
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.

@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: 2

🤖 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/content-sidebar/activity-feed-v2/task-modal-v2/TaskFormV2.tsx`:
- Around line 65-67: The TaskFormV2 edit flow is incorrectly treating overdue
existing due dates as invalid because the minimum selectable date is always
anchored to today. Update the due-date handling in TaskFormV2 so edit mode
allows an initialDueDate in the past to remain selectable and editable, while
still enforcing today as the minimum only for creating new tasks. Use the
existing dueDate state, initialDueDate, and the date picker/min-date logic in
TaskFormV2 to conditionally derive the minimum date based on whether the form is
editing or creating.
- Around line 84-96: The TaskFormV2 handleFormSubmit path still allows submit
when isDisabled is true, so add an early return in handleFormSubmit before any
validation or onSubmit call. Use the existing isDisabled prop in TaskFormV2 to
block submission regardless of pre-seeded fields, while keeping the current
selectedUsers/message checks and onSubmit payload unchanged for enabled forms.
🪄 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: 326fe8e9-088e-4cfb-acc8-49928b979550

📥 Commits

Reviewing files that changed from the base of the PR and between 3fab6f1 and 1a417b1.

📒 Files selected for processing (4)
  • src/elements/content-sidebar/activity-feed-v2/task-modal-v2/TaskFormV2.scss
  • src/elements/content-sidebar/activity-feed-v2/task-modal-v2/TaskFormV2.tsx
  • src/elements/content-sidebar/activity-feed-v2/task-modal-v2/__tests__/TaskFormV2.test.tsx
  • src/elements/content-sidebar/activity-feed-v2/task-modal-v2/messages.ts

@jackiejou jackiejou force-pushed the feat/task-modal-v2-form branch from 1a417b1 to 40c1844 Compare June 29, 2026 21:56

@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

🧹 Nitpick comments (1)
src/elements/content-sidebar/activity-feed-v2/task-modal-v2/__tests__/TaskFormV2.test.tsx (1)

27-60: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Expose callback hooks in the mocks.

These mocks are fully static, so the suite never drives onSelectedUsersChange or the DatePicker change path. That means the new UserContactType[] state updates and DateValueDate submit conversion can regress while these tests still pass. Add a minimal trigger in each mock and cover one interactive assignee change plus one due-date submit.

🤖 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/task-modal-v2/__tests__/TaskFormV2.test.tsx`
around lines 27 - 60, The test mocks for UserSelectorContainer and DatePicker
are static, so they never exercise the onSelectedUsersChange callback or the
DatePicker change path. Update these mocks to expose minimal interaction hooks
that let tests trigger assignee selection and due-date changes, then add
coverage in TaskFormV2.test.tsx for one UserContactType[] update and one
DateValue-to-Date submit flow. Use the existing mock identifiers
UserSelectorContainer, DatePicker, and the lastUserSelectorProps capture to
locate the changes.
🤖 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/content-sidebar/activity-feed-v2/task-modal-v2/TaskFormV2.tsx`:
- Around line 42-54: Only carry forward a seeded due-date time when the form is
in edit mode, not whenever initialDueDate exists. Update TaskFormV2 so the logic
around initialDueDate/initialDueDateTime only sets originalDueDateTime for
existing tasks, while create mode still falls through to toSubmitDate’s
end-of-day normalization. Use the TaskFormV2 submission flow and the
toSubmitDate helper to keep new-task dates at 23:59:59.999 and preserve the
original time only for true edits.

---

Nitpick comments:
In
`@src/elements/content-sidebar/activity-feed-v2/task-modal-v2/__tests__/TaskFormV2.test.tsx`:
- Around line 27-60: The test mocks for UserSelectorContainer and DatePicker are
static, so they never exercise the onSelectedUsersChange callback or the
DatePicker change path. Update these mocks to expose minimal interaction hooks
that let tests trigger assignee selection and due-date changes, then add
coverage in TaskFormV2.test.tsx for one UserContactType[] update and one
DateValue-to-Date submit flow. Use the existing mock identifiers
UserSelectorContainer, DatePicker, and the lastUserSelectorProps capture to
locate the changes.
🪄 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: 85c9d31c-ba2f-4203-87e7-9f216ba55b97

📥 Commits

Reviewing files that changed from the base of the PR and between 1a417b1 and 40c1844.

📒 Files selected for processing (5)
  • src/elements/content-sidebar/activity-feed-v2/task-modal-v2/TaskFormV2.scss
  • src/elements/content-sidebar/activity-feed-v2/task-modal-v2/TaskFormV2.tsx
  • src/elements/content-sidebar/activity-feed-v2/task-modal-v2/TaskModalV2.scss
  • src/elements/content-sidebar/activity-feed-v2/task-modal-v2/__tests__/TaskFormV2.test.tsx
  • src/elements/content-sidebar/activity-feed-v2/task-modal-v2/messages.ts
✅ Files skipped from review due to trivial changes (2)
  • src/elements/content-sidebar/activity-feed-v2/task-modal-v2/TaskFormV2.scss
  • src/elements/content-sidebar/activity-feed-v2/task-modal-v2/TaskModalV2.scss

@jackiejou jackiejou force-pushed the feat/task-modal-v2-form branch from 40c1844 to 411e34a Compare June 29, 2026 22:07

@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 (2)
src/elements/content-sidebar/activity-feed-v2/task-modal-v2/__tests__/TaskFormV2.test.tsx (2)

49-67: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick win

Add a submit-path test for due-date round-tripping.

The date tests stop at minValue. They never drive DatePicker through onChange and assert the submitted dueDate, so the DateValueDate conversion in TaskFormV2 is still unguarded.

Also applies to: 158-173, 240-257

🤖 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/task-modal-v2/__tests__/TaskFormV2.test.tsx`
around lines 49 - 67, Add a submit-path test in TaskFormV2.test.tsx that drives
the mocked DatePicker through onChange and verifies the form submits the
expected dueDate. Use the existing DatePicker mock/lastDatePickerProps setup to
simulate a DateValue selection, then submit the form and assert the TaskFormV2
onSubmit payload contains the converted Date dueDate. Keep the test aligned with
the existing date-related cases around DatePicker, minValue, and TaskFormV2 so
the DateValue-to-Date round-trip is covered.

27-47: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick win

Drive assignee updates through the mock.

All assignee-path assertions here depend on initialAssignees, so the suite never proves that a post-mount onSelectedUsersChange updates selectedUsers, clears validation, or recomputes the completion-rule checkbox state.

Suggested test hook
 type UserSelectorMockProps = {
     disabled?: boolean;
     error?: string;
     label?: React.ReactNode;
     onSelectedUsersChange?: (users: UserContactType[]) => void;
     selectedUsers?: UserContactType[];
 };

 jest.mock('`@box/user-selector`', () => ({
     UserSelectorContainer: (props: UserSelectorMockProps) => {
         lastUserSelectorProps = props;
         return (
             <div data-testid="user-selector">
+                <button
+                    type="button"
+                    onClick={() =>
+                        props.onSelectedUsersChange?.([{ name: 'Alice', type: 'user', value: '1' } as UserContactType])
+                    }
+                >
+                    select-user
+                </button>
                 <label>
                     {props.label}
                     <input aria-label="assignee input" data-testid="user-selector-input" />
                 </label>

Also applies to: 131-148, 223-237

🤖 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/task-modal-v2/__tests__/TaskFormV2.test.tsx`
around lines 27 - 47, The TaskFormV2 tests are still asserting only the initial
assignee state, so they never verify post-mount updates from the
UserSelectorContainer mock. Add a test flow that captures the mock props via
lastUserSelectorProps and invokes onSelectedUsersChange to simulate assignee
changes, then assert selectedUsers updates, validation errors clear, and the
completion-rule checkbox state recomputes accordingly. Apply this to the
relevant assignee-path cases in TaskFormV2.test.tsx so the suite exercises the
actual update path instead of only initialAssignees.
🤖 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/task-modal-v2/__tests__/TaskFormV2.test.tsx`:
- Around line 49-67: Add a submit-path test in TaskFormV2.test.tsx that drives
the mocked DatePicker through onChange and verifies the form submits the
expected dueDate. Use the existing DatePicker mock/lastDatePickerProps setup to
simulate a DateValue selection, then submit the form and assert the TaskFormV2
onSubmit payload contains the converted Date dueDate. Keep the test aligned with
the existing date-related cases around DatePicker, minValue, and TaskFormV2 so
the DateValue-to-Date round-trip is covered.
- Around line 27-47: The TaskFormV2 tests are still asserting only the initial
assignee state, so they never verify post-mount updates from the
UserSelectorContainer mock. Add a test flow that captures the mock props via
lastUserSelectorProps and invokes onSelectedUsersChange to simulate assignee
changes, then assert selectedUsers updates, validation errors clear, and the
completion-rule checkbox state recomputes accordingly. Apply this to the
relevant assignee-path cases in TaskFormV2.test.tsx so the suite exercises the
actual update path instead of only initialAssignees.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 74009a32-7374-4a7e-9978-36f850ff96ac

📥 Commits

Reviewing files that changed from the base of the PR and between 40c1844 and 411e34a.

📒 Files selected for processing (5)
  • src/elements/content-sidebar/activity-feed-v2/task-modal-v2/TaskFormV2.scss
  • src/elements/content-sidebar/activity-feed-v2/task-modal-v2/TaskFormV2.tsx
  • src/elements/content-sidebar/activity-feed-v2/task-modal-v2/TaskModalV2.scss
  • src/elements/content-sidebar/activity-feed-v2/task-modal-v2/__tests__/TaskFormV2.test.tsx
  • src/elements/content-sidebar/activity-feed-v2/task-modal-v2/messages.ts
✅ Files skipped from review due to trivial changes (1)
  • src/elements/content-sidebar/activity-feed-v2/task-modal-v2/TaskFormV2.scss
🚧 Files skipped from review as they are similar to previous changes (3)
  • src/elements/content-sidebar/activity-feed-v2/task-modal-v2/messages.ts
  • src/elements/content-sidebar/activity-feed-v2/task-modal-v2/TaskModalV2.scss
  • src/elements/content-sidebar/activity-feed-v2/task-modal-v2/TaskFormV2.tsx

@jackiejou jackiejou force-pushed the feat/task-modal-v2-form branch from 411e34a to dff9877 Compare June 29, 2026 22:13

@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 (2)
src/elements/content-sidebar/activity-feed-v2/task-modal-v2/__tests__/TaskFormV2.test.tsx (2)

53-67: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick win

Drive one due-date test through DatePicker.onChange.

The current due-date tests only use initialDueDate, which bypasses the DateValueDate conversion this component owns. If that boundary breaks, this suite stays green. Add a small hook in the mock and assert submission after a synthetic picker change.

🤖 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/task-modal-v2/__tests__/TaskFormV2.test.tsx`
around lines 53 - 67, The due-date coverage in TaskFormV2.test.tsx only relies
on initialDueDate and never exercises the DatePicker boundary, so add a test
that drives the form through the mocked DatePicker.onChange path. Update the
DatePicker mock in the Jest setup to expose/trigger onChange from
DatePickerMockProps, then in one of the TaskFormV2 submit tests simulate a
synthetic picker change and assert the submitted due date after the DateValue to
Date conversion. Use the existing TaskFormV2 and DatePicker mock symbols to keep
the test aligned with the component-owned conversion logic.

27-47: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick win

Exercise onSelectedUsersChange in the mock.

All assignee scenarios here are seeded through initialAssignees, so the suite never proves that a selector-driven update recomputes completion-rule state or submit payloads correctly. A regression in the UserSelectorContainer callback path would still pass these tests.

🤖 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/task-modal-v2/__tests__/TaskFormV2.test.tsx`
around lines 27 - 47, The current `UserSelectorContainer` mock in
`TaskFormV2.test.tsx` only renders props and never triggers
`onSelectedUsersChange`, so selector-driven state updates are untested. Update
the mock to expose and invoke `props.onSelectedUsersChange` from the
`UserSelectorContainer` stub, then add coverage in the `TaskFormV2` suite for
changing assignees through the selector and verifying the recomputed
completion-rule state and submit payload. Use the existing
`lastUserSelectorProps`/`UserSelectorMockProps` setup to locate the callback
path.
🤖 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/task-modal-v2/__tests__/TaskFormV2.test.tsx`:
- Around line 53-67: The due-date coverage in TaskFormV2.test.tsx only relies on
initialDueDate and never exercises the DatePicker boundary, so add a test that
drives the form through the mocked DatePicker.onChange path. Update the
DatePicker mock in the Jest setup to expose/trigger onChange from
DatePickerMockProps, then in one of the TaskFormV2 submit tests simulate a
synthetic picker change and assert the submitted due date after the DateValue to
Date conversion. Use the existing TaskFormV2 and DatePicker mock symbols to keep
the test aligned with the component-owned conversion logic.
- Around line 27-47: The current `UserSelectorContainer` mock in
`TaskFormV2.test.tsx` only renders props and never triggers
`onSelectedUsersChange`, so selector-driven state updates are untested. Update
the mock to expose and invoke `props.onSelectedUsersChange` from the
`UserSelectorContainer` stub, then add coverage in the `TaskFormV2` suite for
changing assignees through the selector and verifying the recomputed
completion-rule state and submit payload. Use the existing
`lastUserSelectorProps`/`UserSelectorMockProps` setup to locate the callback
path.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 273f3a82-36ea-40c5-84ff-ec1b3ab0dae3

📥 Commits

Reviewing files that changed from the base of the PR and between 411e34a and dff9877.

📒 Files selected for processing (5)
  • src/elements/content-sidebar/activity-feed-v2/task-modal-v2/TaskFormV2.scss
  • src/elements/content-sidebar/activity-feed-v2/task-modal-v2/TaskFormV2.tsx
  • src/elements/content-sidebar/activity-feed-v2/task-modal-v2/TaskModalV2.scss
  • src/elements/content-sidebar/activity-feed-v2/task-modal-v2/__tests__/TaskFormV2.test.tsx
  • src/elements/content-sidebar/activity-feed-v2/task-modal-v2/messages.ts
✅ Files skipped from review due to trivial changes (2)
  • src/elements/content-sidebar/activity-feed-v2/task-modal-v2/TaskFormV2.scss
  • src/elements/content-sidebar/activity-feed-v2/task-modal-v2/TaskModalV2.scss
🚧 Files skipped from review as they are similar to previous changes (2)
  • src/elements/content-sidebar/activity-feed-v2/task-modal-v2/messages.ts
  • src/elements/content-sidebar/activity-feed-v2/task-modal-v2/TaskFormV2.tsx

@jackiejou jackiejou force-pushed the feat/task-modal-v2-form branch from dff9877 to 0006b0d Compare June 29, 2026 22:26
@mergify

mergify Bot commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

Merge Queue Status

  • Entered queue2026-06-30 17:44 UTC · Rule: Automatic strict merge · triggered by rule Automatic merge queue
  • Checks passed · in-place
  • Merged2026-06-30 17:55 UTC · at 4a4f4aa1d0b58e00181c4af8999a2beda4dbfd6a · squash

This pull request spent 11 minutes 26 seconds in the queue, including 11 minutes 2 seconds running CI.

Required conditions to merge

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