You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Due for payment 2026-09-17] [Batch 1] Refactor ConfirmModal usage to useConfirmModal in simple user-triggered confirms (7 modals) #100151
ConfirmModal is deprecated. These seven call sites are the simplest of the remaining inventory — every one is triggered by a discrete user action and its confirm/cancel handlers map cleanly onto the CONFIRM / CLOSE actions returned by showConfirmModal().
Acknowledgement-only. Identical prop shape to the already-migrated call at IOURequestEditReportCommon.tsx:284. The isUpgradeWarningModalOpen state and its handler become dead code.
Same file already migrated one call. showConfirmModal is not referentially stable — don't silently drop it from the validatePerDiemMoveuseCallback dep array.
Near-identical migrated precedent at WorkspaceMembersPage.tsx:273 — same bulk-selection dropdown, same shouldSkipFocusRestore: true. Note the effect at :55 clears selectedRules on Onyx change; the .then() closure will hold the pre-open selection.
Structurally identical to the row above (removeFromRoom + goBack). Migrate both together.
Shared gotchas
These apply to every batch of this migration — full write-up in this analysis.
Delete onBackdropPress, never forward it. The wrapper omits only onConfirm/onCancel/isVisible, so onBackdropPress spreads to BaseModal, which prefers it over onClose — handleCancel then never runs, the modal never hides, and the promise never resolves.
shouldHandleNavigationBack silently flips undefined → true (useConfirmModal.ts:17). Pass it explicitly where the old behavior matters.
A global ENTER shortcut gets registered (ConfirmModalWrapper.tsx:66). For the two DANGER remove-member modals in this batch, that makes Enter a one-keystroke destructive confirm where it previously wasn't.
closeModal() is not id-scoped — it pops whatever is on top of the stack.
Props become a snapshot taken at show time, not a live-updating binding.
Acceptance criteria
All seven instances use useConfirmModal(); no ConfirmModal import remains in these files.
Confirm, cancel, backdrop, focus-management and navigation behavior are unchanged.
Existing relevant tests pass; coverage added or updated where needed.
Draft PR created: #100285 — all seven modals migrated. Please mark it "Ready for review" when it's ready.
Each site swaps a declarative <ConfirmModal isVisible={...}> plus its useState flag for an imperative showConfirmModal() call in the handler that used to flip that flag. config/eslint/eslint.seatbelt.tsv drops the seven now-resolved no-deprecated/ConfirmModal entries.
Three things worth your review:
shouldHandleNavigationBack is left at the hook's default (true) for the six sites that never passed it. This is a real delta — browser back now dismisses the dialog instead of navigating away. I went this way rather than pinning false because the global modal is rendered by ModalProvider and outlives the page that opened it, so false would leave an orphaned dialog on top of the next screen. It also matches the already-migrated acknowledgement modal at IOURequestEditReportCommon.tsx:284, which the issue cites as the precedent for DynamicIOURequestStepUpgrade. Say the word if you'd rather have strict prop-for-prop preservation.
ExpenseRulesPage captures the selection at show time. As the issue predicted, the .then() closure holds the pre-open selection. handleDeleteRules now takes the rule list as a parameter to make that explicit rather than implicit.
The ENTER shortcut on the two DANGER remove-member dialogs. Enter is now a one-keystroke destructive confirm where it previously wasn't. That's inherent to ConfirmModalWrapper and consistent with the already-migrated WorkspaceMembersPage remove-members dialog, but it is a behavior change.
No onBackdropPress existed on any of the seven, so that hazard didn't apply.
Checks run locally:typecheck, lint-changed, spell-changed, and react-compiler-compliance-check all pass. tests/ui/IOURequestEditReportCommonTest.tsx is the only suite in the repo touching any of these seven files — 7/7 pass, including one case I added asserting the per diem move warning goes through showConfirmModal and that selectReport isn't called.
Browser verification did not run. The CI web session came up on a blank page (0 DOM nodes, no network activity) and couldn't be recovered without a reload, which the harness forbids. That looks like test-infra rather than these changes — the dev server had already compiled three of the touched routes — but I couldn't confirm it either way. The manual Tests / QA sections still need a human pass, so please click through the confirm/cancel paths before marking ready.
changed the title [-][Batch 1] Refactor ConfirmModal usage to useConfirmModal in simple user-triggered confirms (7 modals)[/-][+][Due for payment 2026-09-17] [Batch 1] Refactor ConfirmModal usage to useConfirmModal in simple user-triggered confirms (7 modals)[/+]on Sep 10, 2026
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.4.75-3 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:
If no regressions arise, payment will be issued on 2026-09-17. 🎊
The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the Contributor+ Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button]. If no checklist is needed for this issue, you can click: [no checklist button]
Activity
ZhenjaHorbach commentedon Sep 3, 2026
@MelvinBot
Create a PR to migrate modals from the issue description
MelvinBot commentedon Sep 3, 2026
Draft PR created: #100285 — all seven modals migrated. Please mark it "Ready for review" when it's ready.
Each site swaps a declarative
<ConfirmModal isVisible={...}>plus itsuseStateflag for an imperativeshowConfirmModal()call in the handler that used to flip that flag.config/eslint/eslint.seatbelt.tsvdrops the seven now-resolvedno-deprecated/ConfirmModalentries.Three things worth your review:
shouldHandleNavigationBackis left at the hook's default (true) for the six sites that never passed it. This is a real delta — browser back now dismisses the dialog instead of navigating away. I went this way rather than pinningfalsebecause the global modal is rendered byModalProviderand outlives the page that opened it, sofalsewould leave an orphaned dialog on top of the next screen. It also matches the already-migrated acknowledgement modal atIOURequestEditReportCommon.tsx:284, which the issue cites as the precedent forDynamicIOURequestStepUpgrade. Say the word if you'd rather have strict prop-for-prop preservation.ExpenseRulesPagecaptures the selection at show time. As the issue predicted, the.then()closure holds the pre-open selection.handleDeleteRulesnow takes the rule list as a parameter to make that explicit rather than implicit.DANGERremove-member dialogs. Enter is now a one-keystroke destructive confirm where it previously wasn't. That's inherent toConfirmModalWrapperand consistent with the already-migratedWorkspaceMembersPageremove-members dialog, but it is a behavior change.No
onBackdropPressexisted on any of the seven, so that hazard didn't apply.Checks run locally:
typecheck,lint-changed,spell-changed, andreact-compiler-compliance-checkall pass.tests/ui/IOURequestEditReportCommonTest.tsxis the only suite in the repo touching any of these seven files — 7/7 pass, including one case I added asserting the per diem move warning goes throughshowConfirmModaland thatselectReportisn't called.Browser verification did not run. The CI web session came up on a blank page (0 DOM nodes, no network activity) and couldn't be recovered without a reload, which the harness forbids. That looks like test-infra rather than these changes — the dev server had already compiled three of the touched routes — but I couldn't confirm it either way. The manual
Tests/QAsections still need a human pass, so please click through the confirm/cancel paths before marking ready.view run
melvin-bot commentedon Sep 8, 2026
Unable to auto-create job on Upwork. The BZ team member should create it manually for this issue.
[-][Batch 1] Refactor ConfirmModal usage to useConfirmModal in simple user-triggered confirms (7 modals)[/-][+][Due for payment 2026-09-17] [Batch 1] Refactor ConfirmModal usage to useConfirmModal in simple user-triggered confirms (7 modals)[/+]melvin-bot commentedon Sep 10, 2026
@ZhenjaHorbach
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.4.75-3 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:
If no regressions arise, payment will be issued on 2026-09-17. 🎊
The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the Contributor+ Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button]. If no checklist is needed for this issue, you can click: [no checklist button]
ZhenjaHorbach commentedon Sep 14, 2026
@roryabraham
Let's close this
I think we can handle the payment in the parent issue