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.
JavaScript agentic-codingai-agentsai-governanceautonomous-agentsclaude-codeclicode-reviewcodexcoding-agentsdeveloper-toolsgit-hooksllmlocal-firstmulti-agentsoftware-factoryspec-driven-developmentverificationvibe-coding
chore(merge): integrate accepted browser removal [H5,E16]
Corey Olsonbf5dab691a1d
diff --cc relay/auth-http.jsindex 758e8960,5f7a3e04..c55df0df--- a/relay/auth-http.js+++ b/relay/auth-http.js@@@ -157,7 -159,7 +159,7 @@@ export function createAuthHandler({ aut} catch (error) {const code = error instanceof Refused ? error.code : 'INTERNAL_ERROR';const message = error instanceof Refused ? error.message.replace(/^\[[^\]]+\] /, '') : 'the relay could not complete this request; retry or contact its coordinator';- const status = code === 'BOARD_NOT_LINKED' ? 404 : code === 'AUTH_REQUIRED' ? 401 : ['DEVICE_REVOKED', 'NO_REPO_ACCESS', 'TOKEN_BOARD', 'TOKEN_NOT_OWNED', 'HUMAN_REQUIRED', 'BAD_ORIGIN', 'WRITE_REQUIRED'].includes(code) ? 403 : code === 'GITHUB_UNAVAILABLE' ? 503 : code === 'INTERNAL_ERROR' ? 500 : 400;- const status = code === 'RELAY_BOARD_DELETED' ? 410 : code === 'BOARD_NOT_LINKED' ? 404 : code === 'AUTH_REQUIRED' ? 401 : ['NO_REPO_ACCESS', 'TOKEN_BOARD', 'TOKEN_NOT_OWNED', 'HUMAN_REQUIRED', 'BAD_ORIGIN', 'WRITE_REQUIRED'].includes(code) ? 403 : code === 'GITHUB_UNAVAILABLE' ? 503 : code === 'INTERNAL_ERROR' ? 500 : 400;++ const status = code === 'RELAY_BOARD_DELETED' ? 410 : code === 'BOARD_NOT_LINKED' ? 404 : code === 'AUTH_REQUIRED' ? 401 : ['DEVICE_REVOKED', 'NO_REPO_ACCESS', 'TOKEN_BOARD', 'TOKEN_NOT_OWNED', 'HUMAN_REQUIRED', 'BAD_ORIGIN', 'WRITE_REQUIRED'].includes(code) ? 403 : code === 'GITHUB_UNAVAILABLE' ? 503 : code === 'INTERNAL_ERROR' ? 500 : 400;json(res, status, { error: { code, message, next: message } });}return true;diff --cc relay/auth.jsindex 3f390699,4ee6e18d..1172be7f--- a/relay/auth.js+++ b/relay/auth.js@@@ -97,11 -98,12 +99,15 @@@ export function createRelayAuth({ databfunction credential(token) {open();if (typeof token !== 'string' || !/^(ps_|pa_|pm_)[A-Za-z0-9_-]{43}$/.test(token)) throw new Refused('AUTH_REQUIRED', 'sign in to the relay or supply a current board token');- const row = db.prepare('SELECT c.*, u.login FROM relay_credentials c JOIN relay_users u ON u.id=c.user_id WHERE c.hash=?').get(hash(token));+ db.prepare('DELETE FROM relay_deleted_credentials WHERE expires<=?').run(now());+ const digest = hash(token);+ const row = db.prepare('SELECT c.*, u.login FROM relay_credentials c JOIN relay_users u ON u.id=c.user_id WHERE c.hash=?').get(digest);+ const deleted = !row && db.prepare('SELECT board FROM relay_deleted_credentials WHERE hash=? AND expires>?').get(digest, now());+ if (deleted) throw new Refused('RELAY_BOARD_DELETED', `relay copy ${deleted.board} was deleted; keep working locally, or run pullboard relay on to link it again`);if (!row || row.revoked || row.expires <= now()) throw new Refused('AUTH_REQUIRED', 'this credential is expired or revoked; sign in or obtain a new board token');+ if (row.kind === 'session') {+ for (const guard of sessionGuards) guard({ id: row.id, kind: row.kind, user: { id: row.user_id }, expires: row.expires });+ }return row;}diff --cc relay/browser-devices.jsindex ea4664d9,ed99c5de..f25c2bd8--- a/relay/browser-devices.js+++ b/relay/browser-devices.js@@@ -148,9 -127,8 +149,9 @@@ export async function installPhoneApproif (stopped) return;try {const response = await documentAt('/api/v1/devices/' + device.deviceId + '/approvals');+ if (stopped) return;const ids = new Set(response.approvals.map(value => value.context.id));- for (const child of [...panel.children]) if (!ids.has(child.dataset.request) && !active.has(child.dataset.request)) child.remove();+ for (const child of [...panel.children]) if (child.dataset.request && !ids.has(child.dataset.request) && !active.has(child.dataset.request)) child.remove();for (const row of response.approvals) {const context = approvalContext(row.context);if (context.device !== device.deviceId || context.account !== device.account || Date.now() >= context.expires ||diff --cc src/api-http.jsindex 6a10ae0a,06f7eaa4..d6213b0a--- a/src/api-http.js+++ b/src/api-http.js@@@ -352,7 -352,7 +352,7 @@@ export function applyStateDelta(state,/** Choose the same HTTP refusal class for local and sealed relay adapters. */export function apiStatus(error) {- return { AUTH_REQUIRED: 401, DEVICE_REVOKED: 403, TOKEN_BOARD: 403, API_ORIGIN: 403, BAD_ORIGIN: 403, WRITE_REQUIRED: 403, HUMAN_REQUIRED: 403, NO_REPO_ACCESS: 403, NO_BOARD: 404, NO_SHOUT: 404, BOARD_NOT_LINKED: 404, NO_SNAPSHOT: 404, BASELINE_EXISTS: 412, SNAPSHOT_REQUIRED: 409, SEQUENCE_REPEAT: 409, SEQUENCE_GAP: 409 }[error.code] ?? (error instanceof Refused ? 400 : 500);- return { RELAY_BOARD_DELETED: 410, AUTH_REQUIRED: 401, TOKEN_BOARD: 403, API_ORIGIN: 403, BAD_ORIGIN: 403, WRITE_REQUIRED: 403, HUMAN_REQUIRED: 403, NO_REPO_ACCESS: 403, NO_BOARD: 404, NO_SHOUT: 404, BOARD_NOT_LINKED: 404, NO_SNAPSHOT: 404, BASELINE_EXISTS: 412, SNAPSHOT_REQUIRED: 409, SEQUENCE_REPEAT: 409, SEQUENCE_GAP: 409 }[error.code] ?? (error instanceof Refused ? 400 : 500);++ return { RELAY_BOARD_DELETED: 410, AUTH_REQUIRED: 401, DEVICE_REVOKED: 403, TOKEN_BOARD: 403, API_ORIGIN: 403, BAD_ORIGIN: 403, WRITE_REQUIRED: 403, HUMAN_REQUIRED: 403, NO_REPO_ACCESS: 403, NO_BOARD: 404, NO_SHOUT: 404, BOARD_NOT_LINKED: 404, NO_SNAPSHOT: 404, BASELINE_EXISTS: 412, SNAPSHOT_REQUIRED: 409, SEQUENCE_REPEAT: 409, SEQUENCE_GAP: 409 }[error.code] ?? (error instanceof Refused ? 400 : 500);}// Relay-only snapshot/delete routes reuse the exact shared bounded-body and refusal boundary.diff --cc test/relay-browser.test.jsindex c731dd05,259e8af2..3bbbc4b7--- a/test/relay-browser.test.js+++ b/test/relay-browser.test.js@@@ -534,207 -535,65 +535,270 @@@ test('legacy queued presentations neveassert.equal(compacted.status, 409, 'the relay compacted the moves only after acknowledging their final checkpoint');});+/** Wait for a genuine native enrollment/approval to reach the fixture, without retrying a move. */+async function browserDeviceTransition(read, message) {+ const deadline = Date.now() + 90_000;+ while (Date.now() < deadline) {+ const value = read();+ if (value) return value;+ await new Promise(resolveTransition => setTimeout(resolveTransition, 25));+ }+ assert.fail(message);+}++/** Pair a real Chrome private key through the foreground Mac and its one-use enrollment. */+async function enrolledBrowser(box, t) {+ const setup = box.startCli(['relay', 'on', '--all', '--url', box.origin]);+ const machineFile = join(box.env.PULLBOARD_HOME, 'relay-machine/state.json');+ const pending = await browserDeviceTransition(() => existsSync(machineFile)+ && JSON.parse(readFileSync(machineFile, 'utf8')).pending, 'the Mac publishes the real phone enrollment');+ const chrome = await startChrome();+ t.after(() => chrome.close());+ await signIn(chrome, box);+ await chrome.navigate(box.origin + '/#device=' + pending.locator + '.' + pending.secret);+ const result = await setup.closed;+ assert.equal(result.code, 0, 'the genuine native phone enrollment succeeds');+ await chrome.waitFor("document.querySelector('#chain')?.textContent.includes('private cleanup fixture item') && document.querySelector('#phone-approvals') !== null");+ const state = JSON.parse(readFileSync(machineFile, 'utf8'));+ assert.equal(state.devices.length, 1);+ return { chrome, device: state.devices[0].deviceId };+}++/** Revoke the only enrolled browser through main's fresh provider sign-in, without its own approval. */+async function revokeBrowser(box, _chrome, device) {+ const before = box.calls.length;+ const authorized = box.providerState.deviceAuthorized;+ box.providerState.deviceAuthorized = false;+ try {+ const revoke = box.startCli(['relay', 'revoke', device]);+ await revoke.waitForOutput('Sign in with GitHub: open ');+ assert.ok(box.calls.slice(before).some(record => record.path === '/auth/device/start'),+ 'the only phone is removed through a fresh provider sign-in');+ assert.equal(box.calls.slice(before).some(record => record.path === '/api/v1/devices/approvals'), false,+ 'the target browser never approves its own removal');+ box.providerState.deviceAuthorized = true;+ const result = await revoke.closed;+ assert.equal(result.code, 0, 'a genuine fresh sign-in completes native revocation');+ assert.equal(JSON.parse(result.stdout).revoked, true);+ } finally { box.providerState.deviceAuthorized = authorized; }+}++test('a revoked device read is refused as revoked [H5,E16]', {+ skip: !findChromeExecutable() && 'Chrome is not installed',+}, async t => {+ const box = await relayClientFixture(t);+ const { chrome, device } = await enrolledBrowser(box, t);+ const link = JSON.parse(readFileSync(box.linkFile, 'utf8'));+ const session = await box.phoneSession();+ const headers = { cookie: 'pb_session=' + session.token, 'x-pullboard-engine': String(ENGINE_VERSION) };+ const endpoint = box.origin + '/api/v1/boards/' + link.board + '/state';+ assert.equal((await fetch(endpoint, { headers })).status, 200, 'the genuine enrolled browser can read before revocation');+ await revokeBrowser(box, chrome, device);+ await box.restartRelay();+ const response = await fetch(endpoint, { headers });+ const document = await response.json();+ assert.equal(document.error?.code, 'DEVICE_REVOKED', 'the same browser session cannot keep reading ciphertext after device revocation and relay restart');+ assert.equal(response.ok, false);+ assert.equal('state' in document, false);+ const machine = await fetch(endpoint, { headers: { authorization: 'Bearer ' + link.token, 'x-pullboard-engine': String(ENGINE_VERSION) } });+ assert.equal(machine.status, 200, 'revoking this browser does not revoke the linked computer');+});++test('a revoked browser shows it was removed and no board [H5,E16]', {+ skip: !findChromeExecutable() && 'Chrome is not installed',+}, async t => {+ const box = await relayClientFixture(t);+ const { chrome, device } = await enrolledBrowser(box, t);+ const key = 'pullboard.relay.keys.v1';+ assert.equal(await chrome.evaluate(`Object.keys(JSON.parse(localStorage.getItem(${JSON.stringify(key)}))).length > 0`), true);+ await revokeBrowser(box, chrome, device);+ await chrome.navigate(box.origin);+ await chrome.waitFor("document.body.textContent.includes('This browser was removed') || document.querySelector('#chain')?.textContent.includes('private cleanup fixture item')");+ assert.equal(await chrome.evaluate("document.body.textContent.includes('This browser was removed')"), true, 'reload distinguishes a removed browser from an unpaired browser');+ assert.equal(await chrome.evaluate("document.body.textContent.includes('private cleanup fixture item')"), false, 'the old decrypted board is not drawn');+ assert.equal(await chrome.evaluate(`localStorage.getItem(${JSON.stringify(key)}) === null`), true, 'the cached board keys are erased');+ assert.equal(await chrome.evaluate(`new Promise((resolve, reject) => {+ const open = indexedDB.open('pullboard-relay-device-v1', 1);+ open.onsuccess = () => { const db = open.result; const request = db.transaction('keys').objectStore('keys').get('device');+ request.onsuccess = () => { db.close(); resolve(request.result === undefined); }; request.onerror = () => reject(request.error); };+ open.onerror = () => reject(open.error);+ })`), true, 'the removed browser no longer retains its private device key');+ assert.equal(await chrome.evaluate("Object.keys(localStorage).some(key => key.startsWith('pullboard.relay.requests.v1.') || key.startsWith('pullboard.relay.owned-requests.v1.'))"), false, 'cached board request state is erased');+ assert.equal(box.keyInRequest(), false);+});+++test('revocation clears an already open browser and its cached board request state [H5,E16]', {+ skip: !findChromeExecutable() && 'Chrome is not installed',+}, async t => {+ const box = await relayClientFixture(t);+ const { chrome, device } = await enrolledBrowser(box, t);+ const board = JSON.parse(readFileSync(box.linkFile, 'utf8')).board;+ assert.equal(await chrome.evaluate("(window.__removedBoardReference = data.project).items.some(item => item.title === 'private cleanup fixture item')"), true);+ // These are device-local opaque caches, never authority or a relay response. Use the real key/sealer.+ await chrome.evaluate(`(async () => {+ const module = await import('/relay/seal.js');+ const board = ${JSON.stringify(board)};+ const key = module.decodeBoardKey(JSON.parse(localStorage.getItem('pullboard.relay.keys.v1'))[board]);+ const sealed = await module.seal(key, new TextEncoder().encode('removed cached request'), {boardId:board,kind:'request',sequence:1});+ let binary = ''; for (const value of sealed) binary += String.fromCharCode(value);+ localStorage.setItem('pullboard.relay.requests.v1.'+board+'.cached', JSON.stringify({id:'cached',sequence:1,sealed:btoa(binary)}));+ localStorage.setItem('pullboard.relay.owned-requests.v1.'+board, JSON.stringify(['cached']));+ return true;+ })()`);+ assert.equal(await chrome.evaluate("Object.keys(localStorage).filter(key => key.startsWith('pullboard.relay.requests.v1.') || key.startsWith('pullboard.relay.owned-requests.v1.')).length"), 2);+ await revokeBrowser(box, chrome, device);+ await chrome.waitFor("document.body.textContent.includes('This browser was removed')");+ assert.equal(await chrome.evaluate("document.body.textContent.includes('private cleanup fixture item')"), false, 'live authorization loss clears the actual drawn board before reload');+ assert.equal(await chrome.evaluate("window.__removedBoardReference.items?.length ?? 0"), 0, 'the shared cached board projection held by the cockpit is cleared, not only its DOM');+ assert.equal(await chrome.evaluate("Object.keys(localStorage).some(key => key.startsWith('pullboard.relay.requests.v1.') || key.startsWith('pullboard.relay.owned-requests.v1.'))"), false, 'non-empty opaque board request caches are erased');+ assert.equal(await chrome.evaluate("document.querySelector('#phone-approvals') === null"), true, 'removed browser releases its approval panel and polling loop');+ assert.equal(await chrome.evaluate("document.querySelector('#relay-removed a')?.getAttribute('href')"), '/auth/github/start');+});++/** Independently probe real public auth delegation after a genuinely enrolled browser is revoked. */+test('reviewer: a revoked bound session cannot regain ciphertext through auth machine minting [H5,E16]', {+ skip: !findChromeExecutable() && 'Chrome is not installed',+}, async t => {+ const box = await relayClientFixture(t);+ const {chrome, device} = await enrolledBrowser(box, t);+ const link = JSON.parse(readFileSync(box.linkFile, 'utf8'));+ const oldSession = await box.phoneSession();+ const retainedKey = await chrome.evaluate(`JSON.parse(localStorage.getItem('pullboard.relay.keys.v1'))[${JSON.stringify(link.board)}]`);+ assert.equal(typeof retainedKey, 'string', 'the genuinely enrolled browser already received this board key');+ const endpoint = box.origin + '/api/v1/boards/' + link.board + '/state';+ const oldHeaders = {authorization:'Bearer '+oldSession.token,'x-pullboard-engine':String(ENGINE_VERSION)};+ assert.equal((await fetch(endpoint,{headers:oldHeaders})).status,200,'the bound session has original read access');+ await revokeBrowser(box, chrome, device);+ const refused = await fetch(endpoint,{headers:oldHeaders});+ assert.equal(refused.status,403,'the direct bound-session read is refused');+ assert.equal((await refused.json()).error.code,'DEVICE_REVOKED','revocation is real, not an expired or foreign session');+ // A genuinely fresh unbound GitHub sign-in must remain eligible for lost-phone recovery (#755).+ const start = await fetch(box.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,'a fresh independent OAuth sign-in completes');+ const fresh=callback.headers.getSetCookie().find(value=>value.startsWith('pb_session=')).split(';')[0].slice('pb_session='.length);+ assert.notEqual(fresh,oldSession.token,'the positive control really uses a different fresh session');+ const freshRead=await fetch(endpoint,{headers:{authorization:'Bearer '+fresh,'x-pullboard-engine':String(ENGINE_VERSION)}});+ assert.equal(freshRead.status,200,'fresh unbound person recovery remains eligible');+ const minted=await fetch(box.origin+'/auth/machines',{method:'POST',headers:{...oldHeaders,'content-type':'application/json'},body:JSON.stringify({board:link.board,machine:'revoked-browser-redelegation'})});+ const document=await minted.json();+ let delegatedStatus=null,decryptedOriginal=false;+ if(minted.status===201){+ assert.match(document.token,/^pm_[A-Za-z0-9_-]{43}$/u,'the actual auth endpoint issued a machine delegate');+ const delegated=await fetch(endpoint,{headers:{authorization:'Bearer '+document.token,'x-pullboard-engine':String(ENGINE_VERSION)}});+ delegatedStatus=delegated.status;+ if(delegated.status===200){+ const {state}=await delegated.json();+ assert.equal(typeof state.sealed,'string','the relay served actual ciphertext, not merely a board name');+ const plain=await unseal(decodeBoardKey(retainedKey),Buffer.from(state.sealed,'base64url'),{boardId:link.board,kind:'snapshot',sequence:state.sequence});+ const snapshot=snapshotDocument(plain);+ decryptedOriginal=JSON.stringify(snapshot).includes('private cleanup fixture item');+ assert.equal(decryptedOriginal,true,'the previously received browser key decrypts the regained board');+ }+ }+ t.diagnostic(JSON.stringify({oldBoundRead:refused.status,freshUnboundRead:freshRead.status,machineMint:minted.status,delegatedRead:delegatedStatus,decryptedOriginal}));+ assert.equal(minted.status,403,'a revoked bound browser session must not mint a fresh machine credential that bypasses its revoked read');+ assert.equal(document.error?.code,'DEVICE_REVOKED');+});+/** The revoked session cannot exchange its refusal for another credential through the auth router. */+test('a revoked browser cannot mint or list relay credentials [H5,E16]', {+ skip: !findChromeExecutable() && 'Chrome is not installed',+}, async t => {+ const box = await relayClientFixture(t);+ const { chrome, device } = await enrolledBrowser(box, t);+ const link = JSON.parse(readFileSync(box.linkFile, 'utf8'));+ const session = await box.phoneSession();+ const old = { authorization: 'Bearer ' + session.token };- const paths = ['/auth/session', '/auth/boards', '/auth/tokens?board=' + link.board];++ const paths = ['/auth/session', '/auth/boards', '/auth/machines?board=' + link.board, '/auth/tokens?board=' + link.board];+ for (const path of paths) {+ const response = await fetch(box.origin + path, { headers: old });+ assert.equal(response.status, 200, 'the active enrolled session can read ' + path);+ await response.body?.cancel();+ }+ await revokeBrowser(box, chrome, device);+ await box.restartRelay();+ for (const headers of [old, { cookie: 'pb_session=' + session.token, origin: box.origin }]) {+ for (const path of paths) {+ const response = await fetch(box.origin + path, { headers });+ assert.equal(response.status, 403, 'the revoked session cannot read ' + path);+ assert.equal((await response.json()).error.code, 'DEVICE_REVOKED');+ }+ for (const [path, input] of [+ ['/auth/tokens', { board: link.board, agent: 'revoked-auth-route-probe' }],+ ['/auth/machines', { board: link.board, machine: 'revoked-auth-route-probe' }],+ ]) {+ const response = await fetch(box.origin + path, { method: 'POST',+ headers: { ...headers, 'content-type': 'application/json' }, body: JSON.stringify(input) });+ const document = await response.json();+ assert.equal(response.status, 403, 'the revoked session cannot mint through ' + path);+ assert.equal(document.error?.code, 'DEVICE_REVOKED');+ assert.equal(Object.hasOwn(document, 'token'), false, 'a refusal contains no delegated credential');+ }+ }+});+++ test('the link approval card names the computer and the board [H17,H5]', {+ skip: !findChromeExecutable() && 'Chrome is not installed',+ }, async t => {+ const box = await relayClientFixture(t);+ const { chrome, machineFile } = await pairStudioPhone(t, box);+ const notes = await studioProject(box, 'notes');+ const proposal = JSON.parse(readFileSync(machineFile, 'utf8')).approvals.find(entry => entry.root === notes);+ assert.ok(proposal?.published, 'registering notes on studio publishes one link request to the phone');+ await chrome.navigate(box.origin);+ await chrome.waitFor(`document.querySelector('.phone-approval[data-request="${proposal.context.id}"] button') !== null`);+ const card = await readApprovalCard(chrome, proposal.context.id);+ assert.match(card.text, /^Link notes from studio\?$/mu, 'the card asks in words which computer links which board');+ assert.equal(card.text.includes('fixture/repository'), true, 'the card names the repository being linked');+ assert.equal(card.text.includes('expires ' + phoneExpiry(proposal.context.expires)), true, 'the expiry is in the phone\'s local time');+ assert.equal(card.text.includes(new Date(proposal.context.expires).toISOString()), false, 'no UTC timestamp on the card');+ assert.doesNotMatch(card.text, /[0-9a-f]{32}/u, 'no raw 32-hex board id on the card');+ assert.equal(card.text.includes(proposal.context.machine) || /machine-/u.test(card.text), false, 'no machine id on the card');+ assert.ok(card.pad.every(value => value > 0), 'the card has padding on every side');+ assert.equal(card.inside, true, 'every line of the card\'s text sits inside its padding');+ assert.equal(card.action, 'Link project');+ });++ test('the delete card names the board and confirms the delete [H17,H5]', {+ skip: !findChromeExecutable() && 'Chrome is not installed',+ }, async t => {+ const box = await relayClientFixture(t);+ const notes = await studioProject(box, 'notes');+ const { chrome } = await pairStudioPhone(t, box);+ await chrome.waitFor("document.querySelectorAll('#proj-list .proj.repo').length === 2");+ const board = JSON.parse(readFileSync(join(notes, '.git/pullboard/relay.json'), 'utf8')).board;+ const off = await studioCommand(box, notes, ['relay', 'off']).done;+ assert.equal(off.code, 0, 'relay off on studio removes the local link and asks the phone');+ const posted = box.transit.findLast(record => record.method === 'POST' && record.path === '/api/v1/devices/approvals');+ const context = JSON.parse(posted.request.toString('utf8')).context;+ assert.equal(context.action, 'delete-board');+ assert.equal(context.board, board);+ const selector = `.phone-approval[data-request="${context.id}"]`;+ await chrome.waitFor(`document.querySelector('${selector} button') !== null`);+ const card = await readApprovalCard(chrome, context.id);+ assert.match(card.text, /^Delete notes from the relay\?$/mu, 'the delete card names the board');+ assert.equal(card.text.includes('studio'), true, 'the delete card names the computer that asked');+ assert.doesNotMatch(card.text, /[0-9a-f]{32}/u, 'no raw board id on the delete card');+ assert.equal(card.inside, true, 'the delete card keeps its text inside its padding');+ assert.equal(card.action, 'Delete relay copy');+ await chrome.evaluate(`document.querySelector('${selector} button').click()`);+ await chrome.waitFor("[...document.querySelectorAll('#phone-approvals [role=status]')].some(node => node.textContent === 'notes was deleted from the relay.')");+ const phone = await box.phoneSession();+ const boards = await (await fetch(box.origin + '/auth/boards', { headers: { cookie: 'pb_session=' + phone.token } })).json();+ assert.equal(boards.boards.some(entry => entry.id === board), false, 'the confirmation follows the relay deleting the board');+ await chrome.evaluate(`(() => {+ const original = window.fetch.bind(window);+ window.__approvalLists = 0;+ window.fetch = async (input, init) => {+ const response = await original(input, init);+ if (new URL(typeof input === 'string' ? input : input.url, location.href).pathname.endsWith('/approvals')) window.__approvalLists += 1;+ return response;+ };+ })()`);+ await chrome.waitFor('window.__approvalLists >= 2');+ assert.equal(await chrome.evaluate(`document.querySelector('${selector}') === null && [...document.querySelectorAll('#phone-approvals [role=status]')]+ .some(node => node.textContent === 'notes was deleted from the relay.')`), true, 'the tapped card is gone and its confirmation stays after the next refresh');+ });