Skip to content

fix: BROWSE validation message was clipped away; refresh docs + screenshots#55

Merged
DDecoene merged 1 commit into
release/v1.2.0from
fix/46-grid-error-clipped
Jul 9, 2026
Merged

fix: BROWSE validation message was clipped away; refresh docs + screenshots#55
DDecoene merged 1 commit into
release/v1.2.0from
fix/46-grid-error-clipped

Conversation

@DDecoene

@DDecoene DDecoene commented Jul 9, 2026

Copy link
Copy Markdown
Owner

The bug

The BROWSE per-cell validation message shipped in #45 was never visible to anyone.

#grid-table td sets overflow: hidden (to ellipsis long values), which clipped the absolutely-positioned .cell-error tooltip to nothing. An invalid edit showed a red border and no reason at all.

Why the tests didn't catch it

toContainText() and toBeVisible() do not account for clipping by an ancestor's overflow. The element was in the DOM, had display: block; visibility: visible, and a real bounding box — Playwright happily reported isVisible: true. It was simply painted nowhere.

The assertion now uses toBeInViewport(), which is backed by an IntersectionObserver and therefore does account for ancestor clipping. I verified it fails against the unfixed CSS:

Error: expect(locator).toBeInViewport() failed
Expected: in viewport
Received: viewport ratio 0

The fix is one line: #grid-table td.cell-invalid { overflow: visible; }.

How I found it: not from a test — from looking at a screenshot of the feature while regenerating the docs. That lesson is now in CLAUDE.md → Test discipline, alongside the toContain-can't-see-absence and untested-WS-surface notes.

Docs (DoD steps 5–7)

  • Regenerated every docs/screenshots/*.png and the README demo.gif — they still showed the v1.1.1 banner, and the splash now advertises DO overtime.
  • New docs/screenshots/screenshot-grid-validation.png (the feature actually working — the message reads "STARTTIME: minutes must be a multiple of 15"), a matching capture step in scripts/capture-screenshots.mjs, and a README section for it.
  • CHANGELOG.md entry under Fixed.

Test plan

  • npx tsc --noEmit clean.
  • Confirmed the new assertion fails on the unfixed CSS and passes on the fix.
  • npx playwright test tests/grid-validation.spec.ts tests/assistant.spec.ts tests/overtime.spec.ts — 35/35.
  • Visually verified the rendered screenshot shows the message.

…nshots

The per-cell validation error (#45) was never visible. Grid cells set
overflow:hidden for the ellipsis on long values, which clipped the
absolutely-positioned tooltip to nothing — an invalid edit showed a red
border and no explanation of what was wrong.

The e2e tests passed the whole time: toContainText and toBeVisible do
not account for clipping by an ancestor's overflow. The assertion now
uses toBeInViewport(), which is backed by an IntersectionObserver and
does. Verified it fails against the unfixed CSS (viewport ratio 0).

Found by looking at a screenshot of the feature rather than trusting a
green test — now recorded in CLAUDE.md's test-discipline notes.

Also regenerates every screenshot and the README demo GIF against
v1.2.0 (they still showed the v1.1.1 banner), and adds a new
screenshot-grid-validation.png plus its capture step and a README
section for it.
@DDecoene DDecoene merged commit 9b3b0a7 into release/v1.2.0 Jul 9, 2026
2 checks passed
@DDecoene DDecoene deleted the fix/46-grid-error-clipped branch July 9, 2026 20:01
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