Skip to content

web: replace Dialog, useConfirm and the useDialog* hooks with MUI Dialog #827

Closed

Description

@mforce

Part of #674. ~640 lines: Dialog.tsx, useConfirm, and the four useDialog* hooks.

Carry the evidence from the spike

Branch spike/674-base-ui ported Dialog onto a headless primitive on 2026-09-13: 338 -> 240
lines, typecheck clean, all style guards green — and 82 tests red across 16 files.

Nearly all of those failures asserted the old mechanism rather than a broken guarantee:
body.style.overflow === "hidden", inert on the container, aria-modal present. A probe
confirmed the behaviour itself was intact — focus landed on the first field, the background left the
accessibility tree — the library simply reaches the same end differently.

So the risk here is not the port. It is the test rewrite. Rewriting a guard to match a new
mechanism is exactly where an earned guarantee gets silently lost.

Required of this slice

Every rewritten test names the issue whose guarantee it protects:

inert and scroll lock cannot be settled in jsdom and need Playwright, per #501.

Activity

  1. added
    sliceThin vertical work item
    epic-674SPA revamp — field-first phone, ledger desktop (#674)
    on Sep 13, 2026
  2. added this to the SPA revamp milestone on Sep 13, 2026
  3. mforce commented on Sep 16, 2026

    @mforce
    OwnerAuthor

    Note from #829 (2026-09-16): the phone More menu is still rendered through the current Dialog component. #883 converted the tab bar to BottomNavigation but left More on the existing dialog because this slice had not landed, so the design doc's D2 pair 13 question (More as SwipeableDrawer anchor="bottom" versus keeping it on MUI Dialog after #827; §7 owner-review row) is still open and lands here or in a follow-up once Dialog is MUI. BottomNav.tsx's fifth slot carries aria-haspopup="dialog", aria-expanded and aria-current; whichever component More becomes must keep those three, and anyDialogOpen() must be re-checked for #485 if More leaves Dialog.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:frontendReact/Vite web clientepic-674SPA revamp — field-first phone, ledger desktop (#674)phase:2-controlsRetire the hand-built controlspriority:tier2High value, low risksliceThin vertical work item

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions