Skip to content

Add native macOS screen sharing MVP - #7

Merged
pondorasti merged 13 commits into
mainfrom
codevisor/roquefort
Sep 15, 2026
Merged

pondorasti merged 13 commits into
mainfrom
codevisor/roquefort

Conversation

@pondorasti

@pondorasti pondorasti commented Sep 14, 2026 •

Copy link
Copy Markdown
Member

Codevisor workspaces can view and control an existing display on another Mac over LAN through a native Screen Sharing pane. ScreenCaptureKit and VideoToolbox H.264 feed WebRTC; Metal presents the video. Signaling is authenticated to the workspace and pane, clipboard transfer is explicit plain text, and closing the tab ends the session.

The disconnected pane uses a searchable display chooser. The native toolbar shows the machine name and resolution, a persistent View/Control selector, scaling, clipboard and diagnostics. New panes default to Control. The full toolbar stays interactive while connecting and applies the latest selected mode when ready. Menus suspend input forwarding without resetting the mode; focused Control forwards shortcuts such as Command-Space and Command-Q.

The branch incorporates main through 10bdc699, including attachment-thumbnail framing, center-only pane layout and focus-source ownership. Chatless workspace persistence and agent-terminal synchronization are preserved. Private measurement archives, signaling, desktop captures and runner logs are excluded.

Validation and packaging

  • Validation runs through the existing pre-commit hook: typography and the complete bun run check chain, without exclusions. This covers JavaScript formatting, lint, boundaries, typechecks, coverage and script tests; Swift formatting, lint and package tests; macOS transcript/composer tests; the iOS build and iOS transcript tests. The added PR workflow has been removed. Existing release and dependency-artifact workflows are unchanged.
  • The macOS app build passed. Actual-app verification on d455c353 covered formatted Markdown, streamed code, completion while hidden and returning to the latest content after a tab switch. Manual iOS inspection was blocked by DeviceHub accessibility errors; automated iOS transcript checks passed.
  • Test fixtures now await MP4 SDK callbacks, use async preparation gates and explicitly advance virtual reconnect backoff. Media and ordering assertions are retained; production policies are unchanged. The package suite also completes with a single cooperative Swift worker.
  • The product bundles exact audited macOS/iOS WebRTC dependency notices. The installed dependency remains the checksum-verified stasel 152.0.0 binary. The separate Xcode 26.6 source-build candidate passed all five architectures, notice/header/slice/signature/privacy/dSYM audits, 180 screen-sharing tests and a factory/peer/data-channel lifecycle smoke; it remains unpromoted.
  • Unpublished Developer ID packaging of d455c353 passed for both architecture-specific ZIPs and DMGs, including strict signatures, hardened runtime, timestamps, artifact integrity, source revision and bundled notices/privacy content. The signed ARM runtime loaded the screen-sharing API and exercised SQLite. Local packaging used Xcode 27 beta. Intel reused unchanged native dependencies from main CI with current JavaScript/resources and was not executed locally (no Rosetta). Notarization was not attempted because credentials are unavailable. No release was published.

Remaining verification

Merged to main at the user's direction after the full pre-commit checks passed. The final-source two-Mac acceptance pass remains blocked by missing Screen Recording authorization for the rebuilt development host. Earlier actual-app checks covered the loading toolbar, mode persistence, menus, sizing, hide/reopen and spinner removal; they do not replace the consolidated input/shortcuts, clipboard, focus/close/reconnect/host-stop cleanup and sustained-use pass.

The merge starts the existing Alpha build and publication workflow; completion is tracked separately from the merge. Macroscope review is unavailable due to a workspace billing/usage issue; no automatic approval is claimed. See the MVP checkpoint.

The paced15-worker profile remains an opt-in diagnostic. Apple performance parity, production-default tuning, internet/forced-relay guarantees, iOS viewing, audio and virtual displays are outside this MVP.

@pondorasti
pondorasti marked this pull request as ready for review September 15, 2026 02:46
@pondorasti
pondorasti merged commit c59d21a into main Sep 15, 2026
1 check passed
dylanplayer added a commit that referenced this pull request Oct 22, 2026
…ps (851-3020)

Items #7 and #10 of audit 3 (851-3014).

- CloudMachineConnection#onMessage is now a short router: binary data
  goes to #onRelayBatch, which decodes the batch (decodeRelayBatch,
  hub-frames.ts) and routes each envelope (#routeRelay); text frames are
  decoded and a switch on frame.t calls one named handler per type, so
  unknown and prototype-named types still fall through to a no-op.
  Welcome handling reads as steps: clear the welcome wait, adopt the
  connection (#adoptConnection), replay or discard retained frames
  (#settleRetained), welcome the peers, mark connected, report tunnel
  config and the welcome, then schedule the heartbeat. Pong and hub
  errors get their own guarded handlers.
- plugin-updates' resolveUpdates is now an orchestrator: triage the
  installed plugins, return early when none track the registry, fetch
  the registry (the await stays inline), then resolve each tracked
  plugin. The status logic moves to plugin-update-status.ts:
  triageInstalled/triagePlugin with receiptFor, registryFailures,
  resolveTracked with named predicates (repoMismatch,
  hasInvalidVersion, isUpToDate) and one builder per status shape,
  plus compatibilityFailure, moved unchanged.

Pure refactor: every await stays in its original async function and
only synchronous helpers were extracted. Splitting the receipt guard
exposed one untested branch, a receipt written for a different plugin
id, now covered by a new test (sourceUnknown, no registry fetch).

Verified with differential harnesses comparing HEAD and the new code
side by side over 30,000 seeds each: plugin updates (randomized
installed plugins, receipts, registries, fetch failures, installer
results, concurrent list/prepare/apply, clock moves) and the machine
connection in schema-decoded and raw-decoded modes (randomized text and
binary hub messages including unknown, malformed and prototype-named
types, stale sockets, re-entrant callbacks, timers, closes and
rejections). Logs of property reads, calls, sends, emits, timers and
microtask ticks were identical. All 38 mutants were caught, including
extra awaits, deferred work, reordered effects, dropped cases, early and
single reads, short-circuit order and swapped branches.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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