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(view): the release note follows the selected board's source [N26,A2]
Corey Olsonf052049da9e1
diff --git a/src/cockpit.js b/src/cockpit.jsindex f482e3a0..9655256f 100644--- a/src/cockpit.js+++ b/src/cockpit.js@@ -318,7 +318,13 @@ const $ = (id) => document.getElementById(id);// The update note from src/view/hosted-release.js (#632): only a confirmed read of this machine's view says how far behind it is.// Only the hosted page builds it; every other page draws nothing and never touches the DOM for it.const renderHostedReleaseNote = ${releaseHosted ? `(${hostedReleaseNote.toString()})(${releaseInfo}, { $, keep, distance: (${hostedReleaseDistance.toString()}),- readable: () => hosted.local && localConfirmed && Boolean(localSession) && connection.base === localSession.origin && !transportModule && !transport,+ // The selected board's own source decides (#632 review): a confirmed local board keeps its note on a mixed list that+ // also reads relay boards, and a selected relay board never shows one; with no board selected, only an all-local page.+ readable: () => {+ if (!hosted.local || !localConfirmed || !localSession || connection.base !== localSession.origin) return false;+ const board = data?.projects?.find((entry) => entry.root === view.root && entry.ok);+ return board ? boardSources.get(board.id)?.kind === 'local' : !transportModule && !transport;+ },project: (project = data?.project) => project?.releaseNotes ? project : data?.projects?.find((entry) => entry.ok && entry.releaseNotes) })` : '() => {}'};const hostedState = (${hostedState.toString()});diff --git a/test/cockpit/local-origin.test.js b/test/cockpit/local-origin.test.jsindex 7ea865b7..e202923c 100644--- a/test/cockpit/local-origin.test.js+++ b/test/cockpit/local-origin.test.js@@ -408,6 +408,50 @@ test('the hosted page says how far behind this machine\'s Pullboard is [N26,A2]'local.versionOverride = '0.8.23';await open('0.8.21');assert.equal(await bannerHidden(), true, 'a local version newer than this hosted page does not get a false warning');++ // A mixed list (#632 review): a relay board from another machine beside this machine's own. The selected board's+ // source decides: this machine's board keeps its note while the relay transport is loaded, a relay board shows none.+ const remoteBox = machine();+ const remoteBoard = project(remoteBox, 'remote-a');+ remoteBox.run(remoteBoard.repo, 'add', 'web', 'A board on another machine', '--specs', 'G1');+ const remoteView = await startView(remoteBox);+ try {+ const remoteKey = { headers: { 'x-pullboard-key': remoteView.key } };+ const remoteList = JSON.parse((await call(remoteView, '/api/v1/boards', remoteKey)).body);+ const remote = remoteList.boards[0];+ const remoteState = JSON.parse((await call(remoteView, '/api/v1/boards/' + remote.id + '/state', remoteKey)).body);+ // The relay client stands in with the other machine's real list and state; the page only ever calls request().+ local.client = `export function rememberPairing() { return null; }+export async function createTransport() { return { async request(path) {+ if (path === '/api/v1/boards') return ${JSON.stringify({ ...remoteList, boards: [{ ...remote, name: 'acme/remote-a' }] })};+ if (path.startsWith('/api/v1/boards/${remote.id}/state')) return ${JSON.stringify(remoteState)};+ throw new Error('not in this stand-in: ' + path);+} }; }`;+ local.linked = [{ id: remote.id, repository: 'acme/remote-a', linkedAt: 0 }];+ local.versionOverride = '0.8.20';+ await open(VERSION, true);+ await chrome.waitFor("Boolean(transport) && [...boardSources.values()].map((source) => source.kind).sort().join() === 'local,relay' && document.querySelectorAll('#proj-list .proj.repo').length === 2", 25_000); // budget: hang ceiling for the relay module and its board list after the local read; no throughput claim.+ const roots = JSON.parse(await chrome.stable("JSON.stringify(Object.fromEntries([...boardSources.values()].map((source) => [source.kind, source.board.root])))"));+ const selected = (root) => chrome.waitFor(`data?.project?.root === ${JSON.stringify(root)} && document.querySelector('#chain')?.textContent.length > 0`, 25_000); // budget: hang ceiling for one board switch and its state read; no throughput claim.+ const mixedNote = `Pullboard 0.8.20 is installed; ${VERSION} is current, ${releasesBehind} ${releasesBehind === 1 ? 'release' : 'releases'} behind. Update with`;+ await chrome.stable(`(switchTo(${JSON.stringify(roots.local)}), true)`);+ await selected(roots.local);+ assert.equal(await bannerHidden(), false, 'this machine\'s older board shows its note on a list that also reads relay boards');+ assert.equal(await bannerText(), mixedNote);+ assert.equal(await chrome.stable("document.querySelector('#hosted-release-note code')?.textContent"), 'npm i -g pullboard@latest');+ await chrome.stable(`(switchTo(${JSON.stringify(roots.relay)}), true)`);+ await selected(roots.relay);+ assert.match(await chrome.stable("document.querySelector('#chain')?.textContent"), /A board on another machine/u, 'the relay board is the one on screen');+ assert.equal(await bannerHidden(), true, 'a selected relay board shows no note about this machine\'s install');+ await chrome.stable(`(switchTo(${JSON.stringify(roots.local)}), true)`);+ await selected(roots.local);+ assert.equal(await bannerHidden(), false, 'back on this machine\'s board, the note returns');+ assert.equal(await bannerText(), mixedNote);+ } finally {+ local.client = null;+ local.linked = null;+ await remoteView.stop();+ }assert.deepEqual(chrome.exceptions, [], 'Chrome reports no uncaught page exceptions');} finally {try { if (stopStandIn) await stopStandIn(); }