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
fix(relay): merge phone approval delivery [H17,E16]
Corey Olson2d2ca6ffdfe0
diff --cc relay/browser-devices.jsindex 49912597,ed99c5de..971d8e52--- a/relay/browser-devices.js+++ b/relay/browser-devices.js@@@ -157,7 -160,11 +160,11 @@@ export async function installPhoneApproawait documentAt('/api/v1/devices/approvals/' + context.id + '/complete', {method: 'POST', headers: { 'content-type': 'application/json' }, body: JSON.stringify({ response }),});- card.remove(); await onApproved(context);+ if (context.action === 'delete-board' && authorized.result?.deleted === context.board) {+ const done = document.createElement('p'); done.setAttribute('role', 'status'); done.textContent = deletedText(names);+ delete card.dataset.request; card.className = 'phone-approval phone-approval-done'; card.replaceChildren(done);+ } else card.remove();- await onApproved();++ await onApproved(context);} catch (error) { text.textContent = 'Approval failed: ' + (error instanceof Refused ? error.message : 'Request the action again from the Mac.'); }finally { active.delete(context.id); }};diff --cc src/relay-setup.jsindex a82084b6,376d61be..5a91a0b4--- a/src/relay-setup.js+++ b/src/relay-setup.js@@@ -152,13 -141,13 +152,15 @@@ async function linkProjects(session, ioconst machine = readRelayMachine();const linked = [];const failed = [];- for (const project of listApiProjects()) {+ const projects = listApiProjects();+ for (const project of projects) {if (machine.excluded.includes(project.root)) {onBoardOutcome?.({ root: project.root, name: project.name, outcome: 'skipped', reason: 'Excluded from automatic linking on this machine.' });+ io.say(`Did not link ${project.name}: it is excluded from automatic linking on this machine.`);continue;}+ // A board whose link card is on the phone waits for that tap; see waitForLinkApprovals.+ if (waiting.has(project.root)) continue;try {const result = await relayOn(project.root, session.url, io, { session, quiet: true, strict: true });linked.push({ project: project.name, root: project.root, board: result.board });@@@ -351,17 -284,12 +358,18 @@@ export async function relayOnAll(addres// From this synchronous commit point onward the first board-link attempt is underway; later// cancellation must not claim that already-started link writes were rolled back.onLinking?.();- updateRelayMachine(state => { state.autoLink = true; state.owner = { account: session.account, url: session.url }; state.approvals = []; });- const result = await linkProjects(session, io, { onBoardOutcome });+ // The view's sign-in links every board itself; a terminal run waits for cards already on the phone.+ const waiting = onPairingURL ? [] : waitingLinkApprovals(session);+ const waitingIds = new Set(waiting.map(entry => entry.context.id));+ 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 });+ const approved = await waitForLinkApprovals(waiting, io, { signal });+ result.linked.push(...approved.linked);+ result.failed.push(...approved.failed);return { ...result, ...pairing, autoLink: true };}