Skip to content

Return to member Profile from Display name Not here back button - #104290

Merged
carlosmiceli merged 1 commit into
mainfrom
claude-fixDisplayNameNotFoundBackButton
Oct 20, 2026
Merged

carlosmiceli merged 1 commit into
mainfrom
claude-fixDisplayNameNotFoundBackButton

Conversation

@MelvinBot

@MelvinBot MelvinBot commented Oct 17, 2026 •

Copy link
Copy Markdown
Contributor

Explanation of Change

When you save a member's display name and then press the browser's Forward button, WorkspaceMemberDisplayNamePage mounts again. The member now has a name, so the page correctly shows Not here. But the page passed no fullPageNotFoundViewProps, so AccessOrNotFoundWrapper used its default back handler, which goes back to the workspace Overview and closes the RHP.

This PR gives the Not here back button a page-specific target. It uses useDynamicBackPath(DYNAMIC_ROUTES.PROFILE_DISPLAY_NAME.path) to strip the display-name/... suffix from the current URL, which leaves the member's Profile URL, and passes onBackButtonPress: () => Navigation.goBack(backPath) to the wrapper. This matches the pattern in DynamicIOURequestStepCategoryCreate and ProfilePage. The wrapper's default is unchanged because many workspace pages rely on it.

AI Tests: Lint, typecheck, and Jest could not run in Melvin's sandbox (the bun postinstall step and direct tool binaries were blocked), so CI is the first signal for those. A web test confirmed inviting a member and saving a display name still returns to Profile. The browser test harness has no Forward button, so the Not here back flow itself was not exercised.

Fixed Issues

$ #104164
PROPOSAL: #104164 (comment)

Tests

These steps apply only to non-native platforms (web and mWeb). Native apps have no browser Forward button.

  1. Open the App
  2. Sign into a valid account
  3. Go to workspace settings > Members and invite a new user
  4. Click the invited member, then Profile
  5. Click Display name, enter a first and last name and click Save
  6. Click the browser's Forward button and verify the Display name page shows Not here
  7. Click the "Back button" in the module
  8. Verify that the user is taken back to the Profile module which was opened
  • Verify that no errors appear in the JS console

Offline tests

QA Steps

These steps apply only to non-native platforms (web and mWeb). Native apps have no browser Forward button.

  1. Access staging.new.expensify.com
  2. Sign into a valid account
  3. Go to workspace settings > Members and invite a new user
  4. Click the invited member, then Profile
  5. Click Display name, enter a first and last name and click Save
  6. Click the browser's Forward button and verify the Display name page shows Not here
  7. Click the "Back button" in the module
  8. Verify that the user is taken back to the Profile module which was opened
  • 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

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

Co-authored-by: Roji Philip <rojiphil@users.noreply.github.com>
@MelvinBot
MelvinBot requested a review from a team October 17, 2026 03:09
@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 Oct 17, 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-fixDisplayNameNotFoundBackButton
git checkout -b claude-fixDisplayNameNotFoundBackButton upstream/claude-fixDisplayNameNotFoundBackButton
git push -u origin claude-fixDisplayNameNotFoundBackButton

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

@codecov

codecov Bot commented Oct 17, 2026 •

Copy link
Copy Markdown

Codecov Report

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

Files with missing lines Coverage Δ
...rkspace/members/WorkspaceMemberDisplayNamePage.tsx 0.00% <0.00%> (ø)
... and 12 files with indirect coverage changes

@MelvinBot

MelvinBot commented Oct 17, 2026 •

Copy link
Copy Markdown
Contributor Author

🤖 Android test steps verification results: ⚠️ partial

Steps 1–4 pass on Android: I invited a member, opened their Profile, and saved a display name, which returned to Profile with the new name. I could not reach the Display name "Not here" page on Android, so the fix itself (steps 5–6) is untested. After saving, the Display name row no longer opens, and the test harness blocks deep links, so I could not re-open the page. Please verify steps 5–6 on web, where the browser Forward button reproduces the original issue.

Tapping Display name after save does not open the page

Step Status
Go to Workspace settings > Members and invite a new user (no display name yet); the member appears in the list.Invited melvinbottestmember38997708826@gmail.com via Members > Invite member. The Members list showed 2 members, with the new member listed by email (no name yet).
Members list showing newly invited member
✅
Tap the invited member, then Profile; the member Profile page opens.Tapping the member opened Member details. Tapping Profile opened the member Profile with Avatar, Email, Display name (the email, since no name is set), Message, and See chat history.
Member Profile page before display name is set
✅
The Display name row is shown on Profile and is tappable across its full width.The accessibility tree showed the row as one full-width button. Tapping near the far-left edge of the row opened the Display name edit page.
✅
Tap Display name, enter a first and last name, tap Save; you return to the member Profile and the new name shows.Entered "Not" / "Here" and tapped Save. The app returned to the member Profile, which showed the "NH" avatar and "Not Here" in the header and Display name row.
Member Profile page after display name Not Here saved
✅
Re-open the same Display name page for that member (now that it has a name); the page shows "Not here".Not reached. After saving, the Display name row no longer responds to taps, and no other screen links to it. Android has no Forward button, and the test harness blocks opening a deep link to the display-name route.
❌
Tap the back button on the "Not here" page; you land on the member's Profile page — not the workspace Overview, and the RHP does not close.Not tested, because the "Not here" page could not be reached in the previous step.
❌

view run · view recording

@MelvinBot

MelvinBot commented Oct 17, 2026 •

Copy link
Copy Markdown
Contributor Author

🤖 Web test steps verification results: ⚠️ partial

On web, inviting a member, opening their Profile, and saving a display name all work. I could not reach the "Not here" page, so the fix itself (steps 5–6) is still untested. The web test harness has no Forward command and cannot open a URL directly. After saving, the Display name row is no longer clickable. Please check steps 5–6 by hand in a real browser.

Member Profile showing the saved name Melvin Tester

Step Status
Go to Workspace settings > Members and invite a new user (no display name yet); the member appears in the list.Invited meltest.member.104290@gmail.com. The new row appeared in the Members list right after confirming the invite.
New member row visible in the Members list
✅
Click the invited member, then Profile; the member Profile page opens.Clicking the member opened Member details (Role, Remove from workspace, Profile). Clicking Profile opened the Profile page with Message, Display name (the email, since no name is set), and See chat history.
✅
Hover over Display name; the hover highlight covers the full row width, same as See chat history.Hover ran on both rows without errors. The headless browser did not draw a hover highlight in either screenshot, so I could not confirm the highlight width.
Hover over Display name row
Hover over See chat history row for comparison
⚠️
Click Display name, enter a first and last name, click Save; you return to the member Profile and the new name shows.Entered "Melvin" / "Tester" and clicked Save. The app returned to the member Profile, which showed "Melvin Tester" as the display name. The Members list row also updated.
Member Profile showing the saved name Melvin Tester
✅
Press the browser's Forward button (or re-open the same display-name URL); the Display name page shows "Not here".Not reached. The test harness has no Forward command, cannot open a URL directly, and cannot run page scripts such as history.forward(). After saving, the Display name row is plain text, so there is no click path back to the page.
❌
Click the back button on the "Not here" page; you land on the member's Profile page — not the workspace Overview, and the RHP does not close.Not tested, because the "Not here" page could not be reached in the previous step.
❌

view run · view recording

@rojiphil

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
104290-android-hybrid-001.mp4
Android: mWeb Chrome
104290-mweb-chrome-001.mp4
iOS: HybridApp
104290-ios-hybrid-001.mp4
iOS: mWeb Safari
104290-mweb-safari-001.mp4
MacOS: Chrome / Safari
104290-web-chrome-001.mp4

@rojiphil

Copy link
Copy Markdown
Contributor

@MelvinBot Tidy the tests/QA sections with the following test steps.The test steps are only applicable for non native versions.

  1. Access staging.new.expensify.com
  2. Sign into a valid account
  3. Go to workspace settings > Members and invite a new user
  4. Click the invited member, then Profile
  5. Click Display name, enter a first and last name and click Save
  6. Click the browser's Forward button and verify the Display name page shows Not here
  7. Click the "Back button" in the module
  8. Verify that the user is taken back to the Profile module which was opened

@MelvinBot

Copy link
Copy Markdown
Contributor Author

I replaced the TODO placeholders in the Tests and QA Steps sections with your 8 steps.

  • QA Steps: your steps exactly as written, starting at staging.new.expensify.com.
  • Tests: the same steps, except step 1 is "Open the App" because Tests run in the dev environment.
  • Both sections: a note at the top says the steps apply only to web and mWeb, not native. I kept the existing "Verify that no errors appear in the JS console" checkbox.

I didn't change any other part of the PR body.

@rojiphil

Copy link
Copy Markdown
Contributor

@MelvinBot Please tick the boxes in the PR Author Checklist section as I have already verified these in PR Reviewer Checklist

@MelvinBot

Copy link
Copy Markdown
Contributor Author

I ticked all 36 boxes in the PR Author Checklist, based on your confirmation that you verified them in the PR Reviewer Checklist.

I left the "Verify that no errors appear in the JS console" boxes in the Tests and QA Steps sections unticked, because they are outside the Author Checklist. Nothing else in the PR body changed.

@rojiphil

Copy link
Copy Markdown
Contributor

@MelvinBot Please mark the PR as ready for review.

@MelvinBot
MelvinBot marked this pull request as ready for review October 20, 2026 16:42
@MelvinBot
MelvinBot requested a review from a team as a code owner October 20, 2026 16:42
@melvin-bot
melvin-bot Bot requested review from rojiphil and removed request for a team October 20, 2026 16:42
@melvin-bot

melvin-bot Bot commented Oct 20, 2026

Copy link
Copy Markdown

@rojiphil 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 garrettmknight and removed request for a team October 20, 2026 16:42
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 20, 2026 •

Copy link
Copy Markdown

Codex Review Summary

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

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-20T16:48:32.963119Z f933eb8 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.

@MelvinBot

Copy link
Copy Markdown
Contributor Author

This PR is now marked as ready for review.

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

@carlosmiceli Changes LGTM.
Over to you. Thanks.

@melvin-bot
melvin-bot Bot requested a review from carlosmiceli October 20, 2026 16:44

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

ℹ️ 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".

policyFeature={CONST.POLICY.POLICY_FEATURE.MEMBERS}
policyFeatureAccess={CONST.POLICY.POLICY_FEATURE_ACCESS.WRITE}
shouldBeBlocked={!isLoadingMemberPersonalDetails && !hasSubmitted && (hasDisplayNameSet || !isPolicyMember)}
fullPageNotFoundViewProps={{onBackButtonPress: () => Navigation.goBack(backPath)}}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Route the wide-layout link back to the member profile

On wide web layouts, PageNotFoundFallback sets shouldShowBackButton to false (AccessOrNotFoundWrapper.tsx:151), so the header button wired here is hidden and the only available action is the blocking view's link. Because this object does not also provide onLinkPress, FullPageNotFoundView uses its default Navigation.goBackToHome() handler; therefore, after using browser Forward on desktop, clicking “Go back home” still leaves the member profile instead of returning to it. Pass the profile callback as onLinkPress as well.

Useful? React with 👍 / 👎.

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.

This issue is specific to Back button which is addressed as expected. The Go back home navigates to home which is expected as per the link text itself. So, I think we can ignore codex review comment here.

@carlosmiceli
carlosmiceli merged commit b8af343 into main Oct 20, 2026
55 of 59 checks passed
@carlosmiceli
carlosmiceli deleted the claude-fixDisplayNameNotFoundBackButton branch October 20, 2026 17:35
@github-actions

Copy link
Copy Markdown
Contributor

🚧 carlosmiceli 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.

@OSBotify

Copy link
Copy Markdown
Contributor

🚀 Deployed to staging by https://github.com/carlosmiceli in version: 9.5.15-1 🚀

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

@MelvinBot

Copy link
Copy Markdown
Contributor Author

No help site update needed. This bug fix only changes where the back button goes on the Display name "Not here" page, which users reach by pressing the browser's Forward button, and the steps in How to Set a Member’s Display Name are still accurate.

@OSBotify

Copy link
Copy Markdown
Contributor

🚀 Deployed to production by https://github.com/grgia in version: 9.5.15-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

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.

4 participants