test(e2e): browser-level spec for foldable Tasks-table columns - #866
wojciechszyjka wants to merge 6 commits into
Conversation
Covers the gap #743 left: the fold flow was only ever exercised in jsdom, which does no layout, so nothing proved a folded column is actually narrower. Asserts the shipped defaults, the measured width shrink, the reload round-trip through ui-state.json, sibling preservation against an unrelated appearance key, and card-list parity below md. Refs #822
Two flakes the first green run hid, both in the spec rather than the app: - A direct API write landed on a pooled keep-alive socket the server had already closed, so it died with ECONNRESET whenever the suite spent more than the keep-alive window driving only the browser. Retry it, as queued-stack.e2e.ts already does for the same reason. - The card-parity test assumed the fold state earlier tests happened to leave behind; a toggle clicked into the state it already held flipped it the wrong way and hung for the full 25s provider timeout. It now drives the columns to a known state idempotently. Refs #822
|
🤖 Label rationale:
|
|
🤖 Browser evidence captured by the new spec ( task-columns-defaults task-columns-workflow-folded task-columns-mobile-cards |
|
🤖 |
Review follow-up: two toggles were clicked on an assumed state. Clicked from the wrong one they fold the other way and the wait burns the full 25s provider timeout, reporting a hang where the real problem is an ordering assumption. Assert the precondition so it fails instantly and says so. Refs #822
🔍 Code ReviewPR #866 — 📋 ScopeTwo files: the new ✅ Validation
🐛 FindingsMinor (fixed in this pass, a55abbb) — two toggles were clicked on an assumed state. Nit (not fixed, deliberate). 🧪 Test qualityThe assertion this PR exists for was mutation-checked rather than assumed: dropping the folded Two flakes were found and fixed before the PR was opened, both in the spec and neither in the app: a direct API write landing on a keep-alive socket the server had already closed (
|
|
🤖 What landedOne new e2e spec,
Verification
Honest caveats
|
|
🤖
Worth recording, because it settles the caveat in the summary above: that required check runs the E2E suite, and it went green — including the eleven spec files that were failing locally. The local redness was environmental (a loaded laptop), exactly as the baseline comparison suggested, and not something this PR introduced. The new No further follow-up will come from this agent. |
📦 npm preview published —
|



Summary
Adds the browser-level e2e spec that PR #743 left as follow-up work. The foldable Tasks-table
columns are currently exercised only in jsdom — which does no layout at all — so nothing proved
that a folded column is actually narrower, that the choice survives a reload, or that persisting
it preserves unrelated
ui-state.jsonsiblings.Closes #822
What it covers
packages/web/e2e/task-columns.e2e.ts, five tests, mapping to the issue's scenario:th[data-column-id="branch"][data-folded="true"], no other foldable header folded, and nobuttoninside the Status and Task headersdata-folded/aria-pressed="false"and measurably shrinks the column (getBoundingClientRect().width)$CEZ_HOME/ui-state.jsonreally holdstaskTable.expandedColumns.workflow === falseappearance.accentwritten first still coexists with the column state after a toggle — the sibling-preservation regression an earlier review pass caught as a blockermdthe card list renders the same fields whatever the desktop fold choices areThe spec boots its own cezar over a throwaway
dataRootwith a pinned fixtureruns.json, the wayquick-list.e2e.tsdoes. Two reasons: the run store readsruns.jsononce, at startup, so atask rich enough to render every column can only be seeded before boot; and
fixtureServeEnvpinsCEZ_HOMEinside thatdataRoot, which is a stronger isolation than the shared.ai/qa/cez-home— this suite mutates
ui-state.json, andsettings-appearance.e2e.tssave/restores that samefile. It runs under the existing
npm run test:e2eglob; no new runner, no new CI wiring.Scope — point 6 is deliberately excluded
Scenario point 6 (a queued run present while CPU and Mem are both folded, asserting the two columns
stay narrow) is not in this PR. It pins the defect tracked in #821, which is being fixed in
parallel on #861, so that assertion belongs with that fix rather than racing it here. Acceptance
on #822 is therefore partial on that one point; the three acceptance criteria are otherwise met.
Verification
full suite.
42pxfrom thecolgroupand rebuilding turns thewidth assertion red — the shrink falls to 15.42px against a
> 20floor. The assertion guardswhat it claims to.
direct API write was landing on a keep-alive socket the server had already closed (
ECONNRESET),so the spec passed only when the whole run finished inside the ~5s keep-alive window — the
first green run was 6.5s and hid it. And the card-parity test inherited the fold state earlier
tests happened to leave behind, where a toggle clicked into the state it already held flipped it
the wrong way and hung for the full 25s provider timeout.
typecheck,test,test:unit,build,test:package— all green.npm run test:e2eas a whole is red on this machine, and was already red without thischange. With the new spec: 11 failed files / 30 failed tests. Baseline in the same session with
the new spec temporarily moved out of the glob: 11 failed files / 31 failed tests. The failing
set is pre-existing and unstable between runs (
workflows.e2e.tsandsettings-monitoring.e2e.tsswap places);
task-columns.e2e.tsappears in neither list. Flagging it rather than presenting ared suite as a pass.
Tracking plan:
.ai/runs/2026-08-11-browser-e2e-foldable-task-columns.md