Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .changeset/composer-selection-pill-row.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
"@inkeep/open-knowledge-app": patch
---

Ask AI composer: the captured-selection chip now shares one wrapping row with the file-context chips instead of stacking on its own line above them. The chips sit on the same row and only break to a second line when they overflow the available width. The selection chip continues to truncate a long file name so its label no longer spills past the chip's edge, and the expanded selection preview still drops to its own line beneath the chips.
Ask AI composer: the captured-selection chip now shares one wrapping row with the file-context chips instead of stacking on its own line above them. The chips sit on the same row and only break to a second line when they overflow the available width. The selection chip now truncates a long file name (capped at 16rem) so its label no longer spills past the chip's border, and the expanded selection preview still drops to its own line beneath the chips.
9 changes: 7 additions & 2 deletions packages/app/src/components/BottomComposer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -450,8 +450,13 @@ export function BottomComposer({
>
{pinnedSelection ? (
<>
{/* `title` recovers the full label once it ellipsis-truncates (mirrors
the file chip's `title`). The cap sits a touch wider than the file
chip's max-w-[14rem] because selection labels carry a `(range)`
suffix. */}
<span
data-testid="composer-selection-pill"
title={pinnedLabel}
className="group/chip inline-flex max-w-[16rem] items-center gap-1 rounded-md border bg-muted/40 py-0.5 pr-1.5 pl-1 text-muted-foreground text-xs"
>
{/* The LEADING glyph IS the remove control (mirrors the file chip):
Expand Down Expand Up @@ -491,9 +496,9 @@ export function BottomComposer({
}
onClick={() => setSelectionExpanded((open) => !open)}
data-testid="composer-selection-peek"
className="h-auto min-h-0 min-w-0 justify-start truncate px-0 py-0 text-left font-normal text-muted-foreground text-xs hover:bg-transparent hover:text-foreground"
className="h-auto min-h-0 min-w-0 shrink justify-start px-0 py-0 text-left font-normal text-muted-foreground text-xs hover:bg-transparent hover:text-foreground"
>
{pinnedLabel}
<span className="min-w-0 truncate">{pinnedLabel}</span>
</Button>
</span>
{selectionExpanded && pinnedPreview !== '' ? (
Expand Down