Skip to content

F4: windowed comparison grid with the Flows mount and large mock workload (#23) - #68

Merged
DavidVFitzGerald merged 9 commits into
mainfrom
feat/f4-virtual-grid
Nov 15, 2026
Merged

DavidVFitzGerald merged 9 commits into
mainfrom
feat/f4-virtual-grid

Conversation

@DavidVFitzGerald

Copy link
Copy Markdown
Owner

Refs #23 (F4-04). Phase 1, mock services only.

Stacked on #67 (#22): this PR's base is feat/f4-signed-bars. Merge #67 first; this PR is then retargeted to main.

Behavior

Windowed grid. ComparisonGrid is the grid shared by Flows now and Scores later (#28).

  • One scroll container virtualizes both rows and process columns. Only the viewport plus overscan is mounted.
  • Row heights come from whole-row summaries via resizeItem, so content stays put when rows load.
  • Stripes alternate by row index.
  • A bounded sticky left block holds the seven Flows identifying fields, in order.
  • The process header strip from [Task] F4 — Build shared process headers and comparability warnings #21 stays pinned above the grid and is kept in horizontal sync with the cells.
  • One roving tab stop. Arrows, Home/End, Ctrl+Home/End and PageUp/PageDown move focus, always to a mounted, correct cell. Focus is kept while a cell's data loads.

Bounded reads (useFlowGrid):

  • Row pages of 100 load only as far as the window needs.
  • One whole-selection summary request per row page in the window.
  • Cells are read in tiles of 50 × 20 (at most 1,000 cells). Tiles that leave the window are aborted.

Large mock scenario. ?mock-scenario=large gives 220 processes and 2,000 generated mixed-sign rows.

  • Validated at the composition root, in mock mode only. Any other value, or any non-mock mode, is a configuration error, never a fallback.
  • The demo banner names the scenario.
  • It selects synthetic fixtures inside the existing mock adapter. There is no new service mode, adapter or real configuration contract, so no ADR is needed (see the PM recheck on [Task] F4 — Virtualize comparison rows and columns with sticky alignment #23).

Smaller changes:

  • rowGeometry().rowHeight is now rounded up to whole px; chart geometry is unchanged.
  • Present-value tooltips are hidden from assistive technology, because the cell's accessible name already holds the full lexeme.
  • The test harness gets an empty comparison stub.

Checks (workspace container)

  • format:check, lint, typecheck and build pass.
  • Unit tests: 28 files, 364 tests, pass on two runs.
  • Chromium e2e: 21/21 pass, including the new e2e/flows-grid.spec.ts.
  • Recorded workload in Chromium at 1440 × 900: 2,224 rows × 220 process columns, with about 17–25 rows and at most about 440 cells mounted.

Limitations

🤖 Generated with Claude Code

DavidVFitzGerald and others added 5 commits November 14, 2026 20:44
…efs #22)

Row geometry comes from whole-selection P/N extrema (spec §6.6):
positive-only and negative-only rows keep H, mixed rows grow to
H × (P + N) / M with the axis H × P / M below the top, and M = 0 rows
keep a thin near-top baseline. Floats are derived only for pixels via
an exponent-aware ratio. One SignedValueCell serves Flows and Scores
with adaptive value-only labels, full-lexeme hover/focus tooltips,
blank absence, N/A and no bar for zero.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
QA D1: in lopsided mixed rows with under 1 px on the smaller side, the
1 px minimum bar was clamped across the axis. Bars are now always
anchored at zero, capped by the room on their own side, with the
hairline extending into the cell padding instead. QA D2: M is chosen by
exact magnitude comparison rather than a float ratio. Also announce
absent cells via visually-hidden text and correct the decimalRatio doc.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…23)

One scroll container virtualizes both flow rows and process columns.
Row heights come from whole-row summaries via resizeItem (scroll
anchored). A bounded sticky block shows the seven Flows identifying
fields, stripes follow the row index, the header strip is kept in
horizontal sync, and one roving cell is the tab stop. Cells are read as
fixed row x column tiles, so windows that leave the viewport are
cancelled. Adds the validated mock-only ?mock-scenario=large workload
(220 processes, 2,000 generated mixed-sign rows).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…0 workload (Refs #23)

- Report the viewport-plus-overscan range, not the always-mounted active
  cell, so a far tab stop never widens the summary/cell window.
- Render loading cells through SignedValueCell and key rows by index
  within a comparison token, so focus survives data arrival; reset
  measured heights when the token changes.
- Round row heights to whole px so virtualized row starts never drift.
- Hide present-value tooltips from assistive technology (the accessible
  name already holds the full lexeme).
- Add grid-model, Flows grid component and composition tests plus the
  Chromium flows-grid spec for the large mock scenario.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
DavidVFitzGerald and others added 3 commits November 14, 2026 23:39
…s (Refs #23)

QA D1: any add, remove or reorder emptied the grid, reset scroll to the
top and dropped focus. Rows and summaries are now read for the
canonical sorted process set, so a reorder re-reads nothing; a changed
selection keeps the previous comparison shown (busy, with an updating
status) and reads nothing with its token; and measured heights are no
longer reset per token but corrected, scroll-anchored, as summaries
arrive.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
QA D2: a selection change that added or removed rows above the
viewport kept the pixel offset but showed different flows. The grid now
records the flow at the viewport top and the offset into it; when a new
row set is shown it loads row pages until that flow is located and
restores it at the same offset. The active cell follows its flow by
key, and keyboard focus returns to it if its node changed. Tests now
check which flow is visible, and that nothing is read while the
previous comparison is shown (O6).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…#23)

QA round 3: D3, the restored position was overwritten as row heights were
corrected; D4, a scroll made during an update was undone; and adding
processes or removing one above the view still shifted the visible flows.

The grid now anchors the view itself (the virtualizer's size adjustment
is off): after every scroll it records the loaded rows from the viewport
top with their layout starts, and after any layout change it scrolls by
exactly how far the first surviving recorded flow moved. It reports the
anchor flows to useFlowGrid, which keeps the previous comparison shown
until one is loaded in the new comparison, so new rows never appear at a
stale position. When every recorded flow is gone, the grid re-anchors on
the rows in view, and focus follows the active cell whenever its node
changes meaning (O8, O9).

Tests check the flow identity and offset after heights settle. The
large-scenario composition test gets an explicit timeout.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@DavidVFitzGerald

Copy link
Copy Markdown
Owner Author

QA PASS at 3976241 (see #23). Follow-up #69 tracks D5 and the test gaps.

Ready for maintainer review after #67 merges. This PR is stacked on feat/f4-signed-bars and will be retargeted to main once #67 is merged.

@DavidVFitzGerald
DavidVFitzGerald changed the base branch from feat/f4-signed-bars to main November 15, 2026 06:59
# Conflicts:
#	apps/frontend/src/components/comparison/SignedValueCell.tsx
#	apps/frontend/src/components/comparison/geometry.ts
#	apps/frontend/src/services/README.md
@DavidVFitzGerald

Copy link
Copy Markdown
Owner Author

Coordinator: #67 merged (rebase, 84643b2). Retargeted this PR to main and merged main into the branch as dc1f06e. The merge's tree is byte-identical to the QA-passed 3976241 (git diff 3976241 HEAD is empty; main's tree equalled this branch's #22 base 15ba70d), so the QA PASS still applies. Waiting for the quality check on the new head.

🤖 Generated with Claude Code

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant