fix(layout): keep pages inside main when the production banner is shown - #684
Open
thomaswasle wants to merge 1 commit into
Open
fix(layout): keep pages inside main when the production banner is shown#684thomaswasle wants to merge 1 commit into
thomaswasle wants to merge 1 commit into
Conversation
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.
Contributor
Code Review SummaryStatus: No Issues Found | Recommendation: Merge Files Reviewed (1 file)
Reviewed by glm-5.2 · Input: 16.2K · Output: 1.1K · Cached: 107.6K |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
When the active connection's environment is set to
production, the last row ofthe 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>inMainLayoutis a flex column that holds theProductionBanner(
shrink-0) followed by the routed page. But the pages size themselves withh-full:src/pages/Editor.tsx—flex flex-col h-full bg-basesrc/components/layout/SplitPaneLayout.tsx—relative h-full w-fullsrc/pages/Connections.tsx,src/pages/Settings.tsx,src/pages/McpPage.tsxheight: 100%resolves against the full height of<main>, so it does notsubtract the ~18px the banner already consumed. The page renders taller than the
space left for it,
main'soverflow-hiddenclips the overflow at the bottom,and the bottom of the data grid's
overflow-autoscroll container — the lastrow — 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 aflex-1 min-h-0 min-w-0container. The wrapper is a correctly sized flex itemthat accounts for the banner, and the pages'
h-fullnow 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
environment = production—the last row now ends flush with the grid border and is fully scrollable.
tsc --noEmitandeslintclean.closes #682