Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "drover",
"productName": "Drover",
"version": "0.1.25",
"version": "0.1.26",
"description": "A native workspace for Herdr-powered agents, terminals, worktrees, and live sessions.",
"main": ".vite/build/main.js",
"private": true,
Expand Down
31 changes: 31 additions & 0 deletions src/renderer/chat/ConversationChatPanel.presentation.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -683,6 +683,37 @@ describe('ConversationChatPanel turn projection', () => {
expect(document.querySelector('[data-slot="active-plan"]')).toBeNull();
});

it('settles Working when a settled turn still carries a stale running tool', async () => {
setup(
page([
{
id: 'completed',
sequence: 1,
provider: 'pi',
session_id: 'session-1',
turn_id: 'turn-1',
type: 'turn_state',
state: 'completed',
duration_ms: 6_000,
},
{
id: 'stale-tool',
sequence: 2,
provider: 'pi',
session_id: 'session-1',
turn_id: 'turn-1',
type: 'tool_activity',
action: 'bash',
label: 'bash',
status: 'running',
},
]),
);

await screen.findByText('running');
expect(screen.queryByRole('status')).not.toBeInTheDocument();
});

it('folds settled work while keeping the rendered final answer prominent and visible', async () => {
setup(
page([
Expand Down
9 changes: 8 additions & 1 deletion src/renderer/chat/ConversationChatPanel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -793,6 +793,13 @@ function ConversationChatPanelForPane({
const runningTool = store.items.some(
(item) => item.type === 'tool_activity' && item.status === 'running',
);
// A provider can leave a tool in `running` when its terminal event is
// missed, so a settled latest turn must not stay pinned on a stale tool.
const latestTurnSettled =
latestState !== undefined &&
(latestState.state === 'completed' ||
latestState.state === 'interrupted' ||
latestState.state === 'failed');
if (latestState?.state === 'started') {
let finalAnswerReceived = false;
for (let index = latestStateIndex + 1; index < store.items.length; index += 1) {
Expand Down Expand Up @@ -820,7 +827,7 @@ function ConversationChatPanelForPane({
plan,
};
}
if (runningTool) {
if (runningTool && !latestTurnSettled) {
return {
startedMs: statusStartedMs,
plan,
Expand Down