Repository navigation
Return to member Profile from Display name Not here back button - #104290
Conversation
Co-authored-by: Roji Philip <rojiphil@users.noreply.github.com>
|
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: Then you can close this PR and open a new one from your fork. |
Codecov Report✅ Changes either increased or maintained existing code coverage, great job!
|
|
🤖 Android test steps verification results: 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.
|
|
🤖 Web test steps verification results: 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.
|
Reviewer Checklist
Screenshots/VideosAndroid: HybridApp104290-android-hybrid-001.mp4Android: mWeb Chrome104290-mweb-chrome-001.mp4iOS: HybridApp104290-ios-hybrid-001.mp4iOS: mWeb Safari104290-mweb-safari-001.mp4MacOS: Chrome / Safari104290-web-chrome-001.mp4 |
|
@MelvinBot Tidy the tests/QA sections with the following test steps.The test steps are only applicable for non native versions.
|
|
I replaced the TODO placeholders in the Tests and QA Steps sections with your 8 steps.
I didn't change any other part of the PR body. |
|
@MelvinBot Please tick the boxes in the PR Author Checklist section as I have already verified these in PR Reviewer Checklist |
|
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. |
|
@MelvinBot Please mark the PR as ready for review. |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
This PR is now marked as ready for review. |
rojiphil
left a comment
There was a problem hiding this comment.
@carlosmiceli Changes LGTM.
Over to you. Thanks.
There was a problem hiding this comment.
💡 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)}} |
There was a problem hiding this comment.
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 👍 / 👎.
There was a problem hiding this comment.
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 has triggered a test Expensify/App build. You can view the workflow run here. |
|
🧪🧪 Use the links below to test this adhoc build on Android, iOS, and Web. Happy testing! 🧪🧪
|
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🚀 Deployed to staging by https://github.com/carlosmiceli in version: 9.5.15-1 🚀
|
|
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. |
|
🚀 Deployed to production by https://github.com/grgia in version: 9.5.15-3 🚀
Bundle Size Analysis (Sentry): |








Explanation of Change
When you save a member's display name and then press the browser's Forward button,
WorkspaceMemberDisplayNamePagemounts again. The member now has a name, so the page correctly shows Not here. But the page passed nofullPageNotFoundViewProps, soAccessOrNotFoundWrapperused 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 thedisplay-name/...suffix from the current URL, which leaves the member's Profile URL, and passesonBackButtonPress: () => Navigation.goBack(backPath)to the wrapper. This matches the pattern inDynamicIOURequestStepCategoryCreateandProfilePage. 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
bunpostinstall 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.
Offline tests
QA Steps
These steps apply only to non-native platforms (web and mWeb). Native apps have no browser Forward button.
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectionAvatar, I verified the components usingAvatarare working as expected)npm run compress-svg)Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari