agent-orchestrator/backend/internal/httpd
Vaibhaav Tiwari c6d9692d37
feat(frontend): add live browser panel (#375)
* feat(frontend): add live browser panel

* chore: format with prettier [skip ci]

* feat: preserve and auto-open browser previews

* fix: retry browser preview after session updates

* fix: wait for browser view before preview navigation

* fix: reopen preview after session switches

* fix: preserve browser views across session switches

* chore: format with prettier [skip ci]

* feat: add `ao preview` command to drive the session browser panel

Replaces the browser panel's auto-detect with an explicit, session-scoped
command. `ao preview [url]` runs inside a session (derives the target from
AO_SESSION_ID; rejects when unset or when the session is unknown):
- with a url, opens it verbatim (file://, http, https; no sanitization for now)
- with no url, autodetects index.html in the workspace as before

The resolved target is persisted as a new `previewUrl` session field and fans
out over the existing CDC /events stream (the sessions update trigger now fires
on preview_url and carries previewUrl in its payload). The desktop browser panel
reflects session.previewUrl: it opens, switches the center pane to the browser,
and navigates, re-navigating only when the target changes.

ponytail: file:// preview targets are accepted unsanitized; agent-trusted for now.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* docs(cli): document the `ao preview` command

Add `ao preview` to the CLI command tables in README.md and docs/cli/README.md,
noting it resolves its session from AO_SESSION_ID and its no-arg autodetect vs
explicit-URL behavior.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* chore: format with prettier [skip ci]

* fix(frontend): reveal `ao preview` in the inspector Browser tab, not the center pane

`ao preview` set session.previewUrl, and SessionView surfaced it by
popping the browser into the center pane, replacing the terminal. Reveal
it in the inspector rail's Browser tab instead (opening the rail if it is
collapsed); the manual pop-out button still expands it to the center.

Lifts the inspector's active tab to an optional controlled prop so
SessionView can drive it, and adds a regression test asserting the center
pane keeps the terminal while the rail switches to Browser.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* docs: instruct agents to `ao preview` when showing frontend changes

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

---------

Co-authored-by: Vaibhaav <user@example.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Harshit Singh Bhandari <dev@theharshitsingh.com>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-22 04:14:18 +05:30
..
apierr refactor(backend): LLD maintainability fixes in controllers/service layers (#95) (#96) 2026-06-03 18:09:02 +05:30
apispec feat(frontend): add live browser panel (#375) 2026-06-22 04:14:18 +05:30
controllers feat(frontend): add live browser panel (#375) 2026-06-22 04:14:18 +05:30
envelope fix(sessions): stop AO hook files from making every worktree permanently dirty (#169) 2026-06-11 11:06:45 +05:30
api.go Feat/backend telemetry v0 (#307) 2026-06-18 22:00:25 +05:30
control_test.go fix(cli): harden daemon control surface and stop CLI from writing the store 2026-06-01 01:55:14 +05:30
cors.go feat(frontend): scaffold for frontend with complimentary backend changes (#168) 2026-06-10 11:40:17 +05:30
cors_test.go feat(frontend): scaffold for frontend with complimentary backend changes (#168) 2026-06-10 11:40:17 +05:30
events.go feat(cdc): add SSE event stream replay (#106) 2026-06-06 19:32:21 +05:30
events_test.go feat(cdc): add SSE event stream replay (#106) 2026-06-06 19:32:21 +05:30
log.go Feat/posthog error tracking redaction (#329) 2026-06-21 18:50:47 +05:30
log_test.go Feat/posthog error tracking redaction (#329) 2026-06-21 18:50:47 +05:30
logger.go refactor: simplify session lifecycle and zellij runtime (#62) 2026-06-01 08:42:49 +05:30
logger_test.go refactor(backend): LLD maintainability fixes in controllers/service layers (#95) (#96) 2026-06-03 18:09:02 +05:30
recover.go Feat/posthog error tracking redaction (#329) 2026-06-21 18:50:47 +05:30
router.go Feat/posthog error tracking redaction (#329) 2026-06-21 18:50:47 +05:30
server.go refactor(backend): LLD maintainability fixes in controllers/service layers (#95) (#96) 2026-06-03 18:09:02 +05:30
server_test.go fix: recover terminal reattach after daemon idle (#354) 2026-06-21 13:59:15 +05:30
telemetry_test.go Feat/posthog error tracking redaction (#329) 2026-06-21 18:50:47 +05:30
terminal_mux.go refactor: simplify session lifecycle and zellij runtime (#62) 2026-06-01 08:42:49 +05:30
terminal_mux_test.go feat(windows): ConPTY terminal, zellij discovery, agent launcher trampoline, codex shim resolution (#310) 2026-06-18 21:51:05 +05:30
testhelpers_test.go refactor(backend): LLD maintainability fixes in controllers/service layers (#95) (#96) 2026-06-03 18:09:02 +05:30