Skip to content

[Payment due @Krishna2323] [No QA][Fullstory] Mask profile details and chat surfaces, unmask custom agent chats - #107161

Merged
mountiny merged 9 commits into
Expensify:mainfrom
callstack-internal:bugfix/fullstory-profile-chat-masking
Nov 22, 2026
Merged

mountiny merged 9 commits into
Expensify:mainfrom
callstack-internal:bugfix/fullstory-profile-chat-masking

Conversation

@fabioh8010

@fabioh8010 fabioh8010 commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

Explanation of Change

Masks the private profile details and two chat surfaces that weren't covered in Fullstory recordings, and unmasks chats with custom agents. Follow-up of #105601, which added the masking support used here.

  • Private personal details: the Personal details form and the legal name page (used by Travel) are masked as a whole, and the Legal name, Date of birth, Phone number and Address values on the Profile page are masked.
  • The home address page in Preferences is masked through a new forwardedFSClass prop on AddressPage. The workspace address page uses the same component and doesn't pass it, since workspace settings aren't masked.
  • The shipping address shown when reporting a card lost or damaged is masked.
  • Attachments opened from a chat follow that chat's masking. The attachment modal renders outside the chat's views, so it didn't inherit the chat's mask.
  • The date picker calendar follows its input's masking. It renders in a popover outside the form, so the date of birth calendar was recorded unmasked even though its input was masked.
  • The mention and emoji suggestions follow the chat's masking too. They render in a portal outside the chat on web and on native, so they get the chat's class through FSClassContext.
  • The user's DM with a custom agent is unmasked like a Concierge chat, since agents act as Expensify system users, not people. Group chats and rooms between people stay masked even when an agent is in them. getChatFSClass checks the participants' isCustomAgent flag and has tests for it. The flag is read from PersonalDetailsStore, the same way the function already reads the parent report, so a chat that's already on screen picks up a change in the flag on its next render.

Fullstory test session: https://app.fullstory.com/ui/o-1WN56P-na1/session/5826248309387614834:3760344074396620252!3392275655612737274

Fixed Issues

$ https://github.com/Expensify/Expensify/issues/693315
PROPOSAL:

Tests

How to check

Web: check the DOM

  1. Run npm run web and open the screen.
  2. In DevTools, inspect the element that holds the value: the <input> itself, or the div rendering the text.
  3. It must have the fs-mask class, or have no class of its own under an ancestor with fs-mask. If the element itself has fs-unmask, it gets recorded.

Native: check the component tree

  1. Open React Native DevTools: press j in the bundler terminal, or use the dev menu › Open DevTools.
  2. In the Components tab, select the View / Text / TextInput that holds the value.
  3. Its fsClass prop must be fs-mask. The same rule applies: the closest element with an fsClass decides.

Prerequisites: a validated account, a coworker account, and a workspace you admin. Steps 4 and 9 use fake data added in the web console (dev builds expose window.Onyx). Fake data only lives in your local Onyx: remove it afterwards, and don't press buttons that call the API with it.

  1. Private personal details form: Account › Profile › tap Legal name, or open https://dev.new.expensify.com:8082/settings/profile/private-personal-details.
    • Every input carries fs-mask: legal first and last name, date of birth, phone, address line 1 and 2, city, state, zip, and the country value.
    • Type a few letters in Address line 1: the suggestions list is masked too.
    • Open the Date of birth calendar: its popup carries fs-mask. It renders in a popover outside the form, so before this PR it was recorded unmasked.
    • The labels stay readable. The "Basic details" and "Address" headings are masked as well, because the whole form is masked.
  2. Profile page: Account › Profile (https://dev.new.expensify.com:8082/settings/profile).
    • The Legal name, Date of birth, Phone number and Address values carry fs-mask.
    • Their descriptions ("Legal name", "Date of birth"…) stay readable.
  3. Home address page: Account › Preferences › Home address, or https://dev.new.expensify.com:8082/settings/preferences/home-address.
    • Address line 1 and 2, City, State, Zip and the Country value carry fs-mask, and so does the suggestions list under Address line 1.
  4. Report card lost:
    • Real path: Account › Wallet › [physical Expensify Card] › Report card lost or damaged › pick a reason › Next. Needs a physical card in NOT_ACTIVATED or OPEN state.
    • Without one, add a fake physical card in the web console. Replace <accountID> with yours (Onyx.log('session')):
      Onyx.merge('cardList', {999001: {cardID: 999001, accountID: <accountID>, bank: 'Expensify Card', domainName: 'expensify-policy-fs-test.exfy', fundID: '1', state: 3, lastFourPAN: '1234', nameValuePairs: {isVirtual: false}}});
      Then open https://dev.new.expensify.com:8082/settings/wallet/card/999001, press "Report card lost or damaged", pick a reason and press Next. Don't press the final button.
    • The shipping address value carries fs-mask; the "Address" name stays readable.
    • Tapping it opens the private personal details form from step 1.
  5. Travel legal name: open https://dev.new.expensify.com:8082/workspaces/<policyID>/travel/missing-personal-details with one of your workspaces' IDs.
    • First name and Last name inputs carry fs-mask.
  6. Workspace address (no change): Workspaces › [workspace] › Overview › Address, or https://dev.new.expensify.com:8082/workspaces/<policyID>/overview/workspace-address.
    • It's the same page as step 3, but it doesn't pass the mask, since workspace settings aren't masked by the rules.
    • City, State and the Country value carry fs-unmask.
    • Address line 1, Address line 2 and Zip / Postcode carry fs-mask because of their autofill hints, the same as on main.
  7. Attachment viewer: in your self DM, send an image and tap it.
    • The viewer's content area (around the image) carries fs-mask.
    • Open an image from a workspace chat or a Concierge DM: the content area carries fs-unmask.
  8. Mention / emoji suggestions (web and native): in your self DM composer type @a, then :sm.
    • The suggestions popup carries fs-mask. On web it renders at the end of <body>; on native check its fsClass in React Native DevTools.
    • In a workspace chat or a Concierge DM it carries fs-unmask.
    • Before this PR, the popup had no class on web and on native, so it wasn't masked in masked chats.
  9. Custom agent chats:
    • Real path: Account › Agents › New agent › Build custom agent › name and instructions › Create agent › open the agent › Chat with agent.
    • Without an agent, flag a coworker as one in the web console. Replace <coworkerAccountID> with theirs (from their profile URL, /a/<accountID>):
      Onyx.merge('personalDetailsList', {<coworkerAccountID>: {isCustomAgent: true}});
      Then open your DM with them. If it was already open, open another chat and come back, so it re-renders.
    • The message list, the composer and the chat's preview in the LHN carry fs-unmask.
    • A DM with a coworker who isn't an agent is still masked.
    • A group chat or room with people and the agent in it is still masked: only your DM with the agent is unmasked. With the console flag above, start a group with that coworker and another person to check it.
  10. Clean up the fake data:
    Onyx.merge('cardList', {999001: null});
    Onyx.merge('personalDetailsList', {<coworkerAccountID>: {isCustomAgent: false}});
  • Verify that no errors appear in the JS console

Offline tests

N/A

QA Steps

N/A

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

Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari Screenshot 2026-11-18 at 17 38 58 Screenshot 2026-11-18 at 17 39 13 Screenshot 2026-11-18 at 17 40 15 Screenshot 2026-11-18 at 17 41 15 Screenshot 2026-11-18 at 17 41 58 Screenshot 2026-11-18 at 17 43 58 Screenshot 2026-11-18 at 17 57 30 Screenshot 2026-11-18 at 17 57 40 Screenshot 2026-11-18 at 17 57 49 Screenshot 2026-11-18 at 17 57 56 Screenshot 2026-11-18 at 17 58 04 Screenshot 2026-11-18 at 17 58 10

@codecov

codecov Bot commented Nov 17, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ Changes either increased or maintained existing code coverage, great job!

Files with missing lines Coverage Δ
src/components/DatePicker/index.tsx 64.54% <100.00%> (+0.32%) ⬆️
src/libs/Fullstory/common.ts 97.82% <100.00%> (+0.04%) ⬆️
...rt/ReportActionCompose/ComposerWithSuggestions.tsx 81.52% <100.00%> (+0.04%) ⬆️
...ntModalScreen/AttachmentModalBaseContent/index.tsx 98.22% <100.00%> (+0.02%) ⬆️
...ings/Profile/PersonalDetails/BaseLegalNamePage.tsx 26.92% <ø> (ø)
...gs/Profile/PersonalDetails/PersonalAddressPage.tsx 0.00% <ø> (ø)
...ile/PersonalDetails/PrivatePersonalDetailsPage.tsx 80.78% <ø> (ø)
src/pages/settings/Profile/ProfilePage.tsx 94.31% <ø> (ø)
src/pages/settings/Wallet/ReportCardLostPage.tsx 0.00% <ø> (ø)
src/components/Form/FormWrapper.tsx 92.56% <88.88%> (+2.12%) ⬆️
... and 3 more
... and 12 files with indirect coverage changes

@mountiny
mountiny self-requested a review November 17, 2026 22:01
@melvin-bot

melvin-bot Bot commented Nov 18, 2026

Copy link
Copy Markdown

Hey! I see that you made changes to our Form component. Make sure to update the docs in FORMS.md accordingly. Cheers!

…ile-chat-masking

# Conflicts:
#	src/pages/settings/Profile/PersonalDetails/PrivatePersonalDetailsPage.tsx
#	src/pages/settings/Wallet/ReportCardLostPage.tsx
@fabioh8010
fabioh8010 marked this pull request as ready for review November 18, 2026 18:06
@fabioh8010
fabioh8010 requested review from a team as code owners November 18, 2026 18:06
@expensify-chore-bot
expensify-chore-bot Bot requested review from parasharrajat and removed request for a team November 18, 2026 18:06
@expensify-chore-bot

Copy link
Copy Markdown

@parasharrajat 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]

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 18, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-18T18:23:45.314942Z 4588681 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@expensify-chore-bot
expensify-chore-bot Bot requested review from trjExpensify and removed request for a team November 18, 2026 18:06

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 4588681eda

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread src/libs/Fullstory/common.ts Resolved
trjExpensify
trjExpensify previously approved these changes Nov 18, 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.

👍

@mountiny
mountiny removed the request for review from parasharrajat November 19, 2026 00:58

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

One question on how far the custom agent unmask reaches before this merges.

Comment thread src/libs/Fullstory/common.ts Resolved
@parasharrajat

Copy link
Copy Markdown
Member

@mountiny please reassign if it needs C+ review as I can't test it due to my device being with apple support

@mountiny
mountiny requested a review from Krishna2323 November 21, 2026 02:19
// Given a DM whose participants are known people, none flagged as a custom agent.
await Onyx.set(ONYXKEYS.PERSONAL_DETAILS_LIST, {[participantAccountID]: {accountID: participantAccountID, isCustomAgent: false}});
await waitForBatchedUpdates();
const report = createMock<Report>({participants: {[participantAccountID]: {}}});

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.

NAB: This passes even with isCustomAgent: true on line 170. The mock has no type, so isDM() returns false and the chat is masked before the agent flag is checked. Adding type: CONST.REPORT.TYPE.CHAT would make this test cover the no-agent case properly.

);

// Without the scroll view there's no FSClassView around the form, so one is added when a class is passed. Forms without a class keep their layout.
if (!forwardedFSClass) {

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.

NAB: Which form needs this? None of the forms with shouldUseScrollView={false} pass forwardedFSClass to the form, and the three forms masked here all use the scroll view. If nothing needs it yet, could it move to the PR that adds the caller?

@Krishna2323

Krishna2323 commented Nov 21, 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 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 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 and each prop has a /** comment above it */
    • The file is named correctly
    • 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
    • For Class Components, any internal methods passed to components event handlers are bound to this properly so there are no scoping issues (i.e. for onClick={this.submit} the method this.submit should be bound to this in the constructor)
    • Any internal methods bound to this are necessary to be bound (i.e. avoid this.submit = this.submit.bind(this); if this.submit is never passed to a component event handler like onClick)
    • All JSX used for rendering exists in the render method
    • 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 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 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

Android: HybridApp
android_hybrid.mp4
Android: mWeb Chrome
iOS: HybridApp
ios_hybrid_1.mp4
ios_hybrid_2.mp4
ios_hybrid_3.mp4
iOS: mWeb Safari
MacOS: Chrome / Safari
web_chrome_profile_page.mp4

@Krishna2323 Krishna2323 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!

Left two non-blocking comments.

@melvin-bot
melvin-bot Bot requested a review from mountiny November 21, 2026 03:53
@melvin-bot melvin-bot Bot changed the title [No QA][Fullstory] Mask profile details and chat surfaces, unmask custom agent chats [Payment due @Krishna2323] [No QA][Fullstory] Mask profile details and chat surfaces, unmask custom agent chats Nov 21, 2026
@melvin-bot

melvin-bot Bot commented Nov 21, 2026

Copy link
Copy Markdown

🎯 @Krishna2323, 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/693315.

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.

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

Thank you

@mountiny
mountiny merged commit 5de42f6 into Expensify:main Nov 22, 2026
38 of 42 checks passed
@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

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

@github-actions

Copy link
Copy Markdown
Contributor

@OSBotify

Copy link
Copy Markdown
Contributor

🚀 Deployed to staging by https://github.com/mountiny in version: 9.5.53-0 🚀

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

@MelvinBot

Copy link
Copy Markdown
Contributor

No help site update needed — this PR only changes internal Fullstory recording masks, without adding user-facing workflows, changing UI labels, or making any existing article sentence incorrect.


view run

@melvin-bot

melvin-bot Bot commented Nov 25, 2026

Copy link
Copy Markdown

🤖 Payment issue created: #107981

@OSBotify

Copy link
Copy Markdown
Contributor

🚀 Deployed to production by https://github.com/arosiclair in version: 9.5.53-3 🚀

platform result
🕸 web 🕸 success ✅
🤖 android 🤖 success ✅
🍎 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

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants