Repository navigation
Description
Delivery phase
Phase 1 - frontend with mock services. Milestone F4; task key F4-04.
Goal
Keep hundreds of columns and thousands of variable-height rows usable without mounting the entire cell matrix.
Context and authority
Read AGENTS.md, docs/product/LCA_diff_PRD.md, docs/engineering/LCA_diff_Implementation_Specification.md, docs/engineering/roadmap.md, and docs/team/product-manager.md. Do not read archive/reference folders. Current governance/spec documents are prepared on branch docs/agent-workflow; acceptance/merge authority follows docs/adr/README.md, not proposed ADR status. Any contract deviation needs an ADR and both current document updates in the same PR.
Specification §§6.3–6.4, 6.6, 9.1–9.2 behavior 18. Planned files: apps/frontend/src/components/comparison/ shared grid, viewport hooks, CSS and browser tests (planned).
Requirements and constraints
Use appropriate virtual-grid primitives and TanStack Query with bounded overscan, row windows and column windows. Derive mixed-sign heights from whole-row summaries, not mounted cells. Preserve stable row keys and scroll anchoring as asynchronous data arrives; no arbitrary process cap.
All work runs in containers with synthetic mock data and no API/Firebase/cloud dependency. Keep HTTP/auth/fixtures behind typed services and mock adapters; components consume contracts rather than fixtures. Follow Software Engineer and QA role handoffs, commit focused increments referencing this issue, and leave it open for QA/review.
Acceptance criteria
- AC1 — A deterministic workload of at least 200 columns and 2,000 rows renders only viewport/overscan cells and makes bounded window requests; record counts and workload.
- AC2 — Horizontal scrolling keeps process headers and cells aligned, while metadata headers remain vertically sticky.
- AC3 — A bounded sticky left block visibly retains all seven Flows identifying fields in specified order without consuming the entire grid when sidebars are open.
- AC4 — Mixed-sign rows measure/reposition correctly, retain index-based subtle alternating stripes, and do not produce header drift or repeated scroll jumps.
- AC5 — Switching viewport, resizing or collapsing sidebars cancels obsolete windows and retains readable tab-specific minimum column widths.
- AC6 — The grid exposes useful accessible row/column identity and keyboard navigation without placing focus on unmounted or incorrect cells.
Out of scope and follow-ups
Flows-specific composition is #24, drag actions #25, Scores identifier fields #28, full performance evidence #26. No export/zoom/resizable-column post-MVP work.
Verification plan
Run on the Docker host: ./dev shell, then inside /workspaces/lca-diff: npm --prefix apps/frontend run format:check, npm --prefix apps/frontend run lint, npm --prefix apps/frontend run typecheck, npm --prefix apps/frontend run test:unit, and npm --prefix apps/frontend run build. These scripts are established by F1, not claimed available today. Browser scenarios use npm --prefix apps/frontend run test:e2e -- --project=chromium (F1 establishes the pinned Playwright tool/browser setup). No host package installs.
Add Chromium Playwright scrolling/resize/sidebars cases for the 200×2,000 synthetic workload with mixed-height rows. Assert bounded DOM/request counts and header/identifier alignment. Unit-test range/height bookkeeping where behavior cannot be covered by browser assertions.
Record exact commands/results and delivered SHA in the engineering handoff. QA independently checks every criterion at that SHA and reports PASS/FAIL/BLOCKED; unavailable required checks are not passing.
Dependencies and readiness
Blocking predecessors: #20, #21, #22. Also requires verified M1 container runtime and merged bootstrap/M2 configuration; later milestones are planned, not implementation-ready while predecessors remain open. PM must recheck dependencies and actual interfaces before marking READY.
Activity
DavidVFitzGerald commentedon Nov 13, 2026
PM: BLOCKED
Groomed using docs/team/product-manager.md for F4, Phase 1 — frontend with mock services. Documentation review: PASS for scope, required sections, specification coverage and acyclic dependency links; this is not application QA or implementation readiness.
Blocking predecessor issues: #20, #21, #22. The M1 runtime gate (#2) and merged bootstrap/M2 configuration (#3) also remain required. PM must recheck merged dependencies and current interfaces before changing this to READY.
Engineer implements one issue, commits regularly and hands the delivered SHA plus exact container checks to independent QA; do not close before QA, review and approved merge. No backend/Firebase/cloud credentials or host installations are required for Phase 1.
DavidVFitzGerald commentedon Nov 14, 2026
PM note carried from #16 (D9), not a readiness change: #16 adds no browser-reachable mock-scenario switch. Its paging, latency and large-catalog evidence is component-level, through an injected
createMockDiscovery. The 200×2,000 Chromium workload here will need a browser-reachable large synthetic scenario. When this issue is groomed, decide that mechanism (or accept component-level evidence) explicitly. Any switch must be validated, mock-mode only, visibly identified as demo and never a fallback. If it is added, it should also offer a large discovery tree for the F3/Phase 1 browser evidence (#19 AC6, #34). An ADR is needed only if it changes composition/configuration contracts beyond the existing ones.DavidVFitzGerald commentedon Nov 14, 2026
PM: READY (recheck, stacked)
Dependencies
mainatf138482.15ba70d(PR F4: exact signed-bar geometry and full-precision value cells (#22) #67) and is awaiting maintainer merge. At the maintainer's request, [Task] F4 — Virtualize comparison rows and columns with sticky alignment #23 starts now, stacked on that branch:feat/f4-virtual-grid, based onfeat/f4-signed-bars.feat/f4-signed-barsand is retargeted tomainonce F4: exact signed-bar geometry and full-precision value cells (#22) #67 merges.Interfaces checked
flowRowPages: cursor pages withtotal_countand the comparison token.flowSummaries: one row window over the whole selection.flowCellWindow: bounded transport batches.useSelectionHeadersand theProcessHeaderscolumn window from [Task] F4 — Build shared process headers and comparability warnings #21.rowGeometry().rowHeightandSignedValueCellfrom [Task] F4 — Implement exact signed-bar geometry and full-precision value tooltips #22.Large browser scenario (resolves the PM note carried from #16)
?mock-scenario=large, read only at the composition root, only whenVITE_SERVICE_MODE=mock.mockadapter. It adds no service mode or adapter and changes no real configuration contract. It is documented inapps/frontend/src/services/README.md.Scope split with #24
DavidVFitzGerald commentedon Nov 14, 2026
Engineering: READY FOR QA
feat/f4-virtual-grid, delivered SHA4a9411b.feat/f4-signed-bars(F4: exact signed-bar geometry and full-precision value cells (#22) #67, [Task] F4 — Implement exact signed-bar geometry and full-precision value tooltips #22, at15ba70d).git diff 15ba70d..4a9411b.Criteria
?mock-scenario=largegives 2,224 rows × 220 process columns.scrollTopand the first row are unchanged after settling.role=gridwith row and column counts,aria-rowindexon rows, arowheaderwith all seven fields, andgridcells witharia-colindexwhose names start with the process name.Commands
All run in the workspace container.
format:checklinttypecheckbuildtest:unit(twice)test:e2e -- --project=chromiumNotes and limitations
rowHeightrounding is new.Next: independent QA at
4a9411b.DavidVFitzGerald commentedon Nov 14, 2026
QA: FAIL
4a9411bonfeat/f4-virtual-grid(PR F4: windowed comparison grid with the Flows mount and large mock workload (#23) #68). The review diff isgit diff 15ba70d..4a9411b.lca-diff-devworkspace container. All tooling ran throughdocker compose --project-directory . -f compose.yaml exec -T workspace bash -lc 'cd /workspaces/lca-diff && …'. Nothing was installed on the host.git status --short. Temporary probes (e2e/zz-qa-*.spec.ts,src/services/mock/zz-qa-grid.test.tsx, and mutants in a container-local/tmpcopy) were deleted afterwards.Required checks
npm --prefix apps/frontend run …)format:checklint--max-warnings 0)typecheckbuildtest:unit, run 1test:unit, run 2test:e2e -- --project=chromiumflows-grid.spec.ts(2 tests),process-headers.spec.tsand the@smokejourneysCriteria
AC1 — PASS (DOM and reads bounded)
?mock-scenario=largegives 2,224 rows × 220 process columns.limit=100.AC2 — PASS (alignment and pinned headers)
scrollLeftof 1, 777, 12,345 and the maximumscrollTopof 50,000scrollLeftequals the grid'sscrollLeft, and their maximum scroll widths match.AC3 — PASS, with an observation (O2)
AC4 — FAIL (D1, selection changes)
AC5 — PASS (resize, sidebar and cancellation)
AC6 — PASS for navigation; the selection-change focus loss is part of D1
data-row/data-col, in the viewport, never under the sticky block, with exactly onetabindex=0.store.move) the tab stop follows the process by key. After the active process is removed, exactly one tab stop remains.Defect
D1 — Medium: any selection change collapses the grid to 0 rows, resets the scroll to the top, drops keyboard focus and re-reads everything
Where:
apps/frontend/src/components/comparison/useFlowGrid.ts:65–76:process_idsin selection order keysflowRowPages, androwCount = loadedPages[0]?.total_count ?? 0, with no previous comparison retained.ComparisonGrid.tsx:157: measured heights are reset per token.Repro (Chromium, 1440×900):
/?mock-scenario=large, sign in and select all 220 processes.scrollTopto 70,000 (about row 1,340).Expected vs actual:
aria-rowcountdrops to 0 and every row unmounts. The canvas height becomes 0, soscrollTopis 0 (logged:top: 70327before,top: 0after).scrollTop90,205 also returns totop: 0.FlowsBodyignoresdata.loading).Pure reorder (jsdom probe):
store.move(Gamma, 0).aria-rowcount=0with 0 rows mounted, andflowRowsis called again with the reorderedprocess_ids.<body>, although the tab stop later correctly resolves to Gamma at column 0.Impact:
Suggested direction (engineering's choice):
row_keyacross tokens.If PM decides to re-scope this to #24/#25 instead, that needs an explicit, linked follow-up on those issues. QA does not waive it.
Test strength (mutation checks in a container-local copy;
flows-grid.test.tsx)Every mutant was detected (each fails ≥ 1 test):
Boundary, scenario and ADR
?mock-scenario=LARGE,=(empty),=defaultand=large%20each show the configuration error with no demo banner.main.tsxand validated only incomposition.ts.services/README.md.services/contractstypes andapp/queries.fetchor Firebase are used incomponents/comparison/.comparison-headers.test.tsxandprocess-headers.spec.tspass.rowHeightchange (Math.ceilof chart height plus padding) adds less than 1 px of padding and leaves the chart geometry exact.aria-hidden, and the accessible name already holds the full lexeme. N/A cells keeparia-describedby.Observations (non-blocking)
aria-busy"Loading" after you scroll away. Its summary page leaves the window, so 11 cells in row 1 stay pending while you are deep in the grid. They are not visible, but assistive technology can reach them.titlehover and the full text is in the row header's accessible name, but no visual focus reveal exists. The handoff defers readability to [Task] F4 — Assemble the Flows comparison with exact missingness and cell warnings #24, but [Task] F4 — Assemble the Flows comparison with exact missingness and cell warnings #24's text does not mention it; the coordinator or PM should link it there.Next action
Engineering fixes D1, or PM explicitly re-scopes it with linked follow-ups. QA then re-checks the new SHA with
flows-gridunit and e2e tests plus a selection-change probe.fix: keep the grid's rows, position and focus across selection change…
DavidVFitzGerald commentedon Nov 14, 2026
Engineering: READY FOR QA (round 2)
Branch
feat/f4-virtual-grid, delivered SHAb5a2488, PR #68 (stacked on #67). Changes since the FAIL at4a9411b:git diff 4a9411b..b5a2488.D1 fix: selection changes no longer empty the grid
useFlowGrid.ts:placeholderData: keepPreviousData: while a changed selection loads, the previous comparison stays shown. The grid isaria-busy, and an "Updating the comparison…" status region is shown.ComparisonGrid.tsx:Regression tests
flows-grid.test.tsx):4a9411bversions ofuseFlowGrid.ts,ComparisonGrid.tsxandFlowsGrid.tsx, run in a temporary container copy.e2e/flows-grid.spec.ts): QA's repro. After deep scrolling, removing a process from the selected list keeps the rows, values and scroll position (within one row).Commands
All run in the workspace container.
format:checklinttypecheckbuildtest:unit(twice)test:e2e -- --project=chromiumObservations
Next: QA recheck at
b5a2488.DavidVFitzGerald commentedon Nov 15, 2026
QA: FAIL
Round 2 recheck of #23 (F4-04) at SHA
b5a2488(feat/f4-virtual-grid, PR #68, stacked on #67 at15ba70d). I reviewedgit diff 4a9411b..b5a2488and the full changegit diff 15ba70d..b5a2488.lca-diff-devworkspace container (rootless Docker). Nothing was installed on the host.apps/frontend(/tmp/qa23b, since deleted). No tracked file was changed, andgit status --shortis clean.Summary. The D1 symptoms reported in round 1 are fixed. The grid no longer empties,
scrollTopis kept, the DOM focus node survives, reorders re-read nothing, and no read uses an old token. One part of D1's expected behaviour is still missing: "the reading position stays near the same flows". When a selection change adds or removes rows above the viewport, the pixel offset is kept but the visible flows shift by that number of rows. A bulk change of 110 processes shows flows 110 rows away, and the keyboard tab stop is left off-screen. This is reported as D2 below.Required checks (container)
All commands use
docker compose --project-directory . -f compose.yaml exec -T workspace bash -lc 'cd /workspaces/lca-diff && npm --prefix apps/frontend run <script>'.format:checklint--max-warnings 0)typecheckbuildindex-DBu5_Jh5.js388.47 kB)test:unit, run 1test:unit, run 2test:e2e -- --project=chromiumD1 recheck: PASS for the reported symptoms; the anchoring residual is D2
Chromium probe. 1440×900,
/?mock-scenario=large, all 220 processes, grid atscrollTop69,830 (about row 1,338), a deep value cell focused. I sampled every animation frame from each action until it settled.aria-rowcountduring transitionscrollTopAcross every action:
tabindex=0remained.role=alertappeared, and the console had no errors or warnings.aria-busy"Loading…" row headers while cursor pages reload sequentially.jsdom probe. Uses the
flows-grid.test.tsxharness with 15 ms mock latency and store-driven changes while deep (scrollTop70,327, focus on row 1348, column 2). For each step I checked:aria-rowcount/aria-busytransitions, via a MutationObserver;flowRowsall pages,flowSummaries, thenrowGeometry, thenflowCells);flowCellsrequest's process ids ⊆ its token's process set, everyflowSummariesset equal to its token's set, and no error results.rowcount/busy)store.movecolumn 2 → 0New regression tests. I confirmed that both new tests fail against the
4a9411bversions ofuseFlowGrid.ts,ComparisonGrid.tsxandFlowsGrid.tsx(2 failed, 7 passed), and also with only the olduseFlowGrid.ts. Targeted mutants onb5a2488:keepPreviousDataremovedupdatingguards removed (old-token summary, tile and next-page reads)New defect
D2 (Medium): residual of D1. Row-set changes above the viewport shift the visible flows. Scrolling keeps the pixel offset but is not anchored on rows. The tab stop and DOM focus can also end up on different flows.
Where:
apps/frontend/src/components/comparison/useFlowGrid.ts:85-90:keepPreviousData, then the new comparison is swapped in by index.apps/frontend/src/components/comparison/ComparisonGrid.tsx:107-117: the active row is re-resolved byrowKeywithin ±200 rows.ComparisonGrid.tsx:286-288: rows are index-keyed.row_keybefore the swap or restores it afterwards.Repro (Chromium, 1440×900):
/?mock-scenario=large, sign in and select all 220 processes.scrollTopto 70,000 and wait for the values.Expected: the same flows stay in view, or the nearest surviving flow if the anchor row itself was removed. This is the round-1 D1 expectation, §9.1 "avoid scroll-jump when rows arrive asynchronously", and the issue requirement "preserve stable row keys and scroll anchoring".
Actual:
scrollTopis unchanged, but the first visible flow becomes "Synthetic generated flow 001224". The view has silently moved 110 flows.scrollTop) passes.stopInView: false), far off-screen from where the user was reading.deselectManyof 100 processes,document.activeElementstays on DOM node 1348/2, which now shows flow 001224 withtabindex=-1. The singletabindex=0is on 1248/2 (flow 001124). For a one-process removal, activeElement is on 1348/2 (flow 001125) and the stop on 1347/2 (flow 001124).×removal ([Task] F4 — Add shared column drag, keyboard reorder and global removal #25) would remove processes while focus stays in the grid and expose it.Suggested direction (engineering's choice):
row_key/sort_keyand its offset.sort_key, sits at the same offset.scrollTop.If PM decides instead to re-scope cross-comparison anchoring to #24 or #25, that needs an explicit, linked follow-up. QA does not waive it.
AC1–AC6 regression (round-1 Chromium probe re-run at
b5a2488, 7/7 pass, plus the suites above)AC1 — PASS
AC2 — PASS
scrollLeftequals the grid's.AC3 — PASS. All seven fields are present, in order, in a 300–560 px block.
AC4 — PASS within a comparison; the cross-comparison shift is D2
AC5 — PASS. Resize and sidebar collapse keep minimum widths and alignment, and cancellation is unchanged.
AC6 — PASS for navigation, with the D2 caveat for selection changes
store.move): focus and the tab stop follow the process to its new column, with 0 row and 0 summary re-reads.<body>with one tab stop left. That is expected for a removed column.Edge cases
scrollTop(115,657 → 110,439), the last rows (2098–2107) render, and no blank viewport or error appears.Documentation
services/README.md"Selection changes": accurate about the canonical set, the busy/status state and no old-token reads. "scroll position and focus are kept" is accurate only for the pixel offset and DOM node. It should say that rows are not re-anchored across comparisons, or be updated with the D2 fix.Observations (non-blocking)
updatingguards (N3) goes undetected, although the mock would reject such reads asINVALID.useFlowGridkeepsupdating=trueand the previousrowCount. A disabled query pluskeepPreviousDatamakesisPlaceholderDatatrue. In jsdom,FlowsGridmounted directly stays "Updating the comparison…" with 2,123 rows and 0 columns afterstore.clear(). The app is unaffected today becauseApp.tsxunmountsFlowsGridon an empty selection. Guard it if [Task] F4 — Assemble the Flows comparison with exact missingness and cell warnings #24 renders the grid for empty states.Next action
Engineering fixes D2 (row-anchored position and consistent focus across comparisons), adds a test that asserts the visible flow's identity, and updates the README. Alternatively, PM explicitly re-scopes D2 with a linked follow-up. QA then re-checks the new SHA: the
flows-gridunit and e2e tests plus the selection-change probes above.fix: anchor the grid view on flows across selection changes (Refs #23)
DavidVFitzGerald commentedon Nov 15, 2026
Engineering: READY FOR QA (round 3)
Branch
feat/f4-virtual-grid, delivered SHAdc4cf9f, PR #68 (stacked on #67). Changes since the FAIL atb5a2488:git diff b5a2488..dc4cf9f.D2 fix: the view is anchored on flows, not pixels
ComparisonGrid.tsx:version, the comparison token), it asks its owner to load until that flow is located (onSeek), then scrolls so the flow is back at the same offset.locate(rowKey)across the whole loaded set, not ±200 rows.useFlowGrid.ts:seekKeyargument: keeps fetching row pages until that key is loaded.locate(key): returns the index,undefinedwhile it may still be in an unloaded page, ornullif absent.Tests
jsdom (
flows-grid.test.tsx): while deep at row 1300, with a cell focused, deselect 110 processes in one store update, then reselect them. The test checks that:tabindex=0This test fails against the
b5a2488versions of the three grid files, run in a temporary container copy.Chromium (
e2e/flows-grid.spec.ts): QA's D2 repro. While deep, filter Process Name "generated 0001" and Deselect all matches. Asserts that rows are shown, the row count drops, and the flow at the viewport top is unchanged.Commands
All run in the workspace container.
format:checklinttypecheckbuildtest:unit(twice)test:e2e -- --project=chromiumObservations
updatingand the previous row count): not reachable today, becauseApp.tsxunmounts the grid when nothing is selected. Noted for [Task] F4 — Assemble the Flows comparison with exact missingness and cell warnings #24 if it renders the grid for empty states.Next: QA recheck at
dc4cf9f.DavidVFitzGerald commentedon Nov 15, 2026
QA: FAIL
Round 3 recheck of #23 (F4-04).
dc4cf9f(branchfeat/f4-virtual-grid, PR #68 headdc4cf9f; stacked on #67 /15ba70d)/?mock-scenario=large: 220 processes × 2,000+ flows). No real backend, auth or data-security claims.lca-diff-devworkspace container (rootless Docker). Nothing installed on the host.git diff b5a2488..dc4cf9f, plus the full #23 change15ba70d..dc4cf9ffor regressionsProbes. All probes ran in a container-local copy of
apps/frontend(/tmp/qa23c, since removed). Diagnosticconsole.loginstrumentation was added to that copy only. The shared checkout was not modified, andgit status --shortis clean.Verdict. The fix works for the case it tests: a bulk deselect of 110 processes while deep. In Chromium, though, the restored position is overridden or drifts when row heights are corrected after the restore. As a result, adding never-seen processes still shifts the view by 110 flows, and single or small removals still shift it by 1 to 11 flows. A user's own scroll during an update is also undone. D2 is therefore not fixed for most selection changes.
Required checks (all in the workspace container)
Command form:
docker compose --project-directory . -f compose.yaml exec -T workspace bash -lc 'cd /workspaces/lca-diff && npm --prefix apps/frontend run <script>'format:checklinttypecheckbuildtest:unit, run 1test:unit, run 2test:e2e -- --project=chromium1. D2: FAIL
The tables below give, for each change, the first visible flow (the row containing the viewport top) and its offset, before and after. "Kept" means the same flow at the same offset.
Chromium, 1440×900:
store.move, jsdom; no browser reorder UI yet)Root cause, from instrumentation in the container copy. For the never-seen add, the seek works: row pages load up to 1,300,
locatereturns 1263, and the restore callsscrollTo(66328 + 44). Yet the element ends at 60,369, the old offset plus 1 px. For the single removal at 70,000, the restore scrolls to 70,275 (correct), but 300 ms later the element is at 70,643 (+368 px).The restored position is therefore overwritten after the restore. The most likely cause is the summary-height
resizeItemmicrotask (ComparisonGrid.tsx:186-197). It runs after the restore'sscrollTo(ComparisonGrid.tsx:226), and the virtualizer's scroll-anchoring adjustments are computed against its own internalscrollOffset, which still holds the pre-restore value. The O5 stale per-index heights make those corrections large.Engineering should confirm the mechanism. The observable failure does not depend on it.
Focus and tab stop.
tabindex=0, one stop.relatedTargettabindex=-1. The tab stop is on 1311/5 (flow 001088). Today's UI cannot reach this, because sidebar removal takes focus. [Task] F4 — Add shared column drag, keyboard reorder and global removal #25's header × would reach it.Seeking and reads.
seeking=false. Normal cursor paging continues afterwards.locatecan returnnullonly once every page is loaded, so an absent anchor loads every row page. There is no sort-key early stop (O8).Regression test strength. Each mutant was applied to the container copy and run against
flows-grid.test.tsx:b5a2488versions of the three grid filesscrollToremovedupdatingguards removed (O6/N3)into: 0)No test covers additions above the viewport, single removals, or height corrections after a restore. These are exactly the failing cases.
2. Regressions: PASS apart from the D3/D4 interactions
aria-busyand "Updating the comparison…" during the load, and the row count never reaches 0.dc4cf9f: 7/7 pass, 45 assertions. The bounded-read, deep paging/cancel, reorder and stripe unit tests pass.3. New risk areas
pointerdownlistener and restore-on-lost-focus: PASS. There is no focus stealing after outside clicks, keyboard Tab-away, sidebar buttons or sign-out, and a grid scrollbar click keeps cell focus. The listener is capture-phase and removed on unmount.4. Documentation: FAIL (follows D3)
services/README.md"View anchoring" (lines 467–473) states that "rows added or removed above never shift what is read". That is inaccurate atdc4cf9f: see the tables above.App.tsxunmounts the grid for an empty selection.Defects
D3 (Medium): anchoring is overridden or drifts after row heights are corrected (residual of D2).
apps/frontend/src/components/comparison/ComparisonGrid.tsx:186-197, theresizeItemmicrotask, interacting with the restore atComparisonGrid.tsx:219-228(scrollToat :226). The README claim is atapps/frontend/src/services/README.md:467-473./?mock-scenario=largeand sign in.scrollTopto 60,000 and wait for the values. The first visible row is flow 001039 at −44 px..tree-checkon the first level-2 item, adding the other 110 processes.scrollTo(66372), but scrollTop ends at 60,369. The first visible row is flow 000929, so the view moved 110 flows.scrollTopto 70,000 (flow 001122 at −48).rowWindow.scrollToOffset/scrollToIndexso its internal offset is consistent. Re-apply or verify the anchor once the window's summaries and heights have landed. Then add tests for an addition above the viewport and for a single removal, asserting the flow's identity and offset after the heights settle. Those tests would also kill M2.D4 (Medium): user scrolling during an update, or before the scrolled-to rows load, is undone.
ComparisonGrid.tsx:231-237. The anchor is recorded only while idle and only on a loaded row, so a scroll made while busy or onto pending rows keeps the pre-change anchor.deselectManyon 110 processes. The grid is busy.scrollTopto 90,000 (row 1718). After settling, the view is back at flow 001122 (scrollTop 64,605).Observations (non-blocking)
locatereturnsnullonly after all row pages are loaded, with no sort-key early stop. This is acceptable as a degrade, but worth doing alongside D3.Next action
Engineering fixes D3 and D4, corrects the README, and adds the tests described above. QA then rechecks the new SHA with the
flows-gridunit and e2e tests and these Chromium probes: addition of never-seen processes, single removals at several depths, scroll during busy, and the anchored flow removed.fix: anchor the grid on flows through height changes and updates (Refs …
DavidVFitzGerald commentedon Nov 15, 2026
Engineering: READY FOR QA (round 4)
Branch
feat/f4-virtual-grid, delivered SHA3976241, PR #68 (stacked on #67). Changes since the FAIL atdc4cf9f:git diff dc4cf9f..3976241.Design: the grid anchors the view itself
The virtualizer's own size adjustment is turned off (
shouldAdjustScrollPositionOnItemSizeChange = () => false).ComparisonGrid.tsx:resizeItem. The adjustment is relative, so it never undoes a scroll in progress (D4).onAnchor).useFlowGrid.ts:anchorKeys()when the selection changes. The previous comparison stays shown (updating: busy, no summary or cell reads) until an anchor flow is loaded in the new one, or no pages remain.Results with QA's round-3 probes
Unchanged QA copies, run in the container and then removed.
dc4cf9f)Focus: it follows the flow during rapid changes. Removing the focused column moves focus to the active cell, and focus is never stolen from outside the grid. No console problems were logged in any probe.
New regression tests
flows-grid.test.tsx):dc4cf9fgrid files.e2e/flows-grid.spec.ts): a single removal at depth, checked once rows in view are loaded plus a 500 ms pause, then the bulk "Deselect all matches" check.dc4cf9fgrid files this fails, moving from flow 000545 to 000553. It passes now.composition.test.tsx's large-scenario test now has an explicit 20 s timeout. It builds the 220 × 2,000 catalog and hit the default 5 s once under parallel load.Commands
All run in the workspace container.
format:checklinttypecheckbuildtest:unit(3 runs, after the timeout fix)test:e2e -- --project=chromiumDocumentation
The README "View anchoring" section was rewritten, and the height note corrected.
Remaining observations
Next: QA recheck at
3976241.DavidVFitzGerald commentedon Nov 15, 2026
QA: PASS
Round 4 recheck of #23 (F4-04), PR #68.
3976241onfeat/f4-virtual-grid, in the shared checkout. HEAD was confirmed; the tree was clean before and after.lca-diff-devworkspace container (rootless Docker). Nothing was installed on the host./tmp/qa23d, withnode_modulessymlinked). No tracked file was modified, and nozz-qa-*file was ever placed in the app tree.Verdict: D2, D3 and D4 are fixed on every path QA exercised. There are no regressions in D1 or AC1–AC6, and normal scrolling is not fought. One new Low defect remains on an error-recovery path (D5 below). I consider it non-blocking, but it needs to be fixed in #68 or tracked in a linked follow-up. There are also test-gap observations.
Required checks
All were run in the container with
cd /home/david/projects/LCA-diff && docker compose --project-directory . -f compose.yaml exec -T workspace bash -lc 'cd /workspaces/lca-diff && npm --prefix apps/frontend run <script>'.format:checklint--max-warnings 0)typecheckbuildtest:unit, run 1test:unit, run 2test:e2e -- --project=chromiumComposition timeout change: this is test-only. The large-scenario composition test takes about 4.4 s, close to the default 5 s, because it builds the 220 × 2,000+ catalogue. A 20 s ceiling is reasonable and does not hide a product slowdown.
1. D2, D3 and D4: PASS
The round-3 probes were re-run unchanged.
Chromium (
zz-qa-r3.spec.ts,zz-qa-r3b.spec.ts, 1440×900,/?mock-scenario=large): 7/7 ran, and no console errors or warnings were logged.Single removals at six depths (R3-6), formerly D3:
At
dc4cf9fthe same cases shifted by +4 to +11 flows.Adding 110 never-seen processes (R3-2/R3-7), formerly D2/D3: flow 001039 stays at −44 px (row 1153 → 1263). Every rAF-sampled frame, including the busy frame, shows 001039 at −44:
["60368 1153:001039:-44","… B","66372 1263:001039:-44","66822 1263:001039:-44"].After scrolling +4,800 px: scrollTop is 71,622, the expected 66,822 + 4,800, so there is no late jump.
Later removal at 90k: flow 001468 stays at −14.
Bulk "Deselect all matches" and re-add (R3-1): flow 001113 stays at −9 in all frames (rows 1337 → 1227 → 1337).
Deselecting "generated 0002" at 100k (R3-5): flow 001686 stays at −23 in all frames.
jsdom (
zz-qa-r3*.test.tsx): 9/9 ran.D4, scrolling during an update:
["70287 1346:001122:-8","… B","70587 1351:001127:-7 B","64539 1241:001127:-7","64825 1241:001127:-7"].O8, anchored flow removed:
O9, focused column removed while the grid owns focus: handled. In jsdom P5e/P6, DOM focus ends on the single tab stop, the same flow 001088 in the active cell, with one stop.
New tests fail without the fix.
With the
dc4cf9fversions of the three grid files in the copy, the new unit tests "adds processes above…", "single removal once heights settle" and "does not undo a scroll…" all fail: 3 failed, 9 passed.Mutations of the new code (each mutant applied in the copy, then reverted):
flows-grid.test.tsxflows-grid.spec.tspinafter height correctionupdating = placeholder)record()inonScrollpin()re-records on every render)2. Regressions: PASS
aria-busywith "Updating the comparison…". The bounded-read, deep paging/cancel, reorder and stripe unit tests pass.flows-grid.spec.tscovers bounds, alignment, the seven fields, heights/stripes, resize/sidebar, keyboard/Tab and the new single-removal and bulk anchoring checks. It passes within the 21/21 run. The R3-4/R3-5 probes repeat the stress cases.3. New risk areas: PASS, with D5
setPrevioususes React's previous-render pattern on the same component. It terminates, because the next render hasprevious === fresh. No React warnings appeared in jsdom, and no console errors or warnings in any Chromium probe.focusinevents, then none over a further 1.5 s, including a scroll.aria-busyclears, and the alert "Flow values could not be loaded. Retry" appears with a working Retry button. After Retry, however, the view is not re-anchored (see D5).4. Documentation: PASS
services/README.md"View anchoring" (from line 467) and the corrected height note match the behaviour observed: relative pins, 12 recorded flows, the virtualizer's adjustment off, the hold "until an anchor flow is loaded … or no pages remain", re-anchoring when all recorded flows are gone, and focus following the active cell.Defects
D5 (Low, non-blocking): after a row-page error during the hold, Retry does not restore the anchor.
apps/frontend/src/components/comparison/useFlowGrid.ts:116-124.seekingrequires!isError, so an error ends the hold, andsetPrevious(fresh)at :137 then commits the new comparison.ROW_LOOKAHEAD = 25(:22, :141), so an anchor that moved further down is never loaded.ComparisonGrid.tsx:253/:267its pins stay pending, so the view keeps the stale pixel offset.TEMPORARILY_UNAVAILABLE.previousuntil an anchor is located), or keep fetching while any pin is pending.Observations (non-blocking)
if (old), so that check is conditional.Commands (probes)
All run in the workspace container, in the copy
/tmp/qa23d.npx vitest run src/services/mock/zz-qa-r3.test.tsx src/services/mock/zz-qa-r3b.test.tsx: 9 passed (observational)npx vitest run src/services/mock/zz-qa-r4.test.tsx: Q1, Q3, Q4 and Q5 ran. Q2's second half timed out in the probe's own helper; it was rewritten as Q2b.npx vitest run src/services/mock/zz-qa-r4b.test.tsx: Q1-1, Q1-3 and Q2b, 3 passed (observational)npx playwright test e2e/zz-qa-r3.spec.ts e2e/zz-qa-r3b.spec.ts --project=chromium: 7 passednpx playwright test e2e/zz-qa-r4.spec.ts --project=chromium: 3 passed (R4-1, R4-2, R4-3)mutate4.sh,mutate5.shandmutate6.sh: results in the table above; every mutant was reverted andcmp-verified against the checkout.git status --short: empty before and after.Next action
Coordinator: decide whether D5 and the O10 gaps are fixed in #68 or tracked in a linked follow-up issue before merge. Otherwise #23 is ready for maintainer review. QA does not close, label or merge.
DavidVFitzGerald commentedon Nov 15, 2026
Coordinator: QA round 4 PASS at
3976241(#23 (comment)).Status: ready for maintainer review. PR #68 is stacked on #67 (#22). Merge #67 first; #68 is then retargeted to
main.Merge main after #67 into feat/f4-virtual-grid (Refs #23)
Merge pull request #68 from DavidVFitzGerald/feat/f4-virtual-grid
DavidVFitzGerald commentedon Nov 15, 2026
Coordinator: QA PASS (round 4, tree of 3976241), required checks passed on head dc1f06e, maintainer merged PR #68. Closing. Follow-up defect tracked in #69.
🤖 Generated with Claude Code
test: cover hold errors, Retry and the O8/O9 anchoring cases (Refs #69)