Skip to content

fix(vscode): reverse and aggregate subsession costs in TaskHeader tooltip#8788

Closed
kilo-code-bot[bot] wants to merge 2 commits intomainfrom
fix/tooltip-subsession-aggregation
Closed

fix(vscode): reverse and aggregate subsession costs in TaskHeader tooltip#8788
kilo-code-bot[bot] wants to merge 2 commits intomainfrom
fix/tooltip-subsession-aggregation

Conversation

@kilo-code-bot
Copy link
Copy Markdown
Contributor

@kilo-code-bot kilo-code-bot bot commented Apr 11, 2026

Summary

  • Reverses the order of child sessions in the cost tooltip so the most recent appear on top
  • Aggregates older sessions into a single summary line when there are more than 8 child entries, keeping the tooltip readable with tens of subagents
  • Adds i18n support for the aggregation label across all 19 locales

Fixes #8787

kilo-code-bot bot added 2 commits April 11, 2026 19:37
…ltip

Show the most recent subsessions on top in the cost tooltip and
aggregate older entries into a summary line when there are more than 8
child sessions, keeping the tooltip readable with many subagents.

Fixes #8787
…havior

Cover both the few-subagents case (all shown individually in reverse
order) and the many-subagents case (older sessions aggregated into a
summary line). This commit can be cherry-picked independently.
const items = breakdown()
if (items.length <= 1) return <span>{language.t("context.usage.sessionCost")}</span>
const collapsed = collapseCostBreakdown(items, (n) =>
language.t("context.usage.olderSessions", { count: String(n) }),
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

WARNING: The aggregation label does not handle singular counts

language.t() only interpolates the count value here, so when exactly one child session is collapsed the tooltip renders grammatically incorrect text like 1 older sessions. Other parts of this codebase already use explicit _one / _other keys for count-sensitive strings; this tooltip should use the same pattern so the new summary row is correct across locales.

@kilo-code-bot
Copy link
Copy Markdown
Contributor Author

kilo-code-bot bot commented Apr 11, 2026

Code Review Summary

Status: 1 Issues Found | Recommendation: Address before merge

Overview

Severity Count
CRITICAL 0
WARNING 1
SUGGESTION 0

Fix these issues in Kilo Cloud

Issue Details (click to expand)

CRITICAL

File Line Issue

WARNING

File Line Issue
packages/kilo-vscode/webview-ui/src/components/chat/TaskHeader.tsx 51 Collapsed tooltip label always uses the plural form, so a single hidden session renders incorrect localized text.

SUGGESTION

File Line Issue
Other Observations (not in diff)

Issues found in unchanged code that cannot receive inline comments:

File Line Issue
Files Reviewed (22 files)
  • packages/kilo-vscode/tests/unit/session-utils.test.ts - 0 issues
  • packages/kilo-vscode/webview-ui/src/components/chat/TaskHeader.tsx - 1 issue
  • packages/kilo-vscode/webview-ui/src/context/session-utils.ts - 0 issues
  • packages/kilo-vscode/webview-ui/src/i18n/ar.ts - 0 issues
  • packages/kilo-vscode/webview-ui/src/i18n/br.ts - 0 issues
  • packages/kilo-vscode/webview-ui/src/i18n/bs.ts - 0 issues
  • packages/kilo-vscode/webview-ui/src/i18n/da.ts - 0 issues
  • packages/kilo-vscode/webview-ui/src/i18n/de.ts - 0 issues
  • packages/kilo-vscode/webview-ui/src/i18n/en.ts - 0 issues
  • packages/kilo-vscode/webview-ui/src/i18n/es.ts - 0 issues
  • packages/kilo-vscode/webview-ui/src/i18n/fr.ts - 0 issues
  • packages/kilo-vscode/webview-ui/src/i18n/ja.ts - 0 issues
  • packages/kilo-vscode/webview-ui/src/i18n/ko.ts - 0 issues
  • packages/kilo-vscode/webview-ui/src/i18n/nl.ts - 0 issues
  • packages/kilo-vscode/webview-ui/src/i18n/no.ts - 0 issues
  • packages/kilo-vscode/webview-ui/src/i18n/pl.ts - 0 issues
  • packages/kilo-vscode/webview-ui/src/i18n/ru.ts - 0 issues
  • packages/kilo-vscode/webview-ui/src/i18n/th.ts - 0 issues
  • packages/kilo-vscode/webview-ui/src/i18n/tr.ts - 0 issues
  • packages/kilo-vscode/webview-ui/src/i18n/uk.ts - 0 issues
  • packages/kilo-vscode/webview-ui/src/i18n/zh.ts - 0 issues
  • packages/kilo-vscode/webview-ui/src/i18n/zht.ts - 0 issues

Reviewed by gpt-5.4-2026-03-05 · 1,295,852 tokens

@markijbema
Copy link
Copy Markdown
Contributor

Superseded by #8822

@markijbema markijbema closed this Apr 13, 2026
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.

Tooltip on price in TaskHeader showing subsessions becomes unusable with tens of subagents

1 participant