Skip to content

fix(data-peek): the grid shows its rows again, Escape closes one thing, the Limit box tells the truth - #553

Merged
huyplb merged 7 commits into
mainfrom
fix/data-peek-grid
Oct 25, 2026
Merged

huyplb merged 7 commits into
mainfrom
fix/data-peek-grid

Conversation

@huyplb

@huyplb huyplb commented Oct 25, 2026 •

Copy link
Copy Markdown
Contributor

What this fixes

  • The grid showed no rows. The peek panel had a fixed height (360px, or 320px for a drill panel). Main's multi-row filter (several WHERE and ORDER BY rows, 30ed394315) made the controls above the grid taller. With two filter rows the grid showed only its header. The height now belongs to the panel's body (the grid or Insight), and the controls take what they need. Dragging the handle still resizes the panel. Saved heights now mean the body's height.
  • One Escape closes one thing. Escape in the save-as-variable dialog, or Escape that clears a cell selection, also closed the whole peek and every panel drilled open from it. The peek now ignores an Escape something inside it has already used.
  • The Limit box shows the limit in force. An emptied box, or a number above the cap, stayed on screen while a different limit applied. The box is now clamped like the store and written back.
  • The page number matches the rows on screen. After a failed page fetch, the panel kept page one's rows but called them page two and numbered them from 11. It now goes back to the page whose rows it shows.

Tests

  • e2e sql-editor-data-peek-grid.test.ts (new) passes 14/14 against this branch, using SQLite. It covers paging, WHERE, ORDER BY, refusals, foreign-key drill and stacking, Referenced by, closing, both Escape cases, a failed page fetch, and Insight. Five of these failed before the height fix, because every click on a grid row landed on the sticky header.
  • sql-editor-peek-stacking and sql-editor-peek-row-form (Postgres) pass. They also exercise peek panels.
  • Unit: DataPeekPanel.test.tsx checks that the height is on the body. It fails on the old layout and passes on the new. The sql-editor and shared suites pass: 894 tests.
  • Typecheck (web, e2e, cli) and eslint are clean.

🤖 Generated with Claude Code


Note

Medium Risk
Touches SQL Editor peek layout, keyboard handling, and paging state in useSqlEditorStore; regressions would affect a heavily used preview UI but changes are localized with broad new e2e coverage.

Overview
Data Peek no longer squeezes the grid when multiple WHERE/ORDER BY rows are open: resizable height applies to the body (data-peek-body-{id}) that holds the grid or Insight, while filter chrome grows naturally. Saved/dragged heights are body heights, with updated defaults and min/max.

Escape is scoped so one keypress closes one layer: the save-as-variable input calls preventDefault on Escape, and the peek shell skips closing when defaultPrevented (including grid cell deselect).

Limit input is clamped on apply via clampDataPeekLimit and written back so the field matches the limit actually in force. After a failed page fetch, pageIndex reverts to the last good page so row numbers and the footer page label stay aligned with visible rows.

Adds SQLite e2e sql-editor-data-peek-grid.test.ts (paging, filters, FK drill, Escape, failed fetch, Insight tab), wires it into run-all.mjs, documents data-peek-body-{id}, and a unit test that body—not the outer grid wrapper—owns the fixed height.

Reviewed by Cursor Bugbot for commit 801e6a9. Bugbot is set up for automated code reviews on this repo. Configure here.

huyplb and others added 5 commits October 25, 2026 10:59
…iled fetch)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ever hide the rows

Main's multi-row filter (WHERE and ORDER BY rows) grew the controls above the
grid while the panel kept a fixed 360 px: with two filter rows the grid showed
its header and none of its rows. The height is now the body's (grid or
Insight); the controls take what they need. The e2e follows the new filter:
the refusal text, and one WHERE row per AND condition.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@cursor

cursor Bot commented Oct 25, 2026

Copy link
Copy Markdown
Contributor

Bugbot couldn't run - usage limit reached

Bugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit.

A user or team admin can review and increase usage limits in the Cursor dashboard.

(requestId: e5f8fa5b-b9a5-4283-86af-aa75f8c04ede)

@github-actions

Copy link
Copy Markdown
Contributor

Test IDs

Added (1)

  • data-peek-body-{…}

{…} is a part filled in at run time. The full tree: docs/testing/TEST_IDS.md.

@cursor

cursor Bot commented Oct 25, 2026

Copy link
Copy Markdown
Contributor

Bugbot couldn't run - usage limit reached

Bugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit.

A user or team admin can review and increase usage limits in the Cursor dashboard.

(requestId: 71949c68-ad5d-4024-9e5c-10deb76e94d2)

@huyplb
huyplb merged commit ed471db into main Oct 25, 2026
13 checks passed
@huyplb
huyplb deleted the fix/data-peek-grid branch October 25, 2026 22:11
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