Skip to content

Add a daemon logs page (ring buffer + SSE) - #12

Merged
prop4n merged 1 commit into
mainfrom
feat/daemon-logs
Aug 31, 2026
Merged

prop4n merged 1 commit into
mainfrom
feat/daemon-logs

Conversation

@prop4n

@prop4n prop4n commented Aug 30, 2026

Copy link
Copy Markdown
Owner

Adds a Logs entry in the left sidebar to view the daemon's activity live.

Backend

  • internal/logbuf: a bounded in-memory ring buffer (default 1000 lines) that is
    also an slog.Handler wrapping the existing one, so lines still go to stdout.
    Captures time, level, message + inline attrs. Fans new lines to subscribers.
  • App tees the daemon logger through the buffer at startup.
  • Server: GET /api/v1/logs (retained snapshot) and GET /api/v1/logs/stream
    (new lines over SSE, with keepalive + write deadlines like the status stream).

Frontend

  • A Logs nav item and LogsView.vue: loads the ring snapshot, then streams
    live lines, auto-scrolling to the bottom with a Follow/Pause toggle. Level is
    colour-coded (error/warn/info).

Tests

  • logbuf: cap + snapshot order, attr capture, live subscribe.
  • Routes registered (verified: 401 unauth on /logs and /logs/stream).
  • Go + vitest suites, golangci-lint (v2), gofmt clean.

Lost on restart by design; the persistent per-resource history covers durable audit.

@prop4n
prop4n merged commit 5bf44f1 into main Aug 31, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant