The UI templ components now come from webcore, but gearbox still serves its own copies of the shared static JS/CSS (byte-identical to webcore's at cutover time, so functionally fine — but a duplication that will drift).
Blocked by
webcore#2 (extract the deferred/coupled JS). A blanket "serve webcore static first" override is currently UNSAFE because webcore renamed identifiers gearbox's deferred JS still uses:
GearboxKeymap -> WebCoreKeymap (used by gearbox command-palette.js, shortcut-help.js, header-search.js, keymap.js)
.datagrid-unifi -> .datagrid (gearbox legacy Tabulator grids + datagrid.css + base.templ)
Plan (after webcore#2)
- Extract/abstract the deferred JS (command-palette, header-search, shortcut-help, keymap, charts, api, sidebar) into webcore with neutral namespaces.
- Add a webcore-first fallback static file server in
cmd/server/main.go (try webcore.StaticFiles, fall back to gearbox's embed for app-specific files).
- Delete gearbox's now-superseded shared files:
static/js/utils/{toast,dom,formatting,char-limit}.js, static/js/common/{focus-trap,info-tooltip,page-header}.js, static/css/utilities.css, static/css/components/{buttons,cards,modals}.css.
- Migrate gearbox's
datagrid-unifi class refs to .datagrid once it serves webcore's datagrid.
Definition of done
Shared static served from webcore; gearbox embed holds only app-specific assets; visual parity verified.
The UI templ components now come from webcore, but gearbox still serves its own copies of the shared static JS/CSS (byte-identical to webcore's at cutover time, so functionally fine — but a duplication that will drift).
Blocked by
webcore#2 (extract the deferred/coupled JS). A blanket "serve webcore static first" override is currently UNSAFE because webcore renamed identifiers gearbox's deferred JS still uses:
GearboxKeymap->WebCoreKeymap(used by gearbox command-palette.js, shortcut-help.js, header-search.js, keymap.js).datagrid-unifi->.datagrid(gearbox legacy Tabulator grids + datagrid.css + base.templ)Plan (after webcore#2)
cmd/server/main.go(trywebcore.StaticFiles, fall back to gearbox's embed for app-specific files).static/js/utils/{toast,dom,formatting,char-limit}.js,static/js/common/{focus-trap,info-tooltip,page-header}.js,static/css/utilities.css,static/css/components/{buttons,cards,modals}.css.datagrid-unificlass refs to.datagridonce it serves webcore's datagrid.Definition of done
Shared static served from webcore; gearbox embed holds only app-specific assets; visual parity verified.