Skip to content

feat(session): Add support for labeling and organizing chat sessions - #794

Merged
haiphucnguyen merged 1 commit into
mainfrom
feature/support-labels-for-conversations
Nov 1, 2026
Merged

haiphucnguyen merged 1 commit into
mainfrom
feature/support-labels-for-conversations

Conversation

@haiphucnguyen

Copy link
Copy Markdown
Collaborator

Summary

  • Implement label domain model and database persistence for conversations.
  • Enables users to apply, view, and manage custom labels on individual sessions.
  • Updates the session list view to support grouping and filtering by labels.
  • Integrates label badges across the chat and discover conversation views.
  • Adds label management dialogs and necessary UI components.

Related Issue(s)

Type of Change

  • 🐛 Bug fix
  • ✨ New feature
  • 💥 Breaking change
  • 📝 Documentation
  • ♻️ Refactor (no functional change)
  • 🧪 Tests
  • 🔧 Chore / tooling / CI

What Changed & Why

How to Test

./gradlew test

Screenshots / Recordings (if applicable)

Checklist

  • I have read the CONTRIBUTING guide
  • My branch is up to date with main
  • I ran ./gradlew spotlessApply and ./gradlew detekt locally
  • I ran ./gradlew test and all tests pass
  • I added/updated tests for my changes (if applicable)
  • I added/updated documentation (if applicable)
  • My commits are signed off (DCO) — git commit -s
  • This PR is focused on a single feature/fix

Additional Notes

- Implement label domain model and database persistence for conversations.
- Enables users to apply, view, and manage custom labels on individual sessions.
- Updates the session list view to support grouping and filtering by labels.
- Integrates label badges across the chat and discover conversation views.
- Adds label management dialogs and necessary UI components.
Copilot AI balanced review requested due to automatic review settings November 1, 2026 06:11
@haiphucnguyen
haiphucnguyen merged commit b1c0934 into main Nov 1, 2026
14 checks passed
@haiphucnguyen
haiphucnguyen deleted the feature/support-labels-for-conversations branch November 1, 2026 06:13

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 Changes recommended

Unresolved label-state synchronization and write-ordering bugs can overwrite assignments and leave badges, menus, and usage counts stale.

7 open issues
What changed in this PR

Adds reusable, colored labels to Askimo’s chat sessions, complementing project organization with label assignment, grouping, filtering, and badges.

Changes:

  • Adds the label domain model, database migration, repository, service methods, and persistence tests.
  • Integrates label management, assignment menus, badges, and sidebar grouping/filtering, with localized text and tests.
  • Also updates Swing color-picker handling, OpenAI test model selections, and CLI native-image metadata.
File Description
shared/​src/​commonMain/​kotlin/​io/​askimo/​core/​chat/​domain/​Label.kt Defines labels and their name-length limit.
shared-jvm/​src/​test/​kotlin/​io/​askimo/​core/​chat/​repository/​LabelRepositoryIT.kt Tests label persistence, assignments, and sync helpers.
shared-jvm/​src/​main/​sqldelight/​migrations/​67.sqm Creates label and session-assignment tables.
shared-jvm/​src/​main/​sqldelight/​io/​askimo/​core/​db/​sqldelight/​Labels.sq Defines label queries and schema.
shared-jvm/​src/​main/​kotlin/​io/​askimo/​core/​db/​DatabaseManager.kt Registers label adapters and repository access.
shared-jvm/​src/​main/​kotlin/​io/​askimo/​core/​chat/​service/​ChatSessionService.kt Exposes label management and assignment operations.
shared-jvm/​src/​main/​kotlin/​io/​askimo/​core/​chat/​repository/​LabelRepository.kt Implements label storage and assignment persistence.
desktop/​src/​main/​kotlin/​io/​askimo/​desktop/​Main.kt Passes label state to Discover.
desktop-shared/​src/​test/​kotlin/​io/​askimo/​ui/​session/​SessionGroupOptionTest.kt Tests label-based session grouping.
desktop-shared/​src/​test/​kotlin/​io/​askimo/​ui/​session/​SessionFilterTest.kt Tests any-match label filtering.
desktop-shared/​src/​main/​resources/​i18n/​messages.properties Adds English label UI strings.
desktop-shared/​src/​main/​resources/​i18n/​messages_zh_TW.properties Adds Traditional Chinese label strings.
desktop-shared/​src/​main/​resources/​i18n/​messages_zh_CN.properties Adds Simplified Chinese label strings.
desktop-shared/​src/​main/​resources/​i18n/​messages_vi_VN.properties Adds Vietnamese label strings.
desktop-shared/​src/​main/​resources/​i18n/​messages_pt_BR.properties Adds Brazilian Portuguese label strings.
desktop-shared/​src/​main/​resources/​i18n/​messages_ko_KR.properties Adds Korean label strings.
desktop-shared/​src/​main/​resources/​i18n/​messages_ja_JP.properties Adds Japanese label strings.
desktop-shared/​src/​main/​resources/​i18n/​messages_fr.properties Adds French label strings.
desktop-shared/​src/​main/​resources/​i18n/​messages_es.properties Adds Spanish label strings.
desktop-shared/​src/​main/​resources/​i18n/​messages_de.properties Adds German label strings.
desktop-shared/​src/​main/​kotlin/​io/​askimo/​ui/​shell/​NavigationSidebar.kt Integrates label menus, badges, grouping, and filtering.
desktop-shared/​src/​main/​kotlin/​io/​askimo/​ui/​settings/​AppearanceSettingsSection.kt Makes color selection suspend while using Swing’s event thread.
desktop-shared/​src/​main/​kotlin/​io/​askimo/​ui/​session/​SessionsViewModel.kt Manages label state, filtering, and mutations.
desktop-shared/​src/​main/​kotlin/​io/​askimo/​ui/​session/​SessionsView.kt Adds label badges and actions to session rows.
desktop-shared/​src/​main/​kotlin/​io/​askimo/​ui/​session/​SessionGroupOption.kt Adds label groups and an unlabeled bucket.
desktop-shared/​src/​main/​kotlin/​io/​askimo/​ui/​session/​SessionFilter.kt Implements filtering by selected labels.
desktop-shared/​src/​main/​kotlin/​io/​askimo/​ui/​session/​SessionActionsMenu.kt Adds chat-level label assignment and management.
desktop-shared/​src/​main/​kotlin/​io/​askimo/​ui/​session/​SessionActionMenu.kt Adds labels to the shared sidebar action menu.
desktop-shared/​src/​main/​kotlin/​io/​askimo/​ui/​session/​ManageLabelsDialog.kt Adds label creation, editing, color selection, and deletion.
desktop-shared/​src/​main/​kotlin/​io/​askimo/​ui/​session/​LabelsMenu.kt Provides a reusable label-assignment submenu.
desktop-shared/​src/​main/​kotlin/​io/​askimo/​ui/​session/​LabelColor.kt Provides label badges, color parsing, and presets.
desktop-shared/​src/​main/​kotlin/​io/​askimo/​ui/​discover/​DiscoverView.kt Displays labels on recent conversations.
desktop-shared/​src/​main/​kotlin/​io/​askimo/​ui/​chat/​ChatView.kt Displays and refreshes chat-header label badges.
cli/​src/​test/​kotlin/​io/​askimo/​core/​providers/​openai/​OpenAiModelFactoryTest.kt Changes the OpenAI test model selection.
cli/​src/​test/​kotlin/​io/​askimo/​core/​providers/​openai/​OpenAiModelFactoryProxyTest.kt Changes the proxy test model selection.
cli/​src/​main/​resources/​META-INF/​native-image/​io.askimo/​cli/​reachability-metadata.json Updates reflection and service-resource registrations.

Review effort: Balanced

it
}
}
.clickable { onSelectColor(hex) }
allLabels = labelRepository.list()
assignedLabels = labelRepository.labelsForSession(sessionId)
}
val labelUsageCounts = remember(allLabels) {
Triple(labels, bySession, usageCounts)
}
allLabels = labels
labelsBySessionId = labelsBySessionId + bySession

scope.launch {
try {
withContext(Dispatchers.IO) { sessionService.setSessionLabels(sessionId, newIds) }
Comment on lines +335 to +337
scope.launch {
try {
withContext(Dispatchers.IO) { sessionService.setSessionLabels(sessionId, newIds) }

scope.launch {
try {
withContext(Dispatchers.IO) { sessionService.setSessionLabels(sessionId, newIds) }
Comment on lines +552 to +553
if (sessionsViewModel.showManageLabelsDialog) {
manageLabelsDialog(
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.

2 participants