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(view): merge current main for stats revision [N26]
Corey Olsonf1f0e3b71ab7
diff --cc src/cockpit.jsindex 6a802c7c,1cbeada3..ff4a4202--- a/src/cockpit.js+++ b/src/cockpit.js@@@ -730,33 -737,17 +737,43 @@@ function boardSummary(board, state)};}+/** Format the API's measured minutes without deriving new times from events [N26]. */+function flowMinutes(value) {+ return value === null || value === undefined ? 'unmeasured' : Number(value.toFixed(2)) + ' min';+}++/** Render the four stages, live queues and single recommendation supplied by stats [N26]. */+function proofFlowCard(flow) {+ if (!flow) return '';+ const stages = [['build', 'Build'], ['reviewWait', 'Review wait'], ['review', 'Review'], ['mergeWait', 'Merge wait']];+ const queues = [['open', 'Open'], ['claimed', 'Building'], ['submitted', 'In review'], ['accepted', 'Awaiting merge']];+ const averages = stages.map(([key, label]) => {+ const average = flow.stages[key].averageMinutes;+ return '<div><span>' + label + ' average</span><b data-stage="' + key + '" data-value="' + esc(average ?? '') + '">' + esc(flowMinutes(average)) + '</b></div>';+ }).join('');+ const waiting = queues.map(([key, label]) => {+ const queue = flow.queues[key];+ const oldest = queue.oldest;+ return '<div><span>' + label + ' queue</span><b data-queue="' + key + '" data-value="' + esc(queue.size) + '">' + esc(queue.size) + '</b>'+ + '<small data-oldest="' + key + '" data-value="' + esc(oldest?.ageMinutes ?? '') + '">Oldest: ' + (oldest ? '#' + esc(oldest.id) + ' · ' + esc(flowMinutes(oldest.ageMinutes)) : 'none') + '</small></div>';+ }).join('');+ const bottleneck = flow.bottleneck;+ return '<div class="proof-stats-flow"><div class="proof-stats-grid">' + averages + waiting + '</div>'+ + '<p class="proof-stats-bottleneck"><b>Bottleneck: </b><span data-flow="bottleneck">' + esc(bottleneck.message) + '</span>'+ + (bottleneck.recommendation ? ' · <span data-flow="recommendation">' + esc(bottleneck.recommendation) + '</span>' : '') + '</p></div>';+}++ /** Format a counted noun for the proof stats detail.+ * @param {number} count+ * @param {string} singular+ * @param {string} plural+ * @returns {string}+ */+ function counted(count, singular, plural) {+ return count + ' ' + (count === 1 ? singular : plural);+ }+-/** Render the event-log totals already supplied by the shared stats API [V2]. */+/** Render the event-log totals already supplied by the shared stats API [V2,N26]. */function proofStatsCard(stats) {if (!stats) return '<span class="muted">Stats unavailable</span>';const families = stats.families || [];diff --cc test/cockpit/stats.test.jsindex 449fbfc3,e2131b1e..342e5a0b--- a/test/cockpit/stats.test.js+++ b/test/cockpit/stats.test.js@@@ -4,9 -4,21 +4,22 @@@ import { mkdtempSync, rmSync } from 'noimport { tmpdir } from 'node:os';import { join } from 'node:path';import { test } from 'node:test';-import { SPEC, machine, project, build, sendBack, startView, accept, boardOf, chromeExecutable, openSnapshotChrome, closeSnapshotChrome } from './fixture.js';+import * as store from '../../src/board.js';+import { SPEC, machine, project, build, sendBack, startView, accept, boardOf, earlier, proofShot, chromeExecutable, openSnapshotChrome, closeSnapshotChrome } from './fixture.js';+ /** Add a real joined worktree to the shared test board.+ * @param {ReturnType<typeof machine>} box+ * @param {{ repo: string }} p+ * @param {string} name+ * @returns {string}+ */+ function joinedAgent(box, p, name) {+ const web = join(box.dir, `${name}-web`);+ box.git(p.repo, 'worktree', 'add', '-q', web, '-b', `web/${name}`);+ box.run(web, 'join', 'web');+ return web;+ }+test('[V2,N26] real Chrome shows matching proof stats at phone width and clears on a group [V2,N26]', { timeout: 90_000 }, async (t) => {const executable = chromeExecutable();