Skip to content

Ask on remote reviews - #940

Draft
thesiti92 wants to merge 1 commit into
remote/6-installer-connectfrom
remote/7-remote-ask
Draft

thesiti92 wants to merge 1 commit into
remote/6-installer-connectfrom
remote/7-remote-ask

Conversation

@thesiti92

@thesiti92 thesiti92 commented Oct 5, 2026 •

Copy link
Copy Markdown
Contributor

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

Manual test plan

Purpose. Ask works on a review whose checkout is on a host: the headless server serves Ask, the agent runs on the host with its own sign-ins, and threads live on the host. File names in answers show as text because Source windows do not exist yet.

Setup. Worktree at origin/remote/7-remote-ask. R up a --fake-agent; R install a (a fake OpenCode that answers You asked: <question>). Create the remote review on a. Launch; add wb-test-a.

Steps.

  1. Open Remote-order, select "One now returns", press ⌘L → Ask opens; its header names OpenCode with no agent menu (main's when only harness is installed dont show the selection dropdown #914: one installed agent gets no dropdown).
  2. S wb-test-a 'mv ~/.opencode ~/.opencode.off', refocus the window → Claude Code, Codex and OpenCode each read Not installed on wb-test-a. Move it back → the composer returns.
  3. Ask what does f.ts do → You asked: what does f.ts do streams in.
  4. f.ts in the answer is plain text with the tooltip Source windows are not available for a review on another machine.; clicking it does nothing.
  5. Kill Desktop's master (PR 3 step 7) → host back online → Saved conversations lists the thread.
  6. Quit and relaunch Desktop → the thread is still listed.
  7. Quit; launch again with a fresh DEV_REVIEW_HOME (redo the settings file), add the host → the same thread is listed (threads are on the host).
  8. Ask and then, then R pause a → the panel shows an alert containing lost its connection within 15 s; the host reads offline within 15 s. R resume a.
  9. Remove the host → the review leaves Home.

Negative checks.

Cleanup. Common cleanup; also rm -rf the second home.

Folded in from #945. Remote installs keep --omit=optional (drops ~650 MB of agent binaries), so the install script reads diffr's version from the tarball and installs @dev.fast/diffr-<target>@<version> explicitly. The installer containers test checks the diffr binary; remote-install checks it came through the relay.

Rebased onto main's Ask changes (#947, #948). One POST ask/watch stream replaces the per-thread watch route, and the gateway forwards it plus GET ask/:thread (saved conversations). The stack's own headless idle close is gone; main's sweep covers it.

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/7-remote-ask branch from 5302d3d to 1ac94f9 Compare October 5, 2026 19:38
@thesiti92
thesiti92 force-pushed the remote/7-remote-ask branch from 1ac94f9 to 6e36260 Compare October 5, 2026 20:00
@thesiti92
thesiti92 force-pushed the remote/7-remote-ask branch from 6e36260 to 561c68a Compare October 5, 2026 20:19
@thesiti92
thesiti92 force-pushed the remote/7-remote-ask branch 2 times, most recently from 4766a95 to b5d28da Compare October 5, 2026 20:40
@thesiti92
thesiti92 force-pushed the remote/7-remote-ask branch from b5d28da to 4766a95 Compare October 5, 2026 20:41
@thesiti92
thesiti92 force-pushed the remote/7-remote-ask branch from 4766a95 to f82f3fe Compare October 5, 2026 21:24
@thesiti92
thesiti92 force-pushed the remote/7-remote-ask branch from f82f3fe to 516a783 Compare October 5, 2026 21:38
@thesiti92
thesiti92 force-pushed the remote/7-remote-ask branch from 516a783 to d8426a2 Compare October 5, 2026 21:47
@thesiti92
thesiti92 force-pushed the remote/7-remote-ask branch from d8426a2 to 1b2aaa5 Compare October 5, 2026 23:08
@thesiti92
thesiti92 force-pushed the remote/7-remote-ask branch 2 times, most recently from ca672c8 to e7810ff Compare October 6, 2026 01:58
@thesiti92
thesiti92 force-pushed the remote/7-remote-ask branch from e7810ff to 419e2c8 Compare October 6, 2026 02:46
@thesiti92
thesiti92 force-pushed the remote/7-remote-ask branch from 419e2c8 to 50dc428 Compare October 6, 2026 03:46
@thesiti92
thesiti92 force-pushed the remote/7-remote-ask branch 2 times, most recently from 658b257 to 616c368 Compare October 6, 2026 16:06
@thesiti92
thesiti92 force-pushed the remote/7-remote-ask branch from 616c368 to 6039d82 Compare October 6, 2026 16:16
@thesiti92
thesiti92 force-pushed the remote/7-remote-ask branch from 6039d82 to f6bd979 Compare October 6, 2026 17:10
@thesiti92
thesiti92 force-pushed the remote/7-remote-ask branch from f6bd979 to 654d250 Compare October 7, 2026 13:31
@thesiti92
thesiti92 force-pushed the remote/7-remote-ask branch from 654d250 to c837282 Compare October 8, 2026 12:59
@thesiti92 thesiti92 mentioned this pull request Oct 8, 2026
2 of 4 tasks
@thesiti92
thesiti92 force-pushed the remote/7-remote-ask branch from c837282 to 8cccf62 Compare October 8, 2026 13:10
@thesiti92
thesiti92 force-pushed the remote/7-remote-ask branch from 8cccf62 to 6fbb83c Compare October 11, 2026 13:28
@thesiti92
thesiti92 force-pushed the remote/7-remote-ask branch from 6fbb83c to 22a128e Compare October 11, 2026 13:34

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