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

Skip to content

Conversation

@kiloconnect
Copy link
Contributor

@kiloconnect kiloconnect bot commented Jan 28, 2026

Summary

This PR updates the task history UI to display generated session names instead of truncated task text.

Changes

  1. Added title field to HistoryItem schema (packages/types/src/history.ts)

    • Added optional title field to store generated session names
  2. Updated onSessionTitleGenerated callback (src/shared/kilocode/cli-sessions/extension/session-manager-utils.ts)

    • When a session title is generated, it now updates the task history with the title
    • Triggers a webview state update to reflect the change
  3. Updated TaskItem component (webview-ui/src/components/history/TaskItem.tsx)

    • Displays title when available, falling back to task text if no title exists
  4. Added tests (webview-ui/src/components/history/tests/TaskItem.spec.tsx)

    • Tests for title display when available
    • Tests for fallback to task text when title is not available
    • Tests for fallback when title is empty string

Testing

  • All existing tests pass
  • New tests added for title display behavior

Built for Mark by Kilo for Slack

- Add optional 'title' field to HistoryItem schema for storing generated session names
- Update onSessionTitleGenerated callback to persist title to task history
- Update TaskItem component to display title when available, falling back to task text
- Add tests for title display behavior
@changeset-bot
Copy link

changeset-bot bot commented Jan 28, 2026

πŸ¦‹ Changeset detected

Latest commit: 531b5de

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 Author

kiloconnect bot commented Jan 28, 2026

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Overview

This PR adds support for displaying generated session names in the task history UI. The implementation is clean and follows project conventions.

Key observations:

  • βœ… Type safety: title field properly added as optional in the Zod schema
  • βœ… Fallback logic: item.title || item.task correctly handles undefined/empty string cases
  • βœ… Test coverage: Three tests cover title present, title absent, and empty string scenarios
  • βœ… Async handling: onSessionTitleGenerated callback properly uses async/await
  • βœ… State sync: postStateToWebview() called after history update to refresh UI
  • βœ… Markers: Proper kilocode_change markers included per project guidelines
Files Reviewed (5 files)
  • .changeset/session-name-history.md - Changeset for patch release
  • packages/types/src/history.ts - Added optional title field to schema
  • src/shared/kilocode/cli-sessions/extension/session-manager-utils.ts - Title persistence logic
  • webview-ui/src/components/history/TaskItem.tsx - Title display with fallback
  • webview-ui/src/components/history/__tests__/TaskItem.spec.tsx - Test coverage for title display

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.

1 participant