Skip to content

[Task] F4 — Assemble the Flows comparison with exact missingness and cell warnings #24

Closed

Description

@DavidVFitzGerald

Delivery phase

Phase 1 - frontend with mock services. Milestone F4; task key F4-05.

Goal

Turn selected processes into the complete MVP Flows tab using the shared windowed grid and signed cells.

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, 6.8, 9.2 behaviors 15, 17. Planned files: apps/frontend/src/app/ Flows composition, comparison components/hooks and fixtures/tests (planned).

Requirements and constraints

Use service-supplied harmonized identity/type/metadata; components must not infer flow identity from names/signs or parse source data. Read fixtures only through the mock service. Flows remains the initial tab and first content after selection.

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 — Rows are exactly the selected-process union of flow ID plus type; deselecting the last contributor removes that row without clearing unrelated selections.
  • AC2 — Rows sort Reference → Technosphere → Ecosphere Input → Ecosphere Output then case-insensitive Category/Subcategory/Flow Name with stable ID tie-break.
  • AC3 — The visible sticky fields are Type, Flow Name, Location, Process Name, Category, Subcategory, Unit; ecosphere blanks and resolved technosphere metadata are not invented.
  • AC4 — Present zero labels 0, absent cells are completely blank, signed nonzero cells use the shared chart component and full-precision tooltip.
  • AC5 — Unresolved-reference warning icons/tooltips appear only on the affected process/flow cell, not other cells sharing its row.
  • AC6 — No processes shows an actionable selection empty state; one process shows all represented rows; comparability warnings and shared headers remain visible and values unchanged.
  • AC7 — Identifying-block readability and fixed headers with the sidebar open ([Task] F4 — Virtualize comparison rows and columns with sticky alignment #23 QA notes O2, O3; refined in the PM: READY comment).
  • AC8 — Empty-selection transitions never show a stale "Updating" status or a previous row count ([Task] F4 — Virtualize comparison rows and columns with sticky alignment #23 QA note O7; refined in the PM: READY comment).

Refined, objective wording for AC1–AC8 and the delivered-versus-remaining split are in the PM: READY comment on this issue, which governs where it is more specific.

Out of scope and follow-ups

Column interactions are #25, difference filtering #29/#30, Scores #28, and final async state audit #33. Retry/anchoring after a row-page error during a selection update, plus the O10 anchoring tests and the O11/O13 product questions, are #69. The large-comparison milestone gate is #26. No exchange-details drawer.

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.

Component/service tests and a Playwright comparison scenario use overlapping/unique flows, duplicate names with distinct IDs/compartments, same ID distinct type, positive/negative/zero/absent values and one cell warning. Verify union removal, sort, labels and warnings.

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: #23. 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.

PM recheck (2026-11-15): M1 #2 and M2 #3 are closed. #22 is merged (PR #67). #23 has QA PASS, and PR #68 awaits the maintainer's merge. Under the maintainer's stacking authorization, #24 starts on a branch stacked on feat/f4-virtual-grid (dc1f06e). Its PR targets that branch until #68 merges, and it must not merge to main before #68. See the PM: READY comment.

Activity

  1. added
    task
    frontend
    blocked
    on Nov 13, 2026
  2. DavidVFitzGerald commented on Nov 13, 2026

    @DavidVFitzGerald
    OwnerAuthor

    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: #23. 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.

  3. DavidVFitzGerald commented on Nov 14, 2026

    @DavidVFitzGerald
    OwnerAuthor

    PM note carried from #23 QA (O2, O3); not a readiness change.

    When #24 grooms the Flows composition, include the readability of the bounded sticky identifying block:

    • O2: with the processes sidebar open, at widths up to about 1440 px, the seven fields and their labels are heavily truncated. In the [Task] F4 — Virtualize comparison rows and columns with sticky alignment #23 grid the block is 36% of the grid width, clamped to 300–560 px. All seven fields remain present, with full text in titles and the rowheader's accessible name.
    • O3: at 900 px height the open sidebar makes the page taller than the viewport, so page scroll moves the grid headers.

    Options include compact Type labels, a two-line identity layout, or a wider block when space allows. Spec §6.3 still requires a bounded block with all seven fields visibly present.

  4. DavidVFitzGerald commented on Nov 15, 2026

    @DavidVFitzGerald
    OwnerAuthor

    PM note from #23 QA (O7): useFlowGrid keeps its "updating" state and the previous row count when the selection becomes empty. Today App.tsx unmounts the Flows grid for an empty selection, so this isn't visible. If #24 renders the grid or its states for an empty selection, handle that case explicitly.

  5. removed
    blocked
    on Nov 15, 2026
  6. DavidVFitzGerald commented on Nov 15, 2026

    @DavidVFitzGerald
    OwnerAuthor

    PM: READY

    Rechecked using docs/team/product-manager.md. Phase 1, frontend with mock services; F4-05.

    Authority: spec §§6.3, 6.4, 6.6, 6.8 and §9.2 behaviours 15 and 17, under accepted ADRs 0001–0003. ADRs 0004 and 0005 are still Proposed and grant nothing here. This scope does not change the PRD or the spec, so no ADR is needed. If the engineer finds that a criterion below can only be met by changing product or scientific meaning, stop and raise a blocker for an ADR.

    Dependency check

    Gate State
    M1 runtime (#2) Closed
    Bootstrap/M2 (#3) Closed
    #22 signed bars Merged to main (PR #67), closed
    #23 virtual grid (blocking) QA PASS. PR #68 (feat/f4-virtual-grid, head dc1f06e, a merge of main whose tree equals QA-passed 3976241) is open, mergeable and awaiting the maintainer's merge

    Stacking decision

    Stacking is acceptable for #24, and #24 may start now. The predecessor's code is QA-passed and frozen pending merge, and #24 only builds on its interfaces.

    Delivered vs remaining, per criterion

    AC1, union and removal

    • Delivered: the mock flowRows returns only represented (flow_id, flow_type) rows, honouring absence overrides (comparison.test.ts, "returns only represented flow identities…" and "honors per-process absence overrides…"). The grid renders the service rows.
    • Remaining: no fixture has the same flow ID under two types. Add one by making Alpha's reference flow (FIXTURE_IDS.reference) also a present Technosphere input of one other process. Its two rows must stay distinct, with distinct row keys and cells.
    • Remaining: add UI tests (jsdom and Playwright) for deselection:

    AC2, sort order

    • Delivered: sorting is done at the service (rowOrder in services/mock/comparison.ts, fixture sort_key), with type-group order and a stable ID tie-break (Alpha/Gamma reference rows) tested at the service.
    • Remaining: no fixture exercises case-insensitivity, because all categories are lowercase. Add a mixed-case Category or Subcategory, or a mixed-case Flow Name, whose case-sensitive order differs from its case-insensitive order. Assert the order in the service test.
    • Remaining: assert in a Flows UI test that rendered rows follow service order. Components must not re-sort or derive order from names or signs.

    AC3, identifying fields

    • Delivered: the seven fields render in specified order in the bounded block (FlowsGrid.tsx FLOW_FIELDS). Null Location and Process Name render — with "not specified" in the accessible name. Full text is in title and the rowheader name.
    • Remaining: a Flows test asserts:
      • The technosphere row shows its service-supplied Location and Process Name ("CH", "Synthetic supplier").
      • Ecosphere rows show — for Location and Process Name.
      • No Location is invented for ecosphere rows.

    AC4, values

    AC5, cell warnings (not delivered; the main new work)

    • Contracts and adapter: FlowCell.warnings: PublicWarning[] exists, and the fixture carries one AGGREGATED_DUPLICATES warning on the Alpha technosphere cell. Nothing renders warnings: FlowsGrid.renderCell drops value.warnings, and SignedValueCell has no warning prop.

    • Remaining: add a synthetic fallback warning to the mock fixtures and render warnings on the cell.

      Fixture. Add one synthetic unresolved-reference fallback cell warning:

      • Code: UNRESOLVED_REFERENCE_FALLBACK. This is a provisional mock code, an ordinary contract choice; document it in services/README.md.
      • Placement: a present Technosphere cell of exactly one process, on a row where at least one other selected process also has a present value.
      • Message: explains that the reference was not verified and an isolated fallback is used.

      Rendering. Render each cell's service-supplied warnings on that cell only:

      • Show a visible warning icon, using more than colour alone. Hover and keyboard focus reveal a tooltip with each warning message. The cell's accessible name or description includes the warning.
      • Other cells in the same row, the identity rowheader and the row summaries show no warning.
      • The icon does not change bar geometry, row height or value labels.
      • The existing AGGREGATED_DUPLICATES cell warning renders the same way (generic rendering, no per-code UI logic).
      • Absent cells still show no bar, no label and no 0.

    AC6, empty and single-process states

    • Delivered: App.tsx FlowsPanel renders EmptyComparison ("Select processes in the left sidebar…") for an empty selection. Headers and the comparability warning come from [Task] F4 — Build shared process headers and comparability warnings #21 ComparisonHeader.
    • Remaining: tests for each state:
      • The empty state appears on first visit and after removing the last selected process. It tells the user how to select processes in the sidebar.
      • With exactly one process selected, the grid shows every row that process represents and only those rows.
      • With processes whose reference unit (Alpha + Gamma) or amount (Alpha + Beta) differs, the comparability warning stays visible above the Flows grid and the shared headers render.
      • Cell labels and tooltips show the unnormalized stored lexemes.
    • Out of scope: the difference toggle's disabled state is [Task] F5 — Implement exact on-demand difference queries in mock services #29.

    Added criteria (folded from #23 QA notes)

    AC7, readability and fixed headers (O2, O3). Spec §6.3 still governs: a bounded block, with all seven fields visibly present. Check in Playwright (Chromium) at 1440×900 and at 1280×800, with the process sidebar open and three processes selected:

    • (a) No identifying-field header label is truncated: each label's scrollWidth is at most its clientWidth. Labels may wrap or use a two-line layout.
    • (b) Every Type value is fully legible, either untruncated or as a compact label whose full type is in title and the rowheader's accessible name.
    • (c) The block stays bounded and process columns keep at least the Flows minimum width.
    • (d) The page itself does not scroll vertically. document.scrollingElement.scrollHeight is at most innerHeight with 3 processes selected and with 50 selected, because the sidebar and the Selected list scroll internally. Process headers and identity labels keep their viewport position while the grid scrolls vertically.

    The existing #23 sticky, alignment and min-width e2e checks must still pass.

    AC8, empty-selection transitions (O7). Going from N processes to 0 and back to 1:

    • At 0, the empty state shows without an "Updating the comparison…" status.
    • At 1, the status is empty once loaded, and aria-rowcount and the rendered rows match the one-process comparison, not the previous N-process count.

    Preferred approach: keep the grid unmounted for an empty selection, as today. If the engineer instead keeps it mounted, useFlowGrid must report updating: false and rowCount: 0 for empty entries without touching the #69 hold/error path.

    Container verification plan

    These are existing F1 scripts. Run each 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'

    Test evidence expected:

    • Service tests in services/mock/comparison.test.ts cover the same-ID/two-type rows, the mixed-case sort and fallback warning placement.
    • jsdom Flows tests in services/mock/flows-grid.test.tsx or a new Flows composition test cover AC1–AC6 and AC8.
    • A Playwright Flows scenario covers union removal, sort, labels, the warning icon and tooltip by keyboard, and AC7.
    • Update existing fixture-dependent expectations (row lists and counts) deliberately; do not weaken them.
    • The handoff records the exact commands, results and delivered SHA.

    Fixtures are read only through the mock service. No component calls HTTP or Firebase, or imports fixtures; src/test/service-boundary.test.ts must still pass.

    Out of scope and linked follow-ups

    The issue body was updated: AC7 and AC8 were added, the dependency recheck recorded and #69 and #26 linked. The blocked label was removed.

    Next role: Software Engineer, on feat/f4-flows-composition stacked on feat/f4-virtual-grid (dc1f06e).

    🤖 Generated with Claude Code

  7. DavidVFitzGerald commented on Nov 15, 2026

    @DavidVFitzGerald
    OwnerAuthor

    Coordinator: state → implementing. Branch feat/f4-flows-composition created from feat/f4-virtual-grid at dc1f06e in the main checkout (the container mounts it); stacked PR will target feat/f4-virtual-grid until #68 merges. Software Engineer agent assigned.

    🤖 Generated with Claude Code

  8. DavidVFitzGerald commented on Nov 15, 2026

    @DavidVFitzGerald
    OwnerAuthor

    Engineering: READY FOR QA

    Commits

    SHA Summary
    6045944 Fixtures: same flow ID under two types, mixed-case subcategory, UNRESOLVED_REFERENCE_FALLBACK cell warning; service tests
    b722861 Per-cell warning rendering; compact Type labels, wrapping header labels, inner-column minimums; viewport-tall page with internally scrolling sidebars
    65b4736 jsdom App composition tests, Chromium e2e/flows-composition.spec.ts, services/README.md section
    3561927 20 s timeout budget for the large Flows grid suites (see Limitations)

    Criteria

    AC1. Union and removal: done.

    • Alpha's reference flow (FIXTURE_IDS.reference) is also a present Technosphere input of Gamma (3.5).
    • Each type gets its own row, with distinct row_keys and its own cells.
    • Evidence:
      • comparison.test.ts, "keeps one flow ID under two types as two rows…".
      • flows-composition.test.tsx AC1: deselecting via the Selected list and via the tree drops the rows whose last contributor left, keeps the rest, and leaves the other columns and their order unchanged.
      • Playwright "Flows shows the ordered union…": deselects Gamma in the tree.

    AC2. Sort order: done.

    • airHigh's subcategory is now Upper atmosphere. Case-insensitive sorting puts it after lower atmosphere; a code-point sort would reverse them. The service test asserts both.
    • The UI test compares the rendered rowheader order with the rows in the service response. Components do not re-sort.

    AC3. Identifying fields: done.

    • The technosphere row shows CH and Synthetic supplier.
    • Ecosphere rows show — for Location and Process Name, with "not specified" in the accessible name. No location is invented.
    • Covered in jsdom and Playwright.

    AC4. Values: done.

    • The water row shows 0 in every column.
    • Beta's airHigh cell is blank: no bar, no label.
    • No absent cell renders a label, a bar or 0.
    • Technosphere tooltips hold the full lexemes -80.000000000000000000000001 and 20. Playwright checks this on hover.

    AC5. Cell warnings: done.

    • SignedValueCell takes warnings. The rendering is generic, with no per-code logic:
      • a bordered ! badge in the top-right padding, so the cue is not colour alone;
      • a tooltip, shown on hover and on keyboard focus, with the value followed by each warning;
      • the accessible name ends with . Warning: <messages>.
    • The badge is outside the layout, so it does not affect the bar, axis, label, row height or label text. Tests compare the Beta and Gamma 20 cells.
    • Beta's recovered-material cell carries UNRESOLVED_REFERENCE_FALLBACK. Alpha and Gamma also have values on that row.
    • AGGREGATED_DUPLICATES renders the same way on Alpha's cell.
    • Gamma's cell, the rowheader and the process headers show no warning.
    • The code is documented in src/services/README.md → "Flows composition ([Task] F4 — Assemble the Flows comparison with exact missingness and cell warnings #24)".
    • Playwright reaches the Beta cell with arrow keys, then checks focus, the tooltip's opacity of 1 and the message, the accessible name, and that geometry matches Gamma's cell.

    AC6. Empty and single-process states: done.

    • The empty state, with its sidebar instruction, shows on first visit and after removing the last process.
    • With Beta alone, the grid shows exactly Beta's 4 rows.
    • With Alpha and Gamma (different units), and with all three (different amounts and units), the comparability warning shows above the grid, and the values are the stored lexemes: 1, 1, 2.0000000000000000000000001.

    AC7. Readability and fixed headers: done.

    • Type values use compact labels (Ref, Tech, Eco in, Eco out). The full type is in title and in the rowheader's accessible name.
    • Header labels may wrap.
    • Each inner column has a pixel minimum. The Flows block now has a minimum of 410 px; the shared share (36%) and maximum (560 px) are unchanged.
    • .app is a viewport-tall flex column. The sidebars scroll internally and are position: relative, so a visually hidden <p> no longer extends the page. Before the fix, scrollHeight was 1087 against a 900 px viewport.
    • Playwright runs at 1440×900 and 1280×800 with the sidebar open, with 3 processes and with 50 (large scenario, five "Select all matches" filters). It checks:
      • (a) for every header label, scrollWidth ≤ clientWidth;
      • (b) every Type value is untruncated, and its title matches its accessible name;
      • (c) the block width is at most max(410, 40% of the grid), all 7 fields are present, and the column width is at least 120;
      • (d) page scrollHeight ≤ innerHeight, and the header strip and identity label boxes do not move when the grid scrolls to 30,000 px.
    • The existing [Task] F4 — Virtualize comparison rows and columns with sticky alignment #23 flows-grid.spec.ts checks still pass.

    AC8. Empty-selection transitions: done.

    • The grid stays unmounted for an empty selection (the preferred approach). useFlowGrid is unchanged, so the hold, seeking, error and Retry paths are untouched for Flows grid: Retry after a row-page error during a selection update loses the anchored flow #69.
    • In both jsdom and Playwright, going from N processes to 0 and then 1 shows:
      • at 0: the empty state, with no grid and no "Updating…" text;
      • at 1: aria-rowcount is 4 (never 8), the rendered rows are exactly Beta's, and the status is empty.

    src/test/service-boundary.test.ts passes. Components read only contracts, and fixtures reach them only through the mock service.

    Commands and results

    All checks ran at 3561927 in the lca-diff-dev workspace container. Nothing was 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'   # All matched files use Prettier code style
    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'           # exit 0, no warnings
    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'      # exit 0
    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'      # run 1: 29 files, 383 tests passed; run 2: 29 files, 383 tests passed
    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'          # exit 0
    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'   # 26 passed (59.2s)

    The unit runs were made before the last commit (3561927) was created, but on the same working tree: that commit only recorded the timeout budget, which was already applied.

    Manual verification

    1. Run make dev-up, or npm run dev in the container, and sign in as [email protected].
    2. Expand transport systems › road › operations › infrastructure.
    3. Select Alpha, Gamma and Beta. Then check:
      • two Synthetic transport service rows typed Ref and Tech (CH, Alpha);
      • the ! badge on Alpha's and Beta's Tech | Synthetic recovered material cells;
      • with Tab into the grid, then arrows to Beta's cell, the tooltip shows 20 and the unresolved-reference warning.
    4. Clear the selection, then select Beta alone.

    Limitations and follow-ups

    Next role: QA Engineer verifies 3561927 on PR #71.

    🤖 Generated with Claude Code

  9. DavidVFitzGerald commented on Nov 15, 2026

    @DavidVFitzGerald
    OwnerAuthor

    QA: PASS

    • Reviewed SHA: 3561927e8b72c588e3f4b3f3c32e849002830c68 (PR F4: assemble the Flows comparison with exact missingness and cell warnings (#24) #71, feat/f4-flows-composition → main). HEAD confirmed and the working tree was clean before and after review. git log origin/main..HEAD shows exactly the 4 handed-off commits.
    • Mode: Phase 1, mock services only. Container lca-diff-dev-workspace-1. Nothing was installed or run on the host. No application files were changed. Mutation and old-code runs used a disposable mktemp -d copy inside the container, which was then deleted.
    • Authority: spec §§6.3, 6.4, 6.6, 6.8 and §9.2 behaviours 15 and 17, 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. See O3.

    Commands and results

    All were run in the container at 3561927:

    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'   # All matched files use Prettier code style, exit 0
    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'           # exit 0, no warnings
    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'      # exit 0
    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'      # run 1: 29 files, 383/383 passed (72.7 s); run 2: 29 files, 383/383 passed (73.0 s)
    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'          # exit 0 (392 kB JS)
    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'   # 26 passed (58.4 s), including 5 in flows-composition.spec.ts and both #23 flows-grid.spec.ts tests

    A third full vitest run --reporter=verbose (in the copy, with HEAD's src) also passed. src/test/service-boundary.test.ts passes in every run.

    Per-criterion results

    AC1, union and removal: PASS.

    • In the fixture, FIXTURE_IDS.reference is a Reference row and also a Technosphere row: Gamma's present 3.5, absent for Alpha and Beta. The two rows have distinct row_keys, and the contracts test asserts the keys are unique.
    • In the UI, they are two rows with their own cells: Alpha's reference cell is positive, Gamma's is absent; on the input row, Alpha's cell is absent and Gamma's is 3.5.
    • Removing Gamma from the Selected list leaves exactly 6 rows (Gamma's reference row and the Gamma-only input row are gone), and the columns stay [Alpha, Beta].
    • Then deselecting Alpha in the tree leaves Beta's 4 rows. The Upper atmosphere row goes too, because Beta's cell on it is absent.
    • Playwright covers deselection in the tree.

    AC2, sort order: PASS.

    • Service rowOrder sorts by type group, then by lower-cased Category, Subcategory and Name, then by flow_id.
    • The fixture's Upper atmosphere sorts after lower atmosphere, which only a case-insensitive sort produces.
    • The UI test compares the rendered rowheader order with the last flowRows response.
    • Mutation M3 (the component reverses rows) and M4 (a case-sensitive subcategory sort) are both caught. See below.

    AC3, identifying fields: PASS.

    • The technosphere row shows CH and Synthetic supplier, from the service.
    • Ecosphere rows show — with no title for Location and Process Name. The accessible name says "not specified".
    • Mutation M9 (invent GLO for a null location) is caught.

    AC4, values: PASS.

    • The water row is zero with the label 0 in every column.
    • Beta's Upper atmosphere cell is absent: no label, no bar, no 0. This holds for every absent cell.
    • Full lexemes -80.000000000000000000000001 and 20 appear in the tooltip and accessible name. Playwright checks this on hover.

    AC5, cell warnings: PASS. I checked each requirement in the diff and tests:

    • Placement. Warnings come from the cell (value?.warnings) and render only on that cell. Only 2 badges exist in the 8 × 3 grid, on Alpha's and Beta's recovered-material cells. Gamma's cell on the same row has no badge, and its name is exactly Gamma: 20, positive.
    • Rowheader and headers. The rowheader name and the process headers contain no "warning". Row summaries are geometry inputs and carry no warning UI.
    • Non-colour cue. A bordered ! glyph (aria-hidden, with the message conveyed in text).
    • Tooltip. Shown on :hover and :focus. Playwright hovers Alpha's cell, then reaches Beta's cell by arrow keys and asserts focus, tooltip opacity 1 and the message.
    • Accessible name. Ends with . Warning: <messages>. for present and N/A cells. Absent cells announce it through the sr-only text.
    • Geometry. The badge is absolutely positioned. .signed-bar, .zero-axis and .signed-label styles, the row height and the label 20 are identical to Gamma's unwarned 20, in jsdom and in Playwright.
    • Absent cells. A warned absent cell stays blank (component test).
    • Generic rendering. AGGREGATED_DUPLICATES renders through the same generic path; there is no per-code logic.
    • Provisional code. UNRESOLVED_REFERENCE_FALLBACK is documented as provisional in src/services/README.md → "Flows composition ([Task] F4 — Assemble the Flows comparison with exact missingness and cell warnings #24)", with reconciliation at I1.
    • Mutations. M1, M2, M5, M7 and M8 are all caught.

    AC6, empty and single-process states: PASS.

    • The empty state and its sidebar instruction show on first visit (with no flowRows call) and after removing the last process.
    • Beta alone shows exactly Beta's 4 rows.
    • Alpha + Gamma shows the unit warning above the grid. All three shows the amounts-and-units warning.
    • Values stay as stored lexemes: 1, 1 and 2.0000000000000000000000001, with no normalization.

    AC7, readability and fixed headers: PASS.

    • Playwright runs at 1440×900 and 1280×800 with the sidebar open, with 3 and with 50 processes. It checks, all passing:
      • header labels: scrollWidth ≤ clientWidth;
      • Type values are untruncated, with the full type in title and the accessible name;
      • the block is bounded, all 7 fields are present, and process columns are at least 120 px;
      • page scrollHeight ≤ innerHeight, and the header and identity boxes do not move while the grid scrolls.
    • The old code fails these checks:
      • main's shell.css gives scrollHeight 1043/1201 against 900, and 943/1101 against 800 (4 failures);
      • main's grid.css (no label wrapping) truncates "Process Name" (76 > 50);
      • removing the compact Type labels gives Type 53 > 46 (Playwright failures).
    • The [Task] F4 — Virtualize comparison rows and columns with sticky alignment #23 sticky, alignment, collapse and keyboard e2e checks still pass. Spec fit is in O3.

    AC8, empty-selection transitions: PASS.

    Test-quality mutations

    Each mutation was swapped into the container copy and run with npx vitest run on the 4 relevant files. All 9 were caught.

    # Mutation Caught by
    M1 Every cell in the row renders the row's union of warnings composition AC5
    M2 Warning dropped from the accessible name 2 SignedValueCell tests + composition AC5
    M3 Component reverses the service's row order composition AC1, AC2, AC4, AC5, AC6/8
    M4 Case-sensitive subcategory sort in the mock service 2 comparison.test + composition AC1, AC2
    M5 No ! icon on present cells SignedValueCell + composition AC5
    M6 Compact Type label in the rowheader accessible name composition, 6 tests
    M7 Fallback warning on every process's cell contracts.test, 2 comparison.test, composition AC5
    M8 Warnings dropped from the tooltip 2 SignedValueCell + composition AC5
    M9 GLO invented for a null location composition AC1–AC4, AC6/8

    The three Playwright old-code and mutation runs are listed under AC7.

    Engineer's open concern: the 20 s describe timeout (3561927)

    Accepted; it does not weaken the tests. The commit changes only the describe options. No assertion, waitFor timeout or fixture expectation changed. Tests that already set a larger timeout of their own keep it.

    The first-mount test was already close to the 5 s default before this PR:

    First-mount test (220 × 2,000+) origin/main This PR
    In a full parallel run 4,515 ms 4,657 / 4,717 / 4,868 ms (3 runs)
    Alone 2,577 ms 2,544 ms

    Running alone, the time is the same, so there is no application performance regression. The pressure comes from the parallel test-run load (one new test file and one fixture row), not from the product code. Browser performance is gated separately by Playwright and by #26.

    Defects

    None.

    Observations (non-blocking)

    • O1. The full test:unit run takes about 73 s, and several jsdom tests sit near their budgets under parallel load. Consider tracking suite runtime and budgets with the [Task] F4 — Verify large Flows comparisons and record the milestone gate #26 large-comparison gate.
    • O2. No fixture places a warning on an absent or N/A grid cell. The component tests cover it (blank and announced; N/A described). An absent cell's tooltip appears only on hover or roving focus. Revisit if the real ETL can emit warnings on absent cells.
    • O3. Spec fit; no ADR needed. The compact Type labels (Ref, Tech, Eco in, Eco out) and the 410 px Flows block minimum are presentation choices within §6.3: a bounded block, compact inner columns, every named field visibly present, and full text in title and the accessible name. The 36% share and 560 px maximum are unchanged. The spec sets no pixel bounds for the block.
    • O4. The shell.css change makes .app exactly viewport-tall, and the sidebars scroll internally. The foundation, narrow-viewport, f2/f3, selection and session e2e tests all pass. At the 960 px desktop minimum with the sidebar open, about 2.6 columns are visible, and the grid scrolls horizontally as specified. Fine-tune this in visual UAT.
    • O5. Not run. The Firefox e2e project, which the plan scopes out. This is mock mode only: it proves nothing about real authentication, authorization or data security. UNRESOLVED_REFERENCE_FALLBACK remains provisional until I1.

    Next role: coordinator / maintainer, for review and merge of PR #71. ADR 0004 is still Proposed, so the normal review rules apply.

    🤖 Generated with Claude Code

  10. DavidVFitzGerald commented on Nov 15, 2026

    @DavidVFitzGerald
    OwnerAuthor

    Coordinator: QA PASS at 3561927 (#24 (comment)), quality check passes, PR #71 is mergeable against main. State → ready for maintainer review. #24 closes after the maintainer merges PR #71.

    QA observations carried forward: O1 (unit suite ~73 s, several large-grid tests near their time limits) noted on #26; O4 (≈2.6 process columns at the 960 px minimum width with the sidebar open) is for visual UAT; O5 UNRESOLVED_REFERENCE_FALLBACK stays provisional until I1.

    🤖 Generated with Claude Code

  11. DavidVFitzGerald commented on Nov 15, 2026

    @DavidVFitzGerald
    OwnerAuthor

    Coordinator: closed. QA PASS at 3561927. PR #71 was merged by the maintainer at 2026-11-15T12:50Z as deb4f29 on main. Next: #69 and #25 go to PM grooming. #25's blocking predecessor (#24) is now satisfied.

    🤖 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

    frontendtask

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions