Skip to content

Add beta override switches to the Test Tool menu - #99444

Merged
mountiny merged 34 commits into
Expensify:mainfrom
arekm213:arekm213/feat/98409-beta-overrides
Sep 9, 2026
Merged

mountiny merged 34 commits into
Expensify:mainfrom
arekm213:arekm213/feat/98409-beta-overrides

Conversation

@arekm213

@arekm213 arekm213 commented Aug 25, 2026 •

Copy link
Copy Markdown
Contributor

Explanation of Change

Betas can only be flipped locally today by editing Onyx by hand in the console (Onyx.merge('betas', [...betas, 'submit2026'])), which is easy to get wrong and gets wiped on the next reconnect.

This adds a Beta overrides row to the Test Tool menu that opens a page listing every beta in CONST.BETAS with a switch each, so a beta can be turned on or off on the current device without touching the console. The row renders from TestToolMenu, so it is available both in the hidden Test Tools modal and inline on Settings > Troubleshoot.

The page lives in the RHP on its own route (/beta-overrides), outside Settings, following the design discussion in the thread below.

Behavior:

  • A beta keeps an override only while it differs from your account betas. Toggling back to the account value removes the override, and rows carrying one show an Overridden badge.
  • Reset all overrides clears them all and returns every beta to the value the account has on the backend.
  • Overrides survive sign out, the sign in redirect, delegate switching and clearOnyxAndResetApp, so a testing setup is not lost by logging out.
  • Overrides never apply in production builds, and the row is hidden there (the Test Tools modal is reachable in production).

Implementation notes:

  • New ONYXKEYS.BETA_OVERRIDES key (Partial<Record<Beta, boolean>>) rather than writing into BETAS, because the server re-pushes BETAS on every OpenApp/ReconnectApp and would wipe anything stored there.
  • The merge point is Permissions.isBetaEnabled, which takes the overrides as a parameter, so nothing in Permissions.ts reads Onyx. Components get the value through usePermissions, which reads it from a new BetaOverridesContext, and the remaining non-React caller (TransactionInlineEdit) keeps its own Onyx.connectWithoutView with a comment explaining why, as Onyx Data Management requires.
  • The Test Tools modal and the RHP are both root modals and only one can be open at a time, so the row dismisses the Test Tools modal before navigating. Rendered inline on Settings > Troubleshoot there is nothing to dismiss.
  • The all beta is excluded from the list, since it is a blanket switch rather than an individual feature.

Interim gap, handled in a follow up PR to keep this one small: seven util call sites still resolve their beta from a betas array without receiving the overrides, so an override does not reach them yet. They are asapSubmit (ReportUtils.getExpenseReportStateAndStatus, ReportUtils.shouldCreateNewMoneyRequestReport, IOUAmountSubmission.buildSubmitAmountContext, Search.getApproveActionCallback, Policy.setWorkspaceApprovalMode), defaultRooms (ReportUtils.canSeeDefaultRoom) and vendorMatching (ViolationsUtils.getViolationsOnyxData). The follow up threads the parameter through, grouped by beta so no beta is left half working. Everything reached through usePermissions already honours overrides.

Proposed by @JakubKorytko.

Fixed Issues

$ #98409
PROPOSAL:

Tests

  1. Sign in.
  2. Open the hidden Test Tool menu (iOS/Android App and mWeb: tap the screen with 4 fingers; Web: open /test-tools or press Cmd/Ctrl+D). Alternatively go to Settings > Troubleshoot.
  3. Tap View on the Beta overrides row and verify the Test Tools modal closes and the Beta overrides page opens in the RHP, with the list of betas and a switch on each row.
  4. Toggle customAgent on. Verify the switch flips and an Overridden badge appears next to the name.
  5. Close the page, open Settings and verify the Agents row is now listed under the account section. That row is gated by customAgent through usePermissions, so the override reaches it.
  6. Reopen the page and toggle customAgent back off. Verify the badge disappears, since the override is dropped once the value matches your account again, and verify the Agents row disappears too.
  7. Refresh or restart the app and verify the override is still applied.
  8. Sign out and sign back in. Verify the override is still applied.
  9. Tap Reset all overrides and verify every badge disappears and each beta returns to the value the account has on the backend.
  10. Verify /beta-overrides also works as a direct deeplink, and that the back button returns to whatever was open before it.
  • Verify that no errors appear in the JS console

Offline tests

N/A. Overrides are stored locally in Onyx and only affect frontend checks, so behavior is identical offline. Note that force enabling a beta the account does not have on the backend can still fail at the request level once online, which the page calls out in its description.

QA Steps

Same as Tests.

  • 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 followed proper code patterns (see Reviewing the code)
    • 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 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)
  • 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.
  • 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-01-troubleshoot-row android-02-page-top android-03-page-top-badge android-04-page-bottom
Android: mWeb Chrome mweb-chrome-01-page-top-badge mweb-chrome-02-page-bottom mweb-chrome-03-troubleshoot-row
iOS: Native ios-01-troubleshoot-row ios-02-page-top-badge ios-03-page-bottom
iOS: mWeb Safari Screenshot 2026-08-31 at 16 36 53 Screenshot 2026-08-31 at 16 37 04
MacOS: Chrome / Safari web-02-troubleshoot-row web-03-rhp-top web-04-rhp-bottom

@melvin-bot

melvin-bot Bot commented Aug 25, 2026

Copy link
Copy Markdown

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 bun ./scripts/generateTranslations.ts --help

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

@codecov

codecov Bot commented Aug 25, 2026 •

Copy link
Copy Markdown

Codecov Report

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

Files with missing lines Coverage Δ
src/ONYXKEYS.ts 100.00% <ø> (ø)
src/ROUTES.ts 27.29% <ø> (ø)
src/SCREENS.ts 100.00% <ø> (ø)
...nents/Navigation/QuickCreationActionsBar/index.tsx 92.04% <100.00%> (ø)
src/components/OnyxListItemProvider.tsx 100.00% <100.00%> (ø)
...rch/SearchRouter/useCreateNavigationSuggestions.ts 100.00% <100.00%> (ø)
src/components/TestToolMenu.tsx 93.47% <100.00%> (+0.45%) ⬆️
src/hooks/usePermissions.ts 100.00% <100.00%> (ø)
src/libs/ExportOnyxState/common.ts 80.95% <ø> (ø)
...igation/linkingConfig/RELATIONS/SETTINGS_TO_RHP.ts 100.00% <ø> (ø)
... and 13 more
... and 42 files with indirect coverage changes

@arekm213
arekm213 marked this pull request as ready for review August 26, 2026 10:57
@arekm213
arekm213 requested review from a team as code owners August 26, 2026 10:57
@melvin-bot
melvin-bot Bot requested review from DylanDylann and garrettmknight and removed request for a team August 26, 2026 10:58
@melvin-bot

melvin-bot Bot commented Aug 26, 2026

Copy link
Copy Markdown

@DylanDylann 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 removed the request for review from a team August 26, 2026 10:58
@github-actions

Copy link
Copy Markdown
Contributor

This PR adds a new Onyx.connectWithoutView call, so I've requested a review from the Onyx performance reviewers (@tgolen, @mountiny, @luacmartins) — a review from any one of them is enough. Please add a link in your PR description to the Slack discussion where the @frontend-performance team approved using connectWithoutView here.

Comment thread src/components/BetaOverridesModal.tsx Outdated
text={translate('initialSettingsPage.troubleshoot.overridden')}
isCondensed
// The condensed badge keeps the pill compact next to the beta name, but its 9px text is too small to read at a glance.
textStyles={{fontSize: variables.fontSizeSmall}}

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.

❌ UI-3 (docs)

This passes an inline style object literal (textStyles={{fontSize: variables.fontSizeSmall}}) to a style-typed prop. Per STYLING.md, inline style objects are not allowed: they allocate a new object every render (breaking memoization), bypass theming, and duplicate a value that belongs in the shared style system. The value here is static (variables.fontSizeSmall) with no render-time computation, so it does not qualify for the dynamic-style exception.

Move it into src/styles (e.g. add a styles.badgeTextCondensed or similar helper) and pass the token instead. Badge's textStyles prop is typed StyleProp<TextStyle>, so it accepts a shared style reference or array:

<Badge
    text={translate('initialSettingsPage.troubleshoot.overridden')}
    isCondensed
    textStyles={styles.badgeTextCondensed}
    success
/>

Reviewed at: 88918cd | Please rate this suggestion with 👍 or 👎 to help us improve! Reactions are used to monitor reviewer efficiency.

@arekm213

arekm213 commented Aug 26, 2026 •

Copy link
Copy Markdown
Contributor Author

@Expensify/design could you please take a look on UI here? 🙏

This adds a "Beta overrides" row to the Test Tool menu that opens a list of every beta with a switch each, so betas can be flipped locally without editing Onyx in the console.

I went with a modal for now because it seemed like the best fit: the row lives in TestToolMenu, which renders both in the hidden Test Tools modal and inline on Settings > Troubleshoot, and a component-level modal works from both without a new route. A dedicated RHP screen felt heavy for a developer only tool and did not play well with being opened from inside the Test Tools modal on iOS.

Does this look good to you overall? You can see it on web, Android and iOS in the Screenshots/Videos section above.

A couple of details I am unsure about:

  1. Betas are listed by their raw key (defaultRooms, asapSubmit) rather than friendly names. Greppable in code, but not pretty.
  2. Rows with an override show a small green "Overridden" badge, using the condensed badge with regular text size since the extra small text was hard to read.

Happy to change any of it.

@arekm213

Copy link
Copy Markdown
Contributor Author

One thing I would like a second opinion on: the override semantics.

Toggling a beta always pins an explicit value. Turning it on stores true, turning it back off stores false rather than removing the override, so it stays pinned until "Reset all overrides" clears everything. I picked that because it is predictable: once you touch a beta, the backend cannot silently change it later in the session.

Is pinning what you would expect, or would you rather toggling back removed the override?

@arekm213
arekm213 requested a review from a team as a code owner August 26, 2026 11:38
@dannymcclain

Copy link
Copy Markdown
Contributor

Gotta say, based on the video, I feel like an RHP would be way more appropriate for this. Curious for the other designers' thoughts, but that super tall off-centered modal feels pretty weird to me.

I don't mind the badge you're using, and I'm not sure what my opinion is about the raw key names—is this mostly for internal testing? Do we think users will go in here looking for a beta to enable?

@shawnborton

Copy link
Copy Markdown
Contributor

Yeah I agree, RHP would feel way better for this IMO. We might even consider using a table view with search, similar to this UI we have:
CleanShot 2026-08-26 at 09 00 03@2x

@garrettmknight
garrettmknight removed their request for review August 26, 2026 13:27
@arekm213

Copy link
Copy Markdown
Contributor Author

@dannymcclain yes, this is for internal testing. It shows up in two places, the Test Tools menu (Cmd+D) and Settings > Troubleshoot, and it is hidden in production builds, so only devs and QA ever see it
One thing to flag about the RHP: it cannot open on top of the Test Tools menu. The menu is itself an overlay screen in the navigation stack, and the app dismisses the current overlay when a new one opens, so the menu would close when the RHP appears and would not come back when you close it. The current modal is rendered inside the menu, so the menu stays underneath
In practice that is a small difference, since you leave the menu to test the beta anyway. Happy to build the RHP version if you think it looks better, just wanted to flag that first

Comment thread src/libs/Permissions.ts Outdated

import getEnvironment from './Environment/getEnvironment';

// Module-level so the non-render callers of isBetaEnabled (actions, utils, guards) respect overrides without subscribing to this key.

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.

so the non-render callers of isBetaEnabled (actions, utils, guards)

This is only permissible if ALL these callers are triggered from non-render code (which I think is unlikely). It's not proper to use this as a shortcut for getting data. I think the proper way to do this is to update all callers to pass the data as a parameter to isBetaEnabled. If there are non-UI callers, then they can use connectWithoutView() to get the data and pass it along. All the UI-callers (or anything triggered from a UI caller) should use either usePermissions or useOnyx.

@mountiny @luacmartins do you have any different thoughts about this one?

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.

Yea, I agree that we should follow our pattern and pass in the params if the UI is the call site.

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.

@arekm213 Let's remove Onyx.connectWithoutView here. In the component, we can use the usePermission hook instead, and for the util functions, we can pass betasOverride as a parameter, as the same way we handle the betas param.

That said, to keep this PR in scope and avoid a huge PR, I'd suggest splitting that work into a separate PR rather than growing this one.

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.

Agreed

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Removed the Onyx.connectWithoutView from Permissions.ts - isBetaEnabled takes betasOverride as a parameter now. The remaining util functions still need it passed through, so I'll do that in a separate PR as @DylanDylann suggested

…-beta-overrides

# Conflicts:
#	src/components/TestToolMenu.tsx
@arekm213

arekm213 commented Sep 7, 2026

Copy link
Copy Markdown
Contributor Author

@DylanDylann just reminding - conflicts are resolved again, waiting for your review

@DylanDylann

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
Screen.Recording.2026-09-08.at.11.21.55.mov
Android: mWeb Chrome
Screen.Recording.2026-09-08.at.11.11.41.mov
iOS: HybridApp
Screen.Recording.2026-09-08.at.11.20.45.mov
iOS: mWeb Safari
Screen.Recording.2026-09-08.at.11.07.58.mov
MacOS: Chrome / Safari
Screen.Recording.2026-09-08.at.11.05.56.mov

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

@luacmartins

Copy link
Copy Markdown
Contributor

@mountiny all yours

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

Thanks, just one NAB

);
}

BetaOverridesPage.displayName = 'BetaOverridesPage';

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.

Not needed

Suggested change
BetaOverridesPage.displayName = 'BetaOverridesPage';

@mountiny
mountiny merged commit 8b31ae5 into Expensify:main Sep 9, 2026
39 of 41 checks passed
@github-actions

github-actions Bot commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

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

@OSBotify

OSBotify commented Sep 9, 2026

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.

@sharabai sharabai mentioned this pull request Sep 9, 2026
52 tasks done
@OSBotify OSBotify mentioned this pull request Sep 9, 2026
83 tasks done
@OSBotify

OSBotify commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

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

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

@MelvinBot

MelvinBot commented Sep 9, 2026 •

Copy link
Copy Markdown
Contributor

🤖 No help site changes are required for this PR. I did not create a docs PR.

Why: "Beta overrides" is a developer/QA tool that customers can never reach in production. Both entry points are gated behind !isProduction, and the page itself renders the not-found view in production builds:

The help site documents production behavior for customers, so a dev-only switch panel has no place in it.

Docs I checked

The other user-visible strings this PR adds (Beta overrides, Reset all overrides, Overridden) live only on that production-hidden page, and the ten src/languages/*.ts files just translate them.

I skipped the closing "please review the linked help site PR" line, since there is no help site PR to link. If you want an article written anyway — for example an internal-facing note on using beta overrides during testing — reply with @MelvinBot create the docs PR anyway and say where it should live, and I'll draft it against HELPSITE_NAMING_CONVENTIONS.md, HELP_AUTHORING_GUIDELINES.md, and TEMPLATE.md.


view run · view recording

@lanitochka17

Copy link
Copy Markdown

Deploy Blocker #100769 was identified to be related to this PR.

@OSBotify

Copy link
Copy Markdown
Contributor

🚀 Deployed to production by https://github.com/mountiny in version: 9.4.75-3 🚀

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

Bundle Size Analysis (Sentry):

@OSBotify

Copy link
Copy Markdown
Contributor

🚀 Deployed to production by https://github.com/mountiny in version: 9.4.75-3 🚀

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

Bundle Size Analysis (Sentry):

Comment thread src/libs/Permissions.ts
let isProductionEnvironment = CONFIG.ENVIRONMENT === CONST.ENVIRONMENT.PRODUCTION;
isProduction()
.then((value) => {
isProductionEnvironment = value;

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 line caused [Due for payment 2026-10-15] Home-Changing font size to maximum not showing insights in footer.

isProductionEnvironment starts as true on Android staging, because staging and production ship the same binary and CONFIG.ENVIRONMENT is production. This line corrects it to false after isProduction() resolves. But it only mutates a plain module variable, so React never learns about the change.

usePermissions memoizes on [betas, betaConfiguration, betaOverrides]. None of those change when the environment settles, so isBetaEnabled keeps the stale result. On a cold start, the tab bar renders before the environment resolves, ignores the override, and never re-renders. That's why the Insights tab was missing while the Beta overrides page still showed it as enabled. Toggling the override changed betaOverrides, which is why that fixed it.

Lesson: Don't gate render-time logic on async state stored in a module variable. Put it in React state (for example, useEnvironment()) and pass it in, so memoized consumers recompute when it settles. Re-resolve beta overrides once the environment settles fixed it this way.

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.