Skip to content

Fix command center permission prompt + layout picker in narrow windows#2012

Merged
adboio merged 1 commit intomainfrom
posthog-code/fix-command-center-narrow-permission-scroll
May 4, 2026
Merged

Fix command center permission prompt + layout picker in narrow windows#2012
adboio merged 1 commit intomainfrom
posthog-code/fix-command-center-narrow-permission-scroll

Conversation

@posthog
Copy link
Copy Markdown
Contributor

@posthog posthog Bot commented May 4, 2026

Summary

Reported by Sarah Sanders: in a 1x2 command-center layout, when the window is narrow / not fullscreen, the permission prompt buttons (Next / Submit) become unreachable because they fall below the cell's overflow-hidden boundary. Sarah also flagged "scrolling weirdness" when picking a different layout from the layout selector.

What changed

SessionView.tsx — the permission box at the bottom of a session pane previously had no height constraint and no scroll, so when its content was taller than the cell it just spilled out and got clipped. It now:

  • Caps at max-h-1/2 of the cell height with overflow-y-auto, so the user can scroll to reach the buttons when the cell is short.
  • In compact mode (used for command-center cells), drops the mx-auto + 750px maxWidth to mirror PromptInput's behavior, so it fills the narrow cell edge-to-edge.

CommandCenterToolbar.tsx — the layout Select.Content was using Radix's default position="item-aligned", which tries to keep the currently-selected option aligned with the trigger and shifts the popover up/down depending on which preset is selected. Switching to position="popper" gives a stable, predictable below-trigger placement.

Test plan

  • Resize the window narrow enough that a 1x2 command-center cell is short, drop a task into a cell, trigger a permission prompt (e.g. plan mode "Next" step), and confirm Next / Submit / Cancel are reachable (visible or scrollable to).
  • Confirm the permission box now scrolls internally instead of overflowing the cell.
  • Open the layout selector with 1x2 selected, then with 3x3 selected — confirm the popover appears below the trigger in both cases without "jumping".
  • Verify nothing changed visually for full-window task view (non-compact path still uses mx-auto p-2 + 750px max-width).

Created with PostHog Code

…dows

In a 1x2 (or other multi-cell) command center layout with a narrow window,
the permission prompt could grow taller than its cell. The buttons (Next /
Submit / Cancel) ended up below the cell's overflow-hidden boundary, leaving
the user unable to click them or scroll to reach them.

Cap the permission box at half the cell height with internal scroll, and
drop the centered max-width when in compact mode so it matches PromptInput.

Also switch the layout picker to position="popper" so the dropdown appears
below the trigger instead of trying to align the selected item, which was
causing jumpy scroll behavior when changing layouts.

Generated-By: PostHog Code
Task-Id: a8535e34-5b6b-43b0-a08f-3f58fa9d5e95
@adboio adboio self-assigned this May 4, 2026
@adboio adboio marked this pull request as ready for review May 4, 2026 21:10
@adboio adboio merged commit efc5217 into main May 4, 2026
15 checks passed
@adboio adboio deleted the posthog-code/fix-command-center-narrow-permission-scroll branch May 4, 2026 21:10
@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented May 4, 2026

Reviews (1): Last reviewed commit: "fix: command center permission prompt an..." | Re-trigger Greptile

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