Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@jrf0110
Copy link
Contributor

@jrf0110 jrf0110 commented Jan 14, 2026

image image

@changeset-bot
Copy link

changeset-bot bot commented Jan 14, 2026

🦋 Changeset detected

Latest commit: 2ee6e82

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
kilo-code Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@kiloconnect
Copy link
Contributor

kiloconnect bot commented Jan 14, 2026

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Overview

This PR adds a GitHub-style diff stats display to the task header, showing lines added/removed in real-time. The implementation is well-structured and follows existing patterns in the codebase.

Key Changes:

  • New DiffStatsDisplay component with proportional colored boxes
  • New useTaskDiffStats hook to aggregate diff stats from tool messages
  • Settings toggle to show/hide diff stats (showDiffStats)
  • Full i18n support across all 24 locales
  • Comprehensive test coverage for both component and hook
Files Reviewed (47 files)

Core Changes:

  • .changeset/task-diff-stats-display.md - Changeset
  • packages/types/src/global-settings.ts - Type definition
  • src/core/webview/webviewMessageHandler.ts - Message handler
  • src/shared/ExtensionMessage.ts - Extension state type
  • src/shared/WebviewMessage.ts - Webview message type

UI Components:

  • webview-ui/src/components/kilocode/DiffStatsDisplay.tsx - New component
  • webview-ui/src/components/kilocode/KiloTaskHeader.tsx - Integration
  • webview-ui/src/components/settings/DisplaySettings.tsx - Settings UI
  • webview-ui/src/components/settings/SettingsView.tsx - Settings integration

Hooks & State:

  • webview-ui/src/components/ui/hooks/kilocode/useTaskDiffStats.ts - New hook
  • webview-ui/src/context/ExtensionStateContext.tsx - State context

Tests:

  • webview-ui/src/components/kilocode/__tests__/DiffStatsDisplay.spec.tsx
  • webview-ui/src/components/ui/hooks/__tests__/useTaskDiffStats.spec.ts

i18n (24 locales):

  • webview-ui/src/i18n/locales/*/chat.json - Added "changes" key
  • webview-ui/src/i18n/locales/*/settings.json - Added showDiffStats settings

Notes on Existing Comments

The existing comment on line 71 of DiffStatsDisplay.spec.tsx appears to be outdated - the test correctly expects 0 boxes by default, which matches the component's maxBoxes = 0 default value.

*
* Example: +8 −4 with 4 green boxes, 1 red box, and 0 empty boxes
*/
const DiffStatsDisplay = ({ added, removed, maxBoxes = 0, className }: DiffStatsDisplayProps) => {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Initially we had a UI that showed the diff like a github PR lines added/removed display with the boxes. We decided to not show the boxes but I went ahead and kept the functionality in here in case we want it in the future. maxBoxes = 0 hides the boxes

@jrf0110 jrf0110 enabled auto-merge January 16, 2026 16:27
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.

3 participants