Skip to content

feat(operator): make the PWA operator-first#122

Merged
marcusrbrown merged 6 commits into
mainfrom
feat/operator-first-pwa
Jun 27, 2026
Merged

feat(operator): make the PWA operator-first#122
marcusrbrown merged 6 commits into
mainfrom
feat/operator-first-pwa

Conversation

@marcusrbrown

Copy link
Copy Markdown
Collaborator

Summary

Make the operator interface the primary PWA experience:

  • Render the operator shell at / and redirect /operator back to /.
  • Remove the monitoring frontend from the active app shell and service worker cache path.
  • Keep Gateway operator calls browser-direct; the dashboard still does not proxy operator API routes.
  • Mount the existing operator launch/stream runtimes through a React-controlled lifecycle seam.
  • Rework service worker behavior for operator-first routing, update activation, offline /operator canonicalization, and legacy cache cleanup.
  • Add machine-readable DOM state hooks for automation and accessibility-aligned verification.

Verification

  • pnpm check-types
  • pnpm lint
  • pnpm test
  • Browser verification on a no-watch loopback server:
    • / renders the operator shell
    • /operator canonicalizes to /
    • runtime modules load with ?manual=1
    • service worker is active and controlling the page
    • offline /operator resolves to /

Notes

  • Gateway OAuth recovery still uses return_to=/operator because the Gateway validates return paths against an exact allowlist. The dashboard redirect then canonicalizes /operator to /.
  • Existing installed PWAs may briefly show the prior cached shell until the updated service worker activates.

Route the installed app and /operator links toward the operator surface, remove the monitoring frontend from the active React app, and keep logout cache purging on the new operator seam.

Includes the reviewed requirements and plan artifacts that define the operator-first and run-index follow-up scope.
Add the fixed operator failure taxonomy, remove monitoring runtime caching, and update stale SSR operator tests to assert the new operator-first route and no-proxy boundaries.
Connect the React operator surface to the existing browser-direct launch and stream runtimes with CSP-safe loading, explicit cleanup, and token-aligned operator styling.
Start the root operator shell in ready mode, serve the two required runtime modules outside the legacy operator flag, and keep manual-mode imports manual through the launch-to-stream handoff.

Also restores prompt-mode service-worker activation with updateServiceWorker(true) and documents the verified operator-first PWA routing/fail-state pattern.
@fro-bot fro-bot added the agent: working Agent is currently working on this label Jun 27, 2026

@fro-bot fro-bot left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verdict: PASS

Blocking issues

None

Non-blocking concerns

None

Missing tests

None

Risk assessment (LOW/MED/HIGH) + rationale

MEDIUM. This is a large route/runtime/PWA migration touching auth-adjacent routing, service worker behavior, and browser-direct operator calls. The reviewed implementation keeps / and /operator behind server auth, leaves operator data paths network-only/no-store from the service worker, avoids dashboard proxy/write paths, uses fixed coarse error copy, and adds broad coverage for route redirects, static asset exposure, runtime lifecycle cleanup, service worker routing, and operator state handling. Verified with pnpm check-types, pnpm lint, and pnpm test (1139 tests passed).


Run Summary
Field Value
Event pull_request
Repository fro-bot/dashboard
Run ID 28292247458
Cache hit
Session ses_0f67be44fffeZN2rPzPWno29ww

@fro-bot fro-bot removed the agent: working Agent is currently working on this label Jun 27, 2026
@marcusrbrown marcusrbrown merged commit fff198c into main Jun 27, 2026
7 checks passed
@marcusrbrown marcusrbrown deleted the feat/operator-first-pwa branch June 27, 2026 19:58
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.

2 participants