Skip to content

feat: activity page, cross-fleet command log, and auto-login - #125

Merged
mitulgarg merged 1 commit into
mainfrom
feat/activity-page-no-login
May 9, 2026
Merged

feat: activity page, cross-fleet command log, and auto-login#125
mitulgarg merged 1 commit into
mainfrom
feat/activity-page-no-login

Conversation

@mitulgarg

Copy link
Copy Markdown
Owner

Summary

  • GET /api/commands — new cross-fleet command log endpoint with filters: status, machine_id, since
    (ISO-8601), limit, offset. Joins hostname from machines table and computes duration_seconds.
  • Activity page (/activity) — table view of all commands across the fleet. Status pills, machine dropdown,
    time-range filter (1h / 24h / 7d / all), expandable output rows, 10s auto-refresh.
  • Auto-login — server injects the API token into the served index.html so the browser auto-authenticates on
    load. No login screen for the self-hosted dashboard; API auth is unchanged.
  • Activity nav link added to sidebar.
  • Activity page (/activity) — table view of all commands across the fleet. Status pills, machine dropdown,
    time-range filter (1h / 24h / 7d / all), expandable output rows, 10s auto-refresh.
  • Auto-login — server injects the API token into the served index.html so the browser auto-authenticates on
    load. No login screen for the self-hosted dashboard; API auth is unchanged.
  • Activity nav link added to sidebar.

Test plan

  • npm run build && env-doctor dashboard — open http://localhost:8765, confirm no login screen, land directly
    on dashboard
  • Navigate to /activity — confirm command table loads
  • Status pills filter rows; machine dropdown narrows to one machine; time range changes results
  • Click a row with output → expands inline; click again → collapses
  • Queue a command from MachineDetail → watch it appear in Activity within 10s
  • curl.exe -H "Authorization: Bearer $TOKEN" "http://localhost:8765/api/commands?status=bogus" → 400 with
    helpful message
  • curl.exe -H "Authorization: Bearer $TOKEN" "http://localhost:8765/api/commands?since=not-a-date" → 400

- GET /api/commands: cross-fleet command log with status/machine/since/limit/offset filters, hostname joined in, duration_seconds computed
- Activity page (/activity): table with status pills, machine dropdown, time-range filter, expandable output rows, 10s auto-refresh
- Activity nav link added to sidebar
- Server injects API token into served index.html so browser auto-authenticates — no login screen for self-hosted dashboard

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@mitulgarg

Copy link
Copy Markdown
Owner Author

#123 Phase1

@mitulgarg
mitulgarg merged commit 58a1db0 into main May 9, 2026
4 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