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): a roadmap row opens in place before the redraw [N26]
Corey Olson1dd30841df53
diff --git a/src/cockpit.js b/src/cockpit.jsindex fb42b4e3..e087406f 100644--- a/src/cockpit.js+++ b/src/cockpit.js@@ -801,7 +801,8 @@ function milestoneItem(entry, p) {const source = root === view.root ? p : root ? named[0] : null;const label = local ? '#' + entry.id : String(entry.id);const expanded = view.tab === 'roadmap' && view.roadmapOpen.get(JSON.stringify([view.root, 'i:' + label])) === true;- const detail = item && expanded ? detailOf(source, item, true, root) : null;+ // A folded row holds whatever detail is already kept, so it opens in place whole (#1039).+ const detail = item ? detailOf(source, item, expanded, root) : null;if (item && !expanded) roadmapAhead.set('i:' + label, () => detailOf(source, item, 'ahead', root));// A status the lifecycle declares; the roadmap says unavailable or missing for an item it could not read.const read = item || (FLOW.states.some((state) => state.id === entry.status) ? { status: entry.status, verdict: null } : null);@@ -816,10 +817,10 @@ function milestoneItem(entry, p) {holds: root === view.root ? source.holds : source.laneHolds, items: source.items, agents: source.agents, state: stateOf,address: (id) => itemAddress(id, root), board: root === view.root ? null : root,releases: (p.milestones || []).filter((milestone) => milestone.items.some((ref) => ref.id === entry.id)).map((milestone) => milestone.name),- error: detail?.error,+ error: expanded ? detail?.error : undefined,}) : null,// Until its omitted fields arrive, an expanded row paints what its summary holds and fills the rest in place (#1039).- pending: Boolean(detail?.loading),+ pending: expanded && Boolean(detail?.loading),stage: entry.state === 'landed' ? 'merged' : entry.state === 'accepted' ? 'accepted' : item ? pipelineStage(item) : entry.status,word: entry.status,open: item ? { root, id } : null,diff --git a/src/view/page-script-3.js b/src/view/page-script-3.jsindex 937e199f..c5cafc36 100644--- a/src/view/page-script-3.js+++ b/src/view/page-script-3.js@@ -278,13 +278,16 @@ const movedKey = (item) => JSON.stringify([item.id, item.updatedAt, item.status,const aheadQueue = [];let aheadBusy = 0;-/** Start the next queued reads ahead while fewer than two are on their way. */+/**+ * Start the next queued reads ahead while fewer than two are on their way. When the queue drains, one redraw puts what+ * landed into the folded rows, so each opens in place whole.+ */function aheadNext() {while (aheadBusy < 2 && aheadQueue.length) {const entry = aheadQueue.shift();if (!entry.start) continue;aheadBusy++;- entry.start().finally(() => { aheadBusy--; aheadNext(); });+ entry.start().finally(() => { aheadBusy--; aheadNext(); if (!aheadBusy && !aheadQueue.length && view.tab === 'roadmap') render(); });}}diff --git a/src/view/page-script-4.js b/src/view/page-script-4.jsindex 85fddeb8..e94f09a6 100644--- a/src/view/page-script-4.js+++ b/src/view/page-script-4.js@@ -804,10 +804,17 @@ document.addEventListener('click', (event) => {}if (t.dataset.itemsView) { view.itemsView = t.dataset.itemsView; view.addressDetail = null; address(); render(); return; }if ('roadmapKey' in t.dataset) {- const key = t.dataset.roadmapKey;- view.roadmapOpen.set(JSON.stringify([view.root, key]), t.getAttribute('aria-expanded') !== 'true');- render();- [...$('roadmap').querySelectorAll('[data-roadmap-key]')].find((head) => head.dataset.roadmapKey === key)?.focus({ preventScroll: true });+ const key = t.dataset.roadmapKey, open = t.getAttribute('aria-expanded') !== 'true';+ view.roadmapOpen.set(JSON.stringify([view.root, key]), open);+ // The row or release opens in place, its block already drawn from the summary, and paints in this frame; the+ // full redraw, which fills its detail, follows that paint, so click to paint never waits on it (#1039).+ const panel = t.classList.contains('milestone-item') ? t.nextElementSibling : t.parentElement.querySelector(':scope > .milestone-body');+ t.setAttribute('aria-expanded', String(open));+ if (panel) panel.hidden = !open;+ requestAnimationFrame(() => setTimeout(() => {+ render();+ [...$('roadmap').querySelectorAll('[data-roadmap-key]')].find((head) => head.dataset.roadmapKey === key)?.focus({ preventScroll: true });+ }));return;}if ('roadmapAll' in t.dataset) { view.roadmapOnly = null; render(); return; }diff --git a/test/cockpit/roadmap.test.js b/test/cockpit/roadmap.test.jsindex b9280149..8b0ab5ee 100644--- a/test/cockpit/roadmap.test.js+++ b/test/cockpit/roadmap.test.js@@ -1407,11 +1407,12 @@ test('expanding a roadmap row paints its detail within 100 ms [N26]', { timeout:await chrome.click(row(far));const again = await expand(far);assert.ok(again.fields.includes('Criterion') && again.ms < 100, `a second expand paints whole at once: ${JSON.stringify(again)}`);- // A row on screen is read ahead, so its first expand paints whole.+ // A row scrolled onto the screen is read ahead, so its first expand paints whole.const near = await chrome.stable(`[...document.querySelectorAll('#roadmap .milestone-item[aria-expanded=false]')].find((each) => /^i:#\\d+$/u.test(each.dataset.roadmapKey)- && !each.closest('[hidden]') && each.getBoundingClientRect().top >= 0 && each.getBoundingClientRect().bottom <= innerHeight)?.dataset.roadmapKey`);- assert.ok(near, 'a row is on screen');- await chrome.waitFor(`window.__answered.some((path) => path.endsWith(${JSON.stringify('/items/' + near.slice(3))}))`, 20_000); // budget: hang ceiling for the read ahead queue.+ && !each.closest('[hidden]') && each.dataset.roadmapKey !== ${JSON.stringify(far)})?.dataset.roadmapKey`);+ assert.ok(near, 'the roadmap has another folded row');+ await chrome.stable(`${row(near)}.scrollIntoView({ block: 'center', behavior: 'instant' }); true`);+ await chrome.waitFor(`window.__answered.some((path) => path.endsWith(${JSON.stringify('/items/' + near.slice(3))})) && window.__asked.length === window.__answered.length`, 20_000); // budget: hang ceiling for the read ahead queue.const ahead = await expand(near);assert.ok(ahead.fields.includes('Criterion') && !ahead.loading && ahead.ms < 100, `a row read ahead paints whole at once: ${JSON.stringify(ahead)}`);assert.equal((await reads()).asked.filter((path) => path.endsWith(farPath)).length, 1, 'the far row was read once');