Commit Graph

26 Commits

Author SHA1 Message Date
William Valentin 476c0e347f fix: count only live dashboard sessions 2026-04-30 17:07:17 -07:00
William Valentin 184aa5e6cb fix(web-ui): security hardening, SPA nav, and modularization
Ship the in-progress ES-module refactor of the web-ui (new static/modules/
layout, Usage/Settings pages, uplot-based dashboard) alongside a round of
security and UX fixes:

- main.go: add CSP + X-Frame-Options: DENY + X-Content-Type-Options:
  nosniff + Referrer-Policy middleware on every response; WS CheckOrigin
  now requires Origin host to match Host (blocks cross-site WebSocket
  hijacking); upgrade client before dialing upstream so origin check
  runs first; fatal on unparseable AGENTMON_QUERY_BASE.
- app.js: delegated click handler intercepts same-origin <a> clicks for
  SPA navigation (prev. every nav link caused a full page reload,
  dropping WS + in-memory state); delegated .copy-btn[data-copy]
  handler replaces inline onclick=; removed window.navigate /
  window.copyToClipboard globals and the duplicated handleGlobalSearch.
- modules/nav-signal.js: per-route AbortController so in-flight fetches
  are cancelled when the user navigates away, preventing stale toasts
  and wasted renders.
- modules/api.js: honours the nav signal by default; AbortError is
  silent.
- modules/router.js: resets the nav controller on every route; dropped
  the fixed 80ms transition delay; breadcrumbs no longer emit inline
  onclick= (delegated handler picks them up).
- modules/utils.js: renderCopyButton emits data-copy=\"...\" instead of
  nesting a JS string inside an HTML attribute — fixes an XSS where
  values containing ' broke out via &#39; decoding.

Verified: go build clean; `node --check` clean on all modified modules;
manual curl probes confirm security headers present on every response
and WS upgrade returns 403 for cross-origin/missing Origin while 101
for same-origin.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-23 15:36:12 -07:00
William Valentin 43113f6241 feat(web-ui): improve navigation and session UX 2026-04-21 13:07:05 -07:00
William Valentin c53283ac07 feat: improve web UI UX with global search, breadcrumbs, and better feedback 2026-03-26 14:24:52 -07:00
William Valentin 8bca99573b feat(web-ui): redesign dashboard and live sessions 2026-03-26 11:22:49 -07:00
William Valentin d49785cb25 fix: filter dashboard activity feed events 2026-03-20 14:05:59 -07:00
William Valentin 687a7aa79d Add live agent views and improve Codex monitoring 2026-03-20 13:59:51 -07:00
William Valentin f8ddea3698 feat: add agentmon services section to infrastructure page
Label all agentmon docker-compose services with agentmon.monitor=true
and agentmon.group=agentmon so the swarm-monitor picks them up.
Adds Group field to ServiceSnapshot, probes /healthz for api/web roles,
and renders a separate "Agentmon" section below Swarm Services on the
Infrastructure page with new api and worker card renderers.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-18 13:41:26 -07:00
William Valentin cd2f345454 feat: rename OpenClaw to Infrastructure page, add service cards
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-18 10:20:28 -07:00
William Valentin 93edd39a2b feat: add infrastructure page CSS 2026-03-18 10:16:50 -07:00
William Valentin 07c16653cd feat: add swarm strip to dashboard
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-18 10:14:48 -07:00
William Valentin 13356adfbd feat: openclaw card dividers, running pulse, issue label section
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-14 12:16:30 -07:00
William Valentin acd89e95a9 feat: stat card top accents, timeline time hierarchy 2026-03-14 12:14:15 -07:00
William Valentin 5dbfd68fb5 feat: meta tiles, back link button, css chevron, span-details bg fix
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-14 12:11:55 -07:00
William Valentin eb12319f19 feat: framework color dots in sessions table, filter toolbar panel
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-14 12:05:40 -07:00
William Valentin 1c6255d688 feat: chart legend, fw bar height, feed fade, top tools mini bars 2026-03-14 12:02:49 -07:00
William Valentin 2c4b212ae6 feat: semantic accent colors on summary cards, infrastructure label
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-14 11:59:38 -07:00
William Valentin a6902e8d6c feat: refine global tokens, nav active state, section title 2026-03-14 11:55:58 -07:00
William Valentin ab7a83c50d feat: stacked area chart, framework breakdown on active sessions, tool bar visualization 2026-03-14 11:34:15 -07:00
William Valentin 063e41616a fix: active sessions query, chart update performance
- Active sessions query now finds truly active sessions (started
  anytime, no session.end ever) instead of only today's sessions
- Use uPlot setData() for live WS updates instead of destroying
  and recreating the chart on every event
- Destroy chart only on window change so it recreates with new scale

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-14 11:25:06 -07:00
William Valentin e7dd954f6a fix: ResizeObserver leak, CSS class lowercase, active sessions live update 2026-03-14 11:11:42 -07:00
William Valentin eaf73e5ff5 feat: add real-time dashboard with charts, stats, and activity feed
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-14 11:05:07 -07:00
William Valentin cac3404aa4 feat: add dashboard CSS styles 2026-03-14 11:03:26 -07:00
William Valentin d593c745aa feat: add uPlot CDN and dashboard nav link 2026-03-14 11:02:23 -07:00
William Valentin 3434db3c59 feat: complete agent monitoring - hook, UI, and backend filter
- Add event_type and framework filters to events query endpoint
- Add /agents SPA route to web-ui server
- Add Agents nav link and route in frontend
- Add agents page CSS (timeline, VM pills, stats panel)
- Build VM status strip, activity timeline, and real-time stats
- Add agentmon hook for OpenClaw (HOOK.md + handler.ts)
- Add docker-compose, Dockerfile, and supporting infra files

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-14 00:26:42 -07:00
William Valentin 1927ec6622 feat: add static frontend with SPA routing
- Sessions list with filters (time, framework, host)
- Session detail with runs table
- Run detail with expandable spans
- Dark theme GitHub-style UI
- API proxy to query-api via /api

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-17 01:59:16 -08:00