Phase 3b: live dashboard#7
Merged
Merged
Conversation
nack.lua now INCRs q:{name}:dead (KEYS[4]) atomically on the dead branch
only; retries leave the counter untouched. broker.go adds deadKey() helper
and passes the fourth key to nackScript.Run. Two new tests (TDD RED→GREEN)
cover both branches.
Wire the React UI to the existing data layer: theme.css with Fraunces/IBM Plex typography and CSS custom properties; Sparkline, Sidebar, StatTiles, Charts, DlqTable, EnqueueForm components; App.tsx tying useStream, rolling 60-sample windows, DLQ polling, and the enqueue modal together. Rebuilds web/dist with the full font+CSS+JS bundle.
Mark web/ built in the layout and build-order tables, document the Counters API, SSE stream endpoint, processed/dead Redis counters, dashboard limitations (rolling window, per-connection SSE, committed dist), and Node/Vite build toolchain. Add a 'web' CI job that runs typecheck, vitest, Vite build, and verifies the committed dist is in sync with the source.
Owner
Author
Code reviewNo issues found. Checked for bugs and CLAUDE.md compliance. 🤖 Generated with Claude Code - If this code review was useful, please react with 👍. Otherwise, react with 👎. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Second Phase 3 sub-project: a live, embedded dark-editorial dashboard for Relay — per-queue depth + throughput over SSE, a dead-letter table with one-click requeue, and an enqueue form. Built with Vite + React + TypeScript, served as a single Go binary. The atomic claim is untouched,
ack.lua/nack.luaremain single atomic scripts (one addedINCReach), and the Go module gains no new dependency (the dashboard is a separateweb/npm workspace).Backend
ack.luaINCRsq:{name}:processed,nack.luaINCRsq:{name}:dead(dead branch only). Both stay one atomic script. Newbroker.Counters(ctx, queue)reads them (missing key → 0).GET /api/stream(internal/api/stream.go) pushes a JSON snapshot of every queue's depth + cumulative counters immediately, then every ~1s; stops on client disconnect; a Redis hiccup skips a tick rather than dropping the stream.Frontend (
web/)processed_totalcounter stream), a DLQ table with per-row Requeue, and an enqueue form.EventSourcestream hook; pure logic (format/series/snapshot) unit-tested with Vitest.web/dist, embedded byweb/embed.go(web.Handler()with SPA fallback), served at/bycmd/server(the more-specific/api/,/metrics,/healthzkeep priority).CI & docs
webCI job:npm ci→ typecheck → vitest → build → verify committeddistis in sync. Go job unchanged (builds against the committed dist)./api/stream,Counters,web/layout, known limitations).Design & plan
docs/superpowers/specs/2026-06-08-relay-phase3b-dashboard-design.mddocs/superpowers/plans/2026-06-08-relay-phase3b-dashboard.mdTest plan
go build ./...,go vet ./...,gofmt -l internal/ cmd/ web/cleango test -race ./...— broker (DB 15), worker (DB 14), metrics (DB 13), api (DB 12), web (no Redis), job all pass against a real RedisCountersreads/zeroes, SSE emits a well-formed snapshot and stops on disconnect;web.Handlerserves index + SPA fallbacktsc --noEmit,vitest(format/series/snapshot),vite build, andgit diff --exit-code -- distall cleancmd/serversmoke-tested:/200 html, SPA fallback,/healthz,/api/queues,/api/stream