Skip to content

refactor: unify timeline deduplication and UI theme updates - #723

Merged
haiphucnguyen merged 2 commits into
mainfrom
feature/minor-improvements
Sep 19, 2026
Merged

haiphucnguyen merged 2 commits into
mainfrom
feature/minor-improvements

Conversation

@haiphucnguyen

Copy link
Copy Markdown
Collaborator

Summary

  • Add appendDeduped and grouped helpers to TurnTimelineEntry for stable key generation
  • Update AgentRunViewModel and SessionManager to use new helpers and full tool‑call details
  • Replace all CardDefaults.cardColors calls with AppColors.sidebarCardColors and AppColors.cardColors
  • Introduce isScreenshotMode flag for headless screenshot support
  • Extend i18n resources with elapsed‑time status messages
  • Remove TOOL_DETAIL_MAX_LENGTH and always use full detail when building tool calls
  • Update documentation comments and add new tests for timeline grouping logic

Related Issue(s)

Type of Change

  • [ X] 🐛 Bug fix
  • [ X] ✨ New feature
  • 💥 Breaking change
  • 📝 Documentation
  • [X ] ♻️ 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

- Add `appendDeduped` and `grouped` helpers to `TurnTimelineEntry` for stable key generation
- Update `AgentRunViewModel` and `SessionManager` to use new helpers and full tool‑call details
- Replace all `CardDefaults.cardColors` calls with `AppColors.sidebarCardColors` and `AppColors.cardColors`
- Introduce `isScreenshotMode` flag for headless screenshot support
- Extend i18n resources with elapsed‑time status messages
- Remove `TOOL_DETAIL_MAX_LENGTH` and always use full detail when building tool calls
- Update documentation comments and add new tests for timeline grouping logic
Copilot AI lite review requested due to automatic review settings September 19, 2026 08:57

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.

Copilot review overview

🟡 Changes recommended

Unresolved critical selection-state crash and five moderate correctness or resource issues remain.

Get a fresh assessment by requesting another Copilot review.

Review effort: Lite
Findings: 1 High severity

Open (1)
What changed in this PR

Refactors timeline handling and UI theming while adding screenshot mode, workspace monitoring, localization, and richer tool details.

Changes:

  • Adds timeline deduplication and storage-time truncation.
  • Unifies card colors and elapsed-status localization.
  • Adds screenshot-window support, workspace watching, and multi-selection.
  • Preserves full live tool details while capping persisted data.

Review findings:

  • Critical (1 vote): Stale workspace selections can cause a delete-confirmation crash.
  • Moderate (1 vote each): Completed timelines retain unbounded tool details; watcher overflow events are ignored; renamed folders lose watch tracking; screenshot mode may reuse an off-screen position; Antigravity still truncates argument values.
File Change
shared/​src/​main/​kotlin/​io/​askimo/​core/​chat/​repository/​ChatMessageRepository.kt Truncates tool details before chat persistence.
shared/​src/​main/​kotlin/​io/​askimo/​core/​chat/​dto/​TurnTimelineEntry.kt Adds timeline grouping, deduplication, and storage helpers.
shared/​src/​main/​kotlin/​io/​askimo/​core/​chat/​dto/​ToolCallInfo.kt Documents live versus persisted tool-detail semantics.
shared/​src/​main/​kotlin/​io/​askimo/​core/​agent/​repository/​AgentRunHistoryRepository.kt Truncates persisted agent history details.
shared/​src/​main/​kotlin/​io/​askimo/​core/​agent/​ExternalAgent.kt Removes the legacy tool-detail limit.
shared/​src/​main/​kotlin/​io/​askimo/​core/​agent/​CodexAgent.kt Preserves full live tool details.
shared/​src/​main/​kotlin/​io/​askimo/​core/​agent/​ClaudeAgent.kt Builds richer tool-call details.
shared/​src/​main/​kotlin/​io/​askimo/​core/​agent/​AntigravityAgent.kt Updates tool-detail handling.
desktop/​src/​main/​kotlin/​io/​askimo/​desktop/​shell/​TelemetryPanel.kt Uses shared card colors.
desktop/​src/​main/​kotlin/​io/​askimo/​desktop/​Main.kt Supports undecorated screenshot windows.
desktop/​src/​main/​kotlin/​io/​askimo/​desktop/​chat/​ProjectSidePanel.kt Uses sidebar card colors.
desktop-shared/​src/​test/​kotlin/​io/​askimo/​ui/​chat/​TurnTimelineGroupRenderKeyTest.kt Tests stable timeline grouping keys.
desktop-shared/​src/​main/​resources/​i18n/​messages.properties Adds English elapsed-status and workspace strings.
desktop-shared/​src/​main/​resources/​i18n/​messages_zh_TW.properties Adds Traditional Chinese strings.
desktop-shared/​src/​main/​resources/​i18n/​messages_zh_CN.properties Adds Simplified Chinese strings.
desktop-shared/​src/​main/​resources/​i18n/​messages_vi_VN.properties Adds Vietnamese strings.
desktop-shared/​src/​main/​resources/​i18n/​messages_pt_BR.properties Adds Brazilian Portuguese strings.
desktop-shared/​src/​main/​resources/​i18n/​messages_ko_KR.properties Adds Korean strings.
desktop-shared/​src/​main/​resources/​i18n/​messages_ja_JP.properties Adds Japanese strings.
desktop-shared/​src/​main/​resources/​i18n/​messages_fr.properties Adds French strings.
desktop-shared/​src/​main/​resources/​i18n/​messages_es.properties Adds Spanish strings.
desktop-shared/​src/​main/​resources/​i18n/​messages_de.properties Adds German strings.
desktop-shared/​src/​main/​kotlin/​io/​askimo/​ui/​shell/​SplashScreen.kt Uses themed surface rendering.
desktop-shared/​src/​main/​kotlin/​io/​askimo/​ui/​shell/​AppState.kt Adds screenshot-mode window sizing.
desktop-shared/​src/​main/​kotlin/​io/​askimo/​ui/​settings/​AgentsSettingsSection.kt Uses sidebar card colors.
desktop-shared/​src/​main/​kotlin/​io/​askimo/​ui/​session/​SessionManager.kt Keeps full live tool details.
desktop-shared/​src/​main/​kotlin/​io/​askimo/​ui/​session/​ManageDirectivesDialog.kt Uses sidebar card colors.
desktop-shared/​src/​main/​kotlin/​io/​askimo/​ui/​plan/​PlanHistorySidePanel.kt Uses sidebar card colors.
desktop-shared/​src/​main/​kotlin/​io/​askimo/​ui/​onboarding/​OnboardingWizardDialog.kt Uses unified card colors.
desktop-shared/​src/​main/​kotlin/​io/​askimo/​ui/​mcp/​McpToolsDialog.kt Applies themed content colors.
desktop-shared/​src/​main/​kotlin/​io/​askimo/​ui/​common/​theme/​AppTextStyles.kt Makes text styles ambient-color aware.
desktop-shared/​src/​main/​kotlin/​io/​askimo/​ui/​common/​theme/​AppComponents.kt Adds rounded clickable behavior.
desktop-shared/​src/​main/​kotlin/​io/​askimo/​ui/​common/​theme/​AppColors.kt Adds shared card color helpers.
desktop-shared/​src/​main/​kotlin/​io/​askimo/​ui/​common/​theme/​AppBackground.kt Establishes ambient content color.
desktop-shared/​src/​main/​kotlin/​io/​askimo/​ui/​chat/​MessageComponents.kt Adds elapsed-status rendering.
desktop-shared/​src/​main/​kotlin/​io/​askimo/​ui/​chat/​ChatView.kt Updates card and approval colors.
desktop-shared/​src/​main/​kotlin/​io/​askimo/​ui/​agent/​WorkspaceFilesPanel.kt Adds filesystem watching and multi-selection.
desktop-shared/​src/​main/​kotlin/​io/​askimo/​ui/​agent/​AgentView.kt Moves skills context into the header.
desktop-shared/​src/​main/​kotlin/​io/​askimo/​ui/​agent/​AgentRunViewModel.kt Deduplicates timeline statuses.
desktop-shared/​src/​main/​kotlin/​io/​askimo/​ui/​agent/​AgentRunArea.kt Refactors skills and input controls.
desktop-shared/​src/​main/​kotlin/​io/​askimo/​ui/​agent/​AgentHistoryPanel.kt Uses rounded clickable rows.
cli/​src/​test/​kotlin/​io/​askimo/​core/​chat/​dto/​TurnTimelineEntryTruncatedForStorageTest.kt Tests storage truncation.
cli/​src/​test/​kotlin/​io/​askimo/​core/​chat/​dto/​TurnTimelineEntryAppendDedupedTest.kt Tests timeline deduplication.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@haiphucnguyen
haiphucnguyen merged commit 7b9dcfb into main Sep 19, 2026
9 of 12 checks passed
@haiphucnguyen
haiphucnguyen deleted the feature/minor-improvements branch September 19, 2026 17:01
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