diff --git a/desktop/src/features/chats/ui/ChatWorkPanel.tsx b/desktop/src/features/chats/ui/ChatWorkPanel.tsx
index 5d7a7fe373..baf841c359 100644
--- a/desktop/src/features/chats/ui/ChatWorkPanel.tsx
+++ b/desktop/src/features/chats/ui/ChatWorkPanel.tsx
@@ -119,79 +119,84 @@ export function ChatWorkPanel({
/>
{preview ? (
-
- ) : null}
- {preview ? (
-
-
-
-
- ·
-
-
-
- {openThreads} open comment{openThreads === 1 ? "" : "s"}
-
-
-
-
- {checks && checks.runs.length > 0 ? (
-
- {dedupeRunKeys(checks.runs).map(({ key, run }) => (
- -
-
-
- {run.name}
-
-
- ))}
-
- ) : (
-
- No checks reported yet.
+
+
+
+
+
+ ·
- )}
-
-
-
-
-
+
+
+ {openThreads} open comment{openThreads === 1 ? "" : "s"}
+
+
+
+
+ {checks && checks.runs.length > 0 ? (
+
+ {dedupeRunKeys(checks.runs).map(({ key, run }) => (
+ -
+
+
+ {run.name}
+
+
+ ))}
+
+ ) : (
+
+ No checks reported yet.
+
+ )}
+
+
+
+
+
+
) : null}
diff --git a/desktop/src/features/chats/ui/ChatsScreen.tsx b/desktop/src/features/chats/ui/ChatsScreen.tsx
index 4f8eb68678..4317c766af 100644
--- a/desktop/src/features/chats/ui/ChatsScreen.tsx
+++ b/desktop/src/features/chats/ui/ChatsScreen.tsx
@@ -310,17 +310,26 @@ export function ChatsScreen({
);
const archiveChatMutation = useArchiveChatMutation();
- // Latest PR link the chat's agent posted — drives the header toggle and
- // the top-right work module in the conversation.
+ // Latest PR link ANY agent in the chat posted — drives the header toggle
+ // and the top-right work module. Matching only the default agent missed
+ // PRs from additional agents added to the chat.
const agentPullRequestHref = React.useMemo(() => {
- const agentPubkey = metadata?.defaultAgentPubkey ?? defaultAgent?.pubkey;
- if (!agentPubkey) {
+ const agentKeys = new Set(
+ (managedAgentsQuery.data ?? []).map((agent) =>
+ normalizePubkey(agent.pubkey),
+ ),
+ );
+ const configuredAgent =
+ metadata?.defaultAgentPubkey ?? defaultAgent?.pubkey;
+ if (configuredAgent) {
+ agentKeys.add(normalizePubkey(configuredAgent));
+ }
+ if (agentKeys.size === 0) {
return null;
}
- const agentKey = normalizePubkey(agentPubkey);
for (let index = messages.length - 1; index >= 0; index--) {
const message = messages[index];
- if (normalizePubkey(message.pubkey) !== agentKey) {
+ if (!agentKeys.has(normalizePubkey(message.pubkey))) {
continue;
}
const preview = extractSupportedLinkPreviews(message.content).find(
@@ -331,7 +340,12 @@ export function ChatsScreen({
}
}
return null;
- }, [defaultAgent?.pubkey, messages, metadata?.defaultAgentPubkey]);
+ }, [
+ defaultAgent?.pubkey,
+ managedAgentsQuery.data,
+ messages,
+ metadata?.defaultAgentPubkey,
+ ]);
// null = auto: open once the agent has produced a PR, closed otherwise.
// A click stores an explicit preference for the current chat.
const [workPanelPreference, setWorkPanelPreference] = React.useState<
diff --git a/desktop/src/shared/styles/globals/animations.css b/desktop/src/shared/styles/globals/animations.css
index 1befca1fd4..6c7daa537b 100644
--- a/desktop/src/shared/styles/globals/animations.css
+++ b/desktop/src/shared/styles/globals/animations.css
@@ -263,6 +263,31 @@
}
}
+/* Work-panel content arriving (the agent posted a PR): a gentle pop —
+ slight scale + fade, matching the message entrance feel. */
+@keyframes buzz-work-card-in {
+ from {
+ opacity: 0;
+ transform: scale(0.96);
+ }
+
+ to {
+ opacity: 1;
+ transform: scale(1);
+ }
+}
+
+.buzz-work-card-in {
+ animation: buzz-work-card-in 260ms cubic-bezier(0.22, 1, 0.36, 1) both;
+ transform-origin: top center;
+}
+
+@media (prefers-reduced-motion: reduce) {
+ .buzz-work-card-in {
+ animation: none;
+ }
+}
+
.buzz-poof-layer {
inset: 0;
overflow: hidden;