DataTable visual suite is red on clean develop after the TanStack v9 migration: row expansion no longer renders and the filtered-state snapshot is stale
After the TanStack Table v9 migration merged (#1653), npm run test:visual fails on a clean checkout of develop. I verified this on an untouched upstream/develop branch (10 failed / 10 skipped). The failures fall into three groups; the first two are real regressions from the migration:
-
Row expansion is broken.
table visual states › expanded rowfails withexpanded-row-1element not found after clicking the row's expand control — i.e. the expanded sub-row (SubComponent) never renders. This is a functional failure, not a screenshot mismatch. Pre-v9 the same test passed andtable-expanded-desktop.pngexists. Likely cause: v9 expansion state/rendering wiring (the component gates rendering onrow.getIsExpanded()atDataTable.jsx, but the expanded state no longer round-trips aftertoggleExpanded()). -
Stale filtered-state snapshot.
active filtersfails with expected 1296×285 vs received 1296×193. The committedtable-filtered-desktop.pngstill contains the paginator; v9 correctly recomputes the page count from filtered rows and hides the paginator on a single page. The snapshot was not regenerated when the migration merged. -
Environment drift (context, not a regression). 8 further tests fail with only 0.01–0.02 pixel-ratio differences (font/anti-aliasing), which also makes the suite unreliable across machines — worth addressing separately (pinned font environment / tolerance).
Steps to reproduce
git fetch upstream develop && git checkout -b verify upstream/developcd frontend && npm ci && npx playwright install chromiumnpm run start:visual(terminal 1),npm run test:visual(terminal 2)- Observe the 10 failures above on an otherwise-clean tree.
Why this matters
- Row expansion is a real behavior regression in the shared
DataTablecomponent. - A red visual suite on clean
developblocks every future frontend PR from getting a clean CI signal and discourages contributors.
Suggested fix
- Restore working row expansion under v9 (verify
rowExpandingFeaturestate wiring / add the expanded row model if required). - Regenerate the visual snapshots in a pinned environment once behavior is correct.
Happy to prepare the fix PR.
Hi @ABHIGYA0205 ! Thanks, good catch! I'll assign you.
red visual suite on clean develop blocks every future frontend PR from getting a clean CI signal and discourages contributors.
This is not true, to my knowledge. The CI does not run Playwright or test:visual, so the visual suite only runs when someone runs it locally.
Thanks @regulartim — yep, I’ll drop the CI/Playwright point. The two issues still repro on a clean checkout, so I’ll fix the expansion + update the snapshots and put up a draft PR.
Sorry about the first PR targeting main! Fresh draft PR targeting develop: https://github.com/GreedyBear-Project/GreedyBear/pull/1706 — restores row expansion, regenerates the stale filtered snapshot, and adds the screenshot tolerance. Ready for review.