Repository navigation
feat(ui): reload prompt when a new server version is deployed - #615
Conversation
Relates to #614. An open tab remembers the server commit read from /api/health at load and shows a non-blocking role=status banner with Reload / Dismiss when a later reading reports a different commit. - nav-drawer.js: extract the single /api/health reader as window.CoreHealth.read, reused by the drawer version footer - version-notice.js: pure decide/shouldCheck plus wiring; checks on visibilitychange, WebSocket open and a 5 minute interval, throttled - app.js: dispatch corescope:ws-open when the shared socket opens - failed/5xx/commit-less health is ignored; once per new commit; never auto-reloads Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…n notice Relates to #614. The version notice reads /api/health at load as its baseline; the drawer footer now reuses that first reading (readOnce) instead of issuing its own request, so opening the drawer still adds no request. Update the #111 drawer E2E to allow the single shared page-load request. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Rapport — CS-pve-agent2 PR#615 #614 — head 69107c6Status: Draft PR, all CI jobs green on the final head. Browser-checked in light, dark and 390px; no remaining open items. Requirements, tests and mutants
The E2E is also red against master's Regression found and fixedThe first push failed the #111 drawer E2E, which required zero CI (head 69107c6)All jobs pass: Go Build & Test, Go Ingestor, Go Libraries & CLI, Go Server 1/3–3/3, JS Unit & Lint, Script & Container Unit Checks, Playwright 1/3–3/3, Verify E2E Shards & Coverage, Verify Go Test Assignments, Validate Docker Image, Build & Publish Docker Image. Release, Deploy Staging and Badges are skipped as usual. The earlier failure was on the previous head (the #111 E2E above). The known flaky #271 did not occur [T]. Local runs [T]
Guards [T]
Remaining
Evidence: [T] test or CI output, [A] visual assertion or inspection, [K] known limitation or decision. |
Review — CS-Macmini PR#615 — head 69107c6Dom: APPROVE med nits Findings
No correctness, security or scope findings survived review. Answers to the review points
Tests and mutantsAll run locally against the merge of
Not verified
|
Relates to #614
Plan / what changed
A tab that stays open across a deploy keeps running old JavaScript. This adds a small, non-blocking "New version available – reload" notice.
public/nav-drawer.js: the single/api/healthreader is extracted aswindow.CoreHealth.readand reused by the drawer version footer. There is no second fetch site.public/version-notice.js(new): puredecide(state, health)andshouldCheck(now, last, gap), plus the wiring.visibilitychange(visible only), on WebSocket open and on a 5 minute interval for visible tabs. All are throttled to at least 30 s apart.unknownhealth responses are ignored (restart window).public/app.js: dispatchescorescope:ws-openwhen the shared socket opens.public/style.css: banner uses CSS variables only.createElement/textContent, hasrole="status", and its buttons are keyboard reachable.Performance
At most one small
/api/healthrequest per 30 s, only from existing events or a 5 minute timer. No per-packet or per-render work.Customizer (rule 8)
MIN_GAP_MS(30 s) andINTERVAL_MS(5 min) are hardcoded. They are candidates for the customizer later.Tests
test-issue-614-version-notice.js(vm.createContext): decision logic, throttle, wiring, banner and Reload/Dismiss. Added totest-all.sh.test-issue-614-version-notice-e2e.js(Playwright): stubs/api/health, firesvisibilitychange, and asserts the banner, Reload via keyboard, and Dismiss. Runs in light, dark and 390px. Registered inscripts/e2e-shards.json.test-issue-111-drawer-version.jsis unchanged and passes.Not touched:
cmd/(server stays read-only, no newmap[string]interface{}), workflows (fork guards unchanged).🤖 Generated with Claude Code