Repository navigation
Description
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
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: #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.
DavidVFitzGerald commentedon Nov 14, 2026
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:
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.
DavidVFitzGerald commentedon Nov 15, 2026
PM note from #23 QA (O7):
useFlowGridkeeps its "updating" state and the previous row count when the selection becomes empty. TodayApp.tsxunmounts 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.DavidVFitzGerald commentedon Nov 15, 2026
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
main(PR #67), closedfeat/f4-virtual-grid, headdc1f06e, a merge ofmainwhose tree equals QA-passed3976241) is open, mergeable and awaiting the maintainer's mergeStacking 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.
feat/f4-flows-compositionfromfeat/f4-virtual-gridatdc1f06e, in an isolated worktree.feat/f4-virtual-griduntil F4: windowed comparison grid with the Flows mount and large mock workload (#23) #68 merges. Then retarget it tomain, mergingmainin without rewriting history or force-pushing.mainbefore F4: windowed comparison grid with the Flows mount and large mock workload (#23) #68.useFlowGrid.ts(the hold/error path), and only one writer may touch it at a time. [Task] F4 — Assemble the Flows comparison with exact missingness and cell warnings #24 must not change the hold, seeking, error or Retry logic.Delivered vs remaining, per criterion
AC1, union and removal
flowRowsreturns 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.FIXTURE_IDS.reference) also a present Technosphere input of one other process. Its two rows must stay distinct, with distinct row keys and cells.AC2, sort order
rowOrderinservices/mock/comparison.ts, fixturesort_key), with type-group order and a stable ID tie-break (Alpha/Gamma reference rows) tested at the service.AC3, identifying fields
FlowsGrid.tsxFLOW_FIELDS). Null Location and Process Name render—with "not specified" in the accessible name. Full text is intitleand the rowheader name.—for Location and Process Name.AC4, values
SignedValueCellshows present0and-0as the0label, absent as a blank (no bar, no label), signed bars and full-precision hover/focus tooltips. [Task] F4 — Virtualize comparison rows and columns with sticky alignment #23 wires it into the grid.0(present zero).airHighcell is blank (absent).-80.000000000000000000000001and20as full lexemes in their tooltips.0.AC5, cell warnings (not delivered; the main new work)
Contracts and adapter:
FlowCell.warnings: PublicWarning[]exists, and the fixture carries oneAGGREGATED_DUPLICATESwarning on the Alpha technosphere cell. Nothing renders warnings:FlowsGrid.renderCelldropsvalue.warnings, andSignedValueCellhas 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:
UNRESOLVED_REFERENCE_FALLBACK. This is a provisional mock code, an ordinary contract choice; document it inservices/README.md.Rendering. Render each cell's service-supplied
warningson that cell only:AGGREGATED_DUPLICATEScell warning renders the same way (generic rendering, no per-code UI logic).0.AC6, empty and single-process states
App.tsxFlowsPanelrendersEmptyComparison("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 #21ComparisonHeader.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:
scrollWidthis at most itsclientWidth. Labels may wrap or use a two-line layout.titleand the rowheader's accessible name.document.scrollingElement.scrollHeightis at mostinnerHeightwith 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:
aria-rowcountand 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,
useFlowGridmust reportupdating: falseandrowCount: 0for 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:
Test evidence expected:
services/mock/comparison.test.tscover the same-ID/two-type rows, the mixed-case sort and fallback warning placement.services/mock/flows-grid.test.tsxor a new Flows composition test cover AC1–AC6 and AC8.Fixtures are read only through the mock service. No component calls HTTP or Firebase, or imports fixtures;
src/test/service-boundary.test.tsmust still pass.Out of scope and linked follow-ups
useFlowGrid, not Flows composition.The issue body was updated: AC7 and AC8 were added, the dependency recheck recorded and #69 and #26 linked. The
blockedlabel was removed.Next role: Software Engineer, on
feat/f4-flows-compositionstacked onfeat/f4-virtual-grid(dc1f06e).🤖 Generated with Claude Code
DavidVFitzGerald commentedon Nov 15, 2026
Coordinator: state → implementing. Branch
feat/f4-flows-compositioncreated fromfeat/f4-virtual-gridat dc1f06e in the main checkout (the container mounts it); stacked PR will targetfeat/f4-virtual-griduntil #68 merges. Software Engineer agent assigned.🤖 Generated with Claude Code
DavidVFitzGerald commentedon Nov 15, 2026
Engineering: READY FOR QA
feat/f4-flows-composition3561927e8b72c588e3f4b3f3c32e849002830c68main. PR F4: windowed comparison grid with the Flows mount and large mock workload (#23) #68 is merged; this branch starts at dc1f06e, the parent of main's merge commit e88733a, and its tree equals main. No rebase or merge was needed.Commits
UNRESOLVED_REFERENCE_FALLBACKcell warning; service testse2e/flows-composition.spec.ts,services/README.mdsectionCriteria
AC1. Union and removal: done.
FIXTURE_IDS.reference) is also a present Technosphere input of Gamma (3.5).row_keys and its own cells.comparison.test.ts, "keeps one flow ID under two types as two rows…".flows-composition.test.tsxAC1: 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.AC2. Sort order: done.
airHigh's subcategory is nowUpper atmosphere. Case-insensitive sorting puts it afterlower atmosphere; a code-point sort would reverse them. The service test asserts both.AC3. Identifying fields: done.
CHandSynthetic supplier.—for Location and Process Name, with "not specified" in the accessible name. No location is invented.AC4. Values: done.
0in every column.airHighcell is blank: no bar, no label.0.-80.000000000000000000000001and20. Playwright checks this on hover.AC5. Cell warnings: done.
SignedValueCelltakeswarnings. The rendering is generic, with no per-code logic:!badge in the top-right padding, so the cue is not colour alone;. Warning: <messages>.20cells.UNRESOLVED_REFERENCE_FALLBACK. Alpha and Gamma also have values on that row.AGGREGATED_DUPLICATESrenders the same way on Alpha's cell.src/services/README.md→ "Flows composition ([Task] F4 — Assemble the Flows comparison with exact missingness and cell warnings #24)".AC6. Empty and single-process states: done.
1,1,2.0000000000000000000000001.AC7. Readability and fixed headers: done.
Ref,Tech,Eco in,Eco out). The full type is intitleand in the rowheader's accessible name..appis a viewport-tall flex column. The sidebars scroll internally and areposition: relative, so a visually hidden<p>no longer extends the page. Before the fix,scrollHeightwas 1087 against a 900 px viewport.scrollWidth ≤ clientWidth;scrollHeight ≤ innerHeight, and the header strip and identity label boxes do not move when the grid scrolls to 30,000 px.flows-grid.spec.tschecks still pass.AC8. Empty-selection transitions: done.
useFlowGridis 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.aria-rowcountis 4 (never 8), the rendered rows are exactly Beta's, and the status is empty.src/test/service-boundary.test.tspasses. Components read only contracts, and fixtures reach them only through the mock service.Commands and results
All checks ran at
3561927in thelca-diff-devworkspace container. Nothing was installed on the host.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
make dev-up, ornpm run devin the container, and sign in as[email protected].Synthetic transport servicerows typed Ref and Tech (CH, Alpha);!badge on Alpha's and Beta'sTech | Synthetic recovered materialcells;20and the unresolved-reference warning.Limitations and follow-ups
flows-grid.test.tsx) and the new composition suite now use a describe-level 20 s budget. Under a full paralleltest:unitrun, the first 220-process mount took 4.6–5.9 s against the 5 s default; on its own it takes about 2.5 s at both the base and this branch. The base commit passed a full run once, so it was already marginal. The added test file pushes the run past the default. No assertions changed.UNRESOLVED_REFERENCE_FALLBACKis a mock code; I1 reconciles it with the ETL's public warning codes.Next role: QA Engineer verifies
3561927on PR #71.🤖 Generated with Claude Code
DavidVFitzGerald commentedon Nov 15, 2026
QA: PASS
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..HEADshows exactly the 4 handed-off commits.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 disposablemktemp -dcopy inside the container, which was then deleted.Commands and results
All were run in the container at
3561927:A third full
vitest run --reporter=verbose(in the copy, with HEAD'ssrc) also passed.src/test/service-boundary.test.tspasses in every run.Per-criterion results
AC1, union and removal: PASS.
FIXTURE_IDS.referenceis a Reference row and also a Technosphere row: Gamma's present3.5, absent for Alpha and Beta. The two rows have distinctrow_keys, and the contracts test asserts the keys are unique.3.5.[Alpha, Beta].Upper atmosphererow goes too, because Beta's cell on it is absent.AC2, sort order: PASS.
rowOrdersorts by type group, then by lower-cased Category, Subcategory and Name, then byflow_id.Upper atmospheresorts afterlower atmosphere, which only a case-insensitive sort produces.flowRowsresponse.AC3, identifying fields: PASS.
CHandSynthetic supplier, from the service.—with notitlefor Location and Process Name. The accessible name says "not specified".GLOfor a null location) is caught.AC4, values: PASS.
zerowith the label0in every column.Upper atmospherecell is absent: no label, no bar, no0. This holds for every absent cell.-80.000000000000000000000001and20appear in the tooltip and accessible name. Playwright checks this on hover.AC5, cell warnings: PASS. I checked each requirement in the diff and tests:
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 exactlyGamma: 20, positive.!glyph (aria-hidden, with the message conveyed in text).:hoverand:focus. Playwright hovers Alpha's cell, then reaches Beta's cell by arrow keys and asserts focus, tooltip opacity 1 and the message.. Warning: <messages>.for present and N/A cells. Absent cells announce it through the sr-only text..signed-bar,.zero-axisand.signed-labelstyles, the row height and the label20are identical to Gamma's unwarned20, in jsdom and in Playwright.AGGREGATED_DUPLICATESrenders through the same generic path; there is no per-code logic.UNRESOLVED_REFERENCE_FALLBACKis documented as provisional insrc/services/README.md→ "Flows composition ([Task] F4 — Assemble the Flows comparison with exact missingness and cell warnings #24)", with reconciliation at I1.AC6, empty and single-process states: PASS.
flowRowscall) and after removing the last process.1,1and2.0000000000000000000000001, with no normalization.AC7, readability and fixed headers: PASS.
scrollWidth ≤ clientWidth;titleand the accessible name;scrollHeight ≤ innerHeight, and the header and identity boxes do not move while the grid scrolls.shell.cssgivesscrollHeight1043/1201 against 900, and 943/1101 against 800 (4 failures);grid.css(no label wrapping) truncates "Process Name" (76 > 50);AC8, empty-selection transitions: PASS.
aria-rowcountis never 8 and settles at 4,aria-colcountis 2, the rows are exactly Beta's and the status is empty. This is checked in jsdom and Playwright.useFlowGrid.tsis unchanged (empty diff), so Flows grid: Retry after a row-page error during a selection update loses the anchored flow #69's hold, error and Retry paths are untouched.Test-quality mutations
Each mutation was swapped into the container copy and run with
npx vitest runon the 4 relevant files. All 9 were caught.!icon on present cellsGLOinvented for a null locationThe 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,
waitFortimeout 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:
origin/mainRunning 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)
test:unitrun 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.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 intitleand the accessible name. The 36% share and 560 px maximum are unchanged. The spec sets no pixel bounds for the block.shell.csschange makes.appexactly 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.UNRESOLVED_REFERENCE_FALLBACKremains 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
DavidVFitzGerald commentedon Nov 15, 2026
Coordinator: QA PASS at 3561927 (#24 (comment)),
qualitycheck passes, PR #71 is mergeable againstmain. 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_FALLBACKstays provisional until I1.🤖 Generated with Claude Code
feat: add same-ID two-type, mixed-case and fallback-warning fixtures …
feat: render per-cell warnings and keep the Flows block readable (Refs …
test: cover the Flows composition journey and document #24 (Refs #24)
test: give the large Flows grid suites a 20 s budget (Refs #24)
DavidVFitzGerald commentedon Nov 15, 2026
Coordinator: closed. QA PASS at
3561927. PR #71 was merged by the maintainer at 2026-11-15T12:50Z asdeb4f29onmain. Next: #69 and #25 go to PM grooming. #25's blocking predecessor (#24) is now satisfied.🤖 Generated with Claude Code
fix: lay the process sidebar out as a flex column instead of a fixed …