GUI updates, live log visibility

This commit is contained in:
2026-02-14 17:55:14 +01:00
parent 9d7a36a143
commit e0e8e88276
5 changed files with 134 additions and 32 deletions
+8 -18
View File
@@ -31,24 +31,14 @@ Last updated: 2026-02-14 (session 3)
### What was just completed (2026-02-14 session 3)
- **Enhanced debug logging** across all stack operations in `internal/stacks/`:
- **Operation timing**: All stack ops (start, stop, restart, update, deploy) now log elapsed time
- Success: `[INFO] Stack immich started successfully (took 45.2s)`
- Failure: `[ERROR] Stack immich start failed after 3.1s: exit code 1`
- **`composeExecCustomEnv` improvements**:
- Logs env var **keys** at debug level (never values — secrets stay safe)
- Logs exit code, truncated stdout/stderr (max 500 chars) on failure
- Logs command completion time on success
- **Post-start container state check** (StartStack, RestartStack, UpdateStack, DeployStack):
- Async goroutine: sleeps 3s, runs `docker compose ps -a`, logs each container's state
- Critical for detecting crash-loops that `docker compose up -d` wouldn't surface
- Non-blocking — never fails the operation, just logs a warning if check fails
- **Image pull detection** (DeployStack, UpdateStack at debug level):
- Parses `docker-compose.yml` for `image:` lines
- Runs `docker image inspect` per image to check local availability
- Skips images with `${VAR}` interpolation (can't resolve at check time)
- **GetLogs improvement**: Logs byte count of returned logs (distinguishes empty vs failure)
- **ScanStacks improvement**: `[INFO] Scanned stacks: 10 found (3 deployed, 7 available)`
- **New helpers added to manager.go**: `isDebug()`, `truncateStr()`, `logPostStartStatus()`, `checkLocalImages()`
- All verbose checks gated on `cfg.Logging.Level == "debug"`; timing and container states always logged at INFO
- **Post-start container state check**: Async goroutine after start/restart/update/deploy
- **Image pull detection**: Checks local images before deploy/update (debug level)
- **GetLogs/ScanStacks improvements**: Byte count logging, deployed/available counts
- All verbose checks gated on `cfg.Logging.Level == "debug"`; timing always at INFO
- **UI improvements** in `internal/web/templates.go` and `server.go`:
- **Memory bar fix on deploy page**: Bar segments now always visible (min-width: 3px), new app segment uses translucent green with distinct border for clear visual separation from committed memory
- **Clickable app cards**: Cards on Vezérlőpult and Alkalmazások pages are now clickable (navigates to deploy/detail page). Uses `data-href` attribute + delegated click handler. Protected stacks excluded
- **Live-scrolling logs**: Logs page now auto-refreshes every 3s via AJAX polling (`?raw=1` returns plain text). Fixed-height container (70vh) with auto-scroll to bottom. Pulsing green "Élő" indicator. Pause/resume toggle ("Szüneteltetés"/"Folytatás"). User scroll position preserved when scrolled up to read history
### Previously completed (2026-02-15 session 2)
- **Phase 4: Git Sync + App Catalog Audit** — major milestone