Analytics: time-series message graph with 5 time spans (1h/4h/24h/7d/30d), top-5 agents and channels leaderboards, summary cards. 4 new REST endpoints. PWA: web app manifest, service worker with cache-first static/network-only API strategy, push notifications via Web Push API with VAPID keys, push subscription management endpoints, SQLite migration for subscriptions. UX fixes: auto-resize compose textarea (3-12 lines), inline editable agent display name, editable human display name in settings, smart mention/channel highlighting (existing→link, deleted→inactive badge, unknown→plain text), font size -/+ preference (12-24px persisted in localStorage), version footer with GitHub link. MCP: 4 prompts — daily-digest, agent-health-check, channel-overview, debug-agent. Registered with prompt capabilities enabled. Code review fixes: scoped push unsubscribe to user, capped analytics limit at 100, hardened HTML strip regex, bounded SW cache, backend push unsub on disable. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2.6 KiB
2.6 KiB
Autonomous Execution Summary: SynapBus v0.7.0
Date: 2026-03-17
Branch: 008-webui-pwa-analytics
Status: Complete — all tests pass, binary builds, endpoints verified
Features Implemented
1. Analytics Dashboard (P1)
- 4 new REST endpoints (
/api/analytics/timeline,/top-agents,/top-channels,/summary) - SVG bar chart (
AnalyticsChart.svelte), ranked list (TopList.svelte), redesigned dashboard with stat cards and time span selector (1h, 4h, 24h, 7d, 1month)
2. PWA Conversion (P1)
- PWA manifest (
manifest.json), service worker (sw.js), SVG icon - Cache-first for static assets, network-only for API, push notification handling
3. Push Notifications (P1)
internal/push/package — VAPID key generation, Web Push sending, SQLite subscription store- API:
POST/DELETE /api/push/subscribe,GET /api/push/vapid-key - Push toggle in Settings, migration
012_push_subscriptions.sql
4. Auto-Resizing Textarea (P1)
- ComposeForm textarea auto-grows 3→12 lines, then scrollbar. Resets on send.
5. Smart Mention/Channel Highlighting (P2)
- Entities store caches agents/channels. MessageBody validates @mentions and #channels: existing → link, deleted → "inactive" badge, unknown → plain text. Handles email/issue number edge cases.
6. Editable Agent Display Name (P2)
- Inline edit on agent detail page (click → edit, Enter → save, Escape → cancel)
7. Editable Human Display Name (P2)
PUT /api/auth/profileendpoint,UpdateDisplayNamein UserStore, Settings page field
8. Font Size Preference (P3)
- fontSize store (12–24px, 2px steps), -/+ controls in Settings, persisted in localStorage
9. Version Display (P3)
GET /api/versionendpoint, version footer in layout linked to GitHub repo
10. MCP Prompts (P2)
- 4 prompts: daily-digest, agent-health-check, channel-overview, debug-agent
internal/mcp/prompts.goregistered in server.go
11. Website Update (P3)
- Updated hero/features messaging at ~/repos/synapbus-website/ for individual/small-team positioning
Test Results
All 24 Go packages PASS. All API endpoints verified via curl. Web UI builds successfully. Binary compiles with CGO_ENABLED=0.
New Files
internal/api/analytics_handler.go+ testinternal/api/version_handler.go+ testinternal/api/push_handler.gointernal/push/service.go+ test,store.go+ testinternal/mcp/prompts.go+ testschema/012_push_subscriptions.sqlweb/src/lib/components/AnalyticsChart.svelte,TopList.svelteweb/src/lib/stores/fontSize.ts,entities.tsweb/static/manifest.json,sw.js,icons/icon.svg