Commit 4438a5c
fix(react): the group column is not a data column, and the seams that said it was (#497)
* chore: stop a failing package hiding the rest of the suite, and strike a done roadmap line
pnpm -r bails on the first failing package by default, so one timeout in an
early package silently skipped every package after it — a full run once
never reached core, renderer-dom, react or the apps at all, while the
failure read as a single known flake. --no-bail runs them all and STILL
exits 1 (measured on pnpm 10.12.1; pnpm's own docs claim otherwise). Left
on the build step, where a failure should stop everything.
Residual: the three phases are still chained with &&, so a package-test
failure keeps the apps from running. Fixing that needs exit-code collection,
not a flag.
Roadmap: "public API/documentation gaps + stable row identity" is done.
All four .api.md reports are at zero ae-forgotten-export; getRowId is
required at every entry point with its index parameter removed (#293); and
four fail-closed guards cover API surface (#290), docs tables (#280),
engine reconciliation (#266) and facade forwarding (#301).
* fix(react): the group column is not a data column, and the seams that said it was
Grouping's boundaries with pinning, editing and streaming had no tests at all,
which is where all three prior grouping correctness rounds came from (#259,
#264, #495). Probing those three seams found two live defects, both the #495
shape: a consumer-facing "data column" set that filters only the row-select
checkbox instead of `isSyntheticColumnId`. Ungrouped the two predicates are the
same test, so each site looked correct for as long as nothing was grouped.
1. Announced column counts described a grid one column wider than the artifact.
Grouped, Cmd+A then Cmd+C put 2 columns on the clipboard and announced 3;
`exportCsv` wrote a 2-column file and announced 3. `copy.ts`, `csv.ts` and
`paste.ts` all drop both synthetics, so the announcement — a statement ABOUT
that clipboard or that file — has to drop them too. `computeSelectionExtent`
now resolves spans in DATA ordinals with a group-column bound collapsing to
data column 0, byte-for-byte `resolveRangeBounds`.
2. `onSelectedRowIdChange` went silent while grouped. A range over every real
data column is a full row, but `singleFullRowSelection` was handed the drawn
list, whose first entry is the synthetic group column — so the range never
matched and a consumer's "open the selected record" wiring stopped firing the
moment the user grouped.
Tests: grouping boundaries added to the three suites that had none —
right-pin (drawn order, pinned insets, grouping BY a right-pinned column,
`groupColumn: {pinned:"left"}`, group-row alignment, drawn `aria-colcount`),
editing (commit inside a group, group rows refuse an editor, an edit cancels
when grouping hides its column or collapses its row, a commit that re-paths
into a collapsed group settles), and streaming (selection/focus survive an
in-place update and a key re-path, expansion and aggregates track, a removed
focused row clears focus, an in-flight editor survives a re-path). Every one
runs a grouped leg against an ungrouped control.
Editing and streaming were probed and found CORRECT — those tests pin
behaviour rather than fix it.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
* fix(website): the hero's selection summary counts what the clipboard carries
summarizeSelection filtered only the row-select column, so while grouped it
counted the derived group column too — the sidebar claimed one more column
than Cmd+C actually copies. Same defect the library seams had, and it is
directly in the Excel-interop story: 'N x 3 selected' next to a two-column
paste.
Two tests pinned the over-count and are corrected, not weakened:
- selection.test.ts asserted cols: 3 and its comment claimed the group
column 'is inside the rectangle Cmd+C copies'. Rows and columns are not
symmetric: group ROWS carry labels and aggregates and do copy; the group
COLUMN is presentation and was dropped from copy/CSV/paste in #495.
- grouping.spec.ts derived its expectation as headerCells - 1, subtracting
only the selector. It now counts headers carrying a data-pretable-column-id
and excludes the group column, so it still fails if a hero column is added.
Negative control: reverting the filter fails selection.test.ts.
* test(react): poll the header assertion that races setQuery's settle
external-filter-authority polled for the rows to settle, then asserted the
header state bare. setQuery settles asynchronously across cooperative slices
(#321), so the rows can be drawn a slice before the header reports — under
load the bare assertion loses that race and reads ariaSort 'none' /
filterActive 'false'.
Not caused by this branch: three full react runs on it produced three
different outcomes (eviction-population-change, then this, then 1457 green),
which is the signature of a load race rather than a regression. Both suspects
pass 3/3 in isolation.
Surfaced now because --no-bail (this branch) stops a failing package hiding
the ones after it, so more of the suite actually runs.
* test(website): drive the stubbed clock inside the wait it gates
HeroGrid's replay test stubs requestAnimationFrame, so the replay only
advances when a frame is flushed by hand. It flushed exactly two, then
waitFor'd for an aggregate to change. If those two did not move THAT
sector's value, the retry loop span against a frozen clock until timeout —
waiting cannot rescue a value nothing is ticking. Each attempt now flushes
another frame, so the loop advances the thing it waits on.
HONEST LIMIT: I could not reproduce the CI failure locally to prove this
fixes it. The old version passes 6/6 at load ~14; the observed failures
were at load 30-50. So this is reasoned, not demonstrated — it removes a
real mechanism that can produce exactly this symptom, and is strictly more
correct given rAF is stubbed, but it is not a verified fix for that run.
NOT caused by this branch, proven structurally rather than statistically:
the failing assertions read summary-nav/summary-pnl, which come from
buildModel(rows) in PortfolioSummary and depend only on rows. This branch
changed summarizeSelection, whose output feeds a sibling SelectionSection.
There is no path from the change to those elements.
---------
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>1 parent 48735be commit 4438a5c
12 files changed
Lines changed: 1308 additions & 62 deletions
File tree
- apps/website
- app/components
- __tests__
- heroGrid
- __tests__
- e2e
- packages/react/src
- __tests__
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
40 | | - | |
41 | | - | |
42 | 40 | | |
43 | 41 | | |
44 | 42 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
256 | 256 | | |
257 | 257 | | |
258 | 258 | | |
259 | | - | |
260 | | - | |
261 | | - | |
262 | | - | |
263 | | - | |
264 | | - | |
265 | | - | |
266 | | - | |
267 | | - | |
268 | | - | |
269 | | - | |
270 | | - | |
271 | | - | |
272 | | - | |
273 | | - | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
274 | 280 | | |
275 | 281 | | |
276 | 282 | | |
| |||
Lines changed: 8 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
96 | 96 | | |
97 | 97 | | |
98 | 98 | | |
99 | | - | |
| 99 | + | |
100 | 100 | | |
101 | 101 | | |
102 | | - | |
103 | | - | |
104 | | - | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
105 | 108 | | |
106 | 109 | | |
107 | 110 | | |
108 | 111 | | |
109 | 112 | | |
110 | 113 | | |
111 | | - | |
| 114 | + | |
112 | 115 | | |
113 | 116 | | |
114 | 117 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
1 | 2 | | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
2 | 9 | | |
3 | 10 | | |
4 | 11 | | |
| |||
35 | 42 | | |
36 | 43 | | |
37 | 44 | | |
38 | | - | |
| 45 | + | |
39 | 46 | | |
40 | 47 | | |
41 | 48 | | |
| |||
45 | 52 | | |
46 | 53 | | |
47 | 54 | | |
48 | | - | |
49 | | - | |
| 55 | + | |
| 56 | + | |
50 | 57 | | |
51 | 58 | | |
52 | 59 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1227 | 1227 | | |
1228 | 1228 | | |
1229 | 1229 | | |
1230 | | - | |
1231 | | - | |
1232 | | - | |
1233 | | - | |
| 1230 | + | |
| 1231 | + | |
| 1232 | + | |
| 1233 | + | |
| 1234 | + | |
| 1235 | + | |
| 1236 | + | |
| 1237 | + | |
| 1238 | + | |
| 1239 | + | |
1234 | 1240 | | |
1235 | 1241 | | |
1236 | 1242 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
35 | | - | |
| 35 | + | |
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
| |||
0 commit comments