feat(10.1-02): run registered toolbar actions and scope plugin CSS per controller

- ListToolbar renders server-filtered actions after delete as outline buttons, busy during their POST
- ListView posts {} to toolbar/{action}, toasts, reloads the list and refetches the header partial
- Lists load controller assets too, so other controllers' stylesheet links are disabled on every open
- Vite dev server proxies {prefix}/assets to summer serve; dist rebuilt
This commit is contained in:
Jakub Zych
2026-09-29 02:13:26 +02:00
parent 9df9fae930
commit a5e7dac10f
10 changed files with 207 additions and 23 deletions

View File

@@ -5,8 +5,8 @@ import tailwindcss from '@tailwindcss/vite'
// The committed build is path-agnostic (D-02): assets use a relative base and
// index.html keeps the __SUMMER_ADMIN_BASE__ token, which the Go server
// (boardwalk) replaces with the configured backend.uri. The dev server
// replaces it with SUMMER_ADMIN_DEV_PREFIX and proxies the admin API to a
// running `summer serve` at SUMMER_ADMIN_DEV_TARGET.
// replaces it with SUMMER_ADMIN_DEV_PREFIX and proxies the admin API and the
// plugin assets to a running `summer serve` at SUMMER_ADMIN_DEV_TARGET.
const devPrefix = (process.env.SUMMER_ADMIN_DEV_PREFIX ?? '/backend').replace(/\/+$/, '')
const devTarget = process.env.SUMMER_ADMIN_DEV_TARGET ?? 'http://localhost:8080'
@@ -29,6 +29,8 @@ export default defineConfig(({ command }) => ({
server: {
proxy: {
[`${devPrefix}/api`]: { target: devTarget, changeOrigin: false },
// Plugin JS/CSS that controllers declare (Phase 10.1), served by cabana.
[`${devPrefix}/assets`]: { target: devTarget, changeOrigin: false },
},
},
}))