Skip to content

[No QA] Create the DomainAdminsPage with list of admins#77447

Merged
mountiny merged 22 commits intoExpensify:mainfrom
software-mansion-labs:war-in/domains/add-admin-page
Dec 12, 2025
Merged

[No QA] Create the DomainAdminsPage with list of admins#77447
mountiny merged 22 commits intoExpensify:mainfrom
software-mansion-labs:war-in/domains/add-admin-page

Conversation

@war-in
Copy link
Contributor

@war-in war-in commented Dec 11, 2025

Explanation of Change

First part of the Release 1 of the domain-control-in-new-dot project. It adds Admins page under domain/<domainAccountID>/admins. We won't add Admins button to block users from entering that page until all Release 1 PRs are merged

Fixed Issues

$ #77565
PROPOSAL:

Tests

  1. Open <your-local-new-dot-url>/domain/<domainID>/admins
  2. Veirfy that page loads list of admins
  3. If the list is longer than 15 the search text input should appear
  4. Verify that the list is scrollable
  5. Verify that you can search admins
  6. Verify that when the search phrase doesn't have matches, it shows No results found matching ...

Offline tests

QA Steps

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 there are no new alerts related to the canBeMissing param for useOnyx
  • 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 shown in the product is localized by adding it to src/languages/* files and using the translation method
      • If any non-english text was added/modified, I used JaimeGPT to get English > Spanish translation. I then posted it in #expensify-open-source and it was approved by an internal Expensify engineer. Link to Slack message:
    • I verified all numbers, amounts, dates and phone numbers shown in the product are using the localization methods
    • 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)
    • I verified proper file naming conventions were followed for any new files or renamed files. All non-platform specific files are named after what they export and are not named "index.js". All platform-specific files are named for the platform the code supports as outlined in the README.
    • I verified the JSDocs style guidelines (in STYLE.md) were followed
  • 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)
  • I verified all code is DRY (the PR doesn't include any logic written more than once, with the exception of tests)
  • I verified any variables that can be defined as constants (ie. in CONST.ts or at the top of the file that uses the constant) are defined as such
  • I verified that if a function's arguments changed that all usages have also been updated correctly
  • 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.
  • If a new page is added, I verified it's using the ScrollView component to make it scrollable when more elements are added to the page.
  • 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

Empty state - You'll see it locally until the backend is ready. Should not happen normally (there's always at least one admin - you)
image

Screen.Recording.2025-12-12.at.12.03.37.mov

@melvin-bot
Copy link

melvin-bot bot commented Dec 11, 2025

Hey, I noticed you changed src/languages/en.ts in a PR from a fork. For security reasons, translations are not generated automatically for PRs from forks.

If you want to automatically generate translations for other locales, an Expensify employee will have to:

  1. Look at the code and make sure there are no malicious changes.
  2. Run the Generate static translations GitHub workflow. If you have write access and the K2 extension, you can simply click: [this button]

Alternatively, if you are an external contributor, you can run the translation script locally with your own OpenAI API key. To learn more, try running:

npx ts-node ./scripts/generateTranslations.ts --help

Typically, you'd want to translate only what you changed by running npx ts-node ./scripts/generateTranslations.ts --compare-ref main

@codecov
Copy link

codecov bot commented Dec 11, 2025

Codecov Report

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

Files with missing lines Coverage Δ
src/ONYXKEYS.ts 100.00% <ø> (ø)
src/SCREENS.ts 100.00% <ø> (ø)
src/components/Icon/chunks/illustrations.chunk.ts 0.00% <ø> (ø)
...c/components/Navigation/NavigationTabBar/index.tsx 50.39% <100.00%> (ø)
...ateRootStackNavigator/GetStateForActionHandlers.ts 34.32% <ø> (+8.95%) ⬆️
...ibs/Navigation/helpers/navigateToWorkspacesPage.ts 85.00% <ø> (ø)
src/libs/Navigation/linkingConfig/config.ts 75.00% <ø> (ø)
src/pages/domain/SamlDomainVerifiedPage.tsx 0.00% <0.00%> (ø)
src/pages/domain/SamlVerifyDomainPage.tsx 0.00% <0.00%> (ø)
src/pages/domain/WorkspacesDomainVerifiedPage.tsx 0.00% <0.00%> (ø)
... and 11 more
... and 30 files with indirect coverage changes

@war-in war-in changed the title [Release 1] Create the DomainAdminsPage with list of admins [No QA] Create the DomainAdminsPage with list of admins Dec 12, 2025
@OSBotify
Copy link
Contributor

🦜 Polyglot Parrot! 🦜

Squawk! Looks like you added some shiny new English strings. Allow me to parrot them back to you in other tongues:

View the translation diff
diff --git a/src/languages/de.ts b/src/languages/de.ts
index 438a7f79..33fbbad2 100644
--- a/src/languages/de.ts
+++ b/src/languages/de.ts
@@ -8001,6 +8001,7 @@ Hier ist ein *Testbeleg*, um dir zu zeigen, wie es funktioniert:`,
             subtitle: 'Erzwingen Sie für Mitglieder Ihrer Domain die Anmeldung per Single Sign-On, schränken Sie die Erstellung von Workspaces ein und vieles mehr.',
             enable: 'Aktivieren',
         },
+        admins: {title: 'Admins', findAdmin: 'Admin finden'},
     },
 };
 // IMPORTANT: This line is manually replaced in generate translation files by scripts/generateTranslations.ts,
diff --git a/src/languages/fr.ts b/src/languages/fr.ts
index f9b57883..e21b600f 100644
--- a/src/languages/fr.ts
+++ b/src/languages/fr.ts
@@ -8005,6 +8005,7 @@ Voici un *reçu test* pour vous montrer comment cela fonctionne :`,
             subtitle: "Exiger que les membres de votre domaine se connectent via l'authentification unique, restreindre la création d'espaces de travail, et plus encore.",
             enable: 'Activer',
         },
+        admins: {title: 'Admins', findAdmin: 'Trouver un admin'},
     },
 };
 // IMPORTANT: This line is manually replaced in generate translation files by scripts/generateTranslations.ts,
diff --git a/src/languages/it.ts b/src/languages/it.ts
index a169b1e9..06c38bcd 100644
--- a/src/languages/it.ts
+++ b/src/languages/it.ts
@@ -7980,6 +7980,7 @@ Ecco una *ricevuta di prova* per mostrarti come funziona:`,
             subtitle: 'Richiedi ai membri del tuo dominio di accedere tramite Single Sign-On, limita la creazione di spazi di lavoro e altro ancora.',
             enable: 'Abilita',
         },
+        admins: {title: 'Amministratori', findAdmin: 'Trova amministratore'},
     },
 };
 // IMPORTANT: This line is manually replaced in generate translation files by scripts/generateTranslations.ts,
diff --git a/src/languages/ja.ts b/src/languages/ja.ts
index 52d58496..439e4d9e 100644
--- a/src/languages/ja.ts
+++ b/src/languages/ja.ts
@@ -7922,6 +7922,7 @@ Expensify の使い方をお見せするための*テストレシート*がこ
             subtitle: 'ドメインのメンバーにシングルサインオンでのログインを必須化し、ワークスペースの作成を制限するなど、さらに多くのことができます。',
             enable: '有効にする',
         },
+        admins: {title: '管理者', findAdmin: '管理者を検索'},
     },
 };
 // IMPORTANT: This line is manually replaced in generate translation files by scripts/generateTranslations.ts,
diff --git a/src/languages/nl.ts b/src/languages/nl.ts
index e205c313..8ee1f5b7 100644
--- a/src/languages/nl.ts
+++ b/src/languages/nl.ts
@@ -7962,6 +7962,7 @@ Hier is een *testbon* om je te laten zien hoe het werkt:`,
             subtitle: 'Verplicht leden van je domein om in te loggen via single sign-on, beperk het aanmaken van werkruimten en meer.',
             enable: 'Inschakelen',
         },
+        admins: {title: 'Beheerders', findAdmin: 'Beheerder zoeken'},
     },
 };
 // IMPORTANT: This line is manually replaced in generate translation files by scripts/generateTranslations.ts,
diff --git a/src/languages/pl.ts b/src/languages/pl.ts
index da8ef238..dfbd08e3 100644
--- a/src/languages/pl.ts
+++ b/src/languages/pl.ts
@@ -7950,6 +7950,7 @@ Oto *paragon testowy*, który pokazuje, jak to działa:`,
             subtitle: 'Wymagaj, aby członkowie Twojej domeny logowali się przez Single Sign-On (SSO), ograniczaj tworzenie obszarów roboczych i nie tylko.',
             enable: 'Włącz',
         },
+        admins: {title: 'Administratorzy', findAdmin: 'Znajdź administratora'},
     },
 };
 // IMPORTANT: This line is manually replaced in generate translation files by scripts/generateTranslations.ts,
diff --git a/src/languages/pt-BR.ts b/src/languages/pt-BR.ts
index e827ad66..3e7dfed5 100644
--- a/src/languages/pt-BR.ts
+++ b/src/languages/pt-BR.ts
@@ -7955,6 +7955,7 @@ Aqui está um *recibo de teste* para mostrar como funciona:`,
             subtitle: 'Exija que os membros do seu domínio façam login por meio de logon único (SSO), restrinja a criação de espaços de trabalho e muito mais.',
             enable: 'Ativar',
         },
+        admins: {title: 'Administradores', findAdmin: 'Encontrar administrador'},
     },
 };
 // IMPORTANT: This line is manually replaced in generate translation files by scripts/generateTranslations.ts,
diff --git a/src/languages/zh-hans.ts b/src/languages/zh-hans.ts
index 0ac0fd5f..5af51c44 100644
--- a/src/languages/zh-hans.ts
+++ b/src/languages/zh-hans.ts
@@ -7786,6 +7786,7 @@ ${reportName}
         addDomain: {title: '添加域', subtitle: '请输入您想访问的私有域名(例如:expensify.com)。', domainName: '域名', newDomain: '新域名'},
         domainAdded: {title: '已添加域名', description: '接下来,您需要验证域名的所有权并调整您的安全设置。', configure: '配置'},
         enhancedSecurity: {title: '增强的安全性', subtitle: '要求您域内的成员使用单点登录登录、限制工作区创建等。', enable: '启用'},
+        admins: {title: '管理员', findAdmin: '查找管理员'},
     },
 };
 // IMPORTANT: This line is manually replaced in generate translation files by scripts/generateTranslations.ts,

Note

You can apply these changes to your branch by copying the patch to your clipboard, then running pbpaste | git apply 😉

@war-in war-in marked this pull request as ready for review December 12, 2025 19:59
@war-in
Copy link
Contributor Author

war-in commented Dec 12, 2025

@situchan the crashes should be fixed now

@situchan
Copy link
Contributor

Is it expected to go to admins page automatically after clicking domain?

Screen.Recording.2025-12-13.at.4.26.42.AM.mov

@situchan
Copy link
Contributor

I got this on Admins page on iOS

Screenshot 2025-12-13 at 4 31 51 AM

@situchan
Copy link
Contributor

Is it expected that search header section is scrolled along with list?

Screen.Recording.2025-12-13.at.4.32.49.AM.mov

@ZhenjaHorbach
Copy link
Contributor

Is it expected that search header section is scrolled along with list?

Screen.Recording.2025-12-13.at.4.32.49.AM.mov

The same behaviour is in other places (For example workspace members page)

@situchan
Copy link
Contributor

I got this on Admins page on iOS

Screenshot 2025-12-13 at 4 31 51 AM

NVM. I see you fixed this in latest commit b8cc828

Copy link
Contributor

@situchan situchan left a comment

Choose a reason for hiding this comment

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

Latest changes looks good.

@ZhenjaHorbach
Copy link
Contributor

ZhenjaHorbach commented Dec 12, 2025

Is it expected to go to admins page automatically after clicking domain?

Screen.Recording.2025-12-13.at.4.26.42.AM.mov

I suppose it's okay
Because the domain screen saves the last opened screen
I think this will be fixed in the next PR without additional changes when the admin's option appears in the left menu

@war-in
Copy link
Contributor Author

war-in commented Dec 12, 2025

Is it expected to go to admins page automatically after clicking domain?

@situchan it was caused by the issue on the "backend" side (ngrok from Jack)
Could you verify now? I works fine on my side

Actually, this is what @ZhenjaHorbach said

Users won't have access to the admins page (no visible button) so we should be fine for now

@situchan
Copy link
Contributor

Failing eslint check seems unrelated. Try merging main

@situchan
Copy link
Contributor

The lint error came from #76034. Fixing in #77581 (please watch this and pull main after merged)

Copy link
Contributor

@mountiny mountiny left a comment

Choose a reason for hiding this comment

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

Overall looks good to me

@mountiny
Copy link
Contributor

ESlint is failing on main

@mountiny mountiny merged commit c0289c3 into Expensify:main Dec 12, 2025
33 of 34 checks passed
@melvin-bot melvin-bot bot added the Emergency label Dec 12, 2025
@melvin-bot
Copy link

melvin-bot bot commented Dec 12, 2025

@mountiny looks like this was merged without a test passing. Please add a note explaining why this was done and remove the Emergency label if this is not an emergency.

@mountiny
Copy link
Contributor

mentioned above

@OSBotify
Copy link
Contributor

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

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

@OSBotify
Copy link
Contributor

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

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

@OSBotify
Copy link
Contributor

🚀 Deployed to production by https://github.com/AndrewGable in version: 9.2.81-5 🚀

platform result
🖥 desktop 🖥 success ✅
🕸 web 🕸 success ✅
🤖 android 🤖 failure ❌
🍎 iOS 🍎 success ✅

@OSBotify
Copy link
Contributor

🚀 Deployed to production by https://github.com/AndrewGable in version: 9.2.81-5 🚀

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

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