Skip to content

Autonomous development for real products. Governed agents build from specs you approve, follow the rules you set, and nothing merges until another agent proves it. Your decisions, judgement and taste are the bar that work must clear. Declare your vision and let agents build it.

feat(relay): pair another browser explicitly [H15,H17]

Corey Olson13c2b8d82b8d
diff --git a/relay/browser-notice.js b/relay/browser-notice.js
index 7750b233..87b5dd5b 100644
--- a/relay/browser-notice.js
+++ b/relay/browser-notice.js
@@ -89,7 +89,7 @@ export const RELAY_SCREEN_WORDS = Object.freeze({
/** Select guidance from observed inventory and key delivery, never infer why a computer has not uploaded. */
export function emptyBoardStep({ available = [], waitingBoards = new Map(), approvedBoards = new Set(), loaded = false, browserPaired = false, failure = '' } = {}) {
- const pair = { command: 'pullboard relay pair', ask: 'Help me pair this browser with my boards.',
+ const pair = { command: 'pullboard relay pair --new-browser', ask: 'Help me pair this browser with my boards.',
small: 'On the computer with the boards, run this, then open the link it prints here or scan its QR.' };
if (!loaded) return { title: 'Checking your linked boards', say: failure || 'Waiting for this account’s board list.', command: '', ask: '', small: '', waiting: failure || 'Checking your boards' };
if (approvedBoards.size) return { title: 'Finishing this pairing', say: 'Approved; waiting for the computer to send this browser its board keys.',
diff --git a/src/cli.js b/src/cli.js
index 6fcc25d7..27eaf447 100644
--- a/src/cli.js
+++ b/src/cli.js
@@ -491,7 +491,6 @@ function selectedHelp(command, first, second, rest, values) {
}
return null;
}
-
const OPTIONS = {
criterion: { type: 'string' },
specs: { type: 'string' },
@@ -501,6 +500,7 @@ const OPTIONS = {
port: { type: 'string' },
slots: { type: 'string' },
browser: { type: 'string' },
+ 'new-browser': { type: 'boolean' },
node: { type: 'string' },
root: { type: 'string' },
project: { type: 'boolean' },
diff --git a/src/commands/relay.js b/src/commands/relay.js
index e2f29771..a4b77da0 100644
--- a/src/commands/relay.js
+++ b/src/commands/relay.js
@@ -46,6 +46,7 @@ import {
/** Run `pullboard relay` and return its exit code. */
export async function run(io, { first, second, rest, values }) {
+ if (values['new-browser'] && first !== 'pair') throw new Refused('USAGE', 'pullboard relay pair --new-browser');
if (first === 'recover') {
if (second || rest.length || !values.skip || values.url || values.all) throw new Refused('USAGE', 'pullboard relay recover --skip <exact blocked next sequence>');
requirePersonChannel('terminal');
@@ -93,6 +94,7 @@ export async function run(io, { first, second, rest, values }) {
if (first === 'pair') {
if (second || rest.length || values.url) throw new Refused('USAGE', 'pullboard relay pair');
const ctx = context(io);
+ if (values['new-browser']) return await relayOnAllCommand(undefined, io, { pairAdditional: true });
return await relayPair(ctx.info.root, io);
}
if (first === 'join') {
diff --git a/src/help.js b/src/help.js
index 6fa2244d..0a43dcc0 100644
--- a/src/help.js
+++ b/src/help.js
@@ -44,6 +44,7 @@ Set up
pullboard relay [status|on|off|pair|join <code>] [--url <address>] link, inspect or unlink this board's sealed relay
on signs in through GitHub; the address defaults to https://app.pullboard.dev
pair prints a one-use machine code; join stores it in another clone
+ pullboard relay pair --new-browser sign in and pair one more browser; existing browsers stay paired
pullboard relay on --all [--url <address>] link every registered project after one sign-in; pair the phone once
keep this command open until pairing finishes; later projects link on registration
pullboard relay devices [--verbose] paired phones and joined computers by name, with paired date, last seen and boards
diff --git a/src/relay-setup.js b/src/relay-setup.js
index 4a4d6918..1d968e5a 100644
--- a/src/relay-setup.js
+++ b/src/relay-setup.js
@@ -301,9 +301,10 @@ function waitForPairingPoll(signal) {
}
/** Publish a one-use locator and wait in this command; cancellation never undoes linked boards. */
-async function pairFirstDevice(session, board, linked, io, { signal, onPairingURL } = {}) {
+async function pairFirstDevice(session, board, linked, io, { signal, onPairingURL, pairAdditional = false } = {}) {
+ const retryCommand = pairAdditional ? 'pullboard relay pair --new-browser' : 'pullboard relay on --all';
if (signal?.aborted) {
- io.say('Boards linked; phone pairing cancelled. Run pullboard relay on --all for a fresh code.');
+ io.say(pairAdditional ? 'Boards linked; browser pairing cancelled. Run ' + retryCommand + ' for a fresh code.' : 'Boards linked; phone pairing cancelled. Run pullboard relay on --all for a fresh code.');
return { paired: false, interrupted: false, pairingOutcome: 'cancelled', pairingCleanup: 'not-published' };
}
const pending = beginDeviceEnrollment(board, session);
@@ -328,12 +329,12 @@ async function pairFirstDevice(session, board, linked, io, { signal, onPairingUR
if (signal?.aborted || interrupted) pairingOutcome = 'cancelled';
else if (onPairingURL) onPairingURL({ url: link, expires: pending.expires });
else {
- io.say('Now waiting for a phone to pair. On your phone, scan the code below or open this link.');
- io.say('Pair your phone once: ' + link);
+ io.say(pairAdditional ? 'Now waiting for another browser to pair. Open this link in that browser, or scan the code on your phone.' : 'Now waiting for a phone to pair. On your phone, scan the code below or open this link.');
+ io.say((pairAdditional ? 'Pair this browser: ' : 'Pair your phone once: ') + link);
try { io.say(terminalQr(link)); }
catch (error) { if (error.code !== 'PAIR_LINK_LONG') throw error; io.say('Open the pairing link above.'); }
// Ctrl-C reaches the stop handler above, which keeps every linked board and exits cleanly.
- io.say(`To skip pairing, press Ctrl-C. The linked boards stay linked, and pullboard relay on --all gives a fresh code later. This code works until ${new Date(pending.expires).toISOString()}.`);
+ io.say(`To skip pairing, press Ctrl-C. The linked boards stay linked, and ${retryCommand} gives a fresh code later. This code works until ${new Date(pending.expires).toISOString()}.`);
}
while (!signal?.aborted && !interrupted && Date.now() < pending.expires) {
let result;
@@ -352,7 +353,7 @@ async function pairFirstDevice(session, board, linked, io, { signal, onPairingUR
locatorMayExist = false;
pairingCleanup = 'confirmed';
for (const project of linked) await deliverDeviceWraps(project.root, io);
- io.say('Phone paired; current and future linked boards will appear here.');
+ io.say(pairAdditional ? 'Browser paired; current and future linked boards will appear here.' : 'Phone paired; current and future linked boards will appear here.');
deviceId = device.deviceId;
pairingOutcome = 'paired';
break;
@@ -375,14 +376,14 @@ async function pairFirstDevice(session, board, linked, io, { signal, onPairingUR
}
if (pairingOutcome === 'paired') return { paired: true, deviceId, pairingOutcome, pairingCleanup };
io.say((onPairingURL
- ? `Boards linked; phone pairing ${pairingOutcome}. Run pullboard relay on --all for a fresh code.`
- : 'Boards linked; phone pairing stopped. Run pullboard relay on --all for a fresh code.')
+ ? `Boards linked; ${pairAdditional ? 'browser' : 'phone'} pairing ${pairingOutcome}. Run ${retryCommand} for a fresh code.`
+ : 'Boards linked; ' + (pairAdditional ? 'browser' : 'phone') + ' pairing stopped. Run ' + retryCommand + ' for a fresh code.')
+ (pairingCleanup === 'unconfirmed' ? ' The relay may retain this request until it expires.' : ''));
return { paired: false, interrupted: interrupted || Boolean(signal?.aborted), pairingOutcome, pairingCleanup };
}
/** Explicit foreground sign-in repairs links; only board machine credentials survive this command. */
-export async function relayOnAll(address, io, { signal, onPairingURL, onSignIn, onLinking, onBoardOutcome } = {}) {
+export async function relayOnAll(address, io, { signal, onPairingURL, onSignIn, onLinking, onBoardOutcome, pairAdditional = false } = {}) {
requirePersonChannel(io.personChannel);
// A cancelled or declined sign-in must not migrate machine state or scrub existing board links.
const owner = relayMachineOwner();
@@ -412,9 +413,9 @@ export async function relayOnAll(address, io, { signal, onPairingURL, onSignIn,
updateRelayMachine(state => { state.autoLink = true; state.owner = { account: session.account, url: session.url }; state.approvals = state.approvals.filter(entry => waitingIds.has(entry.context.id)); });
const result = await linkProjects(session, io, { onBoardOutcome, waiting: new Set(waiting.map(entry => entry.root)) });
const devices = readRelayMachine().devices.filter(device => device.account === session.account && device.url === session.url);
- if (devices.length) io.say('Your phone is already paired; the linked boards appear there.');
- const pairing = devices.length || !result.linked.length ? { paired: devices.length > 0 }
- : await pairFirstDevice(session, result.linked[0].board, result.linked, io, { signal, onPairingURL });
+ if (devices.length && !pairAdditional) io.say('Your phone is already paired; the linked boards appear there.');
+ const pairing = (devices.length && !pairAdditional) || !result.linked.length ? { paired: devices.length > 0 }
+ : await pairFirstDevice(session, result.linked[0].board, result.linked, io, { signal, onPairingURL, pairAdditional });
const approved = await waitForLinkApprovals(waiting, io, { signal });
result.linked.push(...approved.linked);
result.failed.push(...approved.failed);
@@ -428,15 +429,16 @@ export async function relayOnAll(address, io, { signal, onPairingURL, onSignIn,
*
* @param {string | undefined} address - The relay to use; the machine's saved relay when omitted.
* @param {any} io
+ * @param {{pairAdditional?: boolean}} options - Explicitly enroll one more browser; default setup stays idempotent.
* @returns {Promise<number>}
*/
-export async function relayOnAllCommand(address, io) {
+export async function relayOnAllCommand(address, io, { pairAdditional = false } = {}) {
const controller = new AbortController();
const cancelSignIn = () => controller.abort();
process.once('SIGINT', cancelSignIn);
process.once('SIGTERM', cancelSignIn);
let result;
- try { result = await relayOnAll(address, io, { signal: controller.signal }); }
+ try { result = await relayOnAll(address, io, { signal: controller.signal, pairAdditional }); }
finally { process.off('SIGINT', cancelSignIn); process.off('SIGTERM', cancelSignIn); }
io.result?.(result);
if (result.outcome) {
diff --git a/test/relay-pairing-options.test.js b/test/relay-pairing-options.test.js
new file mode 100644
index 00000000..c498952f
--- /dev/null
+++ b/test/relay-pairing-options.test.js
@@ -0,0 +1,83 @@
+/** @pullboard-test-input source-tree */
+/** Additional browser options retain CLI types, enrollment idempotence and cancellation [H15,H17]. */
+import assert from 'node:assert/strict';
+import { existsSync, readFileSync } from 'node:fs';
+import { join } from 'node:path';
+import { test } from 'node:test';
+import { relayClientFixture } from './relay-client-fixture.js';
+import { createDeviceKeys, signDeviceEnrollment } from '../src/relay-device-keys.js';
+
+/** Observe real enrollment state and optional foreground output before acting on the owned child. */
+async function enrollment(file, command, ready = '') {
+ const until = Date.now() + command.deadlineMs;
+ while (Date.now() < until) {
+ const state = existsSync(file) ? JSON.parse(readFileSync(file, 'utf8')) : null;
+ if (state?.pending && (!ready || command.stdout.includes(ready))) return state.pending;
+ if (command.child.exitCode !== null || command.child.signalCode !== null) break;
+ await new Promise(resolve => setTimeout(resolve, 25));
+ }
+ assert.fail('the real foreground enrollment did not become ready');
+}
+
+/** Enroll a signed supplemental protocol device; the separate acceptance test uses two real browsers. */
+async function firstDevice(box, file) {
+ const command = box.startCli(['relay', 'on', '--all', '--url', box.origin]);
+ const pending = await enrollment(file, command);
+ const published = await box.waitForResponse('/api/v1/devices/enrollments/' + pending.locator);
+ assert.equal(published.method, 'POST', 'native enrollment publication completes before the protocol device answers');
+ const headers = { authorization: 'Bearer ' + (await box.phoneSession()).token, 'content-type': 'application/json' };
+ const identity = await (await fetch(box.origin + '/api/v1/devices/session', { headers })).json();
+ const keys = await createDeviceKeys();
+ const body = await signDeviceEnrollment(pending.secret, { v: 1, account: identity.account, locator: pending.locator,
+ deviceId: keys.deviceId, publicKey: keys.publicKey, label: 'Protocol compatibility device', createdAt: new Date().toISOString() });
+ const response = await fetch(box.origin + '/api/v1/devices/enrollments/' + pending.locator,
+ { method: 'PUT', headers, body: JSON.stringify(body) });
+ assert.equal(response.status, 200);
+ assert.equal((await command.closed).code, 0);
+ return keys.deviceId;
+}
+
+test('the additional-browser flag preserves string options and refuses unrelated relay moves [H17]', async t => {
+ const box = await relayClientFixture(t);
+ const file = join(box.env.PULLBOARD_HOME, 'relay-machine/state.json');
+ const before = existsSync(file) ? readFileSync(file, 'utf8') : null;
+ const calls = box.calls.length;
+ for (const args of [['relay', 'recover', '--skip', '1'], ['relay', 'on', '--all'], ['relay', 'devices']]) {
+ const result = await box.cli(...args, '--new-browser');
+ assert.equal(result.code, 1);
+ assert.equal(result.document.error.code, 'USAGE');
+ }
+ assert.equal(box.calls.length, calls, 'misused flags do not reach relay endpoints');
+ assert.equal(existsSync(file) ? readFileSync(file, 'utf8') : null, before, 'misused flags do not mutate machine state');
+ const help = await box.startCli(['relay', '--help', '--browser=2'], {}, { json: false }).closed;
+ assert.equal(help.code, 0, 'the existing browser option still accepts a string value');
+ const missing = await box.startCli(['relay', '--browser'], {}, { json: false }).closed;
+ assert.equal(missing.code, 2, 'the existing string option still requires its value');
+ assert.match(missing.stderr, /--browser.*argument missing/iu);
+ assert.match(help.stdout, /relay pair --new-browser/u);
+});
+
+test('repeat setup retains its device and cancelling another browser names the fresh pairing command [H15,H17]', async t => {
+ const box = await relayClientFixture(t);
+ const file = join(box.env.PULLBOARD_HOME, 'relay-machine/state.json');
+ const device = await firstDevice(box, file);
+ const before = JSON.parse(readFileSync(file, 'utf8')).devices;
+ const enrollments = box.calls.filter(call => call.method === 'POST' && call.path.startsWith('/api/v1/devices/enrollments/')).length;
+ assert.ok(enrollments > 0, 'the initial real enrollment was observed before testing idempotence');
+ const repeated = await box.cli('relay', 'on', '--all');
+ assert.equal(repeated.code, 0);
+ assert.equal(box.calls.filter(call => call.method === 'POST' && call.path.startsWith('/api/v1/devices/enrollments/')).length, enrollments);
+ assert.deepEqual(JSON.parse(readFileSync(file, 'utf8')).devices, before);
+ const additional = box.startCli(['relay', 'pair', '--new-browser'], {}, { json: false });
+ const pending = await enrollment(file, additional, 'Now waiting for another browser');
+ assert.ok(pending.locator, 'a real additional enrollment exists before cancellation');
+ assert.equal(additional.child.kill('SIGINT'), true, 'only this exact owned foreground child receives SIGINT');
+ const stopped = await additional.closed;
+ assert.equal(stopped.code, 0);
+ assert.match(stopped.stdout, /Run pullboard relay pair --new-browser for a fresh code/u);
+ const after = JSON.parse(readFileSync(file, 'utf8'));
+ assert.equal(after.pending, null);
+ assert.deepEqual(after.devices, before, 'cancellation retains the first device exactly');
+ assert.equal(after.devices[0].deviceId, device);
+ assert.equal((await box.cli('relay', 'pair')).code, 0, 'bare pairing still creates a computer-clone bundle');
+});
diff --git a/test/relay-pairing.test.js b/test/relay-pairing.test.js
new file mode 100644
index 00000000..995e9aaf
--- /dev/null
+++ b/test/relay-pairing.test.js
@@ -0,0 +1,98 @@
+/** @pullboard-test-input source-tree */
+/** The command shown to a second browser enrolls it without replacing the first [H15,H17]. */
+import assert from 'node:assert/strict';
+import { readFileSync } from 'node:fs';
+import { join } from 'node:path';
+import { test } from 'node:test';
+import { relayClientFixture } from './relay-client-fixture.js';
+import { findChromeExecutable } from './relay-browser-fixture.js';
+import { startChrome } from './relay-browser-fixture.js';
+
+/** Observe real machine enrollment until the command exits, without fabricating relay state. */
+async function pendingEnrollment(file, command) {
+ const until = Date.now() + command.deadlineMs;
+ while (Date.now() < until) {
+ let state;
+ try { state = JSON.parse(readFileSync(file, 'utf8')); }
+ catch (error) { if (error.code !== 'ENOENT') throw error; }
+ if (state?.pending) return state.pending;
+ if (command.child.exitCode !== null || command.child.signalCode !== null) return null;
+ await new Promise(resolve => setTimeout(resolve, 25));
+ }
+ assert.fail('the real pairing command never published a fresh browser enrollment');
+}
+
+/** Sign the second browser in through a distinct real OAuth session, never reuse a device-bound cookie. */
+async function secondBrowserSession(origin) {
+ const start = await fetch(origin + '/auth/github/start', { redirect: 'manual' });
+ const binding = start.headers.getSetCookie().find(value => value.startsWith('pb_oauth_binding=')).split(';')[0];
+ const approved = await fetch(start.headers.get('location'), { redirect: 'manual' });
+ const callback = await fetch(approved.headers.get('location'), { redirect: 'manual', headers: { cookie: binding } });
+ assert.equal(callback.status, 303, 'the second browser has its own real OAuth sign-in');
+ return callback.headers.getSetCookie().find(value => value.startsWith('pb_session=')).split(';')[0].slice('pb_session='.length);
+}
+
+/** Read only public device identity and private-key extractability from actual browser storage. */
+function deviceExpression() {
+ return `new Promise((resolve, reject) => { const request = indexedDB.open('pullboard-relay-device-v1', 1);
+ request.onsuccess = () => { const db = request.result; const read = db.transaction('keys').objectStore('keys').get('device');
+ read.onsuccess = () => { const value = read.result; db.close(); resolve({ id: value.deviceId, extractable: value.privateKey.extractable }); };
+ read.onerror = () => reject(new Error('private fixture device read failed')); };
+ request.onerror = () => reject(new Error('private fixture browser storage unavailable')); })`;
+}
+
+test('a second browser pairs with the command the page names after the first is paired [H15,H17]', async t => {
+ assert.ok(findChromeExecutable(), 'the acceptance case requires the installed real browser');
+ const box = await relayClientFixture(t);
+ const browsers = [];
+ t.after(async () => {
+ const outcomes = await Promise.allSettled(browsers.map(browser => browser.close()));
+ for (const outcome of outcomes) if (outcome.status === 'rejected') throw outcome.reason;
+ });
+ const machineFile = join(box.env.PULLBOARD_HOME, 'relay-machine/state.json');
+ const firstCommand = box.startCli(['relay', 'on', '--all', '--url', box.origin]);
+ const firstPending = await pendingEnrollment(machineFile, firstCommand);
+ assert.ok(firstPending, 'real on --all publishes the first browser enrollment');
+ const first = await startChrome({ profileDirectory: join(box.env.HOME, 'first-browser') });
+ browsers.push(first);
+ const session = await box.phoneSession();
+ assert.equal((await first.send('Network.setCookie', { name: 'pb_session', value: session.token, url: box.origin, httpOnly: true, sameSite: 'Lax' })).success, true);
+ await first.navigate(box.origin + '/#device=' + firstPending.locator + '.' + firstPending.secret);
+ const firstDone = await firstCommand.closed;
+ assert.equal(firstDone.code, 0, 'the first real enrollment completes');
+ await first.waitFor("document.querySelectorAll('#proj-list .proj.repo').length === 1");
+ await first.waitFor("data?.project?.items?.some(item => item.title === 'private cleanup fixture item') && document.querySelector('#chain')?.textContent.includes('private cleanup fixture item')");
+ const firstDevice = await first.evaluate(deviceExpression());
+ assert.equal(firstDevice.extractable, false);
+
+ const second = await startChrome({ profileDirectory: join(box.env.HOME, 'second-browser') });
+ browsers.push(second);
+ assert.equal((await second.send('Network.setCookie', { name: 'pb_session', value: await secondBrowserSession(box.origin), url: box.origin, httpOnly: true, sameSite: 'Lax' })).success, true);
+ await second.navigate(box.origin + '/');
+ await second.waitFor("document.querySelector('.relay-command:not([hidden]) code')?.textContent.includes('pullboard relay')");
+ const named = await second.evaluate("document.querySelector('.relay-command code').textContent.replace(/^\\$\\s*/, '').trim()");
+ assert.match(named, /^pullboard relay /u, 'the real second browser names a native pairing command');
+ const args = named.split(/\s+/u);
+ assert.equal(args.shift(), 'pullboard');
+ const secondCommand = box.startCli(args);
+ const secondPending = await pendingEnrollment(machineFile, secondCommand);
+ assert.ok(secondPending, 'the command the second browser names publishes a fresh enrollment');
+ assert.notEqual(secondPending.locator, firstPending.locator, 'the second enrollment is fresh');
+ await second.navigate(box.origin + '/#device=' + secondPending.locator + '.' + secondPending.secret);
+ assert.equal((await secondCommand.closed).code, 0, 'the second real enrollment completes');
+ await second.waitFor("document.querySelectorAll('#proj-list .proj.repo').length === 1");
+ await second.waitFor("data?.project?.items?.some(item => item.title === 'private cleanup fixture item') && document.querySelector('#chain')?.textContent.includes('private cleanup fixture item')");
+ const secondDevice = await second.evaluate(deviceExpression());
+ assert.equal(secondDevice.extractable, false);
+ assert.notEqual(secondDevice.id, firstDevice.id, 'independent browser profiles retain distinct keys');
+ const state = JSON.parse(readFileSync(machineFile, 'utf8'));
+ assert.deepEqual(state.devices.map(device => device.deviceId).sort(), [firstDevice.id, secondDevice.id].sort(), 'both browser enrollments remain on this machine');
+ assert.equal(state.pending, null);
+ const freshTitle = 'Fresh board content after the second browser paired';
+ assert.equal((await box.cli('add', box.lane, freshTitle)).code, 0, 'a real later native move publishes fresh content');
+ for (const browser of [first, second]) {
+ await browser.navigate(box.origin + '/');
+ await browser.waitFor("data?.project?.items?.some(item => item.title === " + JSON.stringify(freshTitle) + ") && document.querySelector('#chain')?.textContent.includes(" + JSON.stringify(freshTitle) + ")");
+ }
+ assert.equal((await first.evaluate(deviceExpression())).id, firstDevice.id, 'the first browser still opens its board with its original key');
+});
diff --git a/test/relay-person-page.test.js b/test/relay-person-page.test.js
index d10372df..ec0ff64f 100644
--- a/test/relay-person-page.test.js
+++ b/test/relay-person-page.test.js
@@ -33,7 +33,7 @@ test('a signed-in phone names its empty-board blocker and one next step [N26,H5,
const shown = await emptyPhoneScreen(box.chrome);
assert.match(shown.text, /not paired/iu);
assert.match(shown.text, /open.*link.*here/iu);
- assert.ok(shown.commands.includes('pullboard relay pair'));
+ assert.ok(shown.commands.includes('pullboard relay pair --new-browser'));
assert.equal(shown.text.includes('pullboard relay on --all'), false);
});
await t.test('known board key but no first copy', async t => {
@@ -52,16 +52,16 @@ test('a signed-in phone names its empty-board blocker and one next step [N26,H5,
const shown = await emptyPhoneScreen(box.chrome);
assert.match(shown.text, /linked boards.*none.*read/iu);
assert.match(shown.text, /keys/iu);
- assert.ok(shown.commands.includes('pullboard relay pair'));
+ assert.ok(shown.commands.includes('pullboard relay pair --new-browser'));
assert.equal(shown.text.includes('pullboard relay on --all'), false);
});
});
test('a signed-in second computer names a linked board blocker without asking to share again [H5,H17]', chromeOptions, async t => {
for (const [name, options, command] of [
- ['unpaired', {}, 'pullboard relay pair'],
+ ['unpaired', {}, 'pullboard relay pair --new-browser'],
['first copy missing', { savedKey: true }, 'pullboard relay status'],
- ['paired without grants', { enrolled: true }, 'pullboard relay pair'],
+ ['paired without grants', { enrolled: true }, 'pullboard relay pair --new-browser'],
]) await t.test(name, async t => {
const box = await emptyPhoneFixture(t, { ...options, phone: false });
await box.chrome.waitFor("document.querySelector('#relay-notice')?.textContent.includes('fixture/empty-project')");
@@ -80,7 +80,7 @@ test('a phone shows its account quota warning while its already-linked board sti
assert.equal(shown.visible, true);
assert.ok(shown.text.includes(message), 'the actual quota warning is visible in the phone screen, not hidden under it');
assert.match(shown.text, /not paired/iu, 'the independently observed pairing blocker still names its own step');
- assert.ok(shown.commands.includes('pullboard relay pair'));
+ assert.ok(shown.commands.includes('pullboard relay pair --new-browser'));
assert.equal(shown.text.includes('pullboard relay on --all'), false, 'a linked board is not asked to share again');
});