Skip to content

[Task] F5 — Add the indicator tree and source-ordered selection state #27

Closed

Description

@DavidVFitzGerald

Delivery phase

Phase 1 — frontend with mock services. Milestone F5; task key F5-01. Maintainer-authorized parallel delivery alongside the ongoing F4 verification (#26), 2026-11-15.

Goal

Let authenticated users choose native LCIA methods/indicators, including the specified default, independently of process selection.

Context and authority

Read AGENTS.md, docs/product/LCA_diff_PRD.md, docs/engineering/LCA_diff_Implementation_Specification.md, docs/engineering/roadmap.md, docs/engineering/frontend-backlog.md, docs/team/software-engineer.md and docs/adr/README.md from current main. Do not read archive/reference folders. Specification §§6.5, 6.8, 7.1, 9.2 behaviors 7 and 17 govern this work.

The maintainer explicitly requested re-grooming and implementing #27 concurrently with F4. This changes task scheduling only; no product, scientific, service-boundary or Phase 1 acceptance requirement changes. #26 remains a direct predecessor of Scores-grid integration #28. No ADR is needed for this bounded scheduling adjustment.

Existing prerequisites on main: indicator contracts and mock hierarchy/defaults (#8), guarded typed services/query composition (#9), verified mock-auth lifecycle (#15) and process selection (#19). Read src/services/contracts.ts, src/services/mock/comparison.ts, src/services/mock/fixtures.ts, src/app/queries.ts, src/app/service-context.ts, src/app/selection.ts and src/App.tsx before implementation.

Planned ownership: new indicator selection/model/provider modules under apps/frontend/src/app/ and/or src/components/indicator-tree/, scoped styles and tests, a small Scores-sidebar composition change in src/App.tsx, focused browser coverage and issue verification documentation. Preserve existing Flows grid code, geometry, column operations and the F4 verification artifacts. Coordinate shared App/styles/docs changes rather than editing the F4 worktree.

Requirements and constraints

Obtain hierarchy/defaults through the services layer after verified mock authentication, independently of whether any processes are selected and without requiring the Scores tab to initialize selection. Synthetic fixtures model BAFU source order and a test-only optional-category hierarchy without adding a real second release. The right sidebar appears for Scores and supports collapse/expand.

Maintain indicator selection across sidebar collapse and tab switches, independently of process selection/order. Initialize the service-supplied default once per authenticated workspace; refetch/retry must not reselect deliberately deselected indicators. Source order is determined by DTO source_order metadata, never alphabetical labels or click order. Preserve existing valid selection during loading/error/empty recovery; do not silently clear process selection. Account changes/logout clear protected in-memory indicator state through the existing auth boundary. Persistence and publication/stale-ID reconciliation remain #31/#32.

Run all development/tooling in guarded rootless containers using an isolated worktree, Compose project, port and volumes. Do not stop/reconfigure the F4 project. Synthetic mocks only: no API/Firebase/cloud/private-data dependency. Components consume typed services, never fixtures or HTTP. No dependency upgrades or root tooling changes are expected. Follow engineer and independent QA handoffs, commit focused increments referencing #27, and leave the issue open for review/merge.

Acceptance criteria

  • AC1 — After verified auth, IPCC 2021 / GWP 100 is the only default selected indicator even when zero processes are selected; no indicator data is fetched/rendered before auth.
  • AC2 — Method → optional category → indicator hierarchy has accessible disclosure controls and tri-state checkboxes.
  • AC3 — Method/category actions select/deselect all descendants and individual actions update parent state; no category is invented for BAFU's flat workbook layout.
  • AC4 — Selected indicator IDs retain source E:AY order rather than alphabetical order and are independent of selected process order.
  • AC5 — Loading/error/empty tree states preserve existing valid selections and expose retry without clearing process selection.

Out of scope and follow-ups

Scores grid #28 remains blocked by both #26 and #27. Differences #29/#30, indicator persistence #31, publication/stale-ID reconciliation #32, final state audit #33 and Phase 1 gate #34 retain their scope and gates. No cross-database indicator harmonization, real adapter, LCIA calculation or changes to Flows comparison behavior. Record this task-level parallel exception in roadmap/frontend-backlog in this PR; do not mark F4 or F5 complete.

Verification plan

Use isolated worktree /tmp/lca-diff-f5-indicators, branch feat/f5-indicator-tree, Compose project lca-diff-f5-indicators, frontend port 5197 (adjust only if occupied). On the Docker host:

COMPOSE_PROJECT_NAME=lca-diff-f5-indicators FRONTEND_PORT=5197 ./dev up
COMPOSE_PROJECT_NAME=lca-diff-f5-indicators FRONTEND_PORT=5197 ./dev check
docker compose -p lca-diff-f5-indicators exec -T workspace bash -lc 'cd apps/frontend && npm ci --no-audit --no-fund && npm run format:check && npm run lint && npm run typecheck && npm run test:unit && npm run build'
docker compose -p lca-diff-f5-indicators exec -T workspace bash -lc 'cd apps/frontend && npm run test:e2e -- --grep @smoke'
# Run new indicator browser spec in both configured Chromium and Firefox projects.
# Record its exact filename/command in the engineering handoff.

Meaningful component/service tests verify default-before-processes, no unauthenticated indicator calls/rendering, optional categories and flat BAFU layout, full descendant actions, mixed parent state, canonical source order, tab/collapse retention, account isolation, and loading/error/empty retry without resetting valid choices or process selection. Browser coverage exercises Scores-sidebar keyboard/disclosure/checkbox behavior and default selection with zero processes in both projects. Existing small critical smoke checks protect the shared shell/Flows journeys. Instrument injected services where needed; no product component imports test fixtures.

Record exact container commands/results, versions and delivered SHA in the engineering handoff. Independent QA checks every criterion at that SHA and posts PASS/FAIL/BLOCKED. Unavailable required checks do not pass; mock checks prove no real identity/data-security integration.

Dependencies and readiness

Blocking implementation predecessors are #8, #9, #15 and #19, all closed/merged; verified M1 #2 and merged M2 #3 are complete. Current main provides the typed IndicatorTree/defaults and guarded indicatorTree query. #26 is intentionally removed as a prerequisite of this isolated selector slice by the maintainer's explicit instruction; it remains required for #28 and subsequent integrated acceptance. PM re-groomed READY on 2026-11-15. Scheduling records must accompany implementation in the same PR.

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 F5, 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: #26. 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. removed
    blocked
    on Nov 15, 2026
  4. DavidVFitzGerald commented on Nov 15, 2026

    @DavidVFitzGerald
    OwnerAuthor

    PM: READY

    Re-groomed on 2026-11-15 under the maintainer's explicit instruction to implement #27 in parallel with F4. Phase 1 / F5 selector slice; original AC1–AC5 are unchanged. This is a task scheduling adjustment, with no PRD/specification deviation and no ADR required.

    Verified live dependencies #2, #3, #8, #9, #15 and #19 are CLOSED; current main supplies IndicatorTree/default DTOs, asynchronous mock service, guarded auth/query boundary and process selection. Removed #26 as this selector's prerequisite and added it directly to #28, which remains BLOCKED by #26 and #27. The integrated grid and Phase 1 gates are retained.

    Implementation handoff: branch feat/f5-indicator-tree, worktree /tmp/lca-diff-f5-indicators, base current main f0e2f9c; rootless Docker verified by coordinator. Use separate project lca-diff-f5-indicators, port 5197 and volumes. Own new indicator modules/tests, narrowly scoped App sidebar composition and planning records; preserve the other agent's Flows grid and #26 evidence. Specification §§6.5, 6.8, 7.1 and 9.2 remain authoritative. Include roadmap/frontend-backlog scheduling changes in the implementation PR.

    Engineer implements once-defaulted source-ordered selection, accessible hierarchy/tri-state bulk behavior and retry states behind services, then records exact container checks and SHA. QA independently verifies at that SHA; no issue closure or merge is authorized by this READY comment.

  5. DavidVFitzGerald commented on Nov 15, 2026

    @DavidVFitzGerald
    OwnerAuthor

    Engineering: IMPLEMENTING

    PM READY acknowledged. Implementing #27 on feat/f5-indicator-tree in isolated worktree /tmp/lca-diff-f5-indicators, based on current main f0e2f9c, alongside F4 without changing its worktree or comparison components. Separate guarded rootless Compose project lca-diff-f5-indicators, port 5197, passed ./dev up and ./dev check (UID/GID mapping, dropped capabilities, no-new-privileges, eight preflight scenarios, frozen Python lock/toolchain checks). All frontend dependency installation, static checks, unit/build and browser checks run inside this project. No application check is claimed yet. Scores grid #28 still requires both #26 and #27.

  6. DavidVFitzGerald commented on Nov 15, 2026

    @DavidVFitzGerald
    OwnerAuthor

    Engineering: READY FOR QA

    Issue #27 is implemented on feat/f5-indicator-tree, PR #88, delivered SHA a0049b0 (full SHA and branch available from PR). Isolated worktree /tmp/lca-diff-f5-indicators, guarded rootless project lca-diff-f5-indicators, port5197. Current main af5317d / completed F4 delivery was merged cleanly in 9d0037e; final commit changes only the evidence document. No main merge, issue closure, production action or real-service integration performed.

    AC1–AC5 implemented: verified-only service defaults initialize with zero processes while Flows is active; accessible method/optional-category/indicator tree supports full descendants and mixed state; selected IDs follow source metadata independent of processes; loading/error/empty/retry and tab/sidebar changes preserve choices without re-defaulting deliberate deselection; account changes clear protected state. PM re-groomed the issue and #28 keeps both #26 and #27 prerequisites.

    Exact commands, criterion evidence and result details: docs/engineering/f5-indicator-verification.md in PR #88. Key container results: ./dev up/./dev check PASS including8preflight scenarios; frozen npm ci PASS; final merged format:check, lint, typecheck, focused selector/App/session suite27/27 and explicit npm run build PASS; new browser spec2/2 Chromium+Firefox PASS; existing small smoke12/12 PASS before inherited F4 smoke addition. Hosted all4checks passed at predecessor6c823c8, final-head checks pending.

    Broader optional local checks are explicitly not represented as passing: full two-worker unit405/408; complete browser64/66. All33Chromium cases passed. Targeted failed Firefox cases2/2 passed unchanged after main merge; targeted grid cases2/3 passed. The remaining bare-grid hold/Retry transient assertion is filed as separate draft Bug #91; it does not mount App/IndicatorProvider and relevant code/test/harness diff against main is empty. Independent QA's isolated same-case comparison passed on both main14.8s and merged branch9.94s, so no deterministic selector cause is claimed. Existing #76 retains test-headroom work. Assertions/timeouts were not weakened.

    Next: independent QA at this delivered SHA, then coordinator review after current-head hosted checks. Scope is mock/synthetic only; Scores grid #28, persistence #31, publication reconciliation #32, Phase1gate #34 and I1 real integration remain separate.

  7. DavidVFitzGerald commented on Nov 15, 2026

    @DavidVFitzGerald
    OwnerAuthor

    QA: PASS

    Reviewed delivered SHA: a0049b0958f072f22fda039d06d397b71b04d7d9, branch feat/f5-indicator-tree, PR #88. Independent QA; mock/synthetic mode only. No application code, tests or acceptance criteria changed by QA, and no merge or closure performed.

    Criterion Verdict and evidence
    AC1 PASS — guarded service spy observes zero indicator calls/rendering while anonymous or unverified; verified workspace initializes only IPCC 2021 / GWP 100 even with zero processes while Flows is active. Browser checks default before process selection.
    AC2 PASS — accessible disclosure, roving focus, hierarchy levels/positions, mixed checkboxes, and parent-owned child groups inspected; arrow/End/Space behavior exercised by component and both browser projects.
    AC3 PASS — component cases verify method/category descendant selection/deselection and parent state; flat IPCC has the indicator directly at level 2, while the optional-category fixture nests at level 3.
    AC4 PASS — test labels oppose source metadata order, later item is selected first, and canonical selected IDs still follow source order. Adding processes leaves indicator IDs unchanged; provider has no process-order dependency.
    AC5 PASS — deferred loading, failure, empty response and retry preserve indicator IDs and process count; intentional deselection does not re-default on refresh. Tab/sidebar retention and UID switch/logout/cache clearing pass.

    Independent container checks used isolated detached worktree /tmp/lca-diff-f5-indicators-qa, rootless Compose project lca-diff-f5-indicators-qa, port 5198. Node 24.22.3, npm 11.19.1, Playwright 1.65.1 with pinned Chromium/Firefox. ./dev check passed UID/GID mapping, capabilities/no-new-privileges, all eight guard scenarios and frozen tooling. The first environment attempt exited 141 at the existing make --version | head pipeline; unchanged rerun passed. No host installations.

    COMPOSE_PROJECT_NAME=lca-diff-f5-indicators-qa FRONTEND_PORT=5198 ./dev up
    COMPOSE_PROJECT_NAME=lca-diff-f5-indicators-qa FRONTEND_PORT=5198 ./dev check
    docker compose -p lca-diff-f5-indicators-qa exec -T workspace bash -lc 'cd apps/frontend && npm ci --no-audit --no-fund'
    docker compose -p lca-diff-f5-indicators-qa exec -T workspace bash -lc 'cd apps/frontend && npm run format:check && npm run lint && npm run typecheck && npx vitest run src/services/mock/indicator-tree.test.tsx src/App.test.tsx src/app/session.test.tsx'
    docker compose -p lca-diff-f5-indicators-qa exec -T workspace bash -lc 'cd apps/frontend && npm run test:e2e -- e2e/indicator-tree.spec.ts'

    Results: frozen install and static checks PASS; focused unit/component 27/27 PASS; new browser journey 2/2 PASS, Chromium and Firefox (46.8 s). These ran independently at product SHA 6c823c8; I verified the selector implementation and its focused tests are byte-for-byte unchanged through the main merge 9d0037e and final evidence-only commit. Final git diff --check af5317d...HEAD passes and QA checkout is clean. Scheduling documentation preserves the authorized #27 overlap and #28's direct #26/#27 gates; no product/scientific deviation or ADR needed.

    All four exact-delivered-head hosted checks pass: frontend quality, backend quality, API quality, ETL quality. This is attributed hosted evidence, including the ordinary complete unit suite, frozen install/static/build and critical smoke in both projects; QA did not redundantly rerun all backend or full browser suites.

    Broader local results are not a blanket PASS: engineering recorded 405/408 in the optional two-worker unit run and 64/66 in the optional full browser run. The two failed Firefox cases subsequently pass unchanged; two of three failed grid cases pass on targeted retry. Existing #76 tracks headroom; #91 tracks the remaining intermittent hold/Retry observation without assuming its cause. Its bare-grid harness does not mount the indicator provider. Independent same-case comparisons passed on main af5317d (14.8 s) and merged branch 9d0037e (9.94 s), recorded on #91. This does not erase the observed failures or establish a deterministic root cause. No timeout/assertion was weakened. No #27 selector failure was found; the required exact-head hosted gates pass.

    Next action: coordinator/maintainer review and explicit approved merge of PR #88. Keep #27 open until verified merge. Scores grid #28, persistence #31, publication reconciliation #32 and complete Phase 1 acceptance #34 remain separate; real authentication, authorization, API performance, publication and production data security are not proved here.

  8. DavidVFitzGerald commented on Nov 15, 2026

    @DavidVFitzGerald
    OwnerAuthor

    Coordinator: READY FOR REVIEW

    Issue #27 is implemented on feat/f5-indicator-tree, delivered SHA a0049b0958f072f22fda039d06d397b71b04d7d9, PR #88. Worktree /tmp/lca-diff-f5-indicators is clean. Current main/F4 delivery is merged into the branch.

    PM re-groomed the selector for parallel work without changing AC1–AC5; #28 retains both #26 and #27 prerequisites. The roadmap and frontend backlog record that scheduling change. All selector criteria are implemented: verified-only default with zero processes, accessible hierarchy and tri-state bulk actions, source ordering, and recovery/account isolation.

    Independent exact-SHA QA PASS verifies all five criteria. All four hosted checks pass at the delivered head: frontend quality, backend-quality, api-quality, etl-quality. Local guarded-container evidence includes static checks, 27 focused cases, build and indicator browser checks in Chromium and Firefox. Exact commands/results are in docs/engineering/f5-indicator-verification.md.

    Additional broad local unit/browser runs had failures and are explicitly retained in the evidence. Successful targeted reruns and QA baseline comparisons do not erase them. Separate follow-ups remain #76 (headroom) and #91 (intermittent bare-grid Retry assertion). No timeout/assertion weakening or hidden Flows-grid fixes were introduced.

    Next action: maintainer review and explicit approved merge of PR #88. Leave #27 open until merge verification. #28 can then be rechecked for readiness, with F4 #26 now merged/closed. No merge, issue closure, production deployment or publication performed. Evidence is mock/synthetic only.

  9. added a commit that references this issue on Nov 15, 2026
  10. DavidVFitzGerald commented on Nov 15, 2026

    @DavidVFitzGerald
    OwnerAuthor

    Coordinator: MERGED/CLOSED. Verified PR #88 merged at f5769bb following maintainer merge confirmation. Independent QA PASS at delivered SHA a0049b0 and all four required hosted checks are recorded above. Follow-ups #76 and #91 remain open; proceeding to recheck #28 with #26 and #27 satisfied.

  11. added 2 commits that reference this issue on Nov 16, 2026
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