Fix #505: hide Checks tab when empty #510

Merged
crueber merged 1 commit from fix/issue-505 into main 2026-09-14 02:14:29 +00:00
Owner

Hides the repo Checks tab when no checks exist; reappears on first report without reload.

Server (law 4/6/8/12): summary gains always-present has_checks behind the new Env.ChecksSummary hook (CollabCounts shape — one exact-key GET on the CAS'd hot-window checks/index.json, nil/absent → false, +0 round trips for non-consumers; composition fails open). ETag gains the ~k<index-version> suffix so the first report (no ref move) revalidates to 200, never 304. No new routes (exposed_test untouched).

Client: pure showChecksTab helper in web/src/lib/tabs.js (fail-open on loading/deleted/pre-#505 servers) filters the tab render (TABS model + <For each={TABS}> intact); check frames now invalidate repo:{full}; a hidden-state-only shell stream reappears the tab live; deep-link /checks still renders the empty state; header keeps the /api#checks-ci reporting link while hidden (Checks toolbar link untouched). No new deps.

Tests: table-driven summary wire/flip/revalidate (summary505_test.go), HasChecks matrix + 1-GET/0-LIST budget (checks/summary_test.go), helper + source pins (checks-tab-505.test.js), frame-table + liveness pin updates. gofmt/vet clean; internal/api 95.3%, internal/checks 96.3%; go test -race green; node 1130/1131 (1 pre-existing live-server smoke fail); vite build + esbuild green; internal/e2e green. Docs: 07_api §9.1 + suffix lists + Decisions, 06 route table, 12_web_ui Decisions.

Hides the repo Checks tab when no checks exist; reappears on first report without reload. Server (law 4/6/8/12): summary gains always-present `has_checks` behind the new `Env.ChecksSummary` hook (CollabCounts shape — one exact-key GET on the CAS'd hot-window `checks/index.json`, nil/absent → false, +0 round trips for non-consumers; composition fails open). `ETag` gains the `~k<index-version>` suffix so the first report (no ref move) revalidates to 200, never 304. No new routes (`exposed_test` untouched). Client: pure `showChecksTab` helper in `web/src/lib/tabs.js` (fail-open on loading/deleted/pre-#505 servers) filters the tab render (TABS model + `<For each={TABS}>` intact); `check` frames now invalidate `repo:{full}`; a hidden-state-only shell stream reappears the tab live; deep-link `/checks` still renders the empty state; header keeps the `/api#checks-ci` reporting link while hidden (Checks toolbar link untouched). No new deps. Tests: table-driven summary wire/flip/revalidate (`summary505_test.go`), HasChecks matrix + 1-GET/0-LIST budget (`checks/summary_test.go`), helper + source pins (`checks-tab-505.test.js`), frame-table + liveness pin updates. `gofmt/vet` clean; `internal/api` 95.3%, `internal/checks` 96.3%; `go test -race` green; node 1130/1131 (1 pre-existing live-server smoke fail); `vite build` + esbuild green; `internal/e2e` green. Docs: 07_api §9.1 + suffix lists + Decisions, 06 route table, 12_web_ui Decisions.
Summary gains the checks-existence projection behind the Env hook
(CollabCounts shape, one exact-key probe on checks/index.json, +0 round
trips for non-consumers) with the ~k index-version ETag suffix so the
first report busts revalidation; client filters the tab via the pure
showChecksTab helper, reappears it via a hidden-state shell stream +
check->repo frame mapping, and keeps the /api#checks-ci reporting link
in the header while hidden. Docs: 07_api §9.1 + suffix lists, 06 route
table, 12_web_ui Decisions.
Sign in to join this conversation.
No description provided.