Skip to content

Fetch policy categories and tags on the Search Edit multiple page - #102812

Merged
amyevans merged 6 commits into
mainfrom
claude-fetchPolicyDataOnSearchEditMultiple
Oct 14, 2026
Merged

amyevans merged 6 commits into
mainfrom
claude-fetchPolicyDataOnSearchEditMultiple

Conversation

@MelvinBot

@MelvinBot MelvinBot commented Oct 1, 2026 •

Copy link
Copy Markdown
Contributor

Explanation of Change

SearchEditMultiplePage shows the Category and Tag rows only when the workspace's categories/tags are in Onyx. Those keys are not part of the search snapshot, and no Search screen fetches them. So after a cache clear, opening Edit multiple straight from Search left them unloaded, and the rows were silently hidden until opening an expense ran OpenReport and hydrated them.

This PR makes the page load them itself with the shared useLoadPolicyCategories / useLoadPolicyTags hooks (the same ones CategoryPicker and TagPicker use), passing policyID only when the workspace has the feature enabled:

  • The hooks gate on the RAM-only hasOnceLoaded state, not on the Onyx value existing. So a lazy-loaded account that only holds the category or tag already on its expenses still triggers a full read, instead of hiding the other categories or tag lists.
  • They retry on reconnect, so it also works when the page opens offline.

Added UI tests in tests/ui/SearchEditMultiplePageTest.tsx covering the fetch-when-missing, fetch-when-partial, and no-refetch-when-loaded cases.

Fixed Issues

$ #101733
PROPOSAL: #101733 (comment)

Tests

#102812 (comment)
#102812 (comment)

  • Verify that no errors appear in the JS console

Offline tests

QA Steps

Preconditions: A workspace with at least two draft expenses that have no category.

  1. Go to Settings → Troubleshoot → Clear cache and restart.
  2. Navigate directly to the Search → Drafts page without opening any expenses first.
  3. Select two or more draft expenses and click Edit multiple.
  4. Verify that the Category and Reimbursable rows eventually appear. They may take a few moments to load while waiting for data from the backend.
  • 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.
  • If the PR adds or modifies the UI:
    • I asked an AI agent to review the changes for accessibility issues and addressed its findings.
    • I tested with a screen reader (VoiceOver on macOS) and verified all new/changed elements are reachable with a logical focus order.
    • I verified all new/changed elements have meaningful accessible names and roles.
    • I verified state changes are announced (e.g. checked/unchecked, expanded/collapsed, selected).
  • 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

The Category and Tag rows depend on policy categories/tags, which are not in
the search snapshot. After a cache clear, opening Edit multiple straight from
Search left them unloaded, so the rows were hidden.

Co-authored-by: truph01 <truph01@users.noreply.github.com>
@MelvinBot
MelvinBot requested a review from a team October 1, 2026 21:17
@melvin-bot melvin-bot Bot added Melvin-Test-Android Melvin-Test-Web Triggers Melvin to run the testing steps of the PR on web labels Oct 1, 2026
@MelvinBot

Copy link
Copy Markdown
Contributor Author

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:

git remote add upstream https://github.com/Expensify/App.git
git fetch upstream claude-fetchPolicyDataOnSearchEditMultiple
git checkout -b claude-fetchPolicyDataOnSearchEditMultiple upstream/claude-fetchPolicyDataOnSearchEditMultiple
git push -u origin claude-fetchPolicyDataOnSearchEditMultiple

Then you can close this PR and open a new one from your fork.

@MelvinBot

MelvinBot commented Oct 1, 2026 •

Copy link
Copy Markdown
Contributor Author

🤖 Android test steps verification results: ✅ pass

After Clear cache and restart, I went straight to Search → Drafts without opening any expense. Edit multiple on 2 selected drafts showed the Category and Reimbursable rows right away, and they were still there after I opened an expense and reselected. The PR's Tests section is empty, so I used the reproduction steps from the linked issue.
Edit multiple still showing Category and Reimbursable after reselecting

Step Status
Settings → Troubleshoot → Clear cache and restart completes and the app reloads signed inI tapped Clear cache and restart and confirmed the Reset and refresh dialog. The app reloaded to the Troubleshoot screen, still signed in.
Troubleshoot screen after Clear cache and restart, still signed in
✅
Without opening any expense, Search → Expenses (Drafts) lists the draft expensesThe Drafts tab showed Test Merchant A ($10.00) and Test Merchant B ($20.00), both marked Missing category. I did not open either expense.
Search Drafts listing the 2 draft expenses
✅
Select 2+ draft expenses → Edit multiple opens the Edit multiple pageI selected both drafts (2 selected, $30.00) and tapped Edit multiple. The Edit multiple expenses page opened.
Both draft expenses selected
✅
Edit multiple shows the Category and Reimbursable rows immediatelyThe page showed Amount, Description, Merchant, Date, Category, and Reimbursable right away. I did not need to open an expense first.
Edit multiple page showing Category and Reimbursable rows
✅
No regression: rows still show after opening an expense, returning, and reselectingI opened Test Merchant B, went back, reselected both drafts, and opened Edit multiple again. Category and Reimbursable were still there.
Test Merchant B expense detail
Edit multiple still showing Category and Reimbursable after reselecting
✅

view run · view recording

@MelvinBot

MelvinBot commented Oct 1, 2026 •

Copy link
Copy Markdown
Contributor Author

🤖 Web test steps verification results: ✅ pass

After Clear cache and restart, I went straight to Search → Drafts without opening any expense. Edit multiple on 2 selected drafts showed the Category and Reimbursable rows right away, and they were still there after I opened an expense and reselected. The PR's Tests section is empty, so I used the reproduction steps from the linked issue.
Edit multiple still showing Category and Reimbursable after visiting an expense and reselecting

Step Status
Settings → Troubleshoot → Clear cache and restart completes and the app reloads signed inI clicked Clear cache and restart and confirmed the Reset and refresh dialog. The app reloaded to the Troubleshoot page, still signed in.
Troubleshoot page after Clear cache and restart, signed in
✅
Without opening any expense, Search → Expenses (Drafts) lists the draft expensesThe Drafts view showed a draft report with 2 expenses ($65.00 total), both missing a category. I did not open either expense.
Search Drafts listing the draft report with 2 expenses
✅
Select 2+ draft expenses → Edit multiple opens the Edit multiple pageI selected Draft Expense 1 and Draft Expense 2 and clicked Edit multiple. The Edit multiple expenses panel opened.
✅
Edit multiple shows the Category and Reimbursable rows immediatelyThe panel showed Amount, Description, Merchant, Date, Category, and Reimbursable on first open. I did not need to open an expense first.
Edit multiple panel showing Category and Reimbursable rows on first open
✅
No regression: rows still show after opening an expense, returning, and reselectingI opened Draft Expense 1, went back, and opened Edit multiple again with the same selection. Category and Reimbursable were still there.
Edit multiple still showing Category and Reimbursable after visiting an expense and reselecting
✅

view run · view recording

@truph01

truph01 commented Oct 7, 2026

Copy link
Copy Markdown
Contributor

@MelvinBot Mark this PR as ready

@truph01

truph01 commented Oct 13, 2026

Copy link
Copy Markdown
Contributor

@MelvinBot Merge main and open this PR for review

…aOnSearchEditMultiple

Co-authored-by: truph01 <truph01@users.noreply.github.com>
@MelvinBot
MelvinBot marked this pull request as ready for review October 13, 2026 08:38
@MelvinBot
MelvinBot requested a review from a team as a code owner October 13, 2026 08:38
@melvin-bot
melvin-bot Bot requested a review from truph01 October 13, 2026 08:39
@MelvinBot

Copy link
Copy Markdown
Contributor Author

🤖 I merged main into this branch and marked the PR ready for review.

  • The merge had no conflicts. The new merge commit is 31dfd6f.
  • tsc passes after the merge. CI will run tests/ui/SearchEditMultiplePageTest.tsx. I couldn't run it locally because my node_modules is older than the merged main.
  • The Tests and QA Steps sections of the PR description still have TODO placeholders. truph01, please fill them in.

view run

@melvin-bot
melvin-bot Bot requested review from joekaufmanexpensify and removed request for a team October 13, 2026 08:39
@melvin-bot

melvin-bot Bot commented Oct 13, 2026

Copy link
Copy Markdown

@truph01 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 October 13, 2026 08:39
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 13, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-13T08:43:31.236990Z 31dfd6f Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 31dfd6f858

ℹ️ 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".

Comment on lines +184 to +188
if (policy?.areCategoriesEnabled && !policyCategories) {
openPolicyCategoriesPage(policyID);
}
if (policy?.areTagsEnabled && !policyTags) {
openPolicyTagsPage(policyID);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Fetch until the policy data is confirmed complete

For lazy-loaded accounts, these Onyx entries can contain only the category or tag already present on an expense, so their existence does not mean the full policy data was loaded (the existing useLoadPolicyCategories and useLoadPolicyTags hooks explicitly track hasOnceLoaded for this reason). In particular, when such a partial tag entry omits other tag lists, this guard skips the request and the page never renders rows for those lists, leaving them impossible to bulk-edit until another screen hydrates the policy. Gate this on the RAM-only completion/loading state and use the established loaders rather than !policyCategories/!policyTags.

Useful? React with 👍 / 👎.

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.

@MelvinBot Check this comment

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.

🤖 Codex is right, so I fixed it in f8fcf9b.

Checking !policyCategories / !policyTags skips the fetch when a lazy-loaded account has only a partial collection, such as just the tag already on its expenses. The other categories and tag lists then never load.

The page now calls the shared useLoadPolicyCategories and useLoadPolicyTags hooks, the same ones CategoryPicker and TagPicker use. It passes policyID only when the feature is enabled. The hooks check the RAM-only hasOnceLoaded state and retry on reconnect, so I removed the custom useEffect and useNetwork logic.

  • Tests: I added a fetch-when-partial case to tests/ui/SearchEditMultiplePageTest.tsx. The no-refetch case now seeds hasOnceLoaded: true.
  • Checks: Type check and lint pass locally. Jest won't start in my environment for a reason unrelated to this change, so CI will be the first run of these tests.
  • PR description: I updated the explanation to match.

view run

@MelvinBot

Copy link
Copy Markdown
Contributor Author

The failing typecheck check is unrelated to this PR, so I didn't push a fix.

Analysis: main itself is broken. Three updateSplitTransactionsFromSplitExpensesFlow calls in tests/actions/IOUTest/SplitTest.ts:3323 (also lines 3420 and 3529) are missing the newly required reportDrafts param:

error TS2741: Property 'reportDrafts' is missing in type '{...}' but required in type 'UpdateSplitTransactionsParams'.

Evidence:

Once main is fixed, merge main into this branch or re-run the check. The Check independent approval failure is expected for an unreviewed PR.


view run

@MelvinBot

Copy link
Copy Markdown
Contributor Author

Nothing has changed since my last comment, so I didn't push anything.

  • typecheck still fails only in tests/actions/IOUTest/SplitTest.ts:3323 (plus lines 3420 and 3529), where three calls are missing the required reportDrafts param. This PR doesn't touch that file.
  • The latest main still has those three calls without reportDrafts, so merging main won't help yet. Other open PRs fail with the same errors.
  • checklist and Check independent approval fail because the reviewer checklist and approval are still pending.

Once main is fixed, ask me to merge main into this branch and typecheck should pass.


view run

Reuse useLoadPolicyCategories and useLoadPolicyTags so a partial collection on a lazy-loaded account still triggers a full read.

Co-authored-by: truph01 <truph01@users.noreply.github.com>
@MelvinBot
MelvinBot requested a review from a team as a code owner October 13, 2026 09:33
@melvin-bot
melvin-bot Bot requested review from amyevans and removed request for a team October 13, 2026 09:33
@melvin-bot

melvin-bot Bot commented Oct 13, 2026

Copy link
Copy Markdown

@amyevans 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]

Comment on lines +177 to +179
// Policy categories and tags are not part of the search snapshot, and this page can be opened straight from Search
// before any screen has fully loaded them (e.g. after a cache clear, or on a lazy-loaded account that only holds the
// values already on its expenses), so load them here or their rows stay hidden or incomplete.

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.

@MelvinBot Remove this comment

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.

🤖 Done. I removed the comment in 5c9ff12.


view run

@MelvinBot

Copy link
Copy Markdown
Contributor Author

Both failing checks are unrelated to this PR, so I didn't push a fix. This PR only changes SearchEditMultiplePage.tsx and SearchEditMultiplePageTest.tsx.

Once main is fixed, merge main into this branch or re-run the checks. Check independent approval and checklist failures are expected until review is complete.


view run

Co-authored-by: truph01 <truph01@users.noreply.github.com>
@MelvinBot

Copy link
Copy Markdown
Contributor Author

The failing checks are still unrelated to this PR, so I didn't push a fix. This PR only changes SearchEditMultiplePage.tsx and SearchEditMultiplePageTest.tsx.

The fix belongs in main: add reportDrafts: {} to those three calls. After that lands, merge main into this branch or re-run typecheck.


view run

@MelvinBot

Copy link
Copy Markdown
Contributor Author

The failing checks are still unrelated to this PR, so I didn't push a fix. This PR only changes SearchEditMultiplePage.tsx and SearchEditMultiplePageTest.tsx.

  • typecheck: main is still broken. Three calls in tests/actions/IOUTest/SplitTest.ts:3323 (also lines 3420 and 3529) are missing the required reportDrafts param. Adding reportDrafts: {} to them on main fixes it.
  • test (job 7): This is new since my last comment. The failing test is in the Report selection guard tests block of tests/ui/components/IOURequestStepConfirmationPageTest.tsx:1691. That block fails today on unrelated branches too (fix/99385-regressions, claude-localizeGPSDistanceCounter), and a different test in it fails each time. This looks like a flaky or broken test on main, not this PR.
  • checklist and Check independent approval: These pass once a reviewer completes the checklist and approves.

After main is fixed, merge main into this branch or re-run the failed checks.


view run

@truph01

truph01 commented Oct 13, 2026

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-10-13.at.16.43.30.mov
Android: mWeb Chrome
Screen.Recording.2026-10-13.at.16.45.06.mov
iOS: HybridApp
Screen.Recording.2026-10-13.at.16.51.44.mov
iOS: mWeb Safari
Screen.Recording.2026-10-13.at.16.52.31.mov
MacOS: Chrome / Safari
Screen.Recording.2026-10-13.at.16.38.27.mov

@truph01

truph01 commented Oct 13, 2026

Copy link
Copy Markdown
Contributor

@MelvinBot Update QA steps in your checklist to:

**Preconditions:** A workspace with at least two draft expenses that have no category.

1. Go to **Settings → Troubleshoot → Clear cache and restart**.
2. Navigate directly to the **Search → Drafts** page without opening any expenses first.
3. Select two or more draft expenses and click **Edit multiple**.
4. Verify that the **Category** and **Reimbursable** rows eventually appear. They may take a few moments to load while waiting for data from the backend.

@MelvinBot

Copy link
Copy Markdown
Contributor Author

⚠️ MelvinBot CI Fix Loop Detected

MelvinBot has made 5 consecutive commits trying to fix CI failures. Automatic CI fix dispatches are now paused for this PR.

Next steps: A human should review the recent commits and resolve the conflicting CI errors manually.

@MelvinBot

Copy link
Copy Markdown
Contributor Author

🤖 I updated the QA Steps section of the PR description with your steps. I kept the "Verify that no errors appear in the JS console" checkbox below them.


view run

@MelvinBot

Copy link
Copy Markdown
Contributor Author

Fixed the failing checks by merging the latest main into this branch (fdc7549). typecheck and all 8 test jobs now pass.

  • typecheck: The reportDrafts errors in tests/actions/IOUTest/SplitTest.ts came from main. main now has the fix ("fix ts error on main").
  • test (job 7): IOURequestStepConfirmationPageTest.tsx failed. This PR doesn't touch that file, and it passes after the merge.

Check independent approval still fails because the PR needs a review. Native builds and validate-perf-tests are still running.


view run

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

good for product

amyevans
amyevans previously approved these changes Oct 14, 2026

@amyevans amyevans 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, there is a conflict to fix though please @truph01

@truph01

truph01 commented Oct 14, 2026

Copy link
Copy Markdown
Contributor

@MelvinBot Please fix conflicts

…aOnSearchEditMultiple

Co-authored-by: truph01 <truph01@users.noreply.github.com>

# Conflicts:
#	tests/ui/SearchEditMultiplePageTest.tsx
@MelvinBot

Copy link
Copy Markdown
Contributor Author

I fixed the merge conflict by merging main into this branch (859926d).

The only conflict was in tests/ui/SearchEditMultiplePageTest.tsx. Both sides added separate test cases at the end of the file, so I kept both:

  • This PR's three tests for fetching policy categories and tags.
  • main's new test, keeps Merchant editable when a selected expense on the open report has no IOU action.

No source files conflicted. I couldn't run Jest in my environment, so CI will confirm the tests pass.


view run

@amyevans
amyevans merged commit 04dc59a into main Oct 14, 2026
55 of 77 checks passed
@amyevans
amyevans deleted the claude-fetchPolicyDataOnSearchEditMultiple branch October 14, 2026 19:31
@github-actions

Copy link
Copy Markdown
Contributor

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

@OSBotify

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.

@OSBotify

Copy link
Copy Markdown
Contributor

🚀 Deployed to staging by https://github.com/amyevans in version: 9.5.10-0 🚀

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

@MelvinBot

Copy link
Copy Markdown
Contributor Author

No help site update is needed. This bug fix makes the Category and Tag rows load as users already expect in Edit multiple, and no sentence in Edit Expenses becomes incorrect.


view run

@OSBotify

Copy link
Copy Markdown
Contributor

🚀 Deployed to staging by https://github.com/amyevans in version: 9.5.12-0 🚀

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

@MelvinBot

Copy link
Copy Markdown
Contributor Author

No help site update is needed. This bug fix makes the Category and Tag fields appear in Edit multiple as users already expect, and Edit Expenses already describes them that way.


view run

@OSBotify

Copy link
Copy Markdown
Contributor

🚀 Deployed to production by https://github.com/cristipaval in version: 9.5.12-1 🚀

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

Bundle Size Analysis (Sentry):

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Melvin-Test-Android Melvin-Test-Web Triggers Melvin to run the testing steps of the PR on web

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants