Repository navigation
fix(clients): show when a thread title is regenerating #16914
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -9,7 +9,7 @@ import { | |
| isAtomCommandInterrupted, | ||
| squashAtomCommandFailure, | ||
| } from "@t3tools/client-runtime/state/runtime"; | ||
| import { ChevronDownIcon } from "lucide-react"; | ||
| import { ChevronDownIcon, RefreshCwIcon } from "lucide-react"; | ||
| import { | ||
| memo, | ||
| useCallback, | ||
|
|
@@ -46,6 +46,7 @@ interface ChatHeaderProps { | |
| activeThreadTitle: string; | ||
| /** Drafts have no server thread yet, so the title carries no action menu. */ | ||
| isServerThread: boolean; | ||
| isRegeneratingTitle: boolean; | ||
| activeProject: EnvironmentProject | null; | ||
| parentThreadLink: { threadId: ThreadId; title: string } | null; | ||
| onOpenThread: (threadId: ThreadId) => void; | ||
|
|
@@ -80,6 +81,7 @@ export const ChatHeader = memo(function ChatHeader({ | |
| activeThreadId, | ||
| activeThreadTitle, | ||
| isServerThread, | ||
| isRegeneratingTitle, | ||
| activeProject, | ||
| parentThreadLink, | ||
| onOpenThread, | ||
|
|
@@ -413,9 +415,20 @@ export const ChatHeader = memo(function ChatHeader({ | |
| /> | ||
| } | ||
| > | ||
| <h2 className="min-w-0"> | ||
| <h2 className={cn("min-w-0", isRegeneratingTitle && "opacity-55")}> | ||
| <WorkspaceBreadcrumbText>{activeThreadTitle}</WorkspaceBreadcrumbText> | ||
| </h2> | ||
| {isRegeneratingTitle ? ( | ||
| <> | ||
| <RefreshCwIcon | ||
| aria-hidden | ||
| className="size-3.5 shrink-0 text-muted-foreground" | ||
| /> | ||
| <span role="status" className="sr-only"> | ||
| Regenerating title | ||
| </span> | ||
|
Comment on lines
+427
to
+429
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win Move the status region outside the title button. Base UI composes these children into the supplied button. Browsers expose button descendants as presentational, so the nested 🤖 Prompt for AI Agents |
||
| </> | ||
| ) : null} | ||
| <ChevronDownIcon | ||
| aria-hidden | ||
| data-thread-title-chevron | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
Expose the regeneration status outside the row button.
titleRegenerationIndicatorplacesrole="status"inside the row’srole="button"subtree. ARIA maps button descendants as presentational, so assistive technology does not receive the nested status role. The row’s explicitaria-labelalso omits regeneration. Move the live region outside the button subtree. (w3.org)🤖 Prompt for AI Agents