GreedyBear icon indicating copy to clipboard operation
GreedyBear copied to clipboard

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

Open ABHIGYA0205 opened this issue 2 months ago • 3 comments

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:

  1. Row expansion is broken. table visual states › expanded row fails with expanded-row-1 element 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 and table-expanded-desktop.png exists. Likely cause: v9 expansion state/rendering wiring (the component gates rendering on row.getIsExpanded() at DataTable.jsx, but the expanded state no longer round-trips after toggleExpanded()).

  2. Stale filtered-state snapshot. active filters fails with expected 1296×285 vs received 1296×193. The committed table-filtered-desktop.png still 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.

  3. 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

  1. git fetch upstream develop && git checkout -b verify upstream/develop
  2. cd frontend && npm ci && npx playwright install chromium
  3. npm run start:visual (terminal 1), npm run test:visual (terminal 2)
  4. Observe the 10 failures above on an otherwise-clean tree.

Why this matters

  • Row expansion is a real behavior regression in the shared DataTable component.
  • A red visual suite on clean develop blocks every future frontend PR from getting a clean CI signal and discourages contributors.

Suggested fix

  • Restore working row expansion under v9 (verify rowExpandingFeature state 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.

ABHIGYA0205 avatar Oct 06 '26 10:10 ABHIGYA0205

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.

regulartim avatar Oct 06 '26 11:10 regulartim

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.

ABHIGYA0205 avatar Oct 06 '26 12:10 ABHIGYA0205

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.

ABHIGYA0205 avatar Oct 06 '26 20:10 ABHIGYA0205