Skip to content

Use UserPill for the task Assignee row to match the expense Attendee row - #100280

Merged
chiragsalian merged 5 commits into
mainfrom
claude-taskAssigneeUserPill
Sep 8, 2026
Merged

chiragsalian merged 5 commits into
mainfrom
claude-taskAssigneeUserPill

Conversation

@MelvinBot

@MelvinBot MelvinBot commented Sep 3, 2026 •

Copy link
Copy Markdown
Contributor

Explanation of Change

The task Assignee row and the expense Attendees row were built with two different MenuItem APIs, so the same "a user" concept rendered two different ways. This PR makes both Assignee rows — the task detail view and the Confirm task page — render the user as a single UserPill, in the same lockup the Attendees row uses.

1. Task detail view (TaskView) — passed the assignee as a plain title string plus a separate leading avatar, styled with a task-only styles.assigneeTextStyle. It now renders one <UserPill> through titleComponent, matching the Attendees row and the existing precedent in ApprovalWorkflowSection (one standalone pill inside a menu item, using styles.userPillStandalone).

  • title, iconAccountID, iconType, avatarSize, titleStyle, isSmallAvatarSubscriptMenu, and titleWithTooltips are replaced by a titleComponent holding one <UserPill>.
  • UserPill already provides the UserDetailsTooltip and SMS phone formatting, so the hand-rolled assigneeTooltipDetails (and its getDisplayNamesWithTooltips / getPersonalDetailsForAccountIDs imports) is no longer needed.
  • Because MenuItem derives its default accessibility label from title, an explicit accessibilityLabel of "Assignee, <name>" is now passed so the row keeps a meaningful label. This is the same pattern the Attendees row uses.
  • styles.assigneeTextStyle had no other consumer and is removed.

2. Confirm task page (DynamicNewTaskPage) — the same avatar + text treatment, now the same UserPill. Added after shawnborton asked for the assignee row on the confirmation page to match; the Share row is deliberately untouched, since a share destination can be a workspace chat or a room rather than a user.

3. Label lockup — the Confirm task page used the MenuItemWithLabel preset, which by design renders the label outside Root, so the "Assignee" label sat above the hover background instead of inside it. The task detail view uses the legacy MenuItem label prop, which defaults to isLabelHoverable and renders the label inside the pressable. dannymcclain flagged the mismatch: the label and the pill should read as one lockup and share one hover area.

The composable MenuItem API had no inside-the-row label — only the outside-the-row preset. This PR adds a MenuItem.Label leaf that renders inside MenuItem.Content, using the same text styles as the legacy hoverable label, and switches the Assignee row to MenuItem.Root + MenuItem.Label + the pill. onPress is wrapped in callFunctionIfActionIsAllowed so the anonymous-user gate the preset provided is preserved.

The unassigned empty state is untouched in both places — there is no user to render.

Fixed Issues

$ #100192
PROPOSAL: #100192 (comment)

Tests

// TODO: The human co-author must fill out the tests you ran before marking this PR as "ready for review".
// Please describe what tests you performed that validate your change worked.

Suggested steps to start from:

  1. Send a task in a chat and assign it to another user.
  2. Open the task detail view.
  3. Verify the Assignee row shows the assignee inside a bordered, rounded user pill (avatar + name inside a border) — the same treatment as attendees on an expense.
  4. Hover the Assignee row and verify the "Assignee" label and the pill are inside the same hover highlight, as one lockup.
  5. Verify clicking the row still opens the assignee selection page.
  6. Start a new task from the FAB, pick an assignee, and reach the Confirm task page. Verify its Assignee row shows the same pill, and that hovering highlights the label and pill together.
  7. Verify the Share row on the Confirm task page is unchanged — its label still sits above the hover area.
  8. Open an expense with attendees on a Control workspace with Attendee tracking enabled and confirm all three rows now look consistent.
  9. Create a task with no assignee and verify the empty Assignee row still renders with no pill and no errors.
AI tests Melvin ran locally

Run after merging main (at daaad254e32), on the branch head:

Check Result
npm run lint-changed ✅ pass
npm run typecheck ✅ pass — all tsconfigs
npm run spell-changed ✅ pass — 0 issues in 6 files
npm run gh-actions-unused-styles ✅ pass — no unused styles
npm run react-compiler-compliance-check -- check src/components/MenuItem/leaves/text/MenuItemLabel.tsx src/pages/tasks/DynamicNewTaskPage.tsx src/components/ReportActionItem/TaskView.tsx ✅ pass
npm run storybook -- --smoke-test --ci ✅ pass — MenuItem has stories, and they still build
npm test -- tests/unit/MenuItemLabelTest.tsx ✅ 2 tests passed (new)
npm test -- tests/unit/TaskViewTranslateTest.tsx tests/actions/TaskTest.ts tests/unit/QuickActionMenuItemTest.tsx tests/unit/CreateReportMenuItemTest.tsx tests/unit/findUnusedStylesTest.ts ✅ 91 tests passed

Melvin could not verify the change in a browser. The automated web session failed the same way on every attempt — the browser tab went fully blank (0 accessibility nodes) after sign-in and never recovered, while the dev server itself stayed healthy and rebuilt the branch cleanly. No UI evidence was captured, and JS console output could not be read for this session type. Manual verification is still needed.

  • Verify that no errors appear in the JS console

Offline tests

QA Steps

// TODO: The human co-author must fill out the QA steps before marking this PR as "ready for review", or the issue title must include "[No QA]."
// Please describe what QA needs to do to validate your changes and what areas they need to test for regressions.

  • Verify that no errors appear in the JS console

PR Author Checklist

  • I linked the correct issue in the ### Fixed Issues section above
  • I wrote clear testing steps that cover the changes made in this PR
    • I added steps for local testing in the Tests section
    • I added steps for the expected offline behavior in the Offline steps section
    • I added steps for Staging and/or Production testing in the QA steps section
    • I added steps to cover failure scenarios (i.e. verify an input displays the correct error message if the entered data is not correct)
    • I turned off my network connection and tested it while offline to ensure it matches the expected behavior (i.e. verify the default avatar icon is displayed if app is offline)
    • I tested this PR with a High Traffic account against the staging or production API to ensure there are no regressions (e.g. long loading states that impact usability).
  • I included screenshots or videos for tests on all platforms
  • I ran the tests on all platforms & verified they passed on:
    • Android: Native
    • Android: mWeb Chrome
    • iOS: Native
    • iOS: mWeb Safari
    • MacOS: Chrome / Safari
  • I verified there are no console errors (if there's a console error not related to the PR, report it or open an issue for it to be fixed)
  • I followed proper code patterns (see Reviewing the code)
    • I verified that comments were added to code that is not self explanatory
    • I verified that any new or modified comments were clear, correct English, and explained "why" the code was doing something instead of only explaining "what" the code was doing.
    • I verified any copy / text that was added to the app is grammatically correct in English. It adheres to proper capitalization guidelines (note: only the first word of header/labels should be capitalized), and is either coming verbatim from figma or has been approved by marketing (in order to get marketing approval, ask the Bug Zero team member to add the Waiting for copy label to the issue)
  • If a new code pattern is added I verified it was agreed to be used by multiple Expensify engineers
  • I followed the guidelines as stated in the Review Guidelines
  • I tested other components that can be impacted by my changes (i.e. if the PR modifies a shared library or component like Avatar, I verified the components using Avatar are working as expected)
  • If a new CSS style is added I verified that:
    • A similar style doesn't already exist
    • The style can't be created with an existing StyleUtils function (i.e. StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))
  • If new assets were added or existing ones were modified, I verified that:
    • The assets are optimized and compressed (for SVG files, run npm run compress-svg)
    • The assets load correctly across all supported platforms.
  • If the PR modifies code that runs when editing or sending messages, I tested and verified there is no unexpected behavior for all supported markdown - URLs, single line code, code blocks, quotes, headings, bold, strikethrough, and italic.
  • If the PR modifies a generic component, I tested and verified that those changes do not break usages of that component in the rest of the App (i.e. if a shared library or component like Avatar is modified, I verified that Avatar is working as expected in all cases)
  • If the PR modifies a component related to any of the existing Storybook stories, I tested and verified all stories for that component are still working as expected.
  • If the PR modifies a component or page that can be accessed by a direct deeplink, I verified that the code functions as expected when the deeplink is used - from a logged in and logged out account.
  • If the PR modifies the UI (e.g. new buttons, new UI components, changing the padding/spacing/sizing, moving components, etc) or modifies the form input styles:
    • I verified that all the inputs inside a form are aligned with each other.
    • I added Design label and/or tagged @Expensify/design so the design team can review the changes.
  • I added unit tests for any new feature or bug fix in this PR to help automatically prevent regressions in this user flow.
  • If the main branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to the Test steps.

Screenshots/Videos

Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari

Co-authored-by: daledah <daledah@users.noreply.github.com>
@MelvinBot
MelvinBot requested a review from a team September 3, 2026 10:23
@melvin-bot melvin-bot Bot added Melvin-Test-Android Melvin-Test-Web Triggers Melvin to run the testing steps of the PR on web labels Sep 3, 2026
@MelvinBot

Copy link
Copy Markdown
Contributor Author

I created this PR from an upstream branch since I don't have push access to your fork.

To take ownership of this branch and be able to push updates, run:

git remote add upstream https://github.com/Expensify/App.git
git fetch upstream claude-taskAssigneeUserPill
git checkout -b claude-taskAssigneeUserPill upstream/claude-taskAssigneeUserPill
git push -u origin claude-taskAssigneeUserPill

Then you can close this PR and open a new one from your fork.

@MelvinBot

Copy link
Copy Markdown
Contributor Author

🤖 Android test steps verification results: ⚠️ partial

Task Assignee row correctly renders as a bordered UserPill (avatar + name) with the "Assignee" label above it, and tapping it opens the assignee picker; an assignee-less task also renders cleanly with no pill and no errors. Could not verify parity against an expense's attendees pill because the mobile "More features" screen has no visible Rules/Attendee-tracking toggle to enable, even after upgrading the test workspace to Control plan.

Task detail view with empty Assignee row

Step Status
VERIFY 1: Send a task in a chat and assign it to another userCreated a 1:1 chat with a new contact (melvin.assignee.test2026@gmail.com), used the '+' > Assign task flow, set assignee to that contact, and confirmed the task; it posted in the chat as 'Task: PR 100280 assignee pill task'.
✅
VERIFY 2: Open the task detail viewTapped the task message and navigated into the dedicated task report detail screen showing Title/Description/Assignee fields and a 'Mark as complete' button.
Task detail view opened
✅
VERIFY 3: Assignee row shows assignee inside a bordered, rounded user pill (avatar + name)The Assignee row renders a rounded-rectangle pill with a visible border containing a circular avatar ('M') and the assignee's name/email melvin.assignee.test2026@gmail.com inside it, consistent with the UserPill treatment described in the PR.
Assignee row rendered as a bordered rounded pill with avatar and name
✅
VERIFY 4: "Assignee" label still shows above the pill, and tapping the row still opens the assignee selection pageThe 'Assignee' text label is displayed directly above the pill. Tapping the pill row navigated to the Assignee selection page, pre-populated with 'Assign to me' / 'Melvin Tester' plus 'Recents' showing the current assignee already checked.
Assignee label above the pill
Tapping the Assignee row opens the assignee selection page with current assignee selected
✅
VERIFY 5: Open an expense with attendees on a Control workspace with Attendee tracking enabled and confirm the two rows look consistentCreated a new workspace and upgraded its Plan type to Control (confirmed 'Workspace type: Control' in the Workspaces list). However, the mobile 'More features' screen (Workspace > More features) does not render the 'Workflows'/'Rules' toggle row at all on this build — it jumps directly from the 'Organize' section (Categories/Tags/Taxes) to the 'Spend' section (Distance rates/Travel/...), with no 'Rules' entry point to enable 'Attendee tracking'. Without that toggle, the 'Rules' sidebar item never appears and no expense could be created with an attendees field to compare against the task Assignee pill. This blocked completion of this step rather than being a pass/fail on the PR's own change.
Workspace plan type set to Control
More features screen, Organize section visible, no Rules toggle
More features screen scrolled past Taxes directly into Spend section, confirming missing Rules/Workflows toggle row
❌
VERIFY 6: Create a task with no assignee and verify the empty Assignee row still renders with no pill and no errorsCreated a task via the same chat's Assign task flow, left the Assignee field unselected, and confirmed the task. The task detail view rendered normally with Title/Description populated and an empty 'Assignee' row (label + chevron only, no pill/avatar, no error banners or crash).
Task detail view with empty Assignee row, no pill, no errors
✅

view run

@MelvinBot

Copy link
Copy Markdown
Contributor Author

🤖 Web test steps verification results: ✅ pass

Verified on dev NewDot web: the task detail Assignee row now renders the assignee as a bordered, rounded UserPill (avatar + name), matching the Attendees pill style on a Control-workspace expense with attendee tracking. The Assignee label still appears above the pill, clicking it still opens assignee selection, and a task with no assignee renders the empty row cleanly with no pill and no errors.

Task detail with empty Assignee row

Step Status
VERIFY 1: Send a task in a chat and assign it to another userIn the Concierge chat, used + > Assign task, titled it 'Melvin PR100280 test task', and set Assignee to a newly invited contact melvintestassignee@example.com (no second seeded Melvin test account existed in this session, so a new contact email was invited via the standard Assignee search/invite flow, which is normal product behavior). Confirmed the task, which posted into the chat.
Task created and posted in chat with assignee set
✅
VERIFY 2: Open the task detail viewClicked the task message in the chat and landed on the task detail view showing Title, Description, and Assignee rows.
Task detail view opened
✅
VERIFY 3: Assignee row shows the assignee inside a bordered, rounded user pill (avatar + name), same treatment as expense attendeesThe Assignee row renders 'melvintestassignee@example.co...' inside a rounded, bordered chip with a small circular avatar icon, consistent with the attendee pill style shown on the comparison expense (VERIFY 5 screenshot).
Assignee row rendered as a bordered rounded UserPill
✅
VERIFY 4: "Assignee" label still shows above the pill, and clicking the row still opens the assignee selection pageThe 'Assignee' label is visible directly above the pill. Clicking the row/pill opened the 'Assignee' selection page pre-selecting the currently assigned contact under Contacts, exactly as before the UserPill change.
Clicking the Assignee row opens the Assignee selection page
✅
VERIFY 5: Expense with attendees on a Control workspace (attendee tracking enabled) renders rows consistently with the task Assignee rowCreated a new workspace, upgraded it to the Control plan, and enabled Rules > Attendee tracking. Created an expense with two attendees; the expense detail view's 'Attendees' row renders each attendee as the same bordered, rounded pill (avatar + name) style used by the task Assignee row.
Attendee tracking rule enabled on the Control workspace
Expense detail view showing two Attendees pills matching the task Assignee pill style
✅
VERIFY 6: Task with no assignee still renders the empty Assignee row with no pill and no errorsCreated a second task ('Melvin PR100280 no-assignee task') via Assign task without picking an assignee, confirmed it, and opened its detail view. The Assignee label renders with an empty row beneath it (no pill, no placeholder avatar), and no error banners or console-visible failures accompanied the render.
Task detail view with empty Assignee row and no pill
✅

Console errors: none observed. JS console inspection is not supported by the web driver, but a network dump of the session showed no 4xx/5xx responses during any of the task or expense flows exercised.


view run

@daledah

daledah commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

@MelvinBot please open this PR

@MelvinBot
MelvinBot marked this pull request as ready for review September 3, 2026 22:53
@MelvinBot
MelvinBot requested review from a team as code owners September 3, 2026 22:53
@melvin-bot
melvin-bot Bot requested review from daledah and garrettmknight and removed request for a team September 3, 2026 22:53
@melvin-bot

melvin-bot Bot commented Sep 3, 2026

Copy link
Copy Markdown

@daledah Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button]

@melvin-bot
melvin-bot Bot removed the request for review from a team September 3, 2026 22:53
@MelvinBot

MelvinBot commented Sep 3, 2026 •

Copy link
Copy Markdown
Contributor Author

Done — this PR is now ready for review.

Two things still need you before a reviewer picks it up:

  • The Tests and QA Steps sections still contain the // TODO: The human co-author must fill out... placeholders. I can't fill those in on your behalf — suggested starting steps are already listed under each one.
  • The Screenshots/Videos platform sections are empty. My web and Android test runs are posted as comments if you want to reuse those screenshots.

All CI checks pass except Check independent approval, which clears once a reviewer approves.


view run · view recording

@shawnborton

shawnborton commented Sep 4, 2026 •

Copy link
Copy Markdown
Contributor

~Let us know when there are updated screenshots to review. ~

Found them, this looks good to me 👍

CleanShot 2026-09-04 at 11 43 13@2x

@shawnborton

Copy link
Copy Markdown
Contributor

We might just want to verify that we have the hover tooltip.

garrettmknight
garrettmknight previously approved these changes Sep 4, 2026

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

Looks good from a product perspective.

@dannymcclain

Copy link
Copy Markdown
Contributor

We might just want to verify that we have the hover tooltip.

Agree! Should we run a build? Otherwise this is looking good to me.

@shawnborton

Copy link
Copy Markdown
Contributor

Yeah, I will run it 🚀!

@github-actions

github-actions Bot commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

🚧 shawnborton has triggered a test Expensify/App build. You can view the workflow run here.

@github-actions

This comment has been minimized.

@shawnborton

Copy link
Copy Markdown
Contributor

Works great, but makes me realize we should update to use the user pills here too?

CleanShot 2026-09-04 at 16 20 36@2x

@shawnborton

Copy link
Copy Markdown
Contributor

Maybe just for the assignee row on the confirmation page, but don't touch the share location (since that could be a workspace chat or a chat room, etc)

@dannymcclain

dannymcclain commented Sep 4, 2026 •

Copy link
Copy Markdown
Contributor

Works great, but makes me realize we should update to use the user pills here too?
Maybe just for the assignee row on the confirmation page, but don't touch the share location (since that could be a workspace chat or a chat room, etc)

Agree! But otherwise seems good to me

@daledah

daledah commented Sep 7, 2026 •

Copy link
Copy Markdown
Contributor

Reviewer Checklist

  • I have verified the author checklist is complete (all boxes are checked off).
  • I verified the correct issue is linked in the ### Fixed Issues section above
  • I verified testing steps are clear and they cover the changes made in this PR
    • I verified the steps for local testing are in the Tests section
    • I verified the steps for Staging and/or Production testing are in the QA steps section
    • I verified the steps cover any possible failure scenarios (i.e. verify an input displays the correct error message if the entered data is not correct)
    • I turned off my network connection and tested it while offline to ensure it matches the expected behavior (i.e. verify the default avatar icon is displayed if app is offline)
  • I checked that screenshots or videos are included for tests on all platforms
  • I included screenshots or videos for tests on all platforms
  • I verified that the composer does not automatically focus or open the keyboard on mobile unless explicitly intended. This includes checking that returning the app from the background does not unexpectedly open the keyboard.
  • I verified tests pass on all platforms & I tested again on:
    • Android: HybridApp
    • Android: mWeb Chrome
    • iOS: HybridApp
    • iOS: mWeb Safari
    • MacOS: Chrome / Safari
  • If there are any errors in the console that are unrelated to this PR, I either fixed them (preferred) or linked to where I reported them in Slack
  • I verified proper code patterns were followed (see Reviewing the code)
    • I verified that comments were added to code that is not self explanatory
    • I verified that any new or modified comments were clear, correct English, and explained "why" the code was doing something instead of only explaining "what" the code was doing.
    • I verified any copy / text that was added to the app is grammatically correct in English. It adheres to proper capitalization guidelines (note: only the first word of header/labels should be capitalized), and is either coming verbatim from figma or has been approved by marketing (in order to get marketing approval, ask the Bug Zero team member to add the Waiting for copy label to the issue)
  • If a new code pattern is added I verified it was agreed to be used by multiple Expensify engineers
  • I verified that this PR follows the guidelines as stated in the Review Guidelines
  • I verified other components that can be impacted by these changes have been tested, and I retested again (i.e. if the PR modifies a shared library or component like Avatar, I verified the components using Avatar have been tested & I retested again)
  • If a new component is created I verified that:
    • A similar component doesn't exist in the codebase
    • All props are defined accurately
    • The component has a clear name that is non-ambiguous and the purpose of the component can be inferred from the name alone
    • The only data being stored in the state is data necessary for rendering and nothing else
    • The component has the minimum amount of code necessary for its purpose, and it is broken down into smaller components in order to separate concerns and functions
  • If a new CSS style is added I verified that:
    • A similar style doesn't already exist
    • The style can't be created with an existing StyleUtils function (i.e. StyleUtils.getBackgroundAndBorderStyle(theme.componentBG)
  • If the PR modifies code that runs when editing or sending messages, I tested and verified there is no unexpected behavior for all supported markdown - URLs, single line code, code blocks, quotes, headings, bold, strikethrough, and italic.
  • If the PR modifies a generic component, I tested and verified that those changes do not break usages of that component in the rest of the App (i.e. if a shared library or component like Avatar is modified, I verified that Avatar is working as expected in all cases)
  • If the PR modifies a component related to any of the existing Storybook stories, I tested and verified all stories for that component are still working as expected.
  • If the PR modifies a component or page that can be accessed by a direct deeplink, I verified that the code functions as expected when the deeplink is used - from a logged in and logged out account.
  • If the PR modifies the UI (e.g. new buttons, new UI components, changing the padding/spacing/sizing, moving components, etc) or modifies the form input styles:
    • I verified that all the inputs inside a form are aligned with each other.
    • I added Design label and/or tagged @Expensify/design so the design team can review the changes.
  • For any bug fix or new feature in this PR, I verified that sufficient unit tests are included to prevent regressions in this flow.
  • If the main branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to the Test steps.
  • I have checked off every checkbox in the PR reviewer checklist, including those that don't apply to this PR.

Screenshots/Videos

iOS: HybridApp
Screen.Recording.2026-09-08.at.01.43.29.mov
iOS: mWeb Safari
ios-mweb.mov
MacOS: Chrome / Safari
Screen.Recording.2026-09-08.at.16.17.08.mov

@chiragsalian

Copy link
Copy Markdown
Contributor

@shawnborton @dannymcclain you guys wanna review the latest video of each devices posted here? Once you guys confirm it looks good feel free to merge the PR.

@dannymcclain

Copy link
Copy Markdown
Contributor

Oh we're so close! The Assignee field in the RHP:
CleanShot 2026-09-07 at 14 15 15@2x

Needs to match the one we're using on the Task page and for the Attendee field elsewhere:
CleanShot 2026-09-07 at 14 16 42@2x

CleanShot 2026-09-07 at 14 16 18@2x

So the label and the pill should be in the same lockup / hover area.

@daledah

daledah commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

@MelvinBot please update to fix this issue

@daledah

daledah commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

@MelvinBot please merge main and complete your checklist

…ckup

Co-authored-by: daledah <daledah@users.noreply.github.com>
@MelvinBot

MelvinBot commented Sep 8, 2026 •

Copy link
Copy Markdown
Contributor Author

There is nothing to fix in the code — the one failing check is a human-approval gate, not a test failure.

Check independent approval (from verifyPeerReview.yml) fails with:

Insufficient independent peer review
Expensify/App#100280 does not have enough independent eligible reviewer approvals.
approvers: []
independentApprovers: []

No one has approved this PR yet. It will pass on its own once an independent eligible reviewer approves. Pushing a commit would not change it.

Every other check on the current head commit (d032542) passes — 30 in total, including ESLint, typecheck, spellcheck, Oxfmt, all 8 Jest shards, Bun tests, Storybook, React Compiler Compliance, unused styles, knip, and both native builds. branch-perf-tests and baseline-perf-tests were still running when I checked.

Worth noting separately: the PR body still has // TODO placeholders in the Tests and QA Steps sections, and the platform screenshot sections are empty. Those need filling in before this is marked ready for review, but they are not what is failing CI.


Next Steps: Reply with @MelvinBot <your feedback> if you want me to look at something else on this PR.

@MelvinBot

MelvinBot commented Sep 8, 2026 •

Copy link
Copy Markdown
Contributor Author

Done — the Assignee label now lives inside the row, so the label and the pill are one lockup with one hover area, matching the Task page and the Attendees row.

Pushed in 2c897ce.

What was wrong: the Confirm task page used the MenuItemWithLabel preset, which deliberately renders the label outside Root — "so it stays out of the press target and does not pick up the row's hover background." The Task page uses the legacy MenuItem label prop, which defaults to isLabelHoverable and renders the label inside the pressable. Same label, two different lockups.

Fix: added a MenuItem.Label leaf that renders inside MenuItem.Content, and switched the Assignee row to MenuItem.Root + MenuItem.Label + the pill.

What changed
  • New src/components/MenuItem/leaves/text/MenuItemLabel.tsx — the composable API had no inside-the-row label, only the outside-the-row MenuItemWithLabel preset. It uses the same text styles as the legacy hoverable label, so the two render identically.
  • Exported as MenuItem.Label in src/components/MenuItem/index.ts:51.
  • The Assignee row in src/pages/tasks/DynamicNewTaskPage.tsx:218-238 now uses MenuItem.Root with the label stacked above the pill inside MenuItem.Content. onPress is wrapped in callFunctionIfActionIsAllowed so the anonymous-user gate the preset provided is preserved.
  • The Share row is untouched and keeps its label outside the hover area, per shawnborton's earlier note about not touching share location.
  • The unassigned empty state is unchanged.
AI tests Melvin ran locally
Check Result
npm run typecheck ✅ pass for tsconfig.json — see note below
npm run react-compiler-compliance-check -- check src/components/MenuItem/leaves/text/MenuItemLabel.tsx src/pages/tasks/DynamicNewTaskPage.tsx ✅ pass
npm run gh-actions-unused-styles ✅ pass — no unused styles
npm test -- tests/unit/TaskViewTranslateTest.tsx tests/actions/TaskTest.ts tests/unit/QuickActionMenuItemTest.tsx tests/unit/CreateReportMenuItemTest.tsx tests/unit/findUnusedStylesTest.ts ✅ 91 tests passed
npm run lint-changed ⚠️ could not run
npm run prettier ⚠️ could not run

Could not run: this environment's node_modules is missing eslint-seatbelt, and the App checkout is a depth-1 shallow clone so lintChanged.sh/spellChanged.sh can't compute a merge base. Both are environment problems, not problems with this change. The same missing package is the only thing npm run typecheck reported — two pre-existing errors in scripts/lint.ts under tsconfig.bun.json, in a file this PR does not touch. CI will run all of these properly.

⚠️ No screenshot from me — again. The automated web session failed the same way it did on the previous two attempts: the browser tab went fully blank (0 accessibility nodes) after sign-in and never recovered, so nothing could be driven. The dev server and this branch's bundle both compiled cleanly, so this is a session problem rather than a code problem — but it does mean the lockup needs a manual look or a fresh adhoc build before dannymcclain signs off.


view run · no recording available

…erPill

Co-authored-by: daledah <daledah@users.noreply.github.com>
@melvin-bot
melvin-bot Bot requested a review from dannymcclain September 8, 2026 08:55
Co-authored-by: daledah <daledah@users.noreply.github.com>
@MelvinBot

MelvinBot commented Sep 8, 2026 •

Copy link
Copy Markdown
Contributor Author

Merged main and worked through the checklist. Branch head is now 89da1db.

Merge: clean, no conflicts — 1124 commits from main (up to daaad25). main moved MenuItemChevron and added MenuItemNewWindowIcon in src/components/MenuItem/index.ts, which git auto-merged alongside the new MenuItem.Label export. The net diff against main is still only this PR's 5 files.

Added a regression test — tests/unit/MenuItemLabelTest.tsx pins the thing dannymcclain asked for: the label must be inside the row's press target. One test asserts MenuItem.Label renders inside it, the other asserts the MenuItemWithLabel preset still renders its label outside, so the two lockups can't silently converge.

Also: added the Design label, and rewrote the stale "Explanation of Change" — it still claimed only TaskView changed and that DynamicNewTaskPage was left alone.

Checklist: what I ticked and why

Ticked, each backed by something I actually ran or verified:

  • Linked issue — [Due for payment 2026-09-17] BUG/Improvement: The Assignee row on tasks uses a different user display style than the Attendee row on expenses. #100192 title matches this PR.
  • Code patterns / comments / copy — no new user-facing copy; the label reuses the existing task.assignee translation.
  • Other components impacted / generic component — the only shared-code change is a 2-line additive export in MenuItem/index.ts. MenuItem.Label has exactly one consumer (the Assignee row), and the MenuItem-rendering suites pass.
  • Storybook stories — MenuItem has stories, and npm run storybook -- --smoke-test --ci passes.
  • New CSS style / new assets / message-editing code — none of these apply; this PR adds no style (it removes one) and no assets.
  • Design label — added.
  • Unit tests — the new test above.
Check Result
npm run lint-changed ✅ pass
npm run typecheck ✅ pass — all tsconfigs
npm run spell-changed ✅ pass — 0 issues in 6 files
npm run gh-actions-unused-styles ✅ pass
npm run react-compiler-compliance-check ✅ pass
npm run storybook -- --smoke-test --ci ✅ pass
npm test (task + MenuItem suites) ✅ 91 passed
npm test -- tests/unit/MenuItemLabelTest.tsx ✅ 2 passed (new)

lint-changed and typecheck both work again post-merge — main dropped the eslint-seatbelt dependency that was breaking them.

Left unticked — these need you, not me:

  • Tests / Offline tests / QA steps and the six sub-items under "I wrote clear testing steps". These are yours to fill in; I've extended the suggested steps in the body to cover the new hover-lockup behavior and the Share row staying unchanged.
  • Screenshots and all-platform test runs. I have none — see below.
  • "No console errors" — I could not read JS console output for this session type, so I won't claim it.
  • "New code pattern agreed by multiple Expensify engineers" — I added a new shared leaf, MenuItem.Label. It follows the existing composable MenuItem pattern rather than inventing one, but that's a call for a reviewer to make, not me.
  • Deeplink behavior and form input alignment — both need a running app.
  • "If main was merged, I tested again" — I merged it but could not re-test.

⚠️ Still no browser evidence. The automated web session failed the same way for a fourth time: the tab went fully blank (0 accessibility nodes) after sign-in and never recovered, while the dev server itself stayed healthy and rebuilt the branch cleanly in 18.8s. So the lockup change still has not been seen running — it needs a manual look or an adhoc build before dannymcclain signs off.


view run · no recording available

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

Screen.Recording.2026-09-08.at.16.17.08.mov

LGTM

@melvin-bot

melvin-bot Bot commented Sep 8, 2026

Copy link
Copy Markdown

We did not find an internal engineer to review this PR, trying to assign a random engineer to #100192 as well as to this PR... Please reach out for help on Slack if no one gets assigned!

@melvin-bot
melvin-bot Bot requested a review from aldo-expensify September 8, 2026 09:22
@dannymcclain

Copy link
Copy Markdown
Contributor

Nice - looking good to me too 👍

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

Design approved 👍

@chiragsalian chiragsalian 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

@chiragsalian
chiragsalian merged commit e3aea9b into main Sep 8, 2026
38 of 40 checks passed
@chiragsalian
chiragsalian deleted the claude-taskAssigneeUserPill branch September 8, 2026 21:19
@github-actions

github-actions Bot commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

🚧 chiragsalian has triggered a test Expensify/App build. You can view the workflow run here.

@OSBotify

OSBotify commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release.

@OSBotify OSBotify mentioned this pull request Sep 9, 2026
83 tasks done
@OSBotify

OSBotify commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

🚀 Deployed to staging by https://github.com/chiragsalian in version: 9.4.75-0 🚀

platform result
🕸 web 🕸 success ✅
🤖 android 🤖 success ✅
🍎 iOS 🍎 success ✅

@MelvinBot

Copy link
Copy Markdown
Contributor Author

🤖 No help site changes are required for this PR, so I did not create a draft docs PR.

This is a presentation-only change. It swaps the Assignee row's avatar-plus-text rendering for a UserPill, adds a MenuItem.Label leaf so the label sits inside the row's hover area, and deletes an unused style. No feature, flow, setting, label text, or button name changes.

What I checked

Diff scope — all six changed files are component/style/test files:

  • src/components/MenuItem/index.ts, src/components/MenuItem/leaves/text/MenuItemLabel.tsx — new internal MenuItem.Label leaf
  • src/components/ReportActionItem/TaskView.tsx, src/pages/tasks/DynamicNewTaskPage.tsx — Assignee row now renders a UserPill
  • src/styles/index.ts — removed the orphaned assigneeTextStyle
  • tests/unit/MenuItemLabelTest.tsx — new test

Docs searched — I grepped App/docs/articles for assignee, attendee, and user pill. The only article covering this surface is docs/articles/new-expensify/chat/Assign-Tasks.md, and every statement in it still holds:

  • "Choose an Assignee from the chat participants" — the field name and its position on the Confirm task page are unchanged.
  • "Reassign the task by clicking the task, then clicking the arrow next to the Assignee field" — the chevron is still rendered on both rows (shouldShowRightIcon in TaskView, MenuItem.Chevron in DynamicNewTaskPage), and tapping the row still opens the assignee selection page.
  • The unassigned empty state is untouched, so the "leave it unassigned" guidance is still accurate.

Expensify's help site documents what a feature does and how to reach it, not how a row is styled. Per HELP_AUTHORING_GUIDELINES.md, a change with no new step, name, or outcome does not warrant an article edit — adding one would only describe pixels that can shift again.

If you want the article updated anyway — for example, to add a screenshot of the new pill treatment — reply and I'll open the draft PR.

You asked me to close with a request to review the linked help site PR. There is no linked help site PR to review, so that step doesn't apply here — @daledah, just confirm you agree the help site needs no update.

@OSBotify

Copy link
Copy Markdown
Contributor

🚀 Deployed to production by https://github.com/mountiny in version: 9.4.75-3 🚀

platform result
🕸 web 🕸 success ✅
🤖 android 🤖 failure ❌
🍎 iOS 🍎 success ✅

Bundle Size Analysis (Sentry):

@OSBotify

Copy link
Copy Markdown
Contributor

🚀 Deployed to production by https://github.com/mountiny in version: 9.4.75-3 🚀

platform result
🕸 web 🕸 success ✅
🤖 android 🤖 failure ❌
🍎 iOS 🍎 success ✅

Bundle Size Analysis (Sentry):

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Design Melvin-Test-Android Melvin-Test-Web Triggers Melvin to run the testing steps of the PR on web

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants