Repository navigation
Description
🤖 Kit (jatmn's assistant agent)
Umbrella for the post-redesign Web UI cleanup. Dustin asked that unused libraries, leftover CSS, and first-party stand-ins be removed after the redesign, then that the work be split: easy deletes vs the reworks that switch us onto Mantine / Sentinel.
The detailed audit (five passes, counts, and switch-over table) is in this comment, from a read-only look at main at de66727. There are no leftover daisyUI, Headless UI, or chart/icon packages to uninstall; the bloat is first-party skins and unsynced theme plumbing left after #1096.
This issue no longer holds that work itself. Each child below is self-contained. #1130 can be done now. The reworks can also start, but must follow the order notes so they do not fight #1123, #1125, or #1126. None of the children replace #1123's page-by-page restyle; they only switch shared primitives.
Order
- #1130 — delete already-dead CSS/JS (no dependencies).
- Prefer #1136 (token/reset consolidation) before, or tightly coordinated with, fix(webui): rework the dark mode color palette for contrast and navigation #1125 (dark palette) and fix(webui): increase the overall UI scale slightly #1126 (scale), so those issues edit one mapped theme instead of two. If fix(webui): rework the dark mode color palette for contrast and navigation #1125 or fix(webui): increase the overall UI scale slightly #1126 lands first, refactor(webui): consolidate theme tokens and CSS resets onto Mantine #1136 must map the tokens they settled and must not revert them.
- #1131 (buttons) should land before fix(webui): rework the dark mode color palette for contrast and navigation #1125 tunes button affordance, or fix(webui): rework the dark mode color palette for contrast and navigation #1125 should tune Mantine
Buttonrather than the daisy.btnsheet. - #1133 (cards) and #1135 (modal interiors) coordinate with fix(webui): apply redesign styling to remaining pages and settings dialogs #1123: one card language (
Paper+.sf-card) and one dialog structure (Mantine Modal parts). Do not restyle every remaining page or dialog a second time. - #1132 (form controls), #1134 (toast / InfoTip), and #1137 (shared tables) are independent of fix(webui): apply redesign styling to remaining pages and settings dialogs #1123 and can proceed in parallel. Form control heights should use the same scale tokens as fix(webui): increase the overall UI scale slightly #1126.
Children
- #1130 —
chore(webui): delete already-dead CSS and JS - #1131 —
refactor(webui): switch daisy-era buttons to Mantine Button - #1132 —
refactor(webui): switch form controls to Mantine inputs - #1133 —
refactor(webui): replace daisy card stacks with Sentinel Paper cards - #1134 —
refactor(webui): replace custom toast and InfoTip with Mantine Notifications and Tooltip - #1135 —
refactor(webui): rebuild modal-box dialog interiors on Mantine Modal - #1136 —
refactor(webui): consolidate theme tokens and CSS resets onto Mantine - #1137 —
refactor(webui): switch DataTable zebra styles to Mantine Table
Not filed as separate issues (smaller or entangled; pick up here or in a child if convenient): leftover daisy .badge classes (24 uses; 33 call sites already use Mantine Badge), ServerPicker / .menu vs Mantine Select (coordinate with #1122), .sf-tri vs SegmentedControl, LetterAvatar vs Avatar, and the no-op color-scheme manager (covered in #1136 if touched at all). Do not replace the first-party charts or the #588 icon set.
Final step (this issue)
After the children above are merged (and #1123 has landed, so leftover page CSS from the restyle is also eligible):
- Prune unused first-party CSS/JS, unused Mantine CSS layers and
tools/webui/mantine.jsexports, and anything the restyle or switch-over PRs added and then abandoned. - Prune
tools/webui/package-lock.jsonafter anypackage.jsonchange; keep exact version pins. Do not remove@mantine/hooks(required peer). Lockfile-only transitives that never appear in the bundle (react-number-format, some@floating-ui/*packages) stay unless Mantine no longer depends on them. - Update
scripts/package-webui-test.mjsso it no longer requires retired daisy widgets in the built CSS, and updatedocs/WEBUI.mdif the dependency table changes. - Report published JS and CSS bundle sizes before and after, from the built assets and
dist/webui-metafile.json.
Acceptance criteria (umbrella)
- Every child is done or explicitly dropped with a reason.
- The final prune step is complete: no unused deps or dead CSS/JS left from this cleanup, build and tests pass, no visual regressions in Light / Dark / System.
- Bundle size is reported before and after.
- Removals follow the latest-upstream rule: official published packages only, no forks or patches.
Activity
jatmn commentedon Dec 3, 2026
🤖 Kit (jatmn's assistant agent)
Follow-up from Dustin (2026-12-02, 11:40–11:42 PM PT): dig for libraries, CSS, and elements we still carry even though a newer library already provides them, and switch over so we can drop the old copies. Run several independent audit passes — the Web UI has been restyled many times and is likely still carrying bloat.
Investigated read-only on
mainatde66727, including a localnpm ci --ignore-scripts --prefix tools/webui+npm run buildonly to readdist/webui-metafile.jsonand published asset sizes. No knip/depcheck package was added; the same checks were done with lockfile + import + metafile scans, unused-export grep, unused-CSS grep, and git history (-Sand the redesign merge commits). No code changes and no assignee.The large switch-over still belongs after #1121–#1126 (especially #1123). A small set of already-dead leftovers can be deleted in the same cleanup without waiting for behavior changes.
Pass-by-pass summary
1. Package / dependency pass
Current direct pins in
tools/webui/package.jsonare all used: React 19.3.1,@mantine/core+@mantine/hooks9.8.3 (hooks is a required peer; it also ships ~7.3KB inwebui-runtime.jseven though app code does not import it), and devDependenciesesbuild,es-module-lexer, andjsdom(build and tests).tools/eslint/is host-only and is not in the Web UI bundle.There is no second UI, chart, or icon npm package to delete today.
scripts/package-webui-test.mjsalready asserts that daisyUI, Headless UI, and TanStack are gone (retired in #1096).Published JS (esbuild
bytesInOutput): react-dom 209,844,@mantine/core108,476, react 8,913,@mantine/hooks7,353, scroll-lock helpers (react-remove-scrolland related) ~11KB, first-party 394,641. Disk:webui-runtime.js387,657 bytes,app.js380,930,administration.js30,625.Published CSS: 147,159 bytes total —
@mantine/corelayers 67,750,frontend/style.css60,286,frontend/controls.css5,522.Lockfile-only transitives that do not appear in the bundle at all:
react-number-format(Mantine NumberInput),@floating-ui/core,@floating-ui/dom,@floating-ui/react-dom. They stay while@mantine/coredepends on them; they are not a manual uninstall.@floating-ui/reactis emitted (small ScrollArea ref helper), which matches the existing package test.The bloat is not a pile of leftover npm libraries. It is first-party CSS/JS that still reimplements Mantine and leftover layers from earlier redesigns.
2. CSS pass
frontend/style.css(1,045 lines) +frontend/controls.css(147 lines) + selected Mantine layers intools/webui/style.css. 501 unique class selectors. Usage grep against JS/HTML/tests found 22 not mentioned literally; 14 of those are live dynamic names (an-heat-${n},icon-${intent},sf-tri-${mode},sf-infra-fill-${dbTone})..mantine-Badge-labelis a Mantine internal hook and should stay until Badge is fully themed.Already unreferenced (17 CSS lines, plus 2 more for the dead trend picker):
.platform-stats(8 lines)frontend/style.cssan-kpis/KpiTile.trend-card,.trend-picker,.trend-pick-active(3 lines)TrendMetricPickerleft behind after #612 / #626.nav-label(3 lines).action-row,.empty-state,.step-actions(4 lines).sf-dot-bad(1 line)sf-dot-warn/sf-dot-goodDuplicate / stacked layers (still live, but overlapping):
:root/:root[data-theme](--bg,--panel,--text,--accent, …) and Mantine CSS variables. Only 8 Mantine vars are mapped infrontend/appearance.js(webuiColors). Almost all app CSS still talks to--panel/--textdirectly. Extra local palettes:--ui-*and--radius-*incontrols.css(feat(webui): tighten global density to a desktop admin-console scale #599 / feat(webui): global density pass, desktop-sized UI scale across all pages #590),--an-*,--icon-*,--du-tone,--br-tone,--status-tone.--focusis mostly bypassed; the shared ring uses--accent, and--focusremains only on.an-figure svgand.pa-sort.frontend/style.css(* { box-sizing },html, bodymargin) andfrontend/controls.csstypography/form margin reset, plus already-imported@mantine/corebaseline.layer.cssandglobal.layer.css.controls.cssand extended again instyle.css:.btn,.input,.select,.textarea,.card/.card-body,.badge,.alert,.table,.toggle,.menu,.stat..modal-actionis defined twice instyle.css(lines 257 and 330).#1118restyled.dashboard-section .statson top of the older.dashboard-sectionblock instead of replacing it (lines 244–248 vs 908–914).@layer utilities { .rounded-box }and utilities.bg-base-100,.bg-base-200,.text-warning(the last has no JS hits).!importantrules (.hidden, a narrow-screen.fieldflex,.getting-startedborder,.case-notemargin,.rule-list-card.sf-wb-selectedborder). Not a pile, but they exist to win fights with earlier layers.3. JS / component pass
No unused frontend files. All of
appearance.js,state.js,list-controls.js,no-autofill.js,icons.js, andcharts.jsare imported. No dead workspace tabs: everyWORKSPACE_HUBStab has a page function. No feature flag that still mounts an old shell.Already-dead JS in
frontend/charts.js:TREND_METRICS,useTrendMetric, andTrendMetricPicker(~35 lines). Nothing infrontend/orscripts/imports them; they only exist for a picker the #612 / #626 redesign stopped rendering.ListPageSizeis used, but does not need to be exported.Custom UI that duplicates Mantine (still in use, high switch-over value): see the table below. Standout counts: 136
className: "btn…"vs 3 MantineButtoncall sites; 80toast()calls on a home-grown#toast+.alertstack; 49 customInput/ 5Select/ 7Textareawrappers (they areBox+ daisy classes, whileInput.layer.cssandCombobox.layer.cssare already in the CSS bundle); 7 customInfoTipimplementations (~50 lines +.info-tip*CSS); editors already sit inModal.Root/Modal.Content/FocusTrapbut still paint.modal-boxinteriors;DataTablealready wraps MantineTablebut still forcestable table-zebra.Domain logic to keep: draft/save (
useDraftControl,ActionButtonbusy path),noAutofill,createState/useStore, cursor/windowed list pagination (MantinePaginationis numeric pages and is a poor fit), first-party charts, and the #588 icon set (intentional; do not replace with Tabler just because Mantine often uses it). Platform analytics has a runtime “legacy” API fallback, and command delete-days has a “legacy” option — those are product behavior, not UI-library bloat.4. Git-history pass
Walked the redesign merges and
git log -Sfor leftover selectors:frontend/controls.css..nav-labelwithout deleting the CSS, introduced unused.sf-dot-bad, and left.login-card,.dashboard-section/.stats, andsidebarrules stacked undersf-*classes (the rail isclassName: "sidebar sf-rail")..modal-boxeditors in place (“Full editor”).TrendMetricPicker/.platform-stats/.trend-card, without deleting them..action-row,.empty-state, and.step-actions.Earlier page stacks that #1123 must replace, not just delete, also date from #587 (Analytics), #613 (Database Usage), #618 (Platform), #624–#625 (Cases/Bans), #649 (Audit log), and #652 (Bot Resources).
5. Assets pass
No image, SVG file, font file, or favicon lives under
frontend/ortools/webui/. Icons are hand-authored path data infrontend/icons.js; everyICON_PATHSentry is referenced fromNAV_ICONS/ACTION_ICONS/DASHBOARD_ICONS. Inter is named infrontend/style.cssand in the Mantine theme, but is not bundled or loaded from a CDN.vendor/is the Rusttokio-tungstenitecrate only. The APIembed-uifeature embeds the built frontend; it is not a leftover package. No unused static asset to delete today.Estimated removable size
controls.css5,522 bytes in the published CSS, 147 lines, plus overlapping.btn/.card/.modal-*/ utility rules instyle.cssstyle.css(Analytics, Platform, Usage, Resources, Cases, Bans, Audit)style.cssif the daisy sheet, dead rules, and unified page chrome go, before adding any new Mantine layers (Tooltip, Alert, Notifications, Switch, …)Adding official Mantine packages or extra CSS layers can claw back some of the CSS win. Measure before/after with
dist/webui-metafile.jsonand the publishedstyle.css/webui-runtime.jssizes.Overlap and switch-over
Switch to the official latest Mantine (or existing Sentinel tokens/components) and then delete the old copy. No forks or patches. Prefer theming Mantine to Sentinel tokens over keeping a parallel daisy-era skin. Do not rip out Sentinel hub pills / workbench chrome just to use unstyled Mantine Tabs — theme Mantine to Sentinel where it helps, or keep that chrome first-party.
main).btn,.btn-primary,.btn-sm, …)frontend/controls.css; 136 class uses; MantineButtonused only 3 times (Admin Refresh + two workbench actions). Theme already customizesButtoninfrontend/appearance.js.@mantine/coreButton(already in the bundle).btn*rules, including.btn-icon/.btn-squareonce icon buttons moveIconButtoninfrontend/app.js;.btn-iconinfrontend/style.css; 24 usesActionIconIconButtondefault daisy classes; keep#588IconSVGsInput/Select/Textarea(Box+ daisy classes, 49 / 5 / 7 uses).Input.layer.cssandCombobox.layer.cssalready ship. Appearance picker is also a native<select>. Date filters are already nativetype="date"— do not add@mantine/datesjust for that.TextInput,Textarea,NativeSelectorSelect; wrap to keepnoAutofill+ draft hooks.input,.select,.textareaCSS; re-check whetherCombobox.layer.cssis still neededclassName: "card…"/bg-base-100;Paperalready used; Sentinel.sf-cardused 6 times, often stacked oncard bg-base-100Paper+.sf-cardonly.card,.card-body,.card-border,.card-title,.card-actions,.bg-base-100/.bg-base-200Badge+ 24 daisy.badgeclasses;.badgeCSS also patches.mantine-Badge-labelBadgevariants only, themed inwebuiTheme.badge*(keep a themestyleshook if needed).alert/.alert-soft; Alert CSS layer is not importedAlert(add the official CSS layer).alert*DataTable/PagedTablewrapTablebut still usetable table-zebra(19 table class uses)Tablestriped/stickyHeader/highlightOnHover.table-zebraand redundant.tableskins; keep the scroll region if still neededModal.Root/Overlay/Content+FocusTrap(6 dialogs); interiors still.modal-box/.modal-action/.rule-editorModal.Header/Title/Body/CloseButton+ Sentinel inspector chrome.modal-box,.modal-overlay,.modal-actiontoast()(80 calls) +Notification+.toast/.alert@mantine/notifications(new latest-upstream package + CSS)toast,Notification,.toastInfoTip(7 uses, ~50 lines) +.info-tip*CSS, including a “ⓘ” glyph triggerTooltipInfoTipand.info-tip*.toggleuses +.checkboxCSSSwitch,Checkbox(add official CSS layers).toggle,.checkboxskins.menuServerPicker(aria listbox, outside-click, keyboard) +.menuCSS (3 uses)Select/ComboboxorMenu, preserving icons and the documented keyboard behavior.menu/ picker chrome CSS; keep enrollment status behavior.sf-tri(Sentinel, #1118)SegmentedControlthemed to Sentinel tokens, keeping ≥24px targets.sf-tri*if the themed control covers itLetterAvatar+.case-avatarAvatar.case-avatar*ifAvataris themeduseAppearance+matchMedia+localStorage+ a no-opcolorSchemeManagerstub, plusdocumentElement.dataset.theme@mantine/hooksuseHotkeysis optional;useComputedColorScheme/ Mantine’s localStorage manager can own the scheme ifdataset.themeand the theme-color meta still updateSEARCH_DELAY_MS+setTimeoutinfrontend/list-controls.jsuseDebouncedValue/useDebouncedCallbacknavigator.clipboard.writeTextcall sitesuseClipboardorCopyButtonIconButton“copy” where it is the visible control).sr-only(14 uses, includingFocusTrap.InitialFocus),.w-full,.hidden,.row,.mutedVisuallyHidden; Mantine style props /Groupfor simple layout.mutedmay stay as a token helper:roottokens vs--mantine-color-*; two first-party resets vs Mantine baseline/globalcssVariablesResolverand/or migrate app CSS onto the same vars; rely on Mantine baseline where it already covers box-sizing and type resets--focusif rings all use--accent; leftover daisy@layer utilities.statsstack.dashboard-section/.statsstill used on Command Center, restyled again in #1118.sf-cardbento / KPI tiles already used beside it.dashboard-section .statsrules once the overview tiles are on bentofrontend/charts.js(first-party SVG, 19.7KB in the bundle);frontend/icons.js@mantine/chartsor Tabler would add a dependency and fight #588 / #1123. Optional later, not this cleanup.Checklist
.platform-stats,.nav-label,.action-row,.empty-state,.step-actions,.sf-dot-bad,.trend-card/.trend-picker).card bg-base-100under.sf-card; one card language.scripts/package-webui-test.mjs(it currently requires leftover.btn,.card,.bg-base-100,.rounded-box, and similar to remain in the built CSS) anddocs/WEBUI.md.dist/webui-metafile.json.Extra acceptance criterion
Every item we replace with a newer library or with Sentinel tokens/components is actually switched over, and the old dependency, CSS, or first-party stand-in is removed — not left behind “for compatibility” the way #1096 had to leave the daisy class language.
[-]chore(webui): audit and remove unused libraries, dependencies and legacy CSS after the redesign[/-][+]chore(webui): track leftover CSS and dependency cleanup after the redesign[/+]jatmn commentedon Dec 3, 2026
🤖 Kit (jatmn's assistant agent)
Merge order for this umbrella is in the master plan: #1151.