Skip to content

fix(web): expand control preview and dismiss ended sessions - #3560

Merged
bobleer merged 1 commit into
GCWing:mainfrom
bobleer:bob/computer-control-preview-lifecycle
Oct 27, 2026
Merged

bobleer merged 1 commit into
GCWing:mainfrom
bobleer:bob/computer-control-preview-lifecycle

Conversation

@bobleer

@bobleer bobleer commented Oct 27, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

The app-control card currently starts with its preview hidden and remains on screen after control ends. Show the controlled window by default, and remove the card when the host reports the session has ended, including task cancellation and user Stop.

Manual collapse remains available and is scoped to the device activation and control generation. A new session fetches its first preview immediately instead of inheriting the previous session's collapsed state. Failed status or Stop requests retain the live card and Stop action.

Type and Areas

Bug fix / UI behavior; shared Web UI app-control card.

Motivation / Impact

Users can see the controlled window without clicking Show Preview, and an ended task no longer leaves a stopped notification covering the screen. Active, starting, and awaiting-share sessions remain visible. Existing shared previews also open by default and stop observing when their card is removed.

Verification

  • pnpm --dir src/web-ui exec vitest run --maxWorkers=50% src/app/components/ComputerUseControlCard.test.tsx src/app/components/computer-use src/infrastructure/api/adapters/peer-device-adapter.test.ts — 114 tests passed across 6 files.
  • pnpm --dir src/web-ui exec vitest run --maxWorkers=50% src/shared/ui/OverlayStack.test.tsx src/shared/ui/OverlayOwnership.contract.test.ts src/shared/ui/Dialog.test.tsx src/shared/ui/MenuPopover.test.tsx src/infrastructure/appearance/runtime/AppearanceOverlayHost.test.ts src/shared/notification-system/components/NotificationContainer.test.tsx src/shared/context-menu-system/components/ui/ContextMenu.test.tsx — 60 tests passed across 7 files.
  • pnpm run check:web — passed, including TypeScript and Appearance/theme governance.
  • pnpm --dir src/web-ui exec eslint src/app/components/ComputerUseControlCard.tsx — passed.
  • git diff --check — passed.

Regression coverage includes default expansion, collapse retention, immediate expansion on a new generation, an already-stopped snapshot, externally ended control, failed Stop, late status/preview responses, same-generation device switches, and shared-preview teardown. Legacy snapshots without sharing or target revisions remain covered.

Reviewer Notes

AI-assisted; tested with local DOM and transport fixtures. No native UI screenshot or native OS input validation was performed. The normal preview endpoint reads an existing scoped frame cache; the change does not start native capture or modify authorization. No wire or persisted shape changes.

Remote scenarios: Peer Device isolation is covered with mocked device switches and adapter tests, not a live peer connection. Remote workspace, Remote Control, and Detached Dispatch were not exercised end to end.

Checklist

  • This PR is focused and does not include secrets, temporary prompts, generated scratch files, or unrelated artifacts.
  • Relevant verification is recorded above, or skipped checks are explained.
  • User-facing strings, docs, and locales are updated where applicable (existing strings reused).

@bobleer
bobleer merged commit 9cc22e4 into GCWing:main Oct 27, 2026
9 checks passed
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.

1 participant