Skip to content

fix(layout): keep pages inside main when the production banner is shown - #684

Open
thomaswasle wants to merge 1 commit into
TabularisDB:mainfrom
thomaswasle:bug/fix-production-datagrid-view
Open

fix(layout): keep pages inside main when the production banner is shown#684
thomaswasle wants to merge 1 commit into
TabularisDB:mainfrom
thomaswasle:bug/fix-production-datagrid-view

Conversation

@thomaswasle

Copy link
Copy Markdown
Contributor

Problem

When the active connection's environment is set to production, the last row of
the results grid is cut off horizontally — roughly half a row is clipped at the
bottom edge of the window, and it cannot be scrolled into view.

Cause

<main> in MainLayout is a flex column that holds the ProductionBanner
(shrink-0) followed by the routed page. But the pages size themselves with
h-full:

  • src/pages/Editor.tsxflex flex-col h-full bg-base
  • src/components/layout/SplitPaneLayout.tsxrelative h-full w-full
  • src/pages/Connections.tsx, src/pages/Settings.tsx, src/pages/McpPage.tsx

height: 100% resolves against the full height of <main>, so it does not
subtract the ~18px the banner already consumed. The page renders taller than the
space left for it, main's overflow-hidden clips the overflow at the bottom,
and the bottom of the data grid's overflow-auto scroll container — the last
row — gets sliced.

Without the banner the numbers happen to line up, which is why this only shows up
on production-flagged connections.

Fix

Wrap the routed content (SplitPaneLayout / Outlet) in a
flex-1 min-h-0 min-w-0 container. The wrapper is a correctly sized flex item
that accounts for the banner, and the pages' h-full now resolves against it.

This fixes the whole page rather than just the grid, so the split-pane view and
the editor/results resize geometry also stop being off by the banner height while
a production connection is active.

Testing

  • Manual: opened a table tab on a connection with environment = production
    the last row now ends flush with the grid border and is fully scrollable.
  • Verified the non-production case and the split-pane view are unchanged.
  • tsc --noEmit and eslint clean.

closes #682

Every routed page sizes its root with `h-full` (Editor, SplitPaneLayout,
Connections, Settings, McpPage), so its height resolved against the full
height of <main> and ignored the ProductionBanner strip rendered above it
as a flex sibling. With a connection flagged as production the page was
therefore ~18px taller than the space left for it, and main's
overflow-hidden clipped the excess: the bottom of the results grid's
scroll container was cut off, slicing the last row in half.

Wrap the routed content in a `flex-1 min-h-0 min-w-0` container so it is a
properly sized flex item and `h-full` resolves against the space actually
remaining below the banner.
@kilo-code-bot

kilo-code-bot Bot commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Files Reviewed (1 file)
  • src/components/layout/MainLayout.tsx

Reviewed by glm-5.2 · Input: 16.2K · Output: 1.1K · Cached: 107.6K

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.

[Bug]: Last line of datagrid cut off if production environment for connection is active

1 participant