Repository navigation
fix(clients): show when a thread title is regenerating #13905
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 |
|---|---|---|
|
|
@@ -60,6 +60,7 @@ import { | |
| PinIcon, | ||
| PinOffIcon, | ||
| PlusIcon, | ||
| RefreshCwIcon, | ||
| SettingsIcon, | ||
| ShieldQuestionIcon, | ||
| SquarePenIcon, | ||
|
|
@@ -1513,6 +1514,16 @@ const SidebarThreadRow = memo(function SidebarThreadRow(props: { | |
| </span> | ||
| ); | ||
| const accessibleTitle = isRenaming ? null : <span className="sr-only">{thread.title}</span>; | ||
| // Static on purpose: a spinning icon repaints every frame for the whole | ||
| // regeneration, and the dimmed title already reads as "in flight". | ||
| const titleRegenerationIndicator = isRegeneratingTitle ? ( | ||
| <span className="inline-flex shrink-0 items-center text-muted-foreground"> | ||
| <RefreshCwIcon aria-hidden className="size-3.5" /> | ||
| <span role="status" className="sr-only"> | ||
| Regenerating title | ||
| </span> | ||
|
Comment on lines
+1522
to
+1524
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 🔎 Supported by static analysis🏁 Script executed: sed -n '1510,1535p' apps/web/src/components/Sidebar.tsx
sed -n '1605,1665p' apps/web/src/components/Sidebar.tsx
sed -n '1760,1805p' apps/web/src/components/Sidebar.tsx
sed -n '1935,1960p' apps/web/src/components/Sidebar.tsx
git diff --unified=12 38969148a23e7a422045be023627c7fbbddf7503 9bc548896d10b29aea122020d27ac53ed75afa40 -- apps/web/src/components/Sidebar.tsxRepository: pingdotgg/t3code Length of output: 14020 🌐 Web query:
💡 Result: Move Both row roots use 🤖 Prompt for AI Agents |
||
| </span> | ||
| ) : null; | ||
|
|
||
| // Stacks show their layer count; multiple unrelated links show their total count. | ||
| // Either opens the thread's pull requests tab; a single PR link opens that PR and still | ||
|
|
@@ -1618,7 +1629,6 @@ const SidebarThreadRow = memo(function SidebarThreadRow(props: { | |
| aria-label={accessibility.label} | ||
| aria-current={accessibility.current} | ||
| data-testid="sidebar-row-slim" | ||
| aria-busy={isRegeneratingTitle || undefined} | ||
| className={cn(rowSurfaceClassName, "flex h-9 items-center gap-2.5 px-2.5")} | ||
| onClick={handleClick} | ||
| onDoubleClick={handleDoubleClick} | ||
|
|
@@ -1642,12 +1652,8 @@ const SidebarThreadRow = memo(function SidebarThreadRow(props: { | |
| {draftIndicator} | ||
| {title} | ||
| {pinIndicator} | ||
| {titleRegenerationIndicator} | ||
| {terminalStatusIcon} | ||
| {isRegeneratingTitle ? ( | ||
| <span role="status" className="sr-only"> | ||
| Regenerating title | ||
| </span> | ||
| ) : null} | ||
| {/* The PR badge stays outside the hover-fading slot: it must | ||
| remain visible AND clickable while the row is hovered. Only | ||
| the time/jump label yields to the settle affordance. */} | ||
|
|
@@ -1774,7 +1780,6 @@ const SidebarThreadRow = memo(function SidebarThreadRow(props: { | |
| aria-label={accessibility.label} | ||
| aria-current={accessibility.current} | ||
| data-testid="sidebar-row-card" | ||
| aria-busy={isRegeneratingTitle || undefined} | ||
| className={rowSurfaceClassName} | ||
| onClick={handleClick} | ||
| onDoubleClick={handleDoubleClick} | ||
|
|
@@ -1939,13 +1944,9 @@ const SidebarThreadRow = memo(function SidebarThreadRow(props: { | |
| </span> | ||
| )} | ||
| </div> | ||
| <div className="mt-1 flex min-w-0"> | ||
| <div className="mt-1 flex min-w-0 items-center gap-1.5"> | ||
| {title} | ||
| {isRegeneratingTitle ? ( | ||
| <span role="status" className="sr-only"> | ||
| Regenerating title | ||
| </span> | ||
| ) : null} | ||
| {titleRegenerationIndicator} | ||
| </div> | ||
| <div className="mt-0.5 flex min-w-0 items-center gap-1.5 text-secondary-label text-xs"> | ||
| {/* Always the branch. The plan step used to take this slot while | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.