Skip to content

Commit a17d2c7

Browse files
committed
fix(app-shell): the wide palette reads the shared dialog viewport gutter
The 768px cap the palette takes beside a record preview is wider than a 640px window holds with a margin; read DIALOG_VIEWPORT_GUTTER as every other wide dialog does, and list the palette in the gutter census. Claude-Session: https://claude.ai/code/session_01QsR2jV3scu6UYPb42n5okQ Co-authored-by: Claude <noreply@anthropic.com>
1 parent 50b1abd commit a17d2c7

2 files changed

Lines changed: 5 additions & 2 deletions

File tree

‎ui/packages/app-shell/src/chrome/CommandPalette.tsx‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ import {
3535
CommandItem,
3636
CommandList,
3737
CommandSeparator,
38+
DIALOG_VIEWPORT_GUTTER,
3839
ObjectIconTile,
3940
cn,
4041
} from '@object-ui/components';
@@ -947,9 +948,10 @@ function PaletteDialog({
947948
* The palette's width while a record preview is drawn beside the results
948949
* (objectstack#36286): room for two halves. The preview pane itself shows only
949950
* from a 45rem frame on (`PREVIEW_PANE_CLASS`), so a narrower window keeps the
950-
* results alone.
951+
* results alone. The cap (768px) is wider than the narrowest `sm` window can
952+
* hold with a margin, so it reads the shared viewport gutter (objectui#12603).
951953
*/
952-
const PALETTE_WIDE_CLASS = 'sm:max-w-3xl';
954+
const PALETTE_WIDE_CLASS = `sm:max-w-3xl ${DIALOG_VIEWPORT_GUTTER}`;
953955

954956
/**
955957
* The cmdk root's classes, as `CommandDialog` draws them, laid out as a grid

‎ui/packages/components/src/__tests__/dialogViewportGutterCensus-12603.test.ts‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -342,6 +342,7 @@ const sites: Site[] = scans.flatMap((s) => s.sites);
342342
* and is added here; a dialog that narrows leaves in the same commit.
343343
*/
344344
const WIDE_SITES: Array<[file: string, tags: string[]]> = [
345+
['packages/app-shell/src/chrome/CommandPalette.tsx', ['DialogContent']],
345346
['packages/app-shell/src/hooks/useActionModal.tsx', ['DialogContent']],
346347
['packages/app-shell/src/views/ActionParamDialog.tsx', ['DialogContent']],
347348
['packages/app-shell/src/views/FlowRunner.tsx', ['DialogContent']],

0 commit comments

Comments
 (0)