Skip to content

[Payment due @gijoe0295] Replace work email input with button linking to Contact Methods in card feed flows - #95610

Merged
madmax330 merged 45 commits into
mainfrom
claude-cardFeedAddWorkEmailButton
Oct 29, 2026
Merged

madmax330 merged 45 commits into
mainfrom
claude-cardFeedAddWorkEmailButton

Conversation

@MelvinBot

@MelvinBot MelvinBot commented Jul 8, 2026 •

Copy link
Copy Markdown
Contributor

Explanation of Change

The workspace company cards and Expensify Card "import a feed from another workspace" flows both showed an inline email input on the Add work email screen and called AddWorkEmail directly on submit. That command is an account-takeover vector and is now rejected by the backend for validated callers, so the screen silently failed on submit.

This PR replaces the inline email input on both card‑feed Add work email screens with an "Add work email" button. The screen keeps the same title and description text, but the button now navigates the user to Settings → Profile → Contact Methods (SETTINGS_CONTACT_METHODS), where adding a work email goes through the standard magic‑code‑verified flow. The backTo param is set to the current route so the user returns to the card‑feed screen afterward.

Files changed:

  • src/pages/workspace/companyCards/WorkspaceCompanyCardAddWorkEmailPage.tsx
  • src/pages/workspace/expensifyCard/WorkspaceExpensifyCardAddWorkEmailPage.tsx
  • src/languages/en.ts / src/languages/es.ts — added workspace.companyCards.addWorkEmailButton ("Add work email").

The now-unused AddWorkEmail inline submit/validation logic was removed from these two screens.

🤖 This is an automated PR created by MelvinBot on behalf of madmax330.

Fixed Issues

$ https://github.com/Expensify/Expensify/issues/641791

PROPOSAL:

Tests

// TODO: The human co-author must fill out the tests you ran before marking this PR as "ready for review"

  • Verify that no errors appear in the JS console

  • Create a new gmail account

  • Create a control workspace

  • Add a Mock Bank feed

  • Create a new workspace

  • Try to add the previously created Mock Bank feed:

Screenshot 2026-07-22 at 4 33 08 PM
  • Make sure you're asked to add a work email with a button:
Screenshot 2026-07-22 at 4 33 15 PM
  • Click the button and make sure it takes you to the new contact method screen
Screenshot 2026-07-22 at 4 33 33 PM

Offline tests

  • Verify that no errors appear in the JS console

QA Steps

// TODO: The human co-author must fill out the QA tests you ran before marking this PR as "ready for review".

  • 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 any callback methods that were added or modified are named for what the method does and never what callback they handle (i.e. toggleReport and not onIconClick)
    • 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 any new file was added I verified that:
    • The file has a description of what it does and/or why is needed at the top of the file if the code is not self explanatory
  • 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.

…rd feed flows

Co-authored-by: Maxence Coulibaly <madmax330@users.noreply.github.com>
@MelvinBot
MelvinBot requested a review from a team July 8, 2026 14:56
@OSBotify

This comment has been minimized.

@codecov

This comment has been minimized.

…heck

Co-authored-by: Maxence Coulibaly <madmax330@users.noreply.github.com>
@MelvinBot

This comment has been minimized.

@MelvinBot

This comment has been minimized.

Co-authored-by: Maxence Coulibaly <madmax330@users.noreply.github.com>
@MelvinBot

This comment has been minimized.

@MelvinBot

This comment has been minimized.

Co-authored-by: Maxence Coulibaly <madmax330@users.noreply.github.com>
@MelvinBot

This comment has been minimized.

@MelvinBot

This comment has been minimized.

@madmax330

Copy link
Copy Markdown
Contributor

@MelvinBot can you merge main?

…kEmailButton

Co-authored-by: Maxence Coulibaly <madmax330@users.noreply.github.com>
@MelvinBot

This comment has been minimized.

@MelvinBot

This comment has been minimized.

@madmax330
madmax330 marked this pull request as ready for review July 22, 2026 14:38
@madmax330
madmax330 requested a review from a team as a code owner July 22, 2026 14:38
@melvin-bot
melvin-bot Bot requested review from gijoe0295 and removed request for a team July 22, 2026 14:38
@melvin-bot

melvin-bot Bot commented Jul 22, 2026

Copy link
Copy Markdown

@gijoe0295 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 requested review from trjExpensify and removed request for a team July 22, 2026 14:38
chatgpt-codex-connector[bot]

This comment was marked as outdated.

@gijoe0295

Copy link
Copy Markdown
Contributor

Is this a blocker? Otherwise can I review it tomorrow? Thanks

trjExpensify
trjExpensify previously approved these changes Jul 22, 2026

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

Fair enough 👍

…ct method back-navigation changes

The prompt's focus effect returns users to the feed selector, so Contact Methods can use main's plain back behavior.

Addresses review comment: #95610 (comment)
@MelvinBot

This comment has been minimized.

@madmax330

Copy link
Copy Markdown
Contributor

Ok, re-tested locally and it seems you were right @gijoe0295 it's working still. 👍🏽

@MelvinBot

This comment has been minimized.

@gijoe0295

Copy link
Copy Markdown
Contributor

Unrelated failing check. @madmax330 Can you merge main?

@madmax330

Copy link
Copy Markdown
Contributor

@gijoe0295 fixed

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

@melvin-bot
melvin-bot Bot requested a review from madmax330 October 29, 2026 15:29
@melvin-bot melvin-bot Bot changed the title Replace work email input with button linking to Contact Methods in card feed flows [Payment due @gijoe0295] Replace work email input with button linking to Contact Methods in card feed flows Oct 29, 2026
@melvin-bot

melvin-bot Bot commented Oct 29, 2026

Copy link
Copy Markdown

🎯 @gijoe0295, thanks for reviewing and testing this PR! 🎉

A payment issue will be created for your review once this PR is deployed to production.
E/E issue linked to the PR - https://www.github.com/Expensify/Expensify/issues/641791.

If payment is not needed (e.g., regression PR review fix etc), react with 👎 to this comment to prevent the payment issue from being created.

@gijoe0295

Copy link
Copy Markdown
Contributor

Checklist is #95610 (comment)

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

@madmax330
madmax330 merged commit 601da76 into main Oct 29, 2026
47 of 50 checks passed
@madmax330
madmax330 deleted the claude-cardFeedAddWorkEmailButton branch October 29, 2026 16:11
@madmax330

Copy link
Copy Markdown
Contributor

Wow what a ride, thanks @gijoe0295 for sticking with me 😄

@github-actions

Copy link
Copy Markdown
Contributor

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

@OSBotify

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.

@github-actions

Copy link
Copy Markdown
Contributor

@izarutskaya

Copy link
Copy Markdown

@madmax330 @mountiny Steps for QA the same as Tests, right?

@lanitochka17

Copy link
Copy Markdown

Deploy Blocker #105426 was identified to be related to this PR.

@OSBotify

Copy link
Copy Markdown
Contributor

🚀 Deployed to staging by https://github.com/madmax330 in version: 9.5.26-0 🚀

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

@MelvinBot

Copy link
Copy Markdown
Contributor Author

No help site update needed. No article describes the Add work email screen in the card feed import flows, and the private-domain email requirement in Share a Company Card Connection Across Workspaces is still accurate.


view run

@izarutskaya

Copy link
Copy Markdown

@MelvinBot Steps for QA the same as tests, right?

@MelvinBot

Copy link
Copy Markdown
Contributor Author

Yes. The QA Steps section was never filled in, so use the steps in the Tests section. They work on staging, because Mock Bank is listed in every environment except production (SelectBankStep.tsx:64-65).

Steps:

  1. Sign in with a new Gmail account.
  2. Create a Control workspace and add a Mock Bank company card feed.
  3. Create a second workspace. Go to Company cards > Add cards, then pick the Mock Bank feed under From other workspaces.
  4. Verify the Add work email screen shows an Add work email button, with no email field.
  5. Click the button. Verify it opens Contact methods, and that going back returns you to the card feed flow.

The Tests section covers only company cards. The PR also changed the same screen in the Expensify Card "link a feed from another workspace" flow. Run steps 4–5 there too if you can.


view run

@melvin-bot

melvin-bot Bot commented Oct 31, 2026

Copy link
Copy Markdown

🤖 Payment issue created: #105547

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants