fix(permissions): let long approval prompts scroll to their controls#3080
Draft
posthog[bot] wants to merge 1 commit into
Draft
fix(permissions): let long approval prompts scroll to their controls#3080posthog[bot] wants to merge 1 commit into
posthog[bot] wants to merge 1 commit into
Conversation
The pending-permission region in SessionView used `shrink-0` together with `overflow-y-auto`. Because a non-shrinking flex item keeps its full content height, `overflow-y-auto` never engaged: when a command was long enough that the prompt exceeded the pane, the approve/deny controls were pushed below the visible area with no way to scroll to them. Make the region shrinkable (`shrink`) so it collapses to the available pane height and its `overflow-y-auto` engages, keeping the controls reachable. The conversation scroller above is `flex-1` with basis 0, so it yields space first and the prompt only shrinks once it would otherwise overflow. Generated-By: PostHog Code Task-Id: 84a6c574-786a-49ea-9965-fc6eb972822d
|
React Doctor found no issues in the changed files. 🎉 Reviewed by React Doctor for commit |
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
In a cloud run, when a command needs approval and its text is long, the approval prompt fills the pane and the approve/deny choices render below the visible area with no way to scroll to them. Reported for a Codex/GPT cloud run: the controls were unreachable and the only workaround was to switch tasks, navigate back, and press enter.
Changes
The pending-permission region in
SessionViewcombinedshrink-0withoverflow-y-auto— a contradiction. A non-shrinking flex item keeps its full content height, sooverflow-y-autonever engaged; once the prompt exceeded the pane, the controls at the bottom were clipped with no scroll.The region is now shrinkable (
shrink), so it collapses to the available pane height and itsoverflow-y-autoengages, keeping the approve/deny controls reachable. The conversation scroller above it isflex-1(basis 0) and yields space first, so the prompt only shrinks once it would otherwise overflow the pane — normal-length prompts are unchanged.How did you test this?
Reproduced the exact
SessionViewbottom-region flex layout (aflex-1scroller above the permission region, in a short pane) in Storybook with a long command, and drove it with a headless browser, measuring the position of the last control ("No, keep working") relative to the pane:shrink-0): the region is not a scroll container. After scrolling everything possible, the control sits at y≈275px, below the 240px pane — clipped and unreachable (matches the report's "half a line visible" symptom).shrink): the region becomes a scroll container (scrollHeight 341 > clientHeight 238). Scrolling brings the same control to y≈176px, inside the pane — all three options and the keyboard-hint footer are reachable.Biome check passes on the changed file.
Automatic notifications
Created with PostHog Code from an inbox report.