Skip to content

fix(vscode): prevent empty queued messages - #13528

Merged
marius-kilocode merged 1 commit into
mainfrom
investigate-empty-queued-messages
Aug 28, 2026
Merged

fix(vscode): prevent empty queued messages#13528
marius-kilocode merged 1 commit into
mainfrom
investigate-empty-queued-messages

Conversation

@marius-kilocode

Copy link
Copy Markdown
Collaborator

What Problem This Solves

Queued follow-ups can show only a “Queued” label and a remove button, with no prompt text. The earlier fix in #13176 preserved text through metadata-only confirmation, but synthetic attachment context and partial message snapshots could still replace it.

Why This Change Was Made

Attachments are expanded into synthetic text before the visible prompt part arrives. Matching only by part type mistakes this internal context for confirmation of the user’s text. A snapshot can also observe only the first persisted parts.

Preserve unresolved optimistic parts through both event and snapshot reconciliation. Do not discard already-confirmed text when a stale prefix resolves the last pending attachment. Keep snapshots authoritative once optimism has retired.

Empty and internal queued user rows are omitted without deleting their messages or changing assistant-parent grouping. Reads still subscribe to reactive parts when a cached value exists, so hidden rows can appear when their visible text arrives.

User Impact

  • Queued text remains visible while attachment context loads.
  • Empty placeholders and internal messages no longer create blank queue rows or prompt-navigation markers.
  • Image/PDF-only queued messages remain visible, and late text appears without a session switch.

Evidence

Reported behavior before the fix:

Before the fix: two empty queued rows show only the Queued label and remove controls

  • Full extension unit suite: 4,266 passed with bun run test:unit --timeout 30000. The initial run hit two existing five-second timeouts during a concurrent local build; no test timeout settings were changed in the code.
  • Typecheck, lint, webview bundle, Knip, formatting, and merge-marker guard passed.
  • Controlled VS Code replay verified attachment-context ordering, empty/internal rows, late text, and image/PDF-only messages in the initial implementation pass. The subsequent snapshot and lazy-loading corrections have automated regression coverage, including a browser-condition Solid memo test using the production part accessor, rather than a new end-to-end IDE run.

Manual verification: while a reply runs, queue a follow-up with an @file reference. Confirm its text stays visible, then switch away and back and confirm it is still present without duplicate or empty queue rows.

@kilo-code-bot

kilo-code-bot Bot commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Files Reviewed (9 files)
  • .changeset/fix-empty-queued-messages.md
  • packages/kilo-vscode/tests/unit/prompt-rail.test.ts
  • packages/kilo-vscode/tests/unit/session-parts.test.ts
  • packages/kilo-vscode/tests/unit/transcript-rows-reactivity.test.ts
  • packages/kilo-vscode/tests/unit/transcript-rows.test.ts
  • packages/kilo-vscode/webview-ui/src/context/part-stash.ts
  • packages/kilo-vscode/webview-ui/src/context/session-parts.ts
  • packages/kilo-vscode/webview-ui/src/context/session.tsx
  • packages/kilo-vscode/webview-ui/src/context/transcript-rows.ts

Reviewed by grok-4.6 · Input: 231.7K · Output: 29.9K · Cached: 783.4K

Review guidance: REVIEW.md from base branch main

@marius-kilocode
marius-kilocode merged commit 9f4c698 into main Aug 28, 2026
24 checks passed
@marius-kilocode
marius-kilocode deleted the investigate-empty-queued-messages branch August 28, 2026 07:20
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