Always show the Settings option in the categories More menu - #100119
Always show the Settings option in the categories More menu#100119MelvinBot wants to merge 1 commit into
Conversation
The categories Settings page now hosts the Auto-categorize new expenses toggle, which is rendered unconditionally, so the entry point should no longer be hidden for accounts on the rulesRevamp beta without GL codes. Co-authored-by: truph01 <truph01@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. |
|
🤖 Web test steps verification results: ✅ pass On a fresh Collect workspace with no GL codes, the Categories
Caveat on beta coverage: the tester could not confirm whether the test account is on the |
|
The failing check is not related to this PR, so I have not pushed anything. Two checks are red:
Why it's unrelated: this PR changes exactly one file, Why it fails: today is the 2nd of the month, and the test case is Root cause and evidenceThe test builds its expected date from // If today is before the nth day, return the nth of this month.
if (day < nth) {
return new Date(year, month, nth);
}
// Otherwise, return the nth of next month.
return new Date(year, month + 1, nth);The production code under test never calls that helper. let etaDateTime = setDate(new Date(), policy?.autoReportingOffset);
if (isPast(etaDateTime)) {
etaDateTime = addMonths(etaDateTime, 1);
}
So the test asserts against a re-implementation of the rule that has drifted from the code it is meant to verify. Reproduced locally on this branch: Possibly related: #97875 ("Monthly submission date in Next Step differs by one day from date set in Workflows"), closed 2026-08-27, which covers the same off-by-one boundary in user-facing behaviour. Recommended fix (separate PR): make the test deterministic by freezing the clock rather than computing the expected date at runtime, and delete the unused I deliberately did not push this fix here: it touches This blocks every PR merging today, not just this one, so it likely needs someone to pick it up promptly. |
|
🤖 Android test steps verification results: Confirmed the core PR fix: the Categories
Notes for the reviewer:
|
|
Code looks good, @MelvinBot please open the PR |
|
🤖 Done — this PR is out of draft and ready for review. PullerBear has already requested Two things still need a human before merge: 1. One failing check, unrelated to this PR. 2. The Note that the automated run could not confirm whether the test account is on the |
Reviewer Checklist
Screenshots/VideosMacOS: Chrome / SafariScreen.Recording.2026-09-02.at.15.45.04.mov |
|
@MelvinBot Please resolve:
|
|
The failing Jest check is unrelated to this PR — it's a calendar-dependent test failure hitting every open PR today, and it's already tracked in #100134. Failing test: I did not push a fix, since the failure isn't caused by this branch and a fix belongs with the owner of that test. Evidence it's unrelatedThis PR touches one file: The identical failure appears on unrelated PRs today. For example, branch Why it fires today: the test derives its expectation from a different helper than production uses, and the two disagree only when today's date equals the offset day — today is the 2nd.
What to do: once #100134 lands, re-run the Jest check here and it should pass. Nothing on this branch needs to change for it. |
|
No code change is needed on this PR, and I have not pushed anything. Two things to know: 1. The red 2. The permanent fix got closed by mistake, and #100145 carried the test-only fix, was green on every check except
I verified the closed branch still fixes it. Applying just its two files and running the suite today, on the 2nd: I've asked Why the fix doesn't belong on this PRThis PR changes exactly one file, Folding the test fix in here would put an unrelated Root cause, for reference: the test derives its expected date from |
|
@truph01 @dukenv0307 can we be sure to fill out the QA steps correctly? |
|
we can close since the original PR is reverted |









Explanation of Change
The categories
Settingsscreen's visibility was expressed twice — once on the destination page and once on theMoremenu entry point that links to it.#98030 added the
Auto-categorize new expensestoggle toDynamicWorkspaceCategoriesSettingsPageand correctly dropped that page'sshouldBlockEmptySettings/shouldBeBlockedguard, since the page now always has content to show. But it did not touchWorkspaceCategoriesPage, where the mirrored guard still hid theSettingsmenu item:So for any account on the
rulesRevampbeta whose workspace has no GL codes,Settingswas filtered out of theMoredropdown and the new toggle became unreachable from the UI. That covers everyall-beta internal/Expensifail account, which is why the deploy blocker was reported as Expensifail-specific — external accounts without the beta still sawSettings.This change reduces the condition to
canWriteCategoriesand drops the now-stale comment along with theisRulesRevampEnabledandpolicy?.glCodesdependencies (and the now-unusedusePermissionsimport), restoring the pre-revamp behaviour of always offeringSettingsto users who can write categories.Rolling forward rather than reverting #98030, since a revert would remove the
SetPolicyAutoCategorizeNewExpensescommand, the Onyx field, theisCategoryBeingAnalyzedbehaviour and its tests for what is only a UI entry-point bug.Fixed Issues
$ #100115
PROPOSAL: #100115 (comment)
Tests
// TODO: The human co-author must fill out the tests they ran before marking this PR as "ready for review".
Suggested starting point (needs a human to run and confirm):
rulesRevampbeta (any internal/all-beta account).More.Settingsoption is listed.Settingsand verify the page shows theAuto-categorize new expensestoggle.rulesRevampbeta to confirm no regression.Offline tests
QA Steps
// TODO: These must be filled out, or the issue title must include "[No QA]."
// TODO: The human co-author must fill out the QA steps before marking this PR as "ready for review".
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectionAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))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.AI Tests
Run locally by MelvinBot on this branch:
npm run lint-changednpm run typechecknpm run spell-changednpm run react-compiler-compliance-check check src/pages/workspace/categories/WorkspaceCategoriesPage.tsxnpm test -- --findRelatedTests src/pages/workspace/categories/WorkspaceCategoriesPage.tsx(tests/ui/WorkspaceCategoriesTest.tsx, 2 tests)rulesRevampbeta, so it could not have exercised the gated path. This still needs a human to verify with a beta-enabled account.npm run prettieris listed in Melvin's test matrix but no such script exists in this repo; formatting is covered bynpm run lint-changed.Screenshots/Videos
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari