Skip to content

fix(vscode): improve cost tooltip usability with many subagents#8786

Open
kilo-code-bot[bot] wants to merge 3 commits intomainfrom
session/agent_a827bea2-65f7-40ae-a1d7-537dd1349a89
Open

fix(vscode): improve cost tooltip usability with many subagents#8786
kilo-code-bot[bot] wants to merge 3 commits intomainfrom
session/agent_a827bea2-65f7-40ae-a1d7-537dd1349a89

Conversation

@kilo-code-bot
Copy link
Copy Markdown
Contributor

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

Summary

  • Show subsession costs in reverse chronological order (most recent on top) in the TaskHeader price tooltip
  • Aggregate older subsession entries when there are more than 5 children into a single summary line (e.g., "3 older sessions: $0.06")

Fixes #8785

Built for Mark IJbema by Kilo for Slack

kilo-code-bot bot added 2 commits April 11, 2026 19:29
Show most recent subagent sessions on top (reverse chronological order)
and aggregate older entries when more than 5 children exist, displaying
them as a single summary line to keep the tooltip usable.
…y subagents

Add two Storybook stories to cover the TaskHeader cost tooltip:
- Few subagents (individual entries, reverse chronological)
- Many subagents (with aggregated older sessions line)
const older = children.slice(VISIBLE_CAP)
const sum = older.reduce((s, e) => s + e.cost, 0)
items.push(...recent)
items.push({ label: `${older.length} ${olderLabel}`, cost: sum })
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: This aggregation label cannot be localized correctly

This builds the final text by prefixing the count onto a translated suffix. That hardcodes English word order and skips singular/plural handling, so locales like German end up with incorrect strings such as 1 ältere Sitzungen, and languages that place the count elsewhere cannot translate this at all. Please move the full label into i18n (for example with *_one / *_other keys and {{count}}).

@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)

WARNING

File Line Issue
packages/kilo-vscode/webview-ui/src/context/session-utils.ts 179 Aggregated older-session label is built by concatenating count + translated suffix, which breaks singular/plural handling and word order in non-English locales.
Other Observations (not in diff)

None.

Files Reviewed (7 files)
  • packages/kilo-vscode/tests/unit/session-utils.test.ts - 0 issues
  • packages/kilo-vscode/tests/visual-regression.spec.ts-snapshots/chat/task-header-cost-few-subagents-chromium-linux.png - 0 issues
  • packages/kilo-vscode/tests/visual-regression.spec.ts-snapshots/chat/task-header-cost-many-subagents-chromium-linux.png - 0 issues
  • packages/kilo-vscode/webview-ui/src/context/session-utils.ts - 1 issue
  • packages/kilo-vscode/webview-ui/src/context/session.tsx - 0 issues
  • packages/kilo-vscode/webview-ui/src/i18n/en.ts - 0 issues
  • packages/kilo-vscode/webview-ui/src/stories/chat.stories.tsx - 0 issues

Reviewed by gpt-5.4-20260305 · 418,850 tokens

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.

Task header price tooltip becomes unusable with many subagents

1 participant