Add Supabase status publisher and GitHub Pages dashboard#2
Merged
Conversation
Adds remote bench monitoring via Supabase with a React dashboard so operators can view bench health, state, and heartbeat freshness from anywhere. The publisher is opt-in — benches without Supabase credentials continue working unchanged. - Supabase schema: benches, bench_status_current, bench_events tables with RLS policies and a bench_dashboard view - Publisher package (hilbench.publisher): exception-safe client with lazy init, hook functions for flash/health events, heartbeat loop - CLI: `benchctl publish status|heartbeat|config` subcommands - Hook integration: flash_cmd and health_cmd call publisher hooks (import-guarded, no-op without supabase package) - Dashboard: React + Vite + TypeScript + Pico CSS with auth gate, bench table, status badges, 15s polling - GitHub Actions: dashboard-ci (lint/typecheck/build on PR) and deploy-dashboard (tag-based GitHub Pages deployment) - Bootstrap: install_publisher.sh script, bootstrap_pi.sh accepts optional Supabase URL/key args - 22 new tests (75 total), all passing Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Extract results_to_dicts() helper to deduplicate CheckResult serialization across 4 call sites. Move heartbeat import to module level, narrow exception handling from Exception to ImportError in CLI hooks, and stop mutating os.environ in config loader. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add explicit step for creating read-only viewer accounts in the dashboard setup guide and fix stale exception reference in architecture doc. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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
supabase/migrations/):benches,bench_status_current,bench_eventstables with RLS policies and abench_dashboardview with stale heartbeat detectionsrc/hilbench/publisher/): exception-safe Supabase client with lazy init, hook functions for flash/health events, and a systemd-compatible heartbeat loopbenchctl publish status|heartbeat|config): one-shot publish, continuous heartbeat, and config display subcommandsflash_cmd.pyandhealth_cmd.pycall publisher hooks wrapped intry/except (ImportError, Exception)— no-op without the supabase packagedashboard/): Vite + TypeScript + Pico CSS with email/password auth gate, bench table with color-coded status badges, 15s pollingdashboard-ci.yml(lint/typecheck/build on PR) anddeploy-dashboard.yml(tag-baseddashboard-v*GitHub Pages deployment)install_publisher.shscript;bootstrap_pi.shaccepts optional Supabase URL/key args (positions 3-4)docs/dashboard-setup.md(setup guide) anddocs/publisher-architecture.md(design overview)Test plan
ruff check src/ tests/— all checks passedruff format --check src/ tests/— 37 files formattedmypy src/hilbench/— 24 source files, no issuespytest tests/ -m "not hardware"— 75/75 tests pass (22 new publisher tests)cd dashboard && npm run typecheck && npm run build— typecheck and build succeedbenchctl publish status, verify row inbench_status_currentbenchctl publish heartbeat, verify heartbeat updatesdashboard-v0.1.0, verify Pages deployment workflow🤖 Generated with Claude Code