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): quiet release note, no extra request [N26,A2]
Corey Olsonf34887da4937
diff --git a/src/cockpit.js b/src/cockpit.jsindex dd9eaace..3f457b9e 100644--- a/src/cockpit.js+++ b/src/cockpit.js@@ -117,7 +117,7 @@ export function cockpitPage(key = '', { snapshot = false, readOnly = false, requ<label>Speed <select id="replay-speed"><option value="1">1×</option><option value="4">4×</option><option value="16">16×</option></select></label><output id="replay-progress" aria-live="polite">Loading events…</output></section>- <section class="card-panel" id="hosted-release-note" role="status" aria-label="Pullboard update" hidden>+ <section class="release-note" id="hosted-release-note" role="status" aria-label="Pullboard update" hidden><p><span id="hosted-release-text"></span> <code>npm i -g pullboard@latest</code> <a id="hosted-release-link" target="_blank" rel="noopener noreferrer">What changed</a> <button class="ghost" id="hosted-release-dismiss" type="button">Dismiss</button></p></section><section id="group-view" class="group-view" hidden>diff --git a/src/view.css b/src/view.cssindex 70967c54..139b0913 100644--- a/src/view.css+++ b/src/view.css@@ -251,6 +251,11 @@ main { padding: 16px 18px 56px; }.upgrade-note h3 { margin: 10px 0 4px; font-size: 13px; }.upgrade-note p, .upgrade-note footer { margin: 4px 0; font-size: 12px; }.upgrade-note button { flex: none; min-height: var(--tap); }+.release-note { padding: 0 2px 12px; }+.release-note p { margin: 0; font-size: 13px; line-height: 1.6; color: var(--ink-muted); overflow-wrap: anywhere; }+.release-note code { font: 12px var(--mono); color: var(--ink); white-space: nowrap; }+.release-note a { color: var(--ink); margin-left: 4px; white-space: nowrap; }+.release-note button { margin-left: 6px; min-height: var(--tap); padding: 2px 10px; font-size: 12px; }/* The Items toolbar keeps its view, filters, and creation action together on one line. */.toolbar { display: flex; flex-wrap: nowrap; gap: 6px; align-items: center; min-width: 0; padding: 10px; }.toolbar .go { flex: none; margin-left: auto; }diff --git a/test/cockpit/local-origin.test.js b/test/cockpit/local-origin.test.jsindex bafc97d3..dfcee4b9 100644--- a/test/cockpit/local-origin.test.js+++ b/test/cockpit/local-origin.test.js@@ -9,7 +9,7 @@ import { test } from 'node:test';import { cockpitPage } from '../../src/cockpit.js';import { VERSION } from '../../src/help.js';import { createRelayBrowserHandler } from '../../relay/browser-page.js';-import { BIN, machine, project, startView, chromeExecutable, openSnapshotChrome, closeSnapshotChrome, styleOf } from './fixture.js';+import { BIN, machine, project, startView, chromeExecutable, openSnapshotChrome, closeSnapshotChrome, styleOf, proofShot } from './fixture.js';const HOSTED = 'https://app.pullboard.dev';const LOCAL = 'http://127.0.0.1:4890';@@ -330,8 +330,13 @@ test('the hosted page says how far behind this machine\'s Pullboard is [N26,A2]'const bannerHidden = () => chrome.stable("document.querySelector('#hosted-release-note')?.hidden ?? true");let visit = 0;let visitPreload;+ let requestsAt = 0;+ /** The addresses one visit reached, as origin plus path for the hosted page and as origin for the local view. */+ const reached = () => [...new Set(chrome.requests.slice(requestsAt).map((asked) => new URL(asked.url)).filter((address) => address.protocol.startsWith('http'))+ .map((address) => (address.origin === HOSTED ? address.origin + address.pathname : address.origin)))].sort();const open = async (version, production = false) => {activePage = production ? productionPage : pageFor(version);+ requestsAt = chrome.requests.length;if (visitPreload) await chrome.send('Page.removeScriptToEvaluateOnNewDocument', { identifier: visitPreload });const marker = ++visit;const installed = await chrome.send('Page.addScriptToEvaluateOnNewDocument', { source: `window.__releaseVisit = ${marker};` });@@ -345,6 +350,8 @@ test('the hosted page says how far behind this machine\'s Pullboard is [N26,A2]'assert.match(await bannerText(), /Pullboard 0\.8\.20 is installed; 0\.8\.21 is current, 1 release behind/u);assert.equal(await chrome.stable("document.querySelector('#hosted-release-note code')?.textContent"), 'npm i -g pullboard@latest');assert.equal(await chrome.stable("document.querySelector('#hosted-release-link')?.href"), 'https://github.com/pullboard-dev/pullboard/blob/main/CHANGELOG.md');+ await proofShot(chrome, 'hosted-release-note', 1280);+ await proofShot(chrome, 'hosted-release-note', 390);await chrome.click("document.querySelector('#hosted-release-dismiss')");assert.equal(await bannerHidden(), true, 'dismiss hides the note for its current target release');await open('0.8.21');@@ -356,6 +363,7 @@ test('the hosted page says how far behind this machine\'s Pullboard is [N26,A2]'assert.ok(releasesBehind > 0, 'the hosted package has shipped releases after the simulated older install');assert.equal(await bannerText(), `Pullboard 0.8.20 is installed; ${VERSION} is current, ${releasesBehind} ${releasesBehind === 1 ? 'release' : 'releases'} behind. Update with`);assert.equal(await bannerHidden(), false, 'a new target release brings the note back');+ const behindReached = reached();// The production-generated page counts every numeric release heading, including 0.8.4's section with no headline.local.versionOverride = '0.8.4';@@ -367,6 +375,9 @@ test('the hosted page says how far behind this machine\'s Pullboard is [N26,A2]'local.versionOverride = VERSION;await open(VERSION, true);assert.equal(await bannerHidden(), true, 'matching local and hosted releases show no note');+ assert.deepEqual(behindReached, reached(), 'the note costs no request: a visit that shows it reaches what a matched visit reaches');+ assert.deepEqual(behindReached.filter((address) => !address.startsWith(HOSTED + '/') && address !== LOCAL && address !== view.base), [],+ 'the page learns both versions without asking any other address');local.versionOverride = '0.8.22-rc.1';await open(VERSION);