Skip to content

Commit 61e7c5e

Browse files
committed
fix(web): left-align bidirectional search snippets
1 parent 21421ab commit 61e7c5e

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

‎apps/web/src/components/ThreadSearchMatch.tsx‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,9 @@ export function SearchMatchHintLine(props: { hint: SearchMatchHint }) {
2525
return (
2626
<span className="flex min-w-0 items-baseline gap-1 text-xs text-muted-foreground/85" dir="ltr">
2727
<span className="shrink-0 text-muted-foreground/70">{props.hint.label}:</span>
28-
<span className="min-w-0 flex-1 truncate text-start" dir={textDirection(props.hint.text)}>
28+
<bdi className="min-w-0 flex-1 truncate text-left" dir={textDirection(props.hint.text)}>
2929
<HighlightedSearchText text={props.hint.text} ranges={props.hint.ranges} />
30-
</span>
30+
</bdi>
3131
</span>
3232
);
3333
}
@@ -45,12 +45,12 @@ export function ThreadSearchMatchExcerpt(props: {
4545
<span className={`shrink-0 ${isUser ? "text-info-foreground" : "text-success-foreground"}`}>
4646
{isUser ? "You:" : "Agent:"}
4747
</span>
48-
<span className="min-w-0 flex-1 truncate text-start" dir={textDirection(props.match.snippet)}>
48+
<bdi className="min-w-0 flex-1 truncate text-left" dir={textDirection(props.match.snippet)}>
4949
<HighlightedSearchText
5050
text={props.match.snippet}
5151
ranges={findSearchTokenRanges(props.match.snippet, props.match.query)}
5252
/>
53-
</span>
53+
</bdi>
5454
</span>
5555
);
5656
}

0 commit comments

Comments
 (0)