Repository navigation
Description
Delivery phase
Phase 1 - frontend with mock services
Goal
Select or deselect every eligible match, including unloaded descendants, while preserving coherent ordering and checkbox state.
Context and authority
Milestone F3; read AGENTS.md, docs/team/product-manager.md, docs/product/LCA_diff_PRD.md, docs/engineering/roadmap.md, and docs/engineering/LCA_diff_Implementation_Specification.md §§6.2–6.3, 9.2; roadmap F3 gate. Current planning baseline is on docs/agent-workflow, pending review/merge into main; proposed ADRs are not accepted authority. Connect resolve-selection services to tree/root/category/all-match bulk actions; extend selector integration/browser tests and F3 gate evidence. These application paths are planned until created. Exclude all archive/reference folders.
Requirements and constraints
When filtering, branch actions apply only to matching descendants; unfiltered actions cover all descendants. Parent checked/unchecked/indeterminate state uses actionable scope, not rendered children. Newly bulk-added IDs append alphabetically by process name with geography/ID ties; existing selected order is unchanged. All work uses services, cancellable async states and no hard cap.
One session-sized task/PR including verification and handoff. Run all development, installation and checks in containers; install nothing on the host. No real backend, Firebase project, cloud credentials or proprietary inputs. If the current PRD/spec must change, prepare an ADR and updates to both current documents in the same PR.
Acceptance criteria
- AC1 - Select/deselect all matches and release/category/subcategory actions affect all eligible IDs across cursors/unmounted rows, not just the current page.
- AC2 - Filtered branch actions never remove unrelated hidden selections; clearing filters changes actionable scope without changing selection.
- AC3 - Parent checkboxes expose aria-checked mixed and correctly reflect checked/unchecked/indeterminate state relative to the current scope.
- AC4 - Bulk append preserves existing order, adds only new IDs in deterministic alphabetical/geography/ID order, and does not duplicate IDs or impose a product count cap.
- AC5 - Loading/cancellation/error of a bulk action leaves selection coherent and explains incomplete work; tests cover cross-page branches and races.
- AC6 - F3 gate evidence covers keyboard tree/search/individual and bulk actions, selected-list retention and all established container checks.
Out of scope and follow-ups
Comparison grid/order drag interactions are F4; persistent workspace is F5. Real backend selection resolution remains B2; do not silently fetch millions of cell values to resolve selected process IDs.
Verification plan
Inside ./dev shell, run format:check/lint/typecheck/test:unit/build and npm --prefix apps/frontend run test:e2e. Use a branch spanning multiple search pages, mixed existing selections and cancelled/failed resolve-selection calls. Record F3 browser evidence against the delivered SHA.
Engineer records branch/SHA and exact results, leaves issue open, and hands off to QA. QA verifies every criterion at that SHA and reports PASS/FAIL/BLOCKED; mock evidence is not proof of real security/integration.
Dependencies and readiness
Blocked by #17, #18. No implementation until dependencies and the M1 environment runtime gate are satisfied. This body is groomed planning material, not PM READY while blockers remain. Coordinator/PM rechecks merged dependencies and session-sized scope before starting.
Current readiness — supersedes historical planning baseline/blockers above
Rechecked 2026-11-14 on main at b5704da. #17 (PR #54) and #18 (PR #53) are merged and closed, as is #16 (PR #50); the M1/M2 gates were satisfied previously.
Merged interfaces this issue consumes
DataService.resolveSelection. It takes theSearchRequestfields plusscope: "all_matching" | "branch"and returns cursor-pagedProcessIds. The mock caps each response window at 100, which never limits the total selection.DataService.headers. It returns headers for up to 100 IDs in one single-release snapshot.- The [Task] F3: render the paginated release and nested process tree #16/[Task] F3: add reactive AND-tokenized process search with cancellation #17 tree, with exact in-scope
matching_descendant_countfor every rendered branch. - The [Task] F3: manage individual selection order and a virtualized selected-process list #18
SelectionStore. - There is no contract change.
Decisions
- D1 Query layer.
queries.resolveAll(dto)follows every cursor (limit 100) and returns the ordered IDs.queries.headersFor(release, ids)batches 100 IDs per request.- Both are cancellable
queryOptionsunder the existinglca-serviceskey namespace. Components still never call services directly.
- D2 Selection entries.
SelectedProcessgainspath(the category path, from the tree node or the header).- The store gains atomic
selectMany(entries), which appends only entries not already selected, in the given order, with one notification, anddeselectMany(keys). - The existing order never changes.
- D3 Bulk scopes.
- Branch row (release root, category or subcategory):
scope: "branch"withbranch_path, the current normalized fields and a single-release snapshot. - "Select all matches" / "Deselect all matches" buttons appear while a filter is active:
scope: "all_matching", once per release. - With no filter, a release root's checkbox covers the whole release.
- Branch with zero eligible processes: the control is shown disabled with
aria-disabled.
- Branch row (release root, category or subcategory):
- D4 Ordering.
- New IDs are resolved, then their headers are fetched.
- The new entries are sorted by lowercased name, then lowercased geography, then ID, and appended with
selectMany. - Deselect removes the resolved IDs and needs no headers.
- There is no cap.
- D5 Tri-state (spec §6.2.6).
- A branch's state compares the number of selected entries inside its actionable scope with its exact
count. Checked means equal and greater than 0, unchecked means 0, and mixed is anything else (aria-checked="mixed"). - Unfiltered, the scope is every selected entry in the release whose path starts with the branch path.
- Filtered, entries also have to be in the release's matching-ID set (
resolveAllwithall_matching). That set is fetched only when the release has selected entries; otherwise the state is unchecked without any request. - While the set loads, the state uses the matching leaves already loaded, and the row is marked
aria-busy.
- A branch's state compares the number of selected entries inside its actionable scope with its exact
- D6 Interaction.
- Branch rows: Space toggles the bulk selection, and clicking the checkbox does the same. Enter and arrow keys still expand and collapse, and clicking the label still expands.
- Checked means deselect the scope; unchecked or mixed means select it.
- Process rows are unchanged.
- D7 Async states (AC5).
- One bulk action runs at a time. A status area names it ("Selecting processes in road…") with a progress count and a Cancel button, and the other bulk controls are disabled meanwhile.
- Selection changes only on success, atomically.
- Cancel, failure, signout or account change leave the selection unchanged. A message names the action and the error ("Selection unchanged: …"), with Retry when the error is retryable.
- The action keeps the scope it started with, even if the filter changes during the run.
- D8 F3 gate (AC6).
docs/engineering/f3-verification.mdconsolidates the F3 evidence ([Task] F3: render the paginated release and nested process tree #16–[Task] F3: implement filter-scoped bulk selection and tri-state parent checkboxes #19).e2e/f3-gate.spec.tsruns a keyboard journey: tree, search, individual and bulk selection under a filter, the selected list kept after Clear, and signout.- The roadmap records F3 as complete only after this PR passes QA and CI and is merged.
Scope
src/app/queries.tsandsrc/app/selection.ts, plusProcessTree.tsx(branch checkboxes, tri-state and bulk controller).- A new
src/components/bulk-selection/(controller hook and status UI), and the select-all buttons inProcessSearchor the sidebar. App.tsx, the tests,e2e/bulk-selection.spec.ts,e2e/f3-gate.spec.ts, the F3 record and the roadmap.- There is no service or contract change.
Objective verification
- Unit:
selectMany/deselectMany(order kept, no duplicates, one notification, no cap);- the tri-state reducer (checked, unchecked, mixed; filtered and unfiltered);
- the bulk ordering comparator.
- Component (mock injected):
- AC1: a 260-leaf branch spanning six tree pages and three resolve pages selects all 260 with one page loaded; a release root selects everything; select/deselect all matches across two releases.
- AC2: filtered deselect leaves hidden non-matching selections alone; Clear changes the tri-state without changing the selection.
- AC3:
aria-checkedchecked, mixed and false on root, category and subcategory, both filtered and unfiltered; Space and checkbox click toggle bulk, and Enter still expands. - AC4: existing order is kept, and new IDs follow name/geography/ID order with no duplicates.
- AC5: under latency the status and Cancel show; Cancel aborts (
signal.aborted) and leaves the selection unchanged. A resolve or headers failure gives "Selection unchanged" plus Retry. Signout mid-action applies nothing. A second action is disabled while one runs.
- Browser (Chromium and Firefox, composed mock):
bulk-selection.spec.ts: root bulk select with alphabetical order, branch mixed state, filter plus "Select all matches", and Clear keeping the selection.f3-gate.spec.ts: the AC6 keyboard journey.
Verification (container only)
COMPOSE_PROJECT_NAME=lca-diff-f3-bulk FRONTEND_PORT=5192 ./dev up && ./dev check
docker compose -p lca-diff-f3-bulk 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 && npm run test:e2e -- --grep @smoke && npm run test:e2e'Mock evidence does not prove real selection resolution (B2) or large-scale performance.
Activity
DavidVFitzGerald commentedon Nov 13, 2026
PM: BLOCKED
Groomed using docs/team/product-manager.md for F3, 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: #17, #18. 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: READY
Phase 1 (frontend with mock services), milestone F3 (final F3 task, with the gate in AC6). Dependencies #16, #17 and #18 are merged and closed. Spec: §§6.2 (bulk rules 5–6, bulk actions), 6.3 (alphabetical bulk append), 6.8, 9.2. Decisions D1–D8 are in the issue body's Current readiness section:
pathon selection entries, with atomicselectMany/deselectMany;There is no contract change and no ADR (no PRD or spec deviation). Next: Software Engineer.
DavidVFitzGerald commentedon Nov 14, 2026
Engineering: IN PROGRESS (session handoff)
Branch
feat/f3-bulk-selectionat local commitdbb44e0(WIP, not pushed). Compose projectlca-diff-f3-bulkon port 5192.Done:
queries.resolveAllandqueries.headersFor(cursor-following and batched,SERVICE_WINDOW=100).SelectedProcess.path, plusselectMany/deselectMany.components/bulk-selection/:scope.ts(bulkOrder, selectedByScope, checkState),useBulkSelection(atomic, cancellable, Retry) andBulkStatusArea.aria-checked, Space and checkbox-click bulk toggles, and Select/Deselect all matches.resolveSelection/headersspies.Results (in the container):
src/services/mock/bulk-selection.test.tsxfail. Their treeitem lookups (for example/^t, 270/,/^x, 4/,/^road, 3/) don't find rows, so the expansion helper or the expected labels need debugging.Remaining:
e2e/bulk-selection.spec.tsande2e/f3-gate.spec.ts.docs/engineering/f3-verification.mdand update the roadmap's F3 row.DavidVFitzGerald commentedon Nov 14, 2026
Engineering: READY FOR QA
PR #62, branch
feat/f3-bulk-selection, delivered SHAe626581(on top ofdbb44e0, based on mainb5704da).Container
lca-diff-f3-bulkresults:@smoke: 12 passedThe AC1–AC6 evidence and the F3 gate mapping are in
docs/engineering/f3-verification.md.One deviation from the D3 wording: a branch with zero eligible processes is an inert, unchecked no-op, not
aria-disabled. Marking the treeitemaria-disabledwould also disable expanding it.Hosted full CI: https://github.com/DavidVFitzGerald/LCA-diff/actions/runs/43624181572. Next: independent QA.
DavidVFitzGerald commentedon Nov 14, 2026
QA: FAIL
Reviewed: PR #62, branch
feat/f3-bulk-selection, SHAe62658187f6a9e4286e8865ddfed5ce93ddfa108. Phase 1, mock mode only: no real backend, auth or security validation is claimed.Environment: a detached worktree at
e626581and the rootless Compose projectlca-diff-qa19(FRONTEND_PORT=5193). No host runtimes were used.Commands and results
./dev checknpm ci@smokee626581React prints "flushSync was called from inside a lifecycle method" warnings in stderr (65 times). The existing process-tree suites print the same warning, so it does not fail the run.
QA probes: a temporary
src/services/mock/qa19-probe.test.tsx, run withnpx vitest run src/services/mock/qa19-probe.test.tsxin the same container. It was not committed and was removed with the worktree.Per-criterion findings
resolveAllfollows every cursor with a 100-item window, andheadersForbatches by 100. The committed tests cover a 260-leaf branch with 50 rows loaded (3 resolves, 3 header batches) and all matches across two releases. P1 and P5 confirm the filtered cross-page and large cases.aria-checkedtrue, false or mixed, computed frommatching_descendant_countand the selected entries in scope, filtered and unfiltered, on root, category and subcategory. Space and a checkbox click bulk-toggle, and Enter and the arrow keys still expand.selectManyappends only absent keys, in the given order, with one notification. Sorting is by lowercased name, then geography, then ID. 50,000 entries are covered at unit level and 3,000 end to end (P5). There is no cap.Workspaceis keyed by uid, so an account change also cancels (P4).f3-gate.spec.tscovers the keyboard journey: tree, search, individual and bulk actions, Clear keeping the list, and signout. However, the roadmap F3 gate item "filtered bulk selection beyond a visible page" is mapped inf3-verification.mdto an unfiltered test. No committed test exercises a filtered bulk action across pages.bulk-selection/andProcessTreereach services only throughuseServiceQueriesand the query client, and import only contract types. There are no mock, HTTP or Firebase imports in components.Defects
F-1 (Medium, blocking for AC3): a failed matching-set read leaves the parent state wrong,
aria-busystuck and the toggle inverted, with no explanation.t/road.road, 300with no filter. This succeeds and the branch is checked.resolveSelectionwithscope:"all_matching"returnTEMPORARILY_UNAVAILABLE.road, 300.aria-checked="true", or a visible error with a retry and the toggle not inverted.aria-busyshould not stay set indefinitely.roadshowsaria-checked="mixed"and the release row keepsaria-busy="true"indefinitely.aria-busywith no alert for a single selection.ProcessTree.tsx,matchSets[position]?.datais undefined on error, sobusystays true and the state falls back to loaded leaves only. Queryretryis false, and nothing surfaces or retries the error.The same inversion happens briefly while the set is loading, when a fully selected filtered branch can show mixed and Space selects. Suggested fix: surface the query error with a Retry and stop reporting busy on error. Consider making a branch's bulk toggle inert while that row is
aria-busy.F-2 (Medium, blocking for AC6 and the roadmap F3 gate): no committed test covers filtered bulk selection beyond a visible page.
f3-verification.md's F3 gate table maps "Filtered bulk selection beyond a visible page" to the AC1 test, which runs withfields: {}.F-3 (Low): race coverage named in D7 and AC5 is not committed. No committed test covers a filter change during a run (D7 "keeps the scope it started with"), an account change without signout, or Cancel during the headers phase. Probes P2, P4 and P6 pass, so this is coverage only. It could be folded into the F-2 fix.
F-4 (Low, accessibility and UX):
aria-disabled) is reasonable, but PM should confirm it, because it changes the D3 wording.Next action
Engineering (Software Engineer) fixes F-1 and F-2, and optionally F-3 and F-4, on
feat/f3-bulk-selection. QA then re-verifies at the new SHA: the full container suite plus probes P1, P3 and P7. The issue stays open.fix: resolve branch toggles at run time and explain failed match sets…
DavidVFitzGerald commentedon Nov 14, 2026
PM: decision on the D3 deviation (QA F-4)
A branch with zero eligible processes stays an inert, unchecked checkbox. It is not marked
aria-disabled, because that would also disable expanding the treeitem. This is within the contract (spec §6.2 sets no disabled requirement), so no ADR is needed. The D3 wording in the readiness section is superseded by this decision.Engineering: READY FOR QA (re-verify)
Delivered SHA
e1c8fc5on PR #62.QA findings addressed:
The running and failure text for branch toggles now says "Updating processes in X…" and "could not update".
Container results:
@smoke: 12 passedHosted full CI: https://github.com/DavidVFitzGerald/LCA-diff/actions/runs/43625061558
DavidVFitzGerald commentedon Nov 14, 2026
QA: FAIL
Reviewed: PR #62, branch
feat/f3-bulk-selection, SHAe1c8fc50cd9f72798b2a26e2f6aac3b0ba38f80f. This is a re-verification of the previous FAIL ate626581. Phase 1, mock mode only: no real backend, auth or security validation is claimed.Environment: a detached worktree at
e1c8fc5and the rootless Compose projectlca-diff-qa19b(FRONTEND_PORT=5193). No host runtimes were used.Commands and results
./dev checknpm ci@smokee1c8fc5and was stillin_progresswhen I checked, so I report no result for it.QA probes
I copied a temporary
src/services/mock/qa19-probe.test.tsxinto the worktree and ran it withnpx vitest run src/services/mock/qa19-probe.test.tsxin the same container. It was not committed. 11/11 PASS.aria-busy. The notice reads "Could not check which selected processes match the search in Big v1…" and has Retry. Retry removes the notice. The row is busy for a moment while it refetches, then clears, and the branch shows the correctmixedstate. PASSmixed, the notice and Retry are present, and the row is not busy. Space deselects all 300 ("Deselected 300 processes in road."). The notice then disappears, correctly, because nothing is selected so no matching-set read is needed. PASS.disabled. A checkbox click or Space on another branch makes no new resolve call..disabledis cleared and the branch readstrue.Status of the earlier findings
kind: "toggle", souseBulkSelectiondecides at run time from the resolved IDs: it deselects only when every resolved ID is selected and at least one was resolved.busynow requiresisPending && isFetching, so it no longer sticks after an error.query.refetch().docs/engineering/f3-verification.md, F3 roadmap gate coverage table, line 73, is byte-identical toe626581: "Filtered bulk selection beyond a visible page | AC1 component test (260 leaves, 50 loaded)". That is still the unfiltered test. The AC1 row in the AC table also does not cite the new filtered test.bulk-selection.test.tsx› "bulk selection regressions (QA F-1–F-3)" › "bulk-selects a filtered branch beyond the loaded page…").aria-hiddenspan). A screen-reader user gets no per-row disabled state, but the status region does say an action is running.Per-criterion findings
resolveAlland batchedheadersFor.selectManyappends in order with no duplicates and no cap (50,000 at unit level, 3,000 end to end).f3-gate.spec.tsand all container checks pass.togglekind and the matching-set notice: no regression found.indexOf(-1)for releases without selections gives "not busy".f3-verification.mdupdates the unit count (234) and the F-1 behaviour text correctly.Next action
Software Engineer: correct the "Filtered bulk selection beyond a visible page" row in
docs/engineering/f3-verification.md, and optionally add the new filtered test to the AC1 row. This is documentation only; no code change is needed. QA will then re-check the doc at the new SHA and confirm the hosted CI result. The issue stays open.docs: cite the filtered beyond-page test in the F3 gate record (Refs #19
DavidVFitzGerald commentedon Nov 14, 2026
Engineering: READY FOR QA (doc fix)
Delivered SHA
3c785afon PR #62. This is a documentation-only change frome1c8fc5(git diff --stat e1c8fc5 3c785afshows onlydocs/engineering/f3-verification.md).format:checkpasses in the container.e1c8fc5(code identical): https://github.com/DavidVFitzGerald/LCA-diff/actions/runs/43625061558, status success.DavidVFitzGerald commentedon Nov 14, 2026
QA: PASS
Reviewed SHA:
3c785aff085033d49607d0a765401a28e743a4c3(branchfeat/f3-bulk-selection, PR #62). Mock mode only; this is not evidence of real-backend resolution, auth or adapter parity (B2/I1).Scope of this recheck: the previous verdict (
## QA: FAILate1c8fc5) failed only AC6, because the F3 gate row and the AC1 row indocs/engineering/f3-verification.mdcited the unfiltered 260-leaf test. AC1–AC5, the full container suite and 11 probes passed ate1c8fc5.What I checked
git diff --stat e1c8fc5 3c785af: one file changed,docs/engineering/f3-verification.md(+8/−8). No other paths changed. Tree hashes forapps/,.github/,Makefileanddevare identical at both SHAs (apps=57e0c6e), so the code, tests and workflow under test are byte-identical toe1c8fc5.bulk-selection.test.tsx› "bulk-selects a filtered branch beyond the loaded page and keeps hidden selections". That test exists at line 408 ofapps/frontend/src/services/mock/bulk-selection.test.tsx. The doc's description matches what the test asserts:road, 150after filtering by "even");toBeLessThan(40));resolveSelectionrequests, both carryingfields: { process_name: "even" }(100-item window, so 2 windows for 150);e1c8fc5, where they were verified. The remaining gaps (Flaky AuthDialog focus assertion under the parallel unit suite #51, F3: process tree pseudo-row ARIA positions and full browser storage check #52, B2) are unchanged. AC3's "filtered and unfiltered" wording is an accurate description of AC3 coverage, not a stale citation.Per-AC status
e1c8fc5(identical code). The doc row now also cites the filtered beyond-page test.e1c8fc5(identical code)e1c8fc5(identical code)e1c8fc5(identical code)e1c8fc5(identical code)f3-gate.spec.tssmoke and the #16–#18 suites passed ate1c8fc5.CI status
gh run view 43625061558(Frontend,workflow_dispatch, headShae1c8fc5): success. Itsqualityjob passed format, lint, typecheck,test:unit(17 files, 234 passed), build and the full browser suite (36 passed). It applies to3c785afbecause theapps/and.github/trees are identical.gh pr checks 62: no checks reported for3c785af.gh pr view 62showsmergeable: CONFLICTING.git merge-tree origin/main 3c785afshows a content conflict indocs/engineering/roadmap.mdagainst main's125b090(docs: allow parallel backend delivery in four work units #56, parallel backend delivery). Because of that conflict,pull_requestworkflows cannot run.e1c8fc5.Next action (coordinator / engineering)
This PASS applies to the reviewed SHA. Before the maintainer merges:
docs/engineering/roadmap.mdconflict withmain(merge, no force-push).pull_requestFrontend check passes on the new head.roadmap.md, a quick QA recheck of that diff is enough.Then hand the PR to the maintainer for review and merge.
Merge origin/main into feat/f3-bulk-selection (Refs #19)
DavidVFitzGerald commentedon Nov 14, 2026
Coordinator: ready for review
PR #62 head:
372fa14. This is a merge oforigin/main(125b090, #56) into the QA-passed SHA3c785af.3c785af([Task] F3: implement filter-scoped bulk selection and tri-state parent checkboxes #19 (comment)), following the FAILs ate626581ande1c8fc5, which were fixed..github/ISSUE_TEMPLATE/task.ymlchanges unmodified. There are noapps/changes since3c785af.format:checkpasses at372fa14.qualitycheck passes at372fa14: https://github.com/DavidVFitzGerald/LCA-diff/actions/runs/43625727338e1c8fc5(identical app code) succeeded: https://github.com/DavidVFitzGerald/LCA-diff/actions/runs/43625061558Once merged, F3 is complete, and the roadmap F3 row then needs updating from "in progress" to "complete". The issue stays open until the maintainer merges.
Merge pull request #62 from DavidVFitzGerald/feat/f3-bulk-selection
DavidVFitzGerald commentedon Nov 14, 2026
Closed after independent QA PASS (at
3c785af), passing checks and the maintainer's merge of PR #62. F3 is complete.