Skip to content

Add inline diff previews in work log - #1

Merged
tyulyukov merged 1 commit into
mainfrom
marcode/work-log-diff-preview
Mar 27, 2026
Merged

tyulyukov merged 1 commit into
mainfrom
marcode/work-log-diff-preview

Conversation

@tyulyukov

Copy link
Copy Markdown
Owner

Summary

  • Implements inline diff preview component for displaying code changes directly in conversation
  • Adds telemetry infrastructure with PostHog integration for anonymous usage analytics
  • Records provider lifecycle events (session start/stop, turns, interrupts, etc.) for operational insights
  • Adds user setting to control inline diff visibility
  • Implements telemetry identifier generation from existing auth credentials (Codex/Claude) with fallback to installation-scoped anonymous ID

Testing

  • New analytics service tests verify event batching and flushing across multiple PostHog batch requests
  • Inline diff utility tests cover parsing hunks, calculating stats, and edge cases
  • Integration test confirms startup heartbeat records thread and project counts
  • ProviderService tests verify telemetry events fire on session start/recover and turn operations
  • All existing test layers updated to provide AnalyticsService (test variant)
  • Manual: Toggle showInlineDiffs setting in chat settings to verify inline diffs render/hide correctly

- Extract diffs from Edit and Write tool payloads using LCS-based line diff
- Display expandable diff hunks inline in work log instead of compact file badges
- Add showInlineDiffs setting (default: enabled) to control visibility
- Support truncation for large diffs and merge multiple previews by file path
@tyulyukov
tyulyukov merged commit 93b9e4b into main Mar 27, 2026
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