You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[$250] Domains - Not here page opens after removing yourself as admin #80346
Version Number: 9.3.6-0 Reproducible in staging?: Yes Reproducible in production?: Yes If this was caught during regression testing, add the test name, ID and link from BrowserStack:#79765 Email or phone of affected tester (no customers):applausetester+210102abc@applause.expensifail.com Issue reported by: Applause Internal Team Bug source: Exploratory - Significant User Experience Deterioration Device used: Mac 26.1 / Chrome App Component: Workspace Settings
Action Performed:
Precondition:
Log in as domain admin which is not primary contact.
Go to staging.new.expensify.com
Go to Workspaces.
Scroll to the bottom.
Tap applause.expensifail.com domain.
Go to Domain admins.
Tap on your own profile.
Tap Revoke access.
Tap Remove.
Expected Result:
User will be redirected to Workspaces page after removing themselves as admin.
Actual Result:
Not here page opens after removing themselves as admin.
Please re-state the problem that we are trying to solve in this issue.
When a domain admin removes their own admin access from a domain, they see a "Not here" error page instead of being redirected to the Workspaces page. The expected behavior is that after revoking their own admin access, the user should be automatically redirected to the Workspaces list page.
What is the root cause of that problem?
The root cause is that DomainInitialPage does not have a useEffect to navigate the user away when they lose admin access.
When the user clicks "Revoke access" to remove themselves as admin:
In DomainAdminDetailsPage.tsx (lines 65-66), the handleRevokeAdminAccess function calls:
Since the user is no longer an admin (the SHARED_NVP_PRIVATE_ADMIN_ACCESS Onyx key gets updated), isAdmin becomes false, and the "Not here" page is shown.
The problem is that DomainInitialPage only renders the "Not here" view but does NOT automatically navigate the user away. Other wrapper components like DomainNotFoundPageWrapper (lines 40-47) and AccessOrNotFoundWrapper (lines 200-206) have useEffect hooks that handle this scenario by navigating the user away when access is lost.
But DomainInitialPage doesn't use DomainNotFoundPageWrapper - it directly renders FullPageNotFoundView without any automatic navigation on access loss.
What changes do you think we should make in order to solve the problem?
Add a useEffect in DomainInitialPage.tsx to navigate the user to the Workspaces list page when they lose admin access, similar to how DomainNotFoundPageWrapper handles this case.
File:/src/pages/domain/DomainInitialPage.tsx
Add a useEffect after the existing hooks (around line 93):
Detects when the user loses admin access (either !domain or !isAdmin)
Navigates back to the Workspaces list page using Navigation.goBack(ROUTES.WORKSPACES_LIST.route), which is consistent with other navigation patterns in this page (line 118)
What alternative solutions did you explore? (Optional)
changed the title [-]Domains - Not here page opens after removing yourself as admin[/-][+][$250] Domains - Not here page opens after removing yourself as admin[/+]on Jan 23, 2026
⚠️@M00rish Your proposal is a duplicate of an already existing proposal and has been automatically withdrawn to prevent spam. Please review the existing proposals before submitting a new one.
P.S. Is everyone reading this sure this is really a near-term priority? Be brave: if you disagree, go ahead and close it out. If someone disagrees, they'll reopen it, and if they don't: one less thing to do!
[Contributor] If the regression was CRITICAL (e.g. interrupts a core flow) A discussion in #expensify-open-source has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner.
Link to discussion: N/A
[Contributor] If it was decided to create a regression test for the bug, please propose the regression test steps using the template below to ensure the same bug will not reach production again.
[BugZero Assignee] Create a GH issue for creating/updating the regression test once above steps have been agreed upon.
Activity
melvin-bot commentedon Jan 23, 2026
Triggered auto assignment to @heyjennahay (
Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.MobileMage commentedon Jan 23, 2026
Proposal
Please re-state the problem that we are trying to solve in this issue.
When a domain admin removes their own admin access from a domain, they see a "Not here" error page instead of being redirected to the Workspaces page. The expected behavior is that after revoking their own admin access, the user should be automatically redirected to the Workspaces list page.
What is the root cause of that problem?
The root cause is that
DomainInitialPagedoes not have auseEffectto navigate the user away when they lose admin access.When the user clicks "Revoke access" to remove themselves as admin:
In
DomainAdminDetailsPage.tsx(lines 65-66), thehandleRevokeAdminAccessfunction calls:revokeDomainAdminAccess(route.params.domainAccountID, route.params.accountID)Navigation.dismissModal()The
dismissModal()closes the RHP (Right Hand Panel) containingDomainAdminDetailsPage, returning to the underlyingDomainInitialPage.In
DomainInitialPage.tsx(lines 108-115), the page rendersFullPageNotFoundViewwithshouldShow={!domain || !isAdmin}:Since the user is no longer an admin (the
SHARED_NVP_PRIVATE_ADMIN_ACCESSOnyx key gets updated),isAdminbecomesfalse, and the "Not here" page is shown.The problem is that
DomainInitialPageonly renders the "Not here" view but does NOT automatically navigate the user away. Other wrapper components likeDomainNotFoundPageWrapper(lines 40-47) andAccessOrNotFoundWrapper(lines 200-206) haveuseEffecthooks that handle this scenario by navigating the user away when access is lost.DomainNotFoundPageWrapper.tsx (lines 40-47):
But
DomainInitialPagedoesn't useDomainNotFoundPageWrapper- it directly rendersFullPageNotFoundViewwithout any automatic navigation on access loss.What changes do you think we should make in order to solve the problem?
Add a
useEffectinDomainInitialPage.tsxto navigate the user to the Workspaces list page when they lose admin access, similar to howDomainNotFoundPageWrapperhandles this case.File:
/src/pages/domain/DomainInitialPage.tsxAdd a
useEffectafter the existing hooks (around line 93):This approach:
!domainor!isAdmin)Navigation.goBack(ROUTES.WORKSPACES_LIST.route), which is consistent with other navigation patterns in this page (line 118)What alternative solutions did you explore? (Optional)
dmkt9 commentedon Jan 23, 2026
Proposal
Please re-state the problem that we are trying to solve in this issue.
Not here page opens after removing themselves as admin.
What is the root cause of that problem?
isCurrentUserPrimaryContacthas the valuefalse, so the "revoke admin access" button is not disabled.App/src/pages/domain/Admins/DomainAdminDetailsPage.tsx
Line 48 in 6e6f87c
This is because
primaryContacthere has the valueundefined.App/src/pages/domain/Admins/DomainAdminDetailsPage.tsx
Lines 29 to 32 in 6e6f87c
What changes do you think we should make in order to solve the problem?
We should fallback to the
primaryContactvalue in theaccount:+ const primaryContactFromAccountSelector = (account: OnyxEntry<Account>) => account?.primaryLogin;App/src/pages/domain/Admins/DomainAdminDetailsPage.tsx
Line 33 in 6e6f87c
App/src/pages/domain/Admins/DomainAdminDetailsPage.tsx
Line 48 in 6e6f87c
What alternative solutions did you explore? (Optional)
N/A
[-]Domains - Not here page opens after removing yourself as admin[/-][+][$250] Domains - Not here page opens after removing yourself as admin[/+]melvin-bot commentedon Jan 23, 2026
Job added to Upwork: https://www.upwork.com/jobs/~022014735920364075423
melvin-bot commentedon Jan 23, 2026
Triggered auto assignment to Contributor-plus team member for initial proposal review - @Krishna2323 (
External)github-actions commentedon Jan 26, 2026
31 remaining items
Krishna2323 commentedon Feb 26, 2026
@mountiny could you please reopen this?
melvin-bot commentedon Mar 23, 2026
This issue has not been updated in over 15 days. @heyjennahay, @mountiny, @Krishna2323, @MobileMage eroding to Monthly issue.
P.S. Is everyone reading this sure this is really a near-term priority? Be brave: if you disagree, go ahead and close it out. If someone disagrees, they'll reopen it, and if they don't: one less thing to do!
Krishna2323 commentedon Apr 1, 2026
BugZero Checklist:
[Contributor] The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake.
Link to comment: Improvement as per this comment.
[Contributor] If the regression was CRITICAL (e.g. interrupts a core flow) A discussion in #expensify-open-source has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner.
Link to discussion: N/A
[Contributor] If it was decided to create a regression test for the bug, please propose the regression test steps using the template below to ensure the same bug will not reach production again.
[BugZero Assignee] Create a GH issue for creating/updating the regression test once above steps have been agreed upon.
Link to issue: https://github.com/Expensify/Expensify/issues/619641
Regression Test Proposal
Precondition:
Test:
Test 1 — Self-revoke redirects to Workspaces:
Test 2 — Normal admin access still works:
Do we agree 👍 or 👎
Zapier Logs
Run ID: 00040eee-99fe-a7ed-1bf0-87b1a2359414Krishna2323 commentedon Apr 1, 2026
@mallenexpensify checklist completed ^. The PR was deployed to prod a month ago: #81209 (comment)
mallenexpensify commentedon Apr 2, 2026
Payment Summary
Contributor: @MobileMage paid $250 via Upwork
Contributor+: @Krishna2323 due $250 via NewDot
^ Test case created
Apologies for the delay
Krishna2323 commentedon Apr 4, 2026
Requested in ND.
twisterdotcom commentedon Apr 5, 2026
@Krishna2323 has submitted payment for this report on ND here.
SO: https://stackoverflowteams.com/c/expensify/questions/7582
Zapier Logs
Run ID: 00040eee-7752-a79e-acf7-636368aef344quinthar commentedon Apr 13, 2026
Approved $250 to @Krishna2323