Skip to content

Replace the WebUI component stack with Mantine - #1096

Merged
jatmn merged 5 commits into
mainfrom
webui/mantine
Dec 1, 2026
Merged

jatmn merged 5 commits into
mainfrom
webui/mantine

Conversation

@jatmn

@jatmn jatmn commented Dec 1, 2026 •

Copy link
Copy Markdown
Owner

What changed

Replace the WebUI component stack with Mantine across the server workspace and owner Administration. Remove daisyUI and Headless UI from the dependency graph and from both published entry pages.

  • Use Mantine for the shared panels, buttons, badges, tables, filters, and editor dialogs. Workspace editors keep native controls and explicit label associations. Mantine handles dialog focus, Escape, and dismissing the dialog from outside.
  • Keep Light, Dark, and System appearance with jModGuard’s pale-blue and navy palette. App CSS keeps the existing compact workspace, responsive layouts, and chart styles.
  • Use the existing Rust API and React controllers for Discord sign-in, access checks, Analytics, and configuration writes. The static asset names and release packaging stay the same for embedded and separately hosted deployments.

Verification

  • Frontend preflight and Firefox regressions cover navigation after changing Analytics metrics, Automod buttons, editor focus and Escape, long case dialogs, both palettes, and draft and save behavior.
  • Contracts and Rust formatting checks passed.
  • A clean Bun 1.4.5 install and build passed. The packaging tests verify the two entry pages, runtime split, license notices, and removal of the former libraries from the lockfile and browser assets.
  • A local Rust smoke test served the built assets, then read guild configuration, all three Analytics ranges, and Administration status with sample data.

Reviewed head 94d9df0657b5202991b61868767ab9401150d595.

Summary by Sourcery

Replace the WebUI’s former component libraries with Mantine while preserving its existing appearance and workspace behavior.

New Features:

  • Add an Analytics control to show all enforcement metrics or focus on one selected metric.

Enhancements:

  • Replace the WebUI component stack with Mantine across the workspace and owner Administration while retaining the Light, Dark, and System appearance options and compact responsive layouts.
  • Use Mantine dialogs for workspace editors, including focus management, Escape handling, and outside dismissal, while keeping native editor controls and explicit label associations.

Build:

  • Replace daisyUI and Headless UI with Mantine dependencies and bundle Mantine styles and runtime into the existing published assets.
  • Add the upstream license notice for react-remove-scroll-bar, whose locked package omits a license file.

Documentation:

  • Update WebUI architecture, build, appearance, and deployment documentation for Mantine and document the Bun build command.

Tests:

  • Update frontend and packaging checks for Mantine, including Analytics metric changes, Automod actions, dialog behavior, theme synchronization, emitted components, licenses, and removal of retired UI libraries.

Chores:

  • Remove the obsolete Headless UI component adapter and add a Mantine component export module and the react-remove-scroll-bar license text file.

BEGIN_COMMIT_OVERRIDE

feat(webui): replace the WebUI component stack with Mantine (#1096)

END_COMMIT_OVERRIDE

@socket-security

socket-security Bot commented Dec 1, 2026 •

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Addednpm/​@​mantine/​hooks@​9.8.31001008196100
Addednpm/​@​mantine/​core@​9.8.3991008396100

View full report

@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

Changing the Analytics metric prompts users to discard unsaved changes. The shared stylesheet also strips the base styling from the migrated Mantine buttons.

Approach The staged Mantine migration fits the existing WebUI architecture and keeps the API controllers and accessible SVG charts in place.

Reviewed changes I reviewed the Analytics filter and charts, Automod and Administration controls, shared appearance, and static asset build.

  • Analytics. The enforcement chart can show one metric using the existing summary data. Membership and the heatmap stay visible.
  • Automod and Administration. Mantine provides the cards, badges, editor sections, and selected actions.
  • Theme and packaging. Both entry points share the appearance provider, component styles, and bundled dependency notices.

The locked npm build and 91 targeted checks passed, including the Firefox Analytics layout test. I reproduced both findings in Chromium with fixture data.

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

Comment thread frontend/app.js Resolved
Comment thread tools/webui/style.css Resolved
@jatmn jatmn self-assigned this Dec 1, 2026
pullfrog[bot]
pullfrog Bot previously approved these changes Dec 1, 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. Both findings from the previous review are fixed.

Reviewed changes I reviewed the follow-up commit ab7b09e.

  • Excluded the Analytics filter from draft tracking. Changing the enforcement metric now lets users leave Analytics without a discard prompt.
  • Restored Mantine button styling. The shared stylesheet loads the reset before the component rules, so the button variants retain their padding, backgrounds, and borders. Mantine stylesheet import order
  • Added a Firefox regression. It changes the enforcement metric, navigates to Automod, and checks both page actions’ computed styles. The regression and the existing Analytics layout test passed in frontend CI.

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

@jatmn jatmn changed the title Adopt Mantine for WebUI analytics and Automod Replace the WebUI component stack with Mantine Dec 1, 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.

ℹ️ One minor styling regression is noted inline.

Approach Completing the migration through the shared provider keeps the API and draft controllers in place.

Reviewed changes I reviewed commit 94d9df0 against the previously reviewed head, ab7b09e.

  • Migrated remaining workspace and Administration controls. Mantine now renders the shared buttons, badges, panels, and tables, with app CSS handling control dimensions and states.
  • Replaced editor dialogs and field wrappers. Mantine handles dialog focus and dismissal, and native controls use explicit label associations.
  • Removed daisyUI and Headless UI from the build. Both entry pages retain their asset names, shared runtime, and dependency notices.
  • Extended regression coverage. The locked build and focused local checks passed, including the Firefox editor and narrow-screen case tests. The combined local run reached its two-minute limit. Frontend CI passed at the reviewed head.

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

Comment thread frontend/style.css Resolved

@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 restored accent color makes links in light-mode template subtext fall below the 4.5:1 contrast target.

Reviewed changes

I reviewed 546d310 against the previously reviewed head, 94d9df0.

  • Restored template preview link color. Markdown links use the shared accent color and retain their underline.
  • Added light and dark contrast coverage. The test checks the link color against the preview background in both themes. All 29 tests in scripts/frontend-contrast-test.mjs passed. A Chromium fixture using the production parser and styles reproduced the subtext regression.

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

Comment thread frontend/style.css Resolved

@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. Template preview subtext and links meet the 4.5:1 contrast target in both themes.

Reviewed changes I reviewed 11bc964 against the previous review at 546d310.

  • Restored subtext contrast. Discord -# lines use the muted text color at full opacity. Links inside them keep their accent color and reach 4.96:1 in light mode and 7.28:1 in dark mode.
  • Extended regression coverage. All 29 contrast tests and 44 focused Markdown preview tests passed, including the new case for a link inside a -# line. The mounted preview tests verify the rendered HTML using jsdom.

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

@jatmn
jatmn marked this pull request as ready for review December 1, 2026 01:31
@sourcery-ai

sourcery-ai Bot commented Dec 1, 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 1 day and 2 hours by commenting @sourcery-ai review. Upgrade to get a review now.

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.

1 participant