<#1056 Added session-scoped SSE support for consol...
# osctrl
g
#1056 Added session-scoped SSE support for console and file explorer Pull request opened by javuto Summary • Added session-scoped SSE support for console and file explorer live updates. • Published console and file explorer query-result notifications with session and resource identifiers. • Extended
/api/v1/events
to support: •
topic=console&console_session=<id>
•
topic=file_explorer&file_explorer_session=<id>
• Enforced server-side authorization for session streams using environment access,
AdminLevel
, active-session ownership, and per-session event filtering. • Updated the frontend live-update layer so console commands and file explorer requests wake from SSE events instead of relying only on tight polling. • Kept REST as the authoritative data path; SSE only invalidates/refetches existing React Query data. • Added fallback/reconciliation polling so the UI still works when SSE is disabled, unsupported, or disconnected. • Updated feature discovery, architecture docs, OpenAPI output, and related tests. Validation •
go test ./pkg/events ./pkg/queries ./cmd/api/handlers ./pkg/console ./pkg/fileexplorer
•
go test ./...
•
cd frontend && npm run check
• Focused Vitest coverage for events, live updates, console, and file explorer • Full frontend Vitest suite: 411 tests passing • Production frontend build •
make openapi
•
make openapi-check
jmpsec/osctrl