Skip to content

Flows grid: Retry after a row-page error during a selection update loses the anchored flow #69

Closed

Description

@DavidVFitzGerald

Summary and impact

Follow-up from #23 QA round 4 (D5, Low). If a row page fails while the Flows grid is holding the previous comparison after a selection change, Retry does not restore the view to the flow the user was reading. The view lands about 110 flows away, which is the #23 D2 symptom, and the user has to scroll to find their place again. The fix also closes the anchoring test gaps from the same QA round (O10).

Delivery phase

Phase 1, frontend with mocks (F4).

Steps to reproduce

  1. Use jsdom with 30 ms latency, or /?mock-scenario=large.
  2. Select processes 0–109 and scroll to row 1150 (flow 001036 at −20 px).
  3. Select the other 110 processes, with the third row page of the new comparison failing with TEMPORARILY_UNAVAILABLE.
  4. The alert and Retry button appear. Click Retry.

Expected behavior and authority

After Retry, flow 001036 is back at −20 px (row 1260), as it is without an error. Authority: spec §6.4, §6.8 and §9.1, and the #23 view-anchoring contract in apps/frontend/src/services/README.md.

Actual behavior

Flow 000925 is at −28 px (row 1149). The cause (line numbers verified on main at deb4f29):

  • useFlowGrid.ts:116-123: seeking requires !isError, so the error ends the hold.
  • useFlowGrid.ts:136-137: the new, partial comparison is committed.
  • useFlowGrid.ts:230-232: unloaded keys locate to null (absent) once isError is set, so ComparisonGrid.tsx:251-267 may treat the pins as gone and re-anchor on what is in view. This is a likely contributor; the engineer confirms it.
  • After Retry, pages load only to the viewport plus ROW_LOOKAHEAD, so the anchor flow is never loaded.

If the first page fails instead, Retry does restore the anchor.

Environment and version

Found on feat/f4-virtual-grid at 3976241 (PR #68). The same code is now on main (deb4f29). Workspace container, mock adapter.

Context and dependencies

Acceptance criteria

  • AC1: a row-page error during the hold (any page after the first) does not commit the partial new comparison. While the error is shown:

    • The previous comparison's rows stay rendered.
    • The alert with a keyboard-reachable Retry is shown.
    • No summary or cell reads are issued.
    • The status does not say "Updating the comparison…".
    • Unloaded flows are not reported as absent because of the error.

    After a successful Retry, the hold resumes until an anchor flow is loaded or no pages remain. The anchor flow is then restored at its pre-change offset (±1 px); in the repro, 001036 ends at −20 px at row 1260. A further selection change while errored starts a new hold from the still-shown previous comparison. A repeated failure keeps the same guarantees.

  • AC2: a first-page error still shows the error with Retry (0 rows) and recovers (O12, unchanged). Covered by a regression test.

  • AC3: a row-page error with an unchanged selection (deep scrolling) still shows the alert, keeps the loaded rows, and Retry continues paging. Covered by a regression test.

  • AC4: tests catch each O10 mutant from [Task] F4 — Virtualize comparison rows and columns with sticky alignment #23 QA:

    • N5: the ComparisonGrid focus clause for a node that now shows another flow or process (the O9 fix).
    • N6: only the first pin considered.
    • N7: no re-anchor when every pin is gone.

    The [Task] F4 — Virtualize comparison rows and columns with sticky alignment #23 D4 test's old-anchor offset check is unconditional. The handoff records each mutant, the test that kills it, and its revert.

  • AC5: services/README.md "View anchoring" documents how errors interact with the hold: paused with previous rows on error, resumed by Retry; a first-page error shows no rows; errors outside a hold keep the loaded rows. It also records the aria-busy state while errored.

Regression and verification plan

  • jsdom tests in services/mock/flows-grid.test.tsx cover AC1–AC4. Inject the page failure through the test's flowRows spy wrapper, because scenario.failures is per operation, not per call. Do not add a URL fault scenario.
  • Rerun the full Chromium e2e suite, including flows-grid.spec.ts. A browser-level error repro is not required.
  • Required container checks (workspace container, via docker compose --project-directory . -f compose.yaml exec -T workspace bash -lc 'cd /workspaces/lca-diff && npm --prefix apps/frontend run <script>'): format:check, lint, typecheck, test:unit, build and test:e2e -- --project=chromium.
  • The handoff records the exact commands, results and delivered SHA. Independent QA verifies at that SHA.

Out of scope and follow-ups

These product questions are not part of this fix. The PM decisions are in the PM: READY comment:

Activity

  1. added
    bug
    frontend
    on Nov 15, 2026
  2. DavidVFitzGerald commented on Nov 15, 2026

    @DavidVFitzGerald
    OwnerAuthor

    PM: READY

    Rechecked using docs/team/product-manager.md against main at deb4f29. Phase 1, frontend with mock services; F4 bug follow-up from #23 QA round 4 (D5, Low) plus the O10 test gaps.

    Authority: spec §6.4 (union rows; scrolling usable with thousands of rows), §6.8 (loading states, keep controls responsive, keyboard-accessible controls), §9.1 ("avoid scroll-jump when rows arrive asynchronously"; cancel stale requests) and §9.2 behaviours 17 and 18, under accepted ADRs 0001–0003. ADRs 0004 and 0005 are still Proposed and grant nothing here. The anchoring contract is the "View anchoring" and "Selection changes" bullets of apps/frontend/src/services/README.md ("Windowed comparison grid (#23)"). This fix restores existing contracted behaviour on an error path. It changes no PRD, spec or scientific meaning, so no ADR is needed. If the engineer finds a criterion can only be met by changing product meaning, stop and raise a blocker.

    Dependency check

    Gate State
    M1 runtime (#2) Closed
    Bootstrap/M2 (#3) Closed
    #23 virtual grid (PR #68) Merged to main (e88733a), closed
    #24 Flows composition (PR #71) Merged to main (deb4f29), closed

    Sequencing decision: #69 before #25

    #69 goes first and #25 waits for it to merge.

    Branch: fix/f4-hold-retry from main at deb4f29, in an isolated worktree. The PR targets main with Refs #69 (no closing keyword).

    Current code (verified on main, same line numbers as at 3976241)

    • useFlowGrid.ts:116–123: seeking requires !isError, so a row-page error ends the hold.
    • :136–137: setPrevious(fresh) then commits the partial new comparison.
    • :141–150: after that, pages are fetched only up to the viewport plus ROW_LOOKAHEAD (:22), and never while isError.
    • :230–232: locate returns null (absent) for unloaded keys once isError is true. ComparisonGrid.pin (:251–267) therefore treats the pins as gone rather than pending (:253) and re-anchors on what is in view (:267). This is a likely contributor; the engineer confirms it.
    • :240–244: retry refetches the row pages, summaries and cells. Nothing resumes the hold afterwards.

    Delivered vs remaining, per criterion

    AC1: error during the hold, then Retry (remaining, the main fix)

    • Delivered: the hold itself ([Task] F4 — Virtualize comparison rows and columns with sticky alignment #23 D2–D4), and an alert with Retry on any read error (FlowsGrid.tsx:221–228).
    • Remaining: a row-page error while holding (any page after the first) must not commit the partial new comparison. While the error is shown:
      • The previous comparison's rows stay rendered. No rows of the failed comparison appear at a stale position.
      • The alert "Flow values could not be loaded." with a keyboard-reachable Retry button is shown.
      • No summary or cell reads are issued (the existing busyReads must stay empty).
      • The status region does not say "Updating the comparison…" while no request is in flight.
      • Whether aria-busy stays set while errored is the engineer's choice; document it in the README.
    • Remaining: unloaded flows must not be reported as absent merely because a page failed. locate returns unknown, not null, for keys that may be on unfetched pages, so the pins survive the error.
    • Remaining: after a successful Retry, the hold resumes: busy, "Updating…", row pages only, until an anchor flow is loaded or no pages remain. The anchor flow is then restored at its pre-change offset (±1 px). Worked example (jsdom, 30 ms latency, issue repro): flow 001036 ends at −20 px at row 1260, not 000925 at row 1149.
    • Remaining: if the selection changes again while the error is shown, a new hold starts from the still-shown previous comparison. The failed comparison is never shown.
    • Remaining: a second failure after Retry shows the alert again and keeps the same guarantees.

    AC2: first-page error (O12), unchanged

    AC3: errors outside a hold, unchanged

    • Remaining: a regression test. A row-page error while scrolling deep with an unchanged selection still shows the alert and keeps the rows already loaded, and Retry continues paging.

    AC4: O10 anchoring test gaps

    • Remaining: tests in flows-grid.test.tsx (or the e2e spec where jsdom cannot observe the behaviour) that fail under each [Task] F4 — Virtualize comparison rows and columns with sticky alignment #23 QA mutant:
      • N5: remove the ComparisonGrid focus clause for a node that "now shows another flow or process" (ComparisonGrid.tsx:319–325). Covers O9: focused column removed while the grid owns focus. DOM focus must end on the single tab stop showing the same flow.
      • N6: consider only the first pin. When the first recorded flow is removed and a later one survives, the view stays anchored on the later one.
      • N7: remove the re-anchor when every pin is gone (:267). When all recorded flows are removed, the view keeps its position and then stays stable while heights correct.
    • Remaining: make the D4 test's old-anchor offset assertion unconditional (flows-grid.test.tsx:544–545, if (old)). The test must ensure that row is mounted, or assert its offset another way.
    • The handoff records each mutant applied in a scratch copy, the test that kills it, and the revert. No mutant is committed.

    AC5: README

    • Remaining: services/README.md "View anchoring" states how errors interact with the hold. A row-page error pauses the hold with the previous comparison shown. Retry resumes it. A first-page error shows the error with no rows. Errors outside a hold keep the loaded rows. Also record the aria-busy choice.

    Constraints

    • Keep the D1–D4 guarantees and all existing flows-grid unit and e2e tests passing unchanged in intent. Update an assertion only where this fix changes the specified behaviour, and say so in the handoff.
    • No component HTTP/Firebase calls or fixture imports; src/test/service-boundary.test.ts must still pass.
    • Fault injection: the mock's scenario.failures is per operation, not per call. Fail the N-th row page of the new comparison through the test's existing flowRows spy wrapper, returning { ok: false, error: { code: "TEMPORARILY_UNAVAILABLE", … } }. Extending the mock scenario is allowed only if documented in the README, and no URL scenario is added.
    • Do not change column drag, removal or headers ([Task] F4 — Add shared column drag, keyboard reorder and global removal #25), or the hold's length or the top-of-list policy (O11/O13 below).

    Container verification plan

    These are existing F1 scripts, run inside the workspace container. Nothing is installed on the host:

    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 format:check'
    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 lint'
    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 typecheck'
    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 test:unit'
    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 build'
    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 test:e2e -- --project=chromium'

    The worktree's container project, ports and volumes must be distinct from any other active checkout.

    Test evidence expected:

    • jsdom tests (in flows-grid.test.tsx):
      • The issue repro (error on the 3rd page of the new comparison, then Retry): flow 001036 restored at −20 px.
      • During the error: no summary or cell reads, previous rows shown, no "Updating…".
      • A second selection change while errored.
      • The AC2 and AC3 regressions.
      • The N5, N6 and N7 kills and the unconditional D4 check.
    • The large-suite 20 s budgets from [Task] F4 — Assemble the Flows comparison with exact missingness and cell warnings #24 stay. If a new test needs more, record its measured time (input for [Task] F4 — Verify large Flows comparisons and record the milestone gate #26's O1 note).
    • The full Chromium e2e run passes. A browser-level error repro is not required, because there is no URL fault injection.
    • The handoff records the commands, results and delivered SHA. QA independently verifies at that SHA.

    Out of scope, with decisions

    Issue body updated: dependency state, the refined criteria and verification plan, and the O11/O13 decisions. frontend label added.

    Next role: Software Engineer, on fix/f4-hold-retry from main at deb4f29.

    🤖 Generated with Claude Code

  3. DavidVFitzGerald commented on Nov 15, 2026

    @DavidVFitzGerald
    OwnerAuthor

    Coordinator: state → implementing. Software Engineer assigned on fix/f4-hold-retry from deb4f29, in an isolated worktree.

    🤖 Generated with Claude Code

  4. DavidVFitzGerald commented on Nov 15, 2026

    @DavidVFitzGerald
    OwnerAuthor

    Engineering: READY FOR QA

    Root cause

    • useFlowGrid.ts required !isError for seeking. A row-page error therefore ended the hold, and the partial new comparison was committed.

    • After Retry, pages loaded only to the viewport plus ROW_LOOKAHEAD. The anchor, about 110 rows further down, was never loaded.

    • The suspected locate cause is refuted for the repro. I probed four variants of the issue repro (jsdom, 30 ms latency, page 2 fails, then Retry):

      Variant After Retry
      main row 1149 at −68, another flow
      main + locate change only row 1149 at −68
      hold fix only (old locate) row 1260 at −20, the anchor
      both row 1260 at −20

      In the repro, no loaded row of the partial comparison was in view, so record() kept the pins despite the nulls. The locate change is kept because AC1 requires it, and it closes the latent case where loaded partial rows are in view.

    Change

    • useFlowGrid now separates holding (the hold conditions without !isError) from seeking (holding && !isError).
    • A new busy (placeholder or holding) decides which comparison is shown, when the shown comparison is committed, and gates the summary and cell reads.
    • updating (the "Updating…" status) stays placeholder or seeking. aria-busy uses busy, so the grid stays busy while paused; the README records this choice.
    • locate now returns keyIndex.get(key) ?? (busy || hasNextPage ? undefined : null).

    Criteria

    Criterion Status Evidence (flows-grid-anchoring.test.tsx unless noted)
    AC1: error during the hold: no commit, previous rows shown, alert with keyboard-focusable Retry, no summary/cell (or extra row) reads, no "Updating…" Met "keeps the previous comparison through an error during the hold…" (expectPaused, MutationObserver: only the anchor flow is ever at the top)
    AC1: locate unknown for unfetched keys during the error Met code change above; probe table
    AC1: Retry resumes the hold (busy, "Updating…", rows only) and restores the anchor ±1 px (row 1150 at −20 → row 1260 at −20) Met same test. In my run the flow at row 1150 is 001035, where the issue names 001036; the rows and offsets match the issue.
    AC1: selection change while the error shows Met "starts a new hold from the shown comparison…": only the previous and the new row counts are ever shown
    AC1: second failure after Retry Met "keeps the same guarantees when the page fails again after Retry"
    AC2: first-page error regression Met "shows no rows after a first-page error… (O12)"
    AC3: error outside a hold regression Met "keeps the loaded rows after an error outside a hold, and Retry continues paging"
    AC4: N5 / N6 / N7 killed Met see the mutant table below
    AC4: D4 old-anchor check unconditional Met flows-grid.test.tsx D4 test: expect(old).toBeDefined() and then the offset assertion
    AC5: README Met services/README.md: the "Errors and the hold (#69)" bullet and the evidence list

    Bug-first evidence. On the deb4f29 useFlowGrid.ts and FlowsGrid.tsx, the three AC1 tests fail (expected 2225 to be 2115: the partial comparison was committed). The AC2, AC3 and O8/O9 tests pass there, as expected for regression and mutant-killing tests.

    Mutants. Each was a scratch edit to ComparisonGrid.tsx, run against the O8/O9 tests, then restored with cp from a saved copy. None is committed.

    Mutant Edit Killed by
    N5 focus clause removed (lost = body/null only) the O9 test, and only that test
    N6 pins.current.slice(0, 1) "anchors on a later recorded flow…" (52 px off)
    N7 if (!pending) record(); removed "re-anchors on the flows in view…" (other flow at the top)

    Supporting change. The shared harness moved to services/mock/flows-grid-harness.ts, and the new tests live in a second file.

    Commands (workspace container, Compose project lca-diff-f4-hold-retry, FRONTEND_PORT=5196)

    docker compose --project-directory . -f compose.yaml -p lca-diff-f4-hold-retry exec -T workspace bash -lc 'cd /workspaces/lca-diff && npm --prefix apps/frontend run <script>', after npm --prefix apps/frontend ci in the container:

    Script Result at 0c053c6
    format:check, lint, typecheck, build pass
    test:unit 30 files, 391 tests passed
    test:e2e -- --project=chromium 26 passed, including flows-grid.spec.ts and every @smoke test

    Limitations and blockers

    Next role: QA. Verify independently at 0c053c6.

    🤖 Generated with Claude Code

  5. DavidVFitzGerald commented on Nov 15, 2026

    @DavidVFitzGerald
    OwnerAuthor

    QA: PASS

    • Reviewed SHA: 0c053c6bdbebc422404d748c04d0479c54a10b5f (PR F4: keep the hold through row-page errors and restore the anchor on Retry (#69) #73, fix/f4-hold-retry → main at deb4f29). It holds exactly the 3 handed-off commits (25a190b, 82247dc, 0c053c6). The working tree was clean before and after review.
    • Mode: Phase 1, mock services only. I worked in a separate detached worktree /tmp/lca-diff-f4-hold-retry-qa, not the engineer's. It ran in its own rootless workspace container: Compose project lca-diff-f4-hold-retry-qa, FRONTEND_PORT=5197, no volumes. ./dev check passed, npm ci ran in the container, and the container was taken down afterwards.
      • Nothing was installed or run on the host.
      • No application or test files were changed. Old-code, mutant and probe runs were scratch edits in the QA worktree. Each was reverted with git checkout, and the scratch probe directory was deleted before the final runs.
    • Authority: spec §6.4, §6.8, §9.1 and §9.2 behaviours 17–18, and the services/README.md "View anchoring" contract, under accepted ADRs 0001–0003. ADRs 0004 and 0005 are Proposed and were not applied. No archive or reference folder was used.
    • ADR check: none needed. The PRD and spec are unchanged, and the change restores contracted behaviour on an error path.

    Commands and results

    All were run in the QA container at 0c053c6, with the probe files removed:

    cd /tmp/lca-diff-f4-hold-retry-qa && COMPOSE_PROJECT_NAME=lca-diff-f4-hold-retry-qa FRONTEND_PORT=5197 ./dev up && COMPOSE_PROJECT_NAME=lca-diff-f4-hold-retry-qa FRONTEND_PORT=5197 ./dev check   # PASS
    docker compose --project-directory . -f compose.yaml -p lca-diff-f4-hold-retry-qa exec -T workspace bash -lc 'cd /workspaces/lca-diff && npm --prefix apps/frontend ci'                       # exit 0
    docker compose --project-directory . -f compose.yaml -p lca-diff-f4-hold-retry-qa exec -T workspace bash -lc 'cd /workspaces/lca-diff && npm --prefix apps/frontend run format:check'   # All matched files use Prettier code style, exit 0
    docker compose --project-directory . -f compose.yaml -p lca-diff-f4-hold-retry-qa exec -T workspace bash -lc 'cd /workspaces/lca-diff && npm --prefix apps/frontend run lint'           # exit 0, --max-warnings 0
    docker compose --project-directory . -f compose.yaml -p lca-diff-f4-hold-retry-qa exec -T workspace bash -lc 'cd /workspaces/lca-diff && npm --prefix apps/frontend run typecheck'      # exit 0
    docker compose --project-directory . -f compose.yaml -p lca-diff-f4-hold-retry-qa exec -T workspace bash -lc 'cd /workspaces/lca-diff && npm --prefix apps/frontend run build'          # exit 0 (392.16 kB JS)
    docker compose --project-directory . -f compose.yaml -p lca-diff-f4-hold-retry-qa exec -T workspace bash -lc 'cd /workspaces/lca-diff && npm --prefix apps/frontend run test:unit -- --reporter=verbose'   # 30 files, 391/391 passed (88.0 s)
    docker compose --project-directory . -f compose.yaml -p lca-diff-f4-hold-retry-qa exec -T workspace bash -lc 'cd /workspaces/lca-diff && npm --prefix apps/frontend run test:e2e -- --project=chromium'   # 26 passed (1.0 m), incl. both flows-grid.spec.ts tests and all 6 @smoke tests
    gh pr checks 73   # quality: pass (3m28s), run 43719758213 at headSha 0c053c6

    src/test/service-boundary.test.ts passes. The e2e specs are unchanged by this PR.

    Per-criterion results

    AC1, error during the hold, then Retry: PASS.

    • Repro, rerun independently. I used a scratch probe on the shared harness: jsdom, 30 ms latency, processes 0–109, scrolled to row 1150, then the other 110 added, with page index 2 (the 3rd page) failing once.
      • Before the change, the top row is row 1150 at −20 px. During the error, the same flow is still at row 1150 at −20 px.
      • After Retry, the same flow is at row 1260 at −20 px, aria-rowcount 2225. This is identical to the run without an error (row 1260 at −20, 2225 rows).
    • Old code. On deb4f29's useFlowGrid.ts and FlowsGrid.tsx, the same probe has no loaded row at the top during the error. After Retry it shows flow 000924 at −68 px at row 1149, and the anchor is not mounted. This reproduces the bug.
    • 001035 vs 001036. The engineer is right: the row at 1150 is "Synthetic generated flow 001035". 001036 is at row 1151, and 001034 is at row 1149.
      • The issue's flow numbers are one higher than the actual labels. Its "000925 at row 1149" is also 000924 in my old-code run.
      • This does not matter. The criterion is "the anchor flow restored at its pre-change offset", and the row and offset figures (1150 → 1260 at −20 px) match exactly. The test asserts the anchor by name, whatever label it has, and the row 1150 / −20 / 1260 indices. It does not assert a hard-coded label.
    • Bug-first. With deb4f29's useFlowGrid.ts and FlowsGrid.tsx swapped into the QA worktree, flows-grid-anchoring.test.tsx gives 3 failed and 5 passed. The 3 failures are the AC1 tests (the repro, the repeated failure, and the selection change during the error), each with expected 2225 to be 2115. AC2, AC3, O8 and O9 pass there, as expected for regression and mutant-killing tests. At 0c053c6, all 8 pass.
    • While the error is shown, expectPaused checks, over a 300 ms window:
      • no new flowSummaries, flowCells or flowRows calls;
      • the previous aria-rowcount (2115);
      • the anchor at the top at its offset ±1 px;
      • no "Updating the comparison…";
      • aria-busy="true".
        The alert text is asserted, and Retry is a native <button> that receives focus().
    • Extra edge case: scrolling during the pause. In a scratch probe I scrolled 300 rows up within the previous comparison while the error was shown.
      • 0 summary or cell calls and empty busyReads.
      • After Retry, the flow at the new view top (row 856, −32 px) was restored at row 966, −32 px.
      • So the anchor follows a scroll made during the pause.
    • Retry resumes the hold. The test asserts "Updating the comparison…" and aria-busy after Retry. expectRestored then asserts the anchor at ±1 px, empty busyReads (no summary or cell reads while busy), and no alert. A MutationObserver confirms that the anchor is the only flow ever seen at the top, before, during and after the error.
    • Selection change while errored. view.counts contains exactly the previous and the new row counts, so the failed comparison was never shown. The last page read is for 210 processes.
    • Repeated failure. Two failed reads are confirmed via pageReads. The alert reappears with the same paused guarantees, and the second Retry restores the anchor.
    • locate. Code inspection: it returns undefined (unknown) while busy || hasNextPage and returns null only when no pages remain. A failed page therefore no longer makes unloaded keys absent. The test coverage of this is covered in O1.

    AC2, first-page error (O12): PASS. "shows no rows after a first-page error and restores the anchor on Retry" asserts aria-rowcount 0 with the alert, then the anchor restored at ±1 px and empty busyReads after Retry. Code check: with no fresh pages, hasNextPage is false, so holding is false and the error shows with no rows, as specified.

    AC3, error outside a hold: PASS.

    • The test fails the next page while scrolling deep with an unchanged selection.
    • It asserts that the grid is not aria-busy, that aria-rowcount is unchanged, that the last loaded row is still loaded, and that the row after the page boundary is pending.
    • After Retry, that row loads and the alert clears.

    AC4, O10 mutants and D4: PASS. See the mutation table. N5, N6 and N7 are each killed by exactly one test.

    • The D4 test now asserts expect(old).toBeDefined() before the offset check, so the check is unconditional, and it passes.
    • No other assertion or budget changed. I compared every line removed from flows-grid.test.tsx with the new harness. Lines without an exact match are explained by:
      • the flowRows wrapper, which gained fault injection and is a pass-through otherwise;
      • topRow now also returning index;
      • the returned object gaining faults and pageReads;
      • import changes and Prettier reflow of grid;
      • the D4 line.
    • The file still has 12 tests, and the describe 20 s budget and per-test 40 s overrides are unchanged.

    AC5, README: PASS.

    • "Errors and the hold (Flows grid: Retry after a row-page error during a selection update loses the anchored flow #69)" under "View anchoring" covers each required point: paused with the previous rows on an error, resumed by Retry, a repeated failure, a selection change while errored, a first-page error showing no rows, and errors outside a hold keeping the loaded rows.
    • It records the aria-busy choice and its reason.
    • The evidence list names the new file, the fault-injection method, unchanged mock and URL scenarios, and the reason for the split.

    Harness split (task item 3): accepted

    • Test-only.
      • flows-grid-harness.ts is imported only by flows-grid.test.tsx and flows-grid-anchoring.test.tsx; grep -rn over src finds no other importer.
      • It imports vitest, which no production module does.
      • The built bundle contains none of stubGridLayout, watchView, cursorPage, faults.push or vitest. Vite bundles only what index.html reaches.
      • It follows the existing precedent of services/mock/test-harness.ts, which sits in the same folder, is also test-only, and is allowed by the ESLint boundary.
    • Justified. The engineer measured about 100 MB of heap per large-workload test, and a 20-test file exceeding the worker heap limit. Under my run, the two files took the longest per-test times in the suite (below). Splitting by file is the least invasive way to get a fresh worker, and no budget was raised to make it fit.

    aria-busy while paused (task item 4): consistent

    • The spec does not specify aria-busy. §6.8 requires loading states, responsive controls and keyboard access, and §9.1 requires no scroll-jump.
    • Keeping aria-busy="true" signals that the grid's rows are not the current selection's, and this is documented.
    • The error is still announced, because the role="alert" paragraph sits outside the grid.
    • The status region is empty during the error. "Updating the comparison…" is driven by updating (placeholder or seeking, where seeking requires !isError), not by busy. This is confirmed by test and by mutant Q3.

    Mutation table

    Each mutant was a scratch edit in the QA worktree, run with npx vitest run on the files named. Each was reverted with git checkout -- apps/frontend/src/components/comparison/, and none is committed.

    # Mutation Result Killed by
    N5 ComparisonGrid: lost only for null/body (focus clause removed) Killed O9 "moves focus to the tab stop on the same flow…" (tabindex assertion)
    N6 ComparisonGrid: pins.current.slice(0, 1) Killed O8 "anchors on a later recorded flow…" (52 px, more than 1)
    N7 ComparisonGrid: if (!pending) record(); removed Killed O8 "re-anchors on the flows in view…" (another flow at the top)
    Q3 useFlowGrid: seeking = holding (ignores isError) Killed all 3 AC1 tests ("Updating…" shown while errored)
    Q4 FlowsGrid: busy={data.updating} Killed all 3 AC1 tests (aria-busy missing while paused)
    Q2 useFlowGrid: summaries gated on updating, not busy Survives the committed suite; killed by my scroll-during-pause probe (1 summary read) O2
    Q5 useFlowGrid: cell tiles gated on updating, not busy Survives the committed suite; killed by the same probe (1 cell read) O2
    Q1 useFlowGrid: locate reverted to deb4f29's updating || (hasNextPage && !isError) Survives both files (20/20) O1
    Q6 useFlowGrid: locate with busy only (no hasNextPage) Survives both files (20/20) O1

    Timings for #26 (full parallel test:unit, 88.0 s in total)

    Test Time Budget
    selection: 300 selections (pre-existing) 17.6 s 30 s
    O9 focused column removed (new) 16.5 s 40 s
    D4 scroll during update 15.7 s 40 s
    deep scrolling pages rows 13.4 s 40 s
    D3 single removal 10.4 s 40 s
    O8 every recorded flow removed (new) 9.8 s 40 s
    #69 tests (4 hold tests and AC3) 5.0–9.1 s 40 s
    first mount 220 × 2,000+ 5.6 s 20 s

    None is near its budget. The O9 test (16.5 s) is the slowest new one. The e2e suite took 1.0 m on 1 worker.

    Defects

    None.

    Observations (non-blocking)

    • O1. The locate change is not covered by any test.
      • Neither reverting it (Q1) nor tightening it (Q6) fails a test. This matches the engineer's own probe table.
      • By inspection, I found no state the new hold can reach where the old expression changes behaviour. While paused, the shown comparison is the previous one, and every pin is in its index, so locate returns a number. Outside a hold, pins are loaded rows.
      • The change matches the AC1 wording and is harmless, but it is defensive rather than behaviour-proven.
      • If [Task] F4 — Add shared column drag, keyboard reorder and global removal #25 (header × removal through the same hold) creates a reachable case, it should add the test there.
    • O2. The committed "no summary or cell reads while paused" assertion does not catch the busy gating.
    • O3. The issue's flow labels are off by one (001036 → 001035; 000925 → 000924). The row and offset figures are correct, and the tests use indices and offsets rather than labels. No action is needed beyond noting it here.
    • O4. Comment nit. The header of flows-grid-anchoring.test.tsx says "see flows-grid-harness.tsx", but the file is .ts.
    • O5. aria-busy stays true while nothing is in flight. This differs slightly from ARIA's "being updated" sense. It is an explicit, documented choice that the PM left to the engineer, the alert remains outside the busy region, and some AT may defer reading the grid while busy. Reconsider in [Task] F5 — Complete comparison loading, recovery and accessibility states #33's async-state audit if needed.
    • O6. The per-test heap growth (about 100 MB per large-workload test) is pre-existing. If [Task] F4 — Verify large Flows comparisons and record the milestone gate #26 adds more large-workload jsdom tests, it should track this rather than enlarge either file.

    Next role

    Coordinator / maintainer review of PR #73. PASS returns it to review and merge. No merge is authorized by this report. #25 can start once #73 merges. O1 and O2 are candidate follow-ups for #25 or #26.

    🤖 Generated with Claude Code

  6. DavidVFitzGerald commented on Nov 15, 2026

    @DavidVFitzGerald
    OwnerAuthor

    Coordinator: QA PASS at 0c053c6 (#69 (comment)). Hosted quality check passes. State → ready for maintainer review of PR #73. #69 closes after the maintainer merges PR #73.

    QA observations carried forward:

    🤖 Generated with Claude Code

  7. DavidVFitzGerald commented on Nov 15, 2026

    @DavidVFitzGerald
    OwnerAuthor

    Coordinator: closed. QA PASS at 0c053c6. The maintainer merged PR #73 to main. Next: #25 gets its post-merge readiness recheck.

    🤖 Generated with Claude Code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugfrontend

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions