Repository navigation
Support GL codes for dependent multi-level tags - #100885
Conversation
Send parentTagsFilter when updating tag GL codes so duplicate tag names resolve correctly, and fix post-save navigation for level 1+ tags by popping the stack instead of rebuilding the route. $ Expensify#98488
Codecov Report❌ Looks like you've decreased code coverage for some files. Please write tests to increase, or at least maintain, the existing level of code coverage. See our documentation here for how to interpret this table.
|
Add eslint-disable comments for Onyx record keys Roadshow-1 and GL Code in the dependent tag GL code test.
Build Roadshow-1 and GL Code via bracket assignment instead of eslint-disable comments, matching other SetPolicyTagGLCode tests in PolicyTagTest.
Type engineeringRoadshowTag as PolicyTag so bracket assignment to GL Code passes TypeScript.
|
@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] |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 67b2d4d5fe
ℹ️ 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".
Addresses CONSISTENCY-3 review feedback by deduplicating parentTagsFilter query param construction.
|
Working on the checklist and recordings for all platforms. The failing tests appear to be unrelated to this PR; will try re-triggering the CI. |
dylanexpensify
left a comment
There was a problem hiding this comment.
Looks good from a product perspective 👍
Accept main's Rules-revamp tag UI cleanup while preserving appendParentTagsFilter navigation for dependent tags.
|
@DylanDylann Friendly bump, thanks!! |
|
@neerajbachani Could you point out which bug we're resolving here? I'm no longer able to reproduce the original bug and I tried the test steps from the PR description on both this PR and the main branch, but I didn't see any difference |
|
Hi @DylanDylann thanks for checking. The bug is specific to dependent multi-level tags (not independent multi-level tags), so the repro depends on importing the CSV with the right settings. Bug we're fixing (#98488)On main, after importing dependent multi-level tags with GL columns, you can open tag settings for State / Region / City, but the GL code row is not tappable ( This PR unblocks GL code editing for dependent tags, passes Repro steps (please use the CSV from the PR description)
Where to see the difference
On main: the GL code row appears (values from CSV) but is not clickable — you can't open the edit screen or change the value. Screen.Recording.2026-09-15.at.3.59.09.PM.movOn this PR: the GL code row is tappable, you can edit and save, and after save you return to tag settings (no NotFound) with the updated value shown. Screen.Recording.2026-09-11.at.1.43.47.AM.online-video-cutter.com.mp4End-to-end check
If you tested with independent multi-level tags, or without the CSV + settings above, main and this branch can look the same. The bug only shows up with dependent tags imported this way. |
I think this is more of an expected behavior rather than a bug 😃 I also tried reproducing the same issue with the category GL code, but wasn’t able to reproduce it there either. We can confirm the expected behavior with the Product team, and if they feel this needs to be changed, we can cover it in a follow-up PR |
I think we should fix this bug here as well, to make it consistent and ensure it works in the entire flow. I don't believe this would add much extra workload |
Settings URL already carries parentTagsFilter via queryParams registration. buildDynamicRoute inherits it from the base path, so appending again in navigateToEditGlCode caused createDynamicRoute to throw on duplicate keys.
Done. |
Agreed, keeping it in this PR. queryParams: ['parentTagsFilter'] is already on the four tag settings/GL routes so back/reload round-trip the filter. The crash fix above is the missing piece so the full flow is consistent. |
|
Not Found page displays after reloading and clicking the back button Screen.Recording.2026-09-22.at.17.14.20.mov |
|
@MelvinBot Could you review this PR carefully? |
|
Reviewed statically against 🔴 The NotFound-after-reload
|
Registering the filter on the GL routes made suffix stripping delete the only copy, so dependent tags showed NotFound after reload and back. The form now waits for the tag entry so a cold load cannot save an empty GL code.
|
@MelvinBot Thanks, the NotFound-after-reload diagnosis is right. That is why State survived and Region/City did not. Level 0 tags have no parent filter and are keyed by name, so California still resolves after the param is gone. Region and City are same-named children under different parents, so Fixed by removing Also stopped the GL form from mounting until the tag entry exists, so a cold load no longer seeds Left the workspace On the smaller notes: the early return in |
Thanks @DylanDylann for flagging this, It's fixed now |
|
@neerajbachani How about this? #100885 (comment)
|
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppScreen.Recording.2026-09-25.at.12.28.13.movAndroid: mWeb ChromeScreen.Recording.2026-09-25.at.12.28.56.moviOS: HybridAppScreen.Recording.2026-09-25.at.12.27.50.moviOS: mWeb SafariScreen.Recording.2026-09-25.at.12.28.36.movMacOS: Chrome / SafariScreen.Recording.2026-09-25.at.12.24.01.mov |
@DylanDylann commented the repro steps here #100885 (comment) The NotFound I hit was right after Save or Back, with no reload.
Repro on the old Workspace |
|
@neerajbachani Step 9 looks unrelated to this change
|
@DylanDylann updated |
|
🚧 blimpich has triggered a test Expensify/App build. You can view the workflow run here. |
|
🧪🧪 Use the links below to test this adhoc build on Android, iOS, and Web. Happy testing! 🧪🧪
|
|
🚀 Deployed to staging by https://github.com/blimpich in version: 9.4.95-0 🚀
|
|
Yes, help site changes are needed. I created a draft PR: Docs updates for E/A#100885 Add GL code steps for dependent multi-level tags. It updates Create and Manage Expense Tags to:
I added the @neerajbachani, please review the linked help site PR and confirm it reflects the current behavior. Then mark the linked help site PR |
|
🚀 Deployed to production by https://github.com/Julesssss in version: 9.4.95-4 🚀
|



Explanation of Change
Dependent multi-level tags can have GL codes at each level (same as independent tags), but the workspace tag settings flow could not resolve or update them correctly when duplicate display names exist under different parents.
This PR:
findPolicyTagEntryByParentFilterto resolve the correct tag record (and Onyx storage key) usingparentTagsFilterparentTagsFilterwithUpdatePolicyTagGLCodeso the backend updates the correct dependent taghasDependentTagswas true)parentTagsFilterthrough tag list → settings → GL code navigationparentTagsFilterand showing NotFound even though the GL code saved successfullyThe “Show GL codes when selecting a tag” toggle in Tags → More → Settings remains visible and unchanged — dependent tags are expected to support GL codes when that setting is enabled.
Fixed Issues
$ #98488
PROPOSAL:
Tests
multi-level-dependent-tags-with-gl-codes.csv
(see QA import settings below)
Offline tests
QA Steps
Import settings:
Use a dependent multi-level CSV with GL columns (e.g. State / State GL / Region / Region GL / City / City GL) or simply use this file
multi-level-dependent-tags-with-gl-codes.csv
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.Screenshots/Videos
Android: Native
Screen.Recording.2026-09-11.at.2.39.40.PM.online-video-cutter.com.mp4
Android: mWeb Chrome
Record_2026-09-11-15-30-27.online-video-cutter.com.mp4
iOS: Native
Screen.Recording.2026-09-11.at.2.16.49.PM.online-video-cutter.com.mp4
iOS: mWeb Safari
Screen.Recording.2026-09-11.at.2.19.45.PM.online-video-cutter.com.mp4
MacOS: Chrome / Safari
Screen.Recording.2026-09-11.at.1.43.47.AM.online-video-cutter.com.mp4