Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,23 @@ link to an ADR in [`docs/decisions/`](docs/decisions/). The rule and format are
in [`AGENTS.md`](AGENTS.md) (section "Documenting changes"). There are no versions/tags:
the service is not released, deploy is continuous.

## 2026-06-19 — Responsive admin UI: phones, tablets, ultrawide (#115)

Made the admin panel usable on every screen size — mini-phones (320px) through ultrawide.
Almost all of it is static (`internal/handlers/web/static/{app.css,app.js,index.html}`); the
only Go change is a one-line dev tweak (below). The desktop (≥992px) is visually unchanged.
The navbar collapses into a hamburger below `lg` (the tabs became `<button>` for keyboard
use); the Users/Nodes tables turn into `data-label` cards below 992px (two-up on tablets via
CSS-grid, the table returns at ≥992px), with the user description shown inline on a card
rather than a floating tooltip and Bootstrap's row-hover cell tint dropped on cards; the
config constructors stack below 768px; touch gets bigger tap targets while inputs keep their
normal size (no 16px bump — it had blown the dense config selects/inputs out of proportion);
hover popovers open on tap (`:focus-within`); modals scroll their body only (header/footer
pinned); Monaco no longer traps page scroll; and the container widens on ultrawide.
`render.go` now serves the dev `SUBGEN_STATIC_DIR` assets with `Cache-Control: no-cache` so a
live edit shows on a plain reload. Verified with a real browser at
320/360/500/768/850/1024/1280/1600px (no horizontal overflow, no desktop regression).

## 2026-06-18 — public-ready: README overhaul, MIT license, English docs & UI (#117)

Prepared the repository for a public release. Rewrote `README.md` for newcomers (a clear
Expand Down
14 changes: 13 additions & 1 deletion internal/handlers/web/render.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,19 @@ func assetFS(staticDir string) fs.FS {
// because RU1 DNS is unreliable) from staticDir on disk, or the embedded copy when
// staticDir is empty.
func StaticHandler(staticDir string) http.Handler {
return http.StripPrefix("/admin/static/", http.FileServer(http.FS(assetFS(staticDir))))
fileServer := http.StripPrefix("/admin/static/", http.FileServer(http.FS(assetFS(staticDir))))
if staticDir == "" {
return fileServer // embedded prod assets — let the browser cache normally
}

// Live dev (SUBGEN_STATIC_DIR): force revalidation so an edited CSS/JS shows on a
// plain reload. Without this the browser applies heuristic freshness (only
// Last-Modified is sent) and serves a stale asset for minutes — defeating the whole
// "edit + browser reload, no Go rebuild" point of staticDir.
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
w.Header().Set("Cache-Control", "no-cache")
fileServer.ServeHTTP(w, r)
})
}

// ReadPage reads a static HTML page (the SPA shell or the login page) from the on-disk
Expand Down
Loading
Loading