Skip to content

fix(grid): give the cell viewer somewhere to draw the cell - #721

Merged
EVWorth merged 1 commit into
mainfrom
fix/cell-viewer-blank
Sep 19, 2026
Merged

EVWorth merged 1 commit into
mainfrom
fix/cell-viewer-blank

Conversation

@EVWorth

@EVWorth EVWorth commented Sep 18, 2026

Copy link
Copy Markdown
Owner

Reported from the app: expanding a long result value shows the title, the
character count, the search field and the buttons — and no content.

Reproduced for any value. The content area is 56px tall, which is its own
padding and nothing else.

Three reasonable things that add up to a broken one

  • The panel is max-h-[80vh] — a cap, not a height — so it sizes to its
    content.
  • Its content area is min-h-0 flex-1, so flex-basis: 0.
  • Inside that is Monaco, absolutely positioned, reporting no intrinsic
    height
    .

Nothing is left holding the box open.

min-h-0 is the part worth understanding. A flex item's automatic minimum size
is its content — that's what normally stops a flex-basis: 0 item collapsing.
min-h-0 switches it off. It's the right thing to write when the parent has a
definite height and the child needs to scroll, which is what Monaco wants, and
it's fatal when the parent doesn't.

I checked the other flex-column panels: SQLPreviewDialog and ImportDialog
use flex-1 without min-h-0, so their automatic minimum still holds them
open. This one had disabled its own safety net.

The fix

h-[80vh] instead of max-h-[80vh]. The viewer is a place to read a value
rather than a message box, a consistent size suits it, and the failure mode
can't recur.

This is #217 again

Fixed once in #220, at a doubly-nested wrapper. That wrapper was real and
removing it was right — but it wasn't why the box was empty, so the bug came
back. Hence a test this time.

About that test

It measures the box, not Monaco: Monaco loads asynchronously and may never
mount in a harness, while the box it would be given is already decided by CSS.

It only means anything because the browser suite loads the app's stylesheet as
of #716. Before that every element measured zero and this test would have
passed against nothing — which is worth saying plainly, because that's the
second time this week a geometry test would have been decorative.

before:  the content area has 56px to draw 15,000 characters into
after:   343 browser tests passing

🤖 Generated with Claude Code

Expanding a long value showed the title, the character count, the search field
and the buttons — and no content. Reported against a 15,573-character
`SHOW CREATE TABLE`, and reproducible for any value: the content area was
56px tall, which is its own padding and nothing else.

The panel was `max-h-[80vh]`, which is a cap and not a height, so it sized to
its content. Its content area is `min-h-0 flex-1`, and inside that sits Monaco,
which is absolutely positioned and reports no intrinsic height. Every one of
those is individually reasonable and together they leave nothing holding the
box open.

`min-h-0` is the part worth understanding. A flex item's automatic minimum size
is its content, which is what normally stops a `flex-basis: 0` item collapsing;
`min-h-0` switches that off. It is the right thing to write when the parent has
a definite height and you want the child to scroll — which is what Monaco needs
— and it is fatal when the parent does not. The two other flex-column panels in
the app use `flex-1` without `min-h-0`, so their automatic minimum still holds
them open. This one had disabled its own safety net.

So the panel gets a definite `h-[80vh]`. The viewer is a place to read a value
rather than a message box, a consistent size suits it, and the failure mode
cannot recur.

This is #217 again, fixed once in #220 at a nested wrapper. That wrapper was
real and removing it was right, but it was not why the box was empty, and the
bug came back.

The test measures the box rather than Monaco, because Monaco loads
asynchronously and may never mount in a harness, while the box it would be
given is already decided by CSS. It only means anything because the browser
suite loads the app's stylesheet as of #716 — before that every element
measured zero and this test would have passed against nothing.
@EVWorth
EVWorth merged commit 220942a into main Sep 19, 2026
12 checks passed
@EVWorth
EVWorth deleted the fix/cell-viewer-blank branch September 19, 2026 03:25
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