Skip to content

Open Source windows for remote reviews - #942

Draft
thesiti92 wants to merge 1 commit into
remote/8-source-windows-trustfrom
remote/9-source-windows
Draft

thesiti92 wants to merge 1 commit into
remote/8-source-windows-trustfrom
remote/9-source-windows

Conversation

@thesiti92

@thesiti92 thesiti92 commented Oct 5, 2026 •

Copy link
Copy Markdown
Contributor

Stacked PR 9 of 9 for remote reviews (base: remote/8-source-windows-trust; #934, the rename, is merged). Review in order; each PR builds and passes its suites on its own.

Manual test plan

Purpose. Open file, the source tree and Ask file links on a remote review open a read-only Source window bound to the host: the navigator answers vscode-remote://whiteboard+<serverId> URIs, the window resolves and reconnects through Electron main, runs the host's extensions as a stock VS Code remote window does, and shows the host's state. Adds the source-window journey and the docs.

Setup. Worktree at origin/remote/9-source-windows. Build the remote runtime. R up a --fake-agent; R install a; R ssh a -- whiteboard remote extensions ensure. awk '/^const fixture = String.raw/{f=1;next} /^;/{f=0} f' apps/review-desktop/scripts/e2e/journeys/remote-source-window.mjs > /tmp/wb-source.sh; S wb-test-a 'bash -s -- Remote-source Second-checkout' < /tmp/wb-source.sh. Launch; add wb-test-a → online, Language features: available.

Steps.

  1. api /reviews-api → both reviews have available.sourceWindows: true.
  2. Remote-source → Diff → Open file on f.ts → one new window titled Remote-source — Source — Whiteboard; its status bar entry reads wb-test-a.
  3. Its explorer lists added.ts, docs, f.ts.
  4. Typing in f.ts changes nothing and shows the read-only notice.
  5. ⌘P needle → docs/needle.md; ⌘⇧F wbsource-needle → one hit there.
  6. Hover one → function one(): number.
  7. Quick fix on unused (line 6) → Remove unused declaration… runs; its never read diagnostic clears.
  8. ⌘⇧P TypeScript → the host's TypeScript commands are listed (for example TypeScript: Restart TS Server).
  9. From the review, open added.ts's diff → same Source window; left side empty, right side wbsource-added.
  10. ⌘L in the review, ask where is `./f.ts:7` → the answer's ./f.ts:7 is a link; clicking opens f.ts at line 7 in the same window.
  11. Open file in Second-checkout → a second window; S wb-test-a "ps -eo args | grep -c -- '--type=extensionHos[t]'" goes up by one.
  12. R pause a → within about 15 s the status bar reads wb-test-a — offline, reconnecting…, no dialog. R resume a → wb-test-a again; the explorer answers.
  13. R pause a, quit and relaunch Desktop → the restored Source window shows the same offline entry, no dialog; R resume a → it reconnects and shows f.ts.
  14. Remove wb-test-a in Settings → its Source windows close.

Negative checks.

  • A paused host (step 12, and step 13 after a restart) shows the offline entry, never a dialog.
  • Removing the host (step 14) closes its Source windows; none is left.
  • DevTools Network (review window): each navigator answer has workspaceUri/fileUri on vscode-remote://whiteboard%2B… and remoteAuthority, never workspacePath/filePath.
  • Journeys: remote-source-window, remote-host, remote-ask.

Cleanup. Common cleanup.

Reviewer notes

  • Remote hosts are trusted the way VS Code Remote trusts them: a remote Source window is a stock VS Code remote window plus the whiteboard+ resolver, the read-only and title defaults and the host-state entry (docs/superpowers/plans/2026-10-05-adopt-vscode-trust-model.md). The gateway's path refusals and the navigator's URI answers stay: they keep a host path from being read as a laptop path and the laptop token off the wire (ruling T7).
  • Not a defect: one offline toast per window, as briefed; later outages update the status bar entry only.
  • Not a defect: ~130 MB per Source window is measured (the stage-4 spec's figure is stale); the journey records it.
  • Not a defect: "live" is derived in three places (canvas part, tabs service) and they agree.
  • Not a defect: the language-source branch of the tabs service is unreachable for remote reviews.
  • Not a defect: reviewRemoteWindowExtensionManagement patches constructor arguments by position; the positions are typed through ConstructorParameters. The stub stays because the trimmed server registers no extensions channel.
Common setup for all plans

Common setup (read once)

  • Test each PR in a worktree at its head branch: git -C <core> worktree add --detach ../review-prN origin/<head>, then pnpm install there. Run everything below from that worktree root.
  • Helpers (bash or zsh):
R() { node apps/review-desktop/scripts/e2e/remote/remote.mjs "$@"; }
export WB_TEST_RUN=manual-$$                  # before the first `R up`
S() { ssh -F /tmp/wbt.$WB_TEST_RUN/ssh_config "$@"; }   # host aliases are wb-test-<name>
H=/tmp/wb-home-$WB_TEST_RUN                   # isolated Desktop home
mkdir -p $H/review-desktop/state/user-data/User
echo '{"review.experimental.remoteHosts.enabled": true}' > $H/review-desktop/state/user-data/User/settings.json
awk '/createRemoteReview = String.raw`/{f=1;next} /^`;/{f=0} f' apps/review-desktop/scripts/e2e/journeys/remote-host.mjs > /tmp/wb-review.sh
sed -e 's/open\\":false/open\\":true/' -e 's/wbrepo/wbrepo2/g' /tmp/wb-review.sh > /tmp/wb-push.sh
edit() { printf '{"sessionId":"%s","edit":{"type":"insert","content":{"type":"markdown","markdown":"%s"}}}' "$2" "$3" | S "$1" 'whiteboard api session_edit -'; }
  • Launch (dev build only; a packaged build ignores both env vars): DEV_REVIEW_HOME=$H DEV_FAST_REVIEW_SSH_CONFIG=/tmp/wbt.$WB_TEST_RUN/ssh_config pnpm dev (prefix DEV_FAST_REVIEW_DESKTOP_BACKGROUND=1 to keep it from taking focus).
  • Desktop API: D=$(ls $H/review-desktop/instances/dev-*.json); URL=$(node -p "require('$D').url"); TOK=$(node -p "require('$D').token"); api() { curl -s -H "x-review-token: $TOK" "$URL$1"; }
  • A remote review: ID=$(S wb-test-a 'bash -s -- Remote-order' < /tmp/wb-review.sh | head -1) (repo ~/wbrepo, review "Remote-order" with a prose line and a code peek of f.ts). /tmp/wb-push.sh is the same with open: true in ~/wbrepo2.
  • Settings: ⌘, → region Remote hosts → type the alias in SSH alias → Add.
  • Fork unit tests: (cd apps/review-desktop && TSX_TSCONFIG_PATH=tsconfig.test.json node --import tsx --test --test-force-exit <files>). Package tests: pnpm --filter @dev.fast/whiteboard test <files>.
  • Journeys: stage a runtime per apps/review-desktop/scripts/e2e/TESTING.md ("Staging the runtime"), then node apps/review-desktop/scripts/e2e/run.mjs --runtime "$REVIEW_E2E_RUNTIME" --journey <name>.
  • The harness has pause/resume (there is no unpause).
  • Cleanup, every plan: quit Desktop first (its ssh masters count as leftovers), then R down --all; R verify-clean; rm -rf $H /tmp/wb-*.sh. Without an aws sso login session verify-clean also prints AWS could not be checked and exits 1; no other line may appear.

@thesiti92
thesiti92 added this pull request to stack #943 October 5, 2026 19:37
@thesiti92
thesiti92 force-pushed the remote/9-source-windows branch 2 times, most recently from 22e21f7 to 7aab040 Compare October 5, 2026 20:00
@thesiti92
thesiti92 force-pushed the remote/9-source-windows branch from 7aab040 to bce90cd Compare October 5, 2026 20:19
@thesiti92
thesiti92 force-pushed the remote/9-source-windows branch from bce90cd to 7e3845f Compare October 5, 2026 20:35
@thesiti92
thesiti92 force-pushed the remote/9-source-windows branch from 7e3845f to 532169a Compare October 5, 2026 20:40
@thesiti92
thesiti92 force-pushed the remote/9-source-windows branch from 532169a to 7e3845f Compare October 5, 2026 20:41
@thesiti92
thesiti92 force-pushed the remote/9-source-windows branch 2 times, most recently from 0c03663 to 36f05da Compare October 5, 2026 21:38
@thesiti92
thesiti92 force-pushed the remote/9-source-windows branch from 36f05da to b55e244 Compare October 5, 2026 21:47
@thesiti92
thesiti92 force-pushed the remote/9-source-windows branch from b55e244 to 5516292 Compare October 5, 2026 23:09
@thesiti92
thesiti92 force-pushed the remote/9-source-windows branch from 5516292 to 22e4ce1 Compare October 6, 2026 01:08
@thesiti92
thesiti92 force-pushed the remote/9-source-windows branch from 22e4ce1 to 6a50048 Compare October 6, 2026 01:58
@thesiti92
thesiti92 force-pushed the remote/9-source-windows branch from 6a50048 to 4c2c1ae Compare October 6, 2026 02:46
@thesiti92
thesiti92 force-pushed the remote/9-source-windows branch from 4c2c1ae to 1214041 Compare October 6, 2026 03:46
@thesiti92
thesiti92 force-pushed the remote/9-source-windows branch from 1214041 to b8aa084 Compare October 6, 2026 15:57
@thesiti92
thesiti92 force-pushed the remote/9-source-windows branch 2 times, most recently from 0eed111 to 838dfb3 Compare October 6, 2026 16:16
@thesiti92
thesiti92 force-pushed the remote/9-source-windows branch from 838dfb3 to 4fac3ff Compare October 6, 2026 17:10
@thesiti92
thesiti92 force-pushed the remote/9-source-windows branch from 4fac3ff to b7e28f3 Compare October 7, 2026 13:31
@thesiti92
thesiti92 force-pushed the remote/9-source-windows branch from b7e28f3 to aa59e3a Compare October 8, 2026 12:59
@thesiti92
thesiti92 force-pushed the remote/9-source-windows branch from aa59e3a to 3f0ab1c Compare October 8, 2026 13:10

This branch has not been deployed

No deployments
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