Skip to content

refactor(webui): rebuild modal-box dialog interiors on Mantine Modal - #1178

Merged
jatmn merged 2 commits into
mainfrom
refactor/mantine-modal-interiors-1135
Dec 4, 2026
Merged

jatmn merged 2 commits into
mainfrom
refactor/mantine-modal-interiors-1135

Conversation

@jatmn

@jatmn jatmn commented Dec 4, 2026 •

Copy link
Copy Markdown
Owner

Closes #1135

Summary

  • Rebuilds all six settings and record dialog interiors (RuleEditor, CustomRuleEditor, OnboardingTrapEditor, CommandEditor, CaseView, BanDialog) in frontend/app.js onto Mantine Modal compound parts (Modal.Header, Modal.Title, Modal.CloseButton, Modal.Body) plus a shared pinned .sf-modal-footer via ModalDialogShell and modalSizeFor.
  • Deletes retired .modal-overlay, .modal-box, and duplicate .modal-action rules from frontend/style.css and replaces them with a single Sentinel-themed Mantine modal rule set that covers portal heading typography, 24px close-button target sizing, :focus-visible outlines, Light/Dark contrast, and narrow/enlarged-text wrapping.
  • Preserves existing FocusTrap.InitialFocus, Escape, outside-dismiss, canLeave/closeOverlay dirty-leave checks, draft tracking, busy-state disabling, and save/delete/cancel flows.
  • Updates scripts/package-webui-test.mjs, scripts/frontend-contrast-test.mjs, and scripts/frontend-state-test.mjs with regression coverage for Mantine Modal structure, sizing, contrast, and close/dirty-leave semantics across all six dialogs.

Validation

  • Reviewed SHA: bba4928e07b4cff3e02bd469ddb31a6073145b62
  • bash scripts/ci-preflight.sh --only frontend — PASS
    • tools/webui install, audit (0 vulnerabilities), and build
    • tools/eslint install, audit (0 vulnerabilities), selftest, flake test (10/10)
    • scripts/frontend-state-test.mjs (636/636, JSDOM + real headless Firefox in Light/Dark, narrow 360×640 at 32px root font, and CaseView layout)
    • scripts/frontend-contrast-test.mjs (44/44)
    • scripts/frontend-warmup-test.mjs (13/13)
    • scripts/frontend-sr-only-test.mjs (1/1)
    • scripts/package-webui-test.mjs (4/4)
    • scripts/administration-state-test.mjs (42/42)
  • git diff --check — PASS
  • Simulated boundaries: Node/JSDOM suites simulate DOM/API calls; headless Firefox tests exercise real browser rendering against the built dist/frontend/ bundle. Rust checks are covered by hosted CI.

Summary by Sourcery

Standardize the six settings and record dialogs on Mantine Modal components with a shared, accessible layout.

Enhancements:

  • Rebuild six settings and record dialogs with Mantine modal structure and a shared pinned footer, while retaining their existing editing and dismissal behavior.
  • Apply dialog-specific sizing and Sentinel-themed styling with accessible close-button targets, visible focus indicators, theme contrast, and responsive wrapping.
  • Remove the retired modal overlay, box, and action styles from the frontend.

Tests:

  • Add regression checks for modal structure, sizing, theme contrast, close behavior, and dirty-leave prompts across the dialogs.

@jatmn
jatmn marked this pull request as ready for review December 4, 2026 07:30
@sourcery-ai

sourcery-ai Bot commented Dec 4, 2026

Copy link
Copy Markdown

Sorry @jatmn, this account has used its review budget of 1,500,000 diff characters for the last 7 days.

You can request another review in 13 hours and 9 minutes by commenting @sourcery-ai review. Upgrade to get a review now.

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

Important

The shared shell introduces two accessibility regressions. The case body becomes unreadable at enlarged text on a phone-sized viewport, and the modal exposes the entire body as its accessible description.

Approach The shared Mantine shell fits the six dialogs and keeps dismissal on the existing overlay handler. The layout needs to keep content reachable when the header and footer wrap.

Reviewed changes I reviewed all five changed files and ran the WebUI build, focused modal and case tests, contrast checks, and packaging checks. I also compared the case layout on the PR and base builds in Firefox.

  • Dialog structure The three rule editors, command editor, case view, and ban dialog use shared Mantine slots and a common action footer.
  • Styling and packaging Sentinel tokens theme the modal slots, and the package checks cover the removal of the old modal classes.
  • Interaction coverage The updated state tests exercise the dialog structure, dismissal, and dirty-leave prompts.

Pullfrog  | Fix all ➔ | Fix 👍s ➔ | View workflow run | Using gpt-6.2-sol | 𝕏

Comment thread frontend/style.css Resolved
Comment thread frontend/app.js Resolved
pullfrog[bot]
pullfrog Bot previously approved these changes Dec 4, 2026

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

✅ No new issues found.

Reviewed changes

I reviewed 4f6edbf and verified both accessibility fixes from the prior review.

  • Moved scrolling to the whole dialog on short viewports. In Firefox at 360×640 and 667×375 with a 32px default font, I could Tab through the case details and footer actions and back to Close.
  • Kept the dialog title as the accessible name. The shared body now uses a plain container, so Mantine omits aria-describedby for the structured content.
  • Added regression coverage for both fixes. The WebUI build and focused dialog state, Firefox reflow, contrast, and packaging checks passed. The Firefox checks used local API fixtures.

Pullfrog  | View workflow run | Using gpt-6.2-sol | 𝕏

@jatmn
jatmn force-pushed the refactor/mantine-modal-interiors-1135 branch from 4f6edbf to 204d5f9 Compare December 4, 2026 08:01

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

✅ No new issues found.

Reviewed changes

I compared 204d5f9 with the previously reviewed 4f6edbf. The WebUI build and all 49 packaging and contrast checks passed.

  • Rebased onto the Sentinel card migration. The inline rule heading uses sf-card-title, the shared focus rule retains .table-scroll, and the package checks cover both Paper and Modal styles.
  • Preserved both dialog accessibility fixes. Short viewports still scroll the full dialog, and structured bodies stay out of aria-describedby.

Pullfrog  | View workflow run | Using gpt-6.2-sol | 𝕏

@jatmn
jatmn merged commit 82f92d6 into main Dec 4, 2026
17 of 18 checks passed
@jatmn
jatmn deleted the refactor/mantine-modal-interiors-1135 branch December 4, 2026 08:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

refactor(webui): rebuild modal-box dialog interiors on Mantine Modal

1 participant