Skip to content

fix(agent-manager): show local prompt feedback immediately - #11103

Merged
marius-kilocode merged 2 commits into
mainfrom
fix/local-prompt-feedback
Jun 11, 2026
Merged

fix(agent-manager): show local prompt feedback immediately#11103
marius-kilocode merged 2 commits into
mainfrom
fix/local-prompt-feedback

Conversation

@marius-kilocode

Copy link
Copy Markdown
Collaborator

The OpenCode v1.14.48 integration in #10996 made cold session creation slow enough to expose a gap in Agent Manager's Local tab state: the first prompt cleared the composer, but the transcript and progress indicator waited for the backend to create the real session. This left the UI appearing unresponsive for several seconds.

Render the prompt and submission progress against the pending Local session immediately, then transfer that optimistic state to the real session when creation completes. The handoff uses the originating draft ID so background session creation cannot replace or focus the wrong tab, and failed submissions clean up the pending state.

@marius-kilocode
marius-kilocode enabled auto-merge (squash) June 11, 2026 09:52
return (
<div class="working-indicator-slot">
<Show when={session.status() !== "idle" && !blocked()}>
<Show when={session.submitting() || (session.status() !== "idle" && !blocked())}>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SUGGESTION: Elapsed timer won't count during the draft-submission phase

The elapsed createEffect at line 22–38 gates itself on status === 'idle' || !since (line 26). When submitting() is true but no real session has been created yet, status() reads only currentSessionID() (not the draftSessionID fallback), so it returns 'idle' and the timer short-circuits immediately. The spinner will show (submitting() === true) but the elapsed counter stays at 0s.

This is a minor cosmetic gap rather than a logic bug — the busySince timestamp is correctly set via startSubmission — but users will see the spinner appear without the elapsed timer counting until the backend session is created and the status transitions away from 'idle'.

Consider updating the createEffect guard to also continue when submitting() is true:

if ((status === 'idle' && !session.submitting()) || !since) {
  setElapsed(0)
  return
}

@kilo-code-bot

kilo-code-bot Bot commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

Code Review Summary

Status: 1 Issue Found | Recommendation: Address before merge

Overview

Severity Count
CRITICAL 0
WARNING 0
SUGGESTION 1
Issue Details (click to expand)

SUGGESTION

File Line Issue
packages/kilo-vscode/webview-ui/src/components/shared/WorkingIndicator.tsx 101 Elapsed timer won't count during the draft-submission phase
Other Observations (not in diff)

session.tsxconfirmSubmissions safe during Map iteration

The for...of loop in confirmSubmissions (line 466) deletes entries from pendingSubmissions while iterating. In JavaScript, deleting from a Map during a for...of iteration is well-specified and safe — entries added after iteration began are visited, but deleted entries are skipped. This is correct behaviour.

WorkingIndicator.tsx — elapsed timer gap (cosmetic)

As noted in the inline comment: status() reads only currentSessionID() (no draft fallback), while busySince() was updated to also read draftSessionID(). During the pending-session window status() returns 'idle', so the elapsed counter stays at 0s even though busySince() has a timestamp and the spinner is shown. This is a cosmetic inconsistency — the elapsed time display stays frozen at 0s until the backend session is created. The createEffect guard at line 26 could check session.submitting() to start counting immediately.

Files Reviewed (7 files)
  • .changeset/quick-local-prompts.md
  • packages/kilo-docs/public/img/screenshot-tests/kilo-vscode/visual-regression/chat/message-list-subagent-to-queued-user-spacing-chromium-linux.png
  • packages/kilo-docs/public/img/screenshot-tests/kilo-vscode/visual-regression/chat/message-list-tool-to-queued-user-spacing-chromium-linux.png
  • packages/kilo-vscode/webview-ui/agent-manager/AgentManagerApp.tsx — 0 issues
  • packages/kilo-vscode/webview-ui/src/components/shared/WorkingIndicator.tsx — 1 issue
  • packages/kilo-vscode/webview-ui/src/context/session.tsx — 0 issues
  • packages/kilo-vscode/webview-ui/src/types/messages/extension-messages.ts (context read)

Fix these issues in Kilo Cloud


Reviewed by claude-4.6-sonnet-20260217 · 1,222,162 tokens

Review guidance: REVIEW.md from base branch main

@marius-kilocode
marius-kilocode merged commit 8b2a100 into main Jun 11, 2026
23 checks passed
@marius-kilocode
marius-kilocode deleted the fix/local-prompt-feedback branch June 11, 2026 10:11
t7tran pushed a commit to t7tran/kilocode that referenced this pull request Aug 14, 2026
…11103)

* fix(agent-manager): show initial prompt feedback immediately

* chore: update kilo-vscode visual regression baselines

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants