Skip to content

fix: show dismissed question content in chat history - #12043

Merged
marius-kilocode merged 3 commits into
mainfrom
fix/10361-dismissed-question-visibility-vr2
Jul 8, 2026
Merged

fix: show dismissed question content in chat history#12043
marius-kilocode merged 3 commits into
mainfrom
fix/10361-dismissed-question-visibility-vr2

Conversation

@marius-kilocode

Copy link
Copy Markdown
Collaborator

Supersedes #11951 by @Githubguy132010. Full credit to Thomas Brugman for the original work — the commit is cherry-picked with Thomas preserved as the author.

This org-owned branch lets the visual regression workflow commit screenshot baselines for the new kilo-ui stories (QuestionDismissed, QuestionDismissedExpanded), which cannot be pushed back to the contributor's fork.


Fixes #10361

When a question prompt is dismissed (manually via "Dismiss" or automatically when a new prompt arrives), the question content becomes invisible in the chat history. The question tool renderers gate content visibility on answers.length > 0, and dismissed questions have empty answers, so the question text is hidden.

This makes dismissed questions always show their content, with a "Dismissed" label and muted visual treatment.

VSCode/Web UI (packages/kilo-ui/src/components/message-part.tsx):

  • Removed the Show when={completed()} gate. When metadata.dismissed === true or status === "error", shows the question content with "Dismissed" labels and "N dismissed" subtitle
  • Dismissed question errors now fall through to the normal renderer instead of showing a bare "Questions dismissed" label
  • New i18n keys: ui.question.subtitle.dismissed, ui.question.answer.dismissed

TUI main view (packages/opencode/src/cli/cmd/tui/routes/session/index.tsx):

  • When metadata.dismissed is true or error contains "dismissed", shows "Dismissed" labels and updated title "(dismissed)"

TUI v2 view (packages/opencode/src/cli/cmd/tui/feature-plugins/system/session-v2.tsx):

  • Same dismissed treatment as the main TUI view

Visual regression stories (packages/kilo-ui/src/stories/message-part.stories.tsx):

  • QuestionAnswered / QuestionAnsweredExpanded — reference rendering of answered questions
  • QuestionDismissed / QuestionDismissedExpanded — dismissed questions with collapsed and expanded states

const i18n = useI18n()
const questions = createMemo(() => (props.input.questions ?? []) as QuestionInfo[])
const answers = createMemo(() => (props.metadata.answers ?? []) as QuestionAnswer[])
const dismissed = createMemo(() => props.metadata.dismissed === true || props.status === "error")

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: Dismissed detection relies on implicit caller-side gating

dismissed() treats any status === "error" as a dismissal without inspecting the error text. That's only safe today because the caller (ToolPartDisplay above, via isDismissedQuestionError()) only routes an error-status question part into this renderer when the message already contains "dismissed this question" — any other error takes the Card fallback and never reaches this component. If that caller-side gating ever changes, a genuine tool error could silently render as "Dismissed" here instead of as an error. Consider checking the error text directly (e.g. a shared helper) rather than relying on status === "error" alone, so this renderer is correct independent of the caller.


Reply with @kilocode-bot fix it to have Kilo Code address this issue.

const dismissed = createMemo(
() =>
props.metadata.dismissed === true ||
(props.part.state.status === "error" && String(props.part.state.error ?? "").includes("dismissed")),

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: Looser/inconsistent dismissal match vs. the webview renderer

This matches the substring "dismissed", while the equivalent check in packages/kilo-ui/src/components/message-part.tsx (isDismissedQuestionError) matches the more specific "dismissed this question". The same loose "dismissed" match is duplicated in session-v2.tsx. A broader match here could flag an unrelated tool error as dismissed if its message happens to contain that word, and the three separate implementations can drift over time. Consider extracting one shared predicate (or at least aligning the substring) used by all three renderers.


Reply with @kilocode-bot fix it to have Kilo Code address this issue.

@kilo-code-bot

kilo-code-bot Bot commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

Code Review Summary

Status: 2 Issues Found | Recommendation: Address before merge

Overview

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

SUGGESTION

File Line Issue
packages/kilo-ui/src/components/message-part.tsx 2847 dismissed() treats any error status as dismissal, relying on implicit caller-side gating rather than checking the error text itself
packages/opencode/src/cli/cmd/tui/routes/session/index.tsx 2825 Loose "dismissed" substring match is broader than and inconsistent with the webview's "dismissed this question" check, and is duplicated a third time in session-v2.tsx
Files Reviewed (10 files)
  • .changeset/show-dismissed-question-content.md
  • packages/kilo-ui/src/components/message-part.tsx - 1 issue
  • packages/kilo-ui/src/stories/message-part.stories.tsx
  • packages/opencode/src/cli/cmd/tui/feature-plugins/system/session-v2.tsx
  • packages/opencode/src/cli/cmd/tui/routes/session/index.tsx - 1 issue
  • packages/ui/src/i18n/*.ts (20 locale files) - new dismissed keys added consistently, correctly marked // kilocode_change
  • packages/kilo-docs/public/img/screenshot-tests/.../*.png (regenerated VR baselines, not reviewed per policy)

Verified the fix reaches the actual VS Code webview and web UI (both re-export ToolRegistry/PART_MAPPING from @kilocode/kilo-ui/message-part), and confirmed the dismissed/error-detection logic against the real ToolPart/SessionMessageAssistantTool SDK types before flagging anything, so no false-positive type-mismatch findings are included.

Fix these issues in Kilo Cloud


Reviewed by claude-sonnet-5-20260630 · Input: 124 · Output: 42.9K · Cached: 7.7M

Review guidance: REVIEW.md from base branch main

@marius-kilocode
marius-kilocode enabled auto-merge July 8, 2026 16:17
@marius-kilocode
marius-kilocode merged commit d5c75b7 into main Jul 8, 2026
29 checks passed
@marius-kilocode
marius-kilocode deleted the fix/10361-dismissed-question-visibility-vr2 branch July 8, 2026 16:25
t7tran pushed a commit to t7tran/kilocode that referenced this pull request Aug 14, 2026
…uestion-visibility-vr2

fix: show dismissed question content in chat history
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.

Dismissed questions cannot be reviewed afterwards

3 participants