Skip to content

Ask on remote reviews - #940

Merged
thesiti92 merged 7 commits into
mainfrom
remote/7-remote-ask
Oct 14, 2026
Merged

thesiti92 merged 7 commits into
mainfrom
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 added this pull request to stack #1105 October 13, 2026 15:38
@thesiti92
thesiti92 force-pushed the remote/7-remote-ask branch from c1e73e4 to ed4906e Compare October 13, 2026 16:00
@thesiti92
thesiti92 force-pushed the remote/7-remote-ask branch from ed4906e to 432ce3b Compare October 13, 2026 17:22
@thesiti92
thesiti92 force-pushed the remote/7-remote-ask branch from 432ce3b to c2b3610 Compare October 13, 2026 17:38
@thesiti92
thesiti92 force-pushed the remote/7-remote-ask branch from c2b3610 to 6b1b12f Compare October 13, 2026 21:49
@thesiti92
thesiti92 removed this pull request from stack #1105 October 13, 2026 22:42
@thesiti92
thesiti92 added this pull request to stack #1117 October 13, 2026 22:42
@thesiti92
thesiti92 force-pushed the remote/7-remote-ask branch 2 times, most recently from a9d0fb1 to 3c5ce09 Compare October 13, 2026 22:54
@thesiti92
thesiti92 force-pushed the remote/7-remote-ask branch 5 times, most recently from bb360f0 to f6f2321 Compare October 14, 2026 17:27
@thesiti92
thesiti92 force-pushed the remote/7-remote-ask branch from 79fb91a to dff3556 Compare October 14, 2026 17:51
Ask's agent environment is resolved on first use, so a slow login shell no longer delays startup.
The gateway's slow-route and stream-silence handling, thread idle close and reopen, and the install's API checks are tested where they live; what stays covers Ask's own routes and wiring.
The remote-ask journey drives the gateway's Ask routes end to end; route-table, copy and package-listing checks and tests of unchanged Ask code are gone.
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.

2 participants