feat(dashboard): add web dashboard with activity, rules, and live log tail #205
No reviewers
Labels
No labels
Compat/Breaking
Kind/Bug
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Security
Kind/Testing
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Status
Abandoned
Status
Blocked
Status
Need More Info
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
thwap/ttheart!205
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/add-web-dashboard"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What
Add embedded web dashboard accessible at
/:/api/rules— JSON endpoint listing configured rules (#167)/api/logs— Server-Sent Events stream for live log tail (#168)/api/activity— JSON endpoint for recent webhook activity (#166)PushLogEntry()— programmatic log injection into SSE streamWhy
Provides operational visibility without external tools. Operators can see rules, recent activity, and live logs from a single page.
Testing
go test ./...and pre-commit passdashboard_test.goBreaking Changes
None.
Notes
/— can be mounted under a subpath viahttp.StripPrefixCloses #169
Closes #166
Closes #167
Closes #168
Review
Clean web dashboard implementation. All 3 tests pass, lint and vet clean.
Endpoints:
GET /— dark-themed HTML dashboard (self-contained CSS/JS)GET /api/rules— stored rules JSON (viaSetRules())GET /api/logs— SSE stream for live log tail (buffered channel, non-blocking push, cleanup on disconnect)GET /api/activity— returns[](placeholder)Design: Global channel map for SSE clients, thread-safe via mutex. Non-blocking
PushLogEntrydrops for slow consumers. Rules stored as pre-encoded JSON blob. Dashboard HTML embedded in Go source — zero external dependencies.No blocking issues.
APPROVED