Skip to content

Disable payer role editing when no selectable alternative exists - #106812

Draft
MelvinBot wants to merge 1 commit into
mainfrom
claude-payerRoleHint
Draft

MelvinBot wants to merge 1 commit into
mainfrom
claude-payerRoleHint

Conversation

@MelvinBot

Copy link
Copy Markdown
Contributor

Explanation of Change

Use the same selectable payer roles as the role picker when deciding whether the Authorized Payer can change roles. This prevents the internal Editor role from creating a dead-end role picker on Collect workspaces, in both member details and the inline Members table cell.

Restore the existing localized lock explanation and its payment-workflows link only when no alternative payer role is selectable. Control workspaces retain the ability to switch between Workspace Admin and Payments Admin. Backend payer permissions are unchanged.

AI Tests

  • Full Jest suite: 2,372 suites / 39,477 tests passed, 146 tests skipped; all 160 snapshots passed. Initial two-worker run timed out; the four-worker rerun completed successfully.
  • Targeted member-details and Members UI suites: 81 tests passed, including Collect role lock and hint-link navigation, Control editability, and inline role controls on both plans.
  • Passed: npm run lint, npm run lint-changed, npm run typecheck, npm run spell-changed, Storybook smoke test, and React Compiler checks with explicit changed-page targets.
  • check-changed could not resolve origin/ because its base-ref input is empty in this environment; explicit page checks passed instead.
  • The required prettier script no longer exists. The repository's current oxfmt pre-commit hook formatted all five changed files successfully.
  • Coding-standards review: no violations reported.
  • Browser verification blocked: the existing dev-web session is suspended and exposed no accessible page content, including after one retry. Manual Collect/Control verification remains outstanding; the regression test case should distinguish Collect's locked payer from Control's editable payer.

Contributor branch access

Created from an upstream branch because Melvin cannot push to getusha's fork. To copy it to your fork:

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

You can then open a replacement PR from your fork and close this draft if you prefer.

Fixed Issues

$ #102392
PROPOSAL: #102392 (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 validates your changed worked.

  • Verify that no errors appear in the JS console

Offline tests

QA Steps

// TODO: The human co-author must fill out the QA tests you ran before marking this PR as "ready for review".
// Please describe what QA needs to do to validate your changes and what areas do 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 verified any copy / text that was added to the app 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 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 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.
  • If the PR adds or modifies the UI:
    • I asked an AI agent to review the changes for accessibility issues and addressed its findings.
    • I tested with a screen reader (VoiceOver on macOS) and verified all new/changed elements are reachable with a logical focus order.
    • I verified all new/changed elements have meaningful accessible names and roles.
    • I verified state changes are announced (e.g. checked/unchecked, expanded/collapsed, selected).
  • 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

Web verification blocker (not evidence of a passing product test):
Blocked app page with no accessible content

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

Co-authored-by: Getabalew T <getusha@users.noreply.github.com>
@MelvinBot
MelvinBot requested a review from a team November 13, 2026 07:49
@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 Nov 13, 2026
@MelvinBot

MelvinBot commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor Author

🤖 Android test steps verification results: ⚠️ partial

On standalone Android NewDot, testing was blocked by missing fixtures: the account has no workspaces, and available tools cannot provision connected-bank or admin-payer fixtures. None of the requested payer-role behaviors could be verified.

Android Workspaces screen showing No workspaces yet

Step Status
1. Open Collect workspace Workflows with a connected bank and fewer than 8 adminsBlocked: Workspaces shows “No workspaces yet.” Required workspace, bank, and admin fixtures are unavailable.
Android Workspaces screen showing No workspaces yet
⚠️
2. Tap Payer to open Authorized PayerBlocked: required workspace is unavailable.
⚠️
3. Select a non-owner admin payer and tap ShareBlocked: connected-bank workspace and non-owner admin fixture are unavailable.
⚠️
4. Open Members tabBlocked: required workspace is unavailable.
⚠️
5. Open admin payer member detailsBlocked: admin payer fixture is unavailable.
⚠️
6. Collect payer Role is disabled with the specified lock hintNot verified: Collect payer member details could not be reached.
⚠️
7. Hint payer link opens Workflows paymentsNot verified: payer lock hint was unreachable.
⚠️
8. Collect payer inline Members Role is not editableNot verified: Members was unreachable; native inline-control availability could not be determined.
⚠️
9. Control admin payer Role remains editable, offers Payments Admin, and has no lock hintNot verified: Control workspace/admin-payer fixture is unavailable. Detail and inline role behavior remain unverified.
⚠️
10. No JS console errors during testsNot verified: session logging was inactive with zero captured bytes.
⚠️

view run · view recording

@MelvinBot

MelvinBot commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor Author

🤖 Web test steps verification results: ❌ fail

Blocked on dev NewDot web: the signed-in account has no workspaces. Available setup tools cannot supply connected-bank and admin-payer fixtures, so no PR behavior was verified.

Workspaces page showing no workspaces

Step Status
1. Navigate to Collect workspace > Workflows with a connected bank and fewer than 8 adminsBlocked: Workspaces displays “No workspaces yet.”
Workspaces page showing no workspaces
❌
2. Click Payer to open Authorized PayerNot tested: required workspace fixture is unavailable.
❌
3. Select a non-owner admin payer and click ShareNot tested: connected-bank and admin fixtures are unavailable.
❌
4. Go to MembersNot tested: no workspace exists.
❌
5. Open the admin payer’s member detailsNot tested: no admin-payer fixture exists.
❌
6. Collect Role is disabled with the specified payer hintNot tested: Collect admin-payer fixture is unavailable.
❌
7. Hint’s payer link opens Workflows paymentsNot tested: payer hint could not be reached.
❌
8. Collect payer’s inline Members Role is not editableNot tested: Collect admin-payer fixture is unavailable.
❌
9. Control admin payer Role and inline Role remain editable, offer Payments Admin, and show no lock hintNot tested: Control admin-payer fixture is unavailable.
❌
10. No errors appear in the JS consoleNot verified: supported web commands do not expose JS console inspection.
❌

view run · view recording

This branch has not been deployed

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

Labels

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.

2 participants