Skip to content

Commit a100bd3

Browse files
committed
Conversations panel: labeled New conversation and Search rows, Pinned and Recents, status under the title
- New conversation is a row with its name and ⇧N, not an unlabeled icon in the header. - Search is a row with ⌘K that opens the command palette. The palette already searches every conversation on the server, so the panel's own search box and its results list are removed. - The list is grouped under small muted labels: Pinned (when anything is pinned), then Recents. - A row's age ("2w") shows on hover or keyboard focus. A screen reader still reads it. - While a Bot works, the row says so on a muted line under its text: "Working", "Waiting on <Bot>" for a Bot it asked, or "Running a routine". Read from the fields the roster already has (busy, work, delegated tasks). No API change.
1 parent 54f25d7 commit a100bd3

12 files changed

Lines changed: 337 additions & 485 deletions

‎CHANGELOG.md‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,15 @@ Newest first. `Unreleased` is what is on `main` and not yet tagged.
5656
long list never meets a proxy's limit on an address. The web app uses the new operations, and
5757
falls back to the old ones on a server from before them.
5858

59+
**The conversation list.**
60+
61+
- **New conversation and Search are labeled rows, and the list has Pinned and Recents.** The top of
62+
the Conversations panel has New conversation (⇧N), Search (⌘K) and Artifacts. Search opens the
63+
command palette, which searches every conversation, so the search box in the panel is gone.
64+
Pinned conversations sit under Pinned, the rest under Recents. While a Bot works, its
65+
conversation says so on a muted line under the title, such as "Working" or "Waiting on Research
66+
Bot". How long ago a conversation was used shows when you point at it.
67+
5968
## 1.2.7
6069

6170
**Before upgrading.**

‎app/src/components/app-sidebar/app-sidebar.tsx‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,6 @@ export {
1313
isUnread,
1414
matchingChannels,
1515
pinnedFirst,
16-
SEARCH_DEBOUNCE_MS,
17-
SEARCH_HINT,
18-
SEARCH_SCOPE,
1916
} from "./conversations-panel";
2017

2118
/**

‎app/src/components/app-sidebar/bots-panel.tsx‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ import {
5858
isWorking,
5959
NONE_DELEGATING,
6060
pinnedFirst,
61+
workStatus,
6162
} from "./conversations-panel";
6263

6364
/** Where a Bot's row hands up that its conversations are held back, by Bot, for the panel to say once. */
@@ -172,6 +173,7 @@ function BotConversations({
172173
{pinnedFirst(conversations.data).map((channel) => (
173174
<Channel
174175
busy={isWorking(channel, delegating)}
176+
status={workStatus(channel, delegating) ?? undefined}
175177
canRename={channel.canRename ?? false}
176178
channelId={channel.id}
177179
data-slot="bot-conversation-row"

‎app/src/components/app-sidebar/channel-item-content.tsx‎

Lines changed: 46 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,16 @@ import type { MessageListEmphasis } from "@/lib/settings/message-list";
66
/**
77
* Shared by live conversations and the appearance preference previews.
88
*
9-
* `view` picks the row's shape. Detailed (the default here) is two lines: the Bot's name, its time
10-
* and marks, then the title. Compact is one line, as Claude's sidebar lists chats: a small avatar
11-
* and the title, then the time, the unread dot and the pin at the right. It draws no Bot name, and
12-
* says it to a screen reader.
9+
* `view` picks the row's shape. Detailed (the default here) is two lines: the Bot's name and its
10+
* marks, then the title. Compact is one line, as Claude's sidebar lists chats: a small avatar and
11+
* the title, then the unread dot and the pin at the right. It draws no Bot name, and says it to a
12+
* screen reader.
13+
*
14+
* While its Bot works, a row gets one more line under its text: the Bot's live status, muted, as
15+
* the Grok Bot app lists a Bot under its name. The status is `status`, or "Working" while `busy`.
16+
*
17+
* The time since the conversation was last used shows only while the pointer is on the row or the
18+
* row has keyboard focus (`group/row` on the row's link). At rest a screen reader still reads it.
1319
*/
1420
export function ChannelItemContent({
1521
participantIds,
@@ -19,6 +25,7 @@ export function ChannelItemContent({
1925
lastMessageAt,
2026
emphasis,
2127
busy = false,
28+
status,
2229
unread = false,
2330
pinned = false,
2431
revealing = false,
@@ -32,6 +39,8 @@ export function ChannelItemContent({
3239
lastMessageAt?: string;
3340
emphasis: MessageListEmphasis;
3441
busy?: boolean;
42+
/** What the Bot is doing, said under the row's text. "Working" while `busy` if not given. */
43+
status?: string;
3544
unread?: boolean;
3645
pinned?: boolean;
3746
revealing?: boolean;
@@ -52,18 +61,31 @@ export function ChannelItemContent({
5261
/>
5362
) : null;
5463
/*
55-
* While a Bot works on it, the row says so where its time goes, in the scheme's color for what is
56-
* working: said as well as shown by the orb, and the time is news only once the work is done.
64+
* The age is for the row a person is looking at, so it waits for the pointer or the keyboard. Out
65+
* of sight it stays in the accessibility tree (`sr-only`), so a screen reader still says it.
5766
*/
58-
const time = busy ? (
59-
<span className="shrink-0 whitespace-nowrap font-medium text-[12px] text-success leading-4">
60-
Working
61-
</span>
62-
) : (
63-
<span className="shrink-0 whitespace-nowrap text-[12px] leading-4 text-muted-foreground/70">
67+
const time = lastMessageAt ? (
68+
<span
69+
className="sr-only shrink-0 whitespace-nowrap text-[12px] leading-4 text-muted-foreground/70 group-hover/row:not-sr-only group-focus-visible/row:not-sr-only"
70+
data-slot="last-used"
71+
>
6472
{lastMessageAt}
6573
</span>
66-
);
74+
) : null;
75+
/*
76+
* The Bot's live state, a muted line of its own under the text. The orb moves as well, so the
77+
* line stays quiet: no color, no weight.
78+
*/
79+
const statusText = status ?? (busy ? "Working" : undefined);
80+
const statusLine = statusText ? (
81+
<div
82+
className="mt-px truncate text-[12px] leading-4 text-muted-foreground"
83+
data-slot="status"
84+
title={statusText}
85+
>
86+
{statusText}
87+
</div>
88+
) : null;
6789
const caret = revealing ? (
6890
<span className="ml-0.5 inline-block h-3 w-px translate-y-px bg-foreground/70 align-middle" />
6991
) : null;
@@ -87,13 +109,16 @@ export function ChannelItemContent({
87109
{avatar ? (
88110
<span className="sr-only" data-slot="bot-name">{`${name}, `}</span>
89111
) : null}
90-
<span
91-
className={`min-w-0 flex-1 truncate text-sm leading-5 tracking-[-1%] ${unread ? "font-semibold" : "font-normal"}`}
92-
title={title}
93-
>
94-
{displayedTitle}
95-
{caret}
96-
</span>
112+
<div className="min-w-0 flex-1">
113+
<div
114+
className={`truncate text-sm leading-5 tracking-[-1%] ${unread ? "font-semibold" : "font-normal"}`}
115+
title={title}
116+
>
117+
{displayedTitle}
118+
{caret}
119+
</div>
120+
{statusLine}
121+
</div>
97122
{time}
98123
{unreadDot}
99124
{pin}
@@ -132,6 +157,7 @@ export function ChannelItemContent({
132157
{displayedTitle}
133158
{caret}
134159
</div>
160+
{statusLine}
135161
</div>
136162
</div>
137163
);

‎app/src/components/app-sidebar/channel.tsx‎

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ export const Channel = memo(function Channel({
4242
canRename,
4343
unread,
4444
busy,
45+
status,
4546
emphasis,
4647
view = "detailed",
4748
avatar = true,
@@ -60,6 +61,8 @@ export const Channel = memo(function Channel({
6061
canRename: boolean;
6162
unread: boolean;
6263
busy: boolean;
64+
/** What its Bot is doing while it works, said under the row's text. See `ChannelItemContent`. */
65+
status?: string;
6366
emphasis: MessageListEmphasis;
6467
/** One line or two: see `ChannelItemContent`. */
6568
view?: ConversationView;
@@ -108,7 +111,8 @@ export const Channel = memo(function Channel({
108111
data-slot={slot}
109112
type="button"
110113
className={cn(
111-
"flex flex-row px-2.5 gap-2 items-center w-full hover:bg-foreground/5 rounded-lg [content-visibility:auto]",
114+
// `group/row`: the row's age shows while the pointer or the keyboard is on it.
115+
"group/row flex flex-row px-2.5 gap-2 items-center w-full hover:bg-foreground/5 rounded-lg [content-visibility:auto]",
112116
view === "compact"
113117
? "py-1.5 [contain-intrinsic-size:auto_2rem]"
114118
: "py-2 [contain-intrinsic-size:auto_3.25rem]",
@@ -125,6 +129,7 @@ export const Channel = memo(function Channel({
125129
lastMessageAt={lastMessageAt}
126130
emphasis={emphasis}
127131
busy={busy}
132+
status={status}
128133
unread={unread}
129134
pinned={pinned}
130135
revealing={revealed.typing}

0 commit comments

Comments
 (0)