Skip to content

Commit 365011e

Browse files
committed
fix(web): banner titles truncate and stay announced
Long titles truncate instead of overflowing into the controls. A single remaining agent keeps its activity after the list was opened. The banner has a status region again, and rows expose their activity to screen readers.
1 parent 84ee58c commit 365011e

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

‎apps/web/src/components/chat/BackgroundWorkBanner.tsx‎

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,6 @@ function Rows({
268268
) : (
269269
<button
270270
type="button"
271-
aria-label={`Open subagent ${row.label}`}
272271
className={cn(
273272
rowClassName,
274273
"cursor-pointer hover:bg-accent focus-visible:outline-2 focus-visible:-outline-offset-2 focus-visible:outline-ring",
@@ -311,7 +310,7 @@ export function BackgroundWorkBanner(props: {
311310
<HeaderIcon rows={presentation.rows} />
312311
</ComposerBanner.Icon>
313312
<ComposerBanner.Content className="whitespace-nowrap">
314-
<span className="min-w-0 shrink-0 truncate font-medium leading-7 sm:leading-6">
313+
<span className="min-w-0 truncate font-medium leading-7 sm:leading-6">
315314
{single?.kind === "command" ? (
316315
<>
317316
{presentation.waiting ? "Waiting on " : "Running "}
@@ -321,7 +320,7 @@ export function BackgroundWorkBanner(props: {
321320
presentation.title
322321
)}
323322
</span>
324-
{description && !expanded ? (
323+
{description && (single || !expanded) ? (
325324
<span className={cn("w-0 min-w-0 grow truncate @max-[400px]:sr-only", mutedText)}>
326325
{description}
327326
</span>
@@ -343,6 +342,9 @@ export function BackgroundWorkBanner(props: {
343342
);
344343
return (
345344
<div data-background-work-banner="true">
345+
<span role="status" className="sr-only">
346+
{presentation.title}
347+
</span>
346348
<div className="flex items-center">
347349
{single ? (
348350
<ComposerBanner.Row className="flex-1">{header}</ComposerBanner.Row>

0 commit comments

Comments
 (0)