Skip to content

Consolidate gearbox static JS/CSS onto webcore #149

Description

@sarg3nt

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)

  1. Extract/abstract the deferred JS (command-palette, header-search, shortcut-help, keymap, charts, api, sidebar) into webcore with neutral namespaces.
  2. 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).
  3. 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.
  4. 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    Status
    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions