Skip to content

Commit fd4fcc7

Browse files
committed
fix(app): address prompt overflow review
Keep tooltip-wrapped prompt controls from shrinking so the control strip scrolls instead of overlapping Submit. Correct the directional chevrons and centralize the complete model/variant sizing classes shared by app and session-ui.
1 parent fa98e0f commit fd4fcc7

2 files changed

Lines changed: 6 additions & 6 deletions

File tree

‎packages/app/src/components/prompt-input-v2.tsx‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -517,7 +517,7 @@ function PromptInputV2ModelControl(props: {
517517
data-control-type="dialog"
518518
variant="ghost-muted"
519519
size="normal"
520-
class={`min-w-0 ${promptInputV2ControlClass} group`}
520+
class={`${promptInputV2ControlClass} group`}
521521
classList={{ "animate-in fade-in": shouldAnimate() }}
522522
style={{ height: "28px" }}
523523
onClick={props.onUnpaidClick}
@@ -534,7 +534,7 @@ function PromptInputV2ModelControl(props: {
534534
variant="ghost-muted"
535535
size="normal"
536536
style={{ height: "28px" }}
537-
class={`min-w-0 ${promptInputV2ControlClass} group`}
537+
class={`${promptInputV2ControlClass} group`}
538538
classList={{ "animate-in fade-in": shouldAnimate() }}
539539
data-action="prompt-model"
540540
data-control-type="popover"

‎packages/session-ui/src/v2/components/prompt-input/index.tsx‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ export type {
3434

3535
export type PromptInputV2Mode = "normal" | "shell"
3636

37-
export const promptInputV2ControlClass = "max-w-[220px] shrink-0 justify-start ![font-weight:440]"
37+
export const promptInputV2ControlClass = "min-w-0 max-w-[220px] shrink-0 justify-start ![font-weight:440]"
3838

3939
export type PromptInputV2Props = {
4040
controller: PromptInputV2Interaction
@@ -243,7 +243,7 @@ export function PromptInputV2(props: PromptInputV2Props) {
243243
<div
244244
ref={setControls}
245245
data-slot="prompt-controls"
246-
class="flex min-w-0 items-center gap-1 overflow-x-auto no-scrollbar"
246+
class="flex w-full min-w-0 items-center gap-1 overflow-x-auto no-scrollbar [&>*]:shrink-0"
247247
aria-hidden={state.mode === "shell"}
248248
inert={state.mode === "shell" ? true : undefined}
249249
style={buttons()}
@@ -309,7 +309,7 @@ export function PromptInputV2(props: PromptInputV2Props) {
309309
aria-label={i18n.t("ui.promptInput.scrollControlsLeft")}
310310
onClick={() => scrollControls(-1)}
311311
>
312-
<IconV2 name="chevron-down" class="-rotate-90" />
312+
<IconV2 name="chevron-down" class="rotate-90" />
313313
</button>
314314
</Show>
315315
<Show when={controlsScroll().right}>
@@ -320,7 +320,7 @@ export function PromptInputV2(props: PromptInputV2Props) {
320320
aria-label={i18n.t("ui.promptInput.scrollControlsRight")}
321321
onClick={() => scrollControls(1)}
322322
>
323-
<IconV2 name="chevron-down" class="rotate-90" />
323+
<IconV2 name="chevron-down" class="-rotate-90" />
324324
</button>
325325
</Show>
326326
</div>

0 commit comments

Comments
 (0)