feat: implement browser preview workspace and resolve authenticated-only selection gap - #60
Conversation
…nly selection gap
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6722b1d3e5
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
Pull request overview
Implements a session-linked Browser Preview workspace end-to-end (protocol/client projection + cache, fixture runtime support, and web UI routing), and updates the vendored @oh-my-pi/app-wire artifact to a new pinned release that carries the preview wire additions.
Changes:
- Bump vendored
@oh-my-pi/app-wireto0.6.0, updating checksums/compatibility metadata and distribution pinning tests. - Add preview-specific projection, cache persistence, capture chunk assembly/object-URL ownership, cooperative preview leases, and reconnect preview-state bootstrap in the client + fixture runtime.
- Add a dedicated web preview workspace route/UI (with controls + snapshot interaction), preview activity logging, and new unit/E2E coverage.
Reviewed changes
Copilot reviewed 35 out of 38 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| vendor/app-wire/manifest.json | Updates vendored app-wire version + source/tarball metadata. |
| THIRD_PARTY_NOTICES.md | Updates third-party notice to reflect app-wire 0.6.0 provenance/checksums. |
| pnpm-lock.yaml | Updates lockfile references and integrity for vendored app-wire tarball. |
| packages/protocol/test/distribution.test.ts | Updates distribution pinning test expectations for app-wire 0.6.0. |
| packages/protocol/package.json | Points protocol package dependency at new vendored app-wire tarball. |
| packages/fixture-server/test/engine.test.ts | Extends deterministic fixture command coverage for preview commands. |
| packages/fixture-server/src/fixture-sessions.ts | Adds preview sequence tracking to created fixture sessions. |
| packages/fixture-server/src/fixture-command-frames.ts | Adds preview snapshot fixtures + preview event classification helper. |
| packages/fixture-server/src/engine.ts | Adds preview cursor/revision sequencing and preview command responses in fixture engine. |
| packages/client/test/projection.test.ts | Adds/updates projection tests for preview freshness, caching, capture resource behavior. |
| packages/client/test/preview-lease.test.ts | Adds tests for cooperative preview lease manager behavior. |
| packages/client/test/client-reconnect.test.ts | Adds reconnect tests ensuring preview state is requested after attach. |
| packages/client/src/projection.ts | Adds preview projections, freshness/order handling, and preview activity capture. |
| packages/client/src/projection-cache.ts | Bumps projection cache version and persists/restores preview metadata + events. |
| packages/client/src/preview.ts | Adds capture chunk assembly/object-URL ownership and preview lease manager. |
| packages/client/src/omp-client-runtime.ts | Adds preview commands, capture loading, lease management, and preview-state bootstrap on attach/reconnect. |
| packages/client/src/index.ts | Exposes preview APIs/types from the client package entrypoint. |
| e2e/remote-app.spec.ts | Adds E2E coverage for opening preview workspace + recapture + mobile safety. |
| compat/omp-app-matrix.json | Updates compatibility matrix to app-wire 0.6.0 metadata. |
| apps/web/test/workspace-store.test.ts | Extends workspace-store persistence/continuity tests to include preview view state. |
| apps/web/test/tool-renderers.test.tsx | Ensures browser tool renderer offers “Open Preview” only in live render contexts. |
| apps/web/test/preview-workspace.test.ts | Adds unit tests for preview model/policy, adapter lease behavior, and capture URL cleanup. |
| apps/web/test/panes-live.test.ts | Adds tests for preview activity sanitization and dedup across projection replays. |
| apps/web/test/panes-activity.test.ts | Adds tests for preview event classification + export redaction guarantees. |
| apps/web/src/state/workspace-store.ts | Persists per-session preview selection + scale mode in workspace state. |
| apps/web/src/router.tsx | Adds /sessions/$sessionId/preview route and shared session gate logic. |
| apps/web/src/features/transcript/tool-render/types.ts | Extends tool render host interface with openPreview(). |
| apps/web/src/features/transcript/tool-render/tools/browser.tsx | Adds “Open Preview” action to browser tool renderer when host supports it. |
| apps/web/src/features/transcript/tool-render/tool-render.css | Styles the new host link and updates focus/touch-target handling. |
| apps/web/src/features/transcript/SessionMain.tsx | Adds preview banner/button and navigation to preview workspace. |
| apps/web/src/features/preview/PreviewWorkspace.tsx | Implements preview workspace UI (controls, snapshot, advanced actions, confirmations). |
| apps/web/src/features/preview/preview-runtime.ts | Adds desktop adapter for preview commands, capture reads, and cooperative leases. |
| apps/web/src/features/preview/preview-model.ts | Adds preview support/status derivation, policy parsing, and safety helpers. |
| apps/web/src/features/panes/live-projection.ts | Includes preview events in inspector activity derivation. |
| apps/web/src/features/panes/live-inspector.ts | Ensures empty projection includes preview fields. |
| apps/web/src/features/panes/activity-log.ts | Adds preview activity classification with strict redaction constraints. |
| apps/web/src/components/SessionScreen.tsx | Adds Preview badge/link in session header when previews exist. |
Files not reviewed (1)
- pnpm-lock.yaml: Generated file
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
# Conflicts: # THIRD_PARTY_NOTICES.md # apps/web/src/features/transcript/SessionMain.tsx # apps/web/src/router.tsx # apps/web/test/workspace-store.test.ts # compat/omp-app-matrix.json # packages/protocol/package.json # packages/protocol/test/distribution.test.ts # pnpm-lock.yaml # vendor/app-wire/manifest.json
…lay, and lease release
What this changes
This PR adds a focused, session-linked Browser/App Preview Workspace.
How you verified it
Focused checks completed after the review fixes:
The focused browser flow opens an isolated fixture session, enters Preview, recaptures a blob-backed snapshot, and preserves mobile touch targets without horizontal overflow.
Screenshot
Checklist