The changed-files card and per-turn inline diff are derived from full-tree
checkpoint snapshots, so any tree-rewriting git command the agent runs
(pull, checkout, cherry-pick, rebase) shows up as hundreds of "changed
files" the agent never authored.
This adds a read-side attribution layer on top of the existing checkpoint
mechanism (capture, storage, and revert are untouched):
- Checkpoint commits now record the HEAD oid and branch in their commit
message. Legacy checkpoints without metadata degrade to today's behavior.
- attributeCheckpointDiff classifies each path in a checkpoint tree delta:
a path is "git" only when its exact blob transition also appears in the
HEAD-movement delta for the turn and no commit authored during the turn
touched it. Every ambiguity resolves to "agent" (shown), so
misclassification can add noise but never hide agent work. Merge commits
use the combined diff so only conflict resolutions count as agent work.
- The checkpoint reactor tags each file with an origin; attribution
failures degrade to unattributed files and never block the pipeline.
- getTurnDiff/getFullThreadDiff drop git-attributed file sections from the
patch unless the new includeGitChanges input is set.
- The changed-files card lists agent files only, with a muted
"Updated via git — N files" row for demoted changes. The diff panel
shows a banner with a show/hide toggle so the full tree delta stays one
click away.
Co-Authored-By: Claude Fable 5 <[email protected]>
- Add shared compact subheader styling for preview, file, and diff panels
- Open diff files in the thread file viewer when available
- Fix macOS cursor auto-hide and Option-modified shortcut matching
* Guard non-git projects and improve send and diff UX
- Skip checkpoint capture/revert and turn diff ingestion for non-git workspaces
- Normalize project workspace roots and return clearer request/error messages
- Show "No Git" state in chat/diff UI and enrich work log with commands/files
- Track send start time so working status shows elapsed duration consistently
* Format active working timer in concise h/m/s units
- add `formatWorkingTimer` for human-friendly durations in ChatView
- show active "Working for" time as `0s`, `1m 5s`, or `2h 3m` instead of ms
* more cleanup
* Fix active work timing and use temp git workspaces in tests
- derive active work start from unsettled turn state instead of always latest turn
- update chat view to use shared deriveActiveWorkStartedAt helper
- make server/ws tests create temporary workspace roots with .git for project creation
Drop the temporary selector overload from useStore and migrate the remaining selector call sites to the unified { state, dispatch } API so the store surface stays single-path.
Made-with: Cursor
- Replace broad `useStore` state reads with targeted selector/action hooks across chat, diff, sidebar, and routing views
- Remove dispatch-style calls in favor of direct store actions to reduce unnecessary rerenders
- Improve chat UI interactions (composer menu navigation, image preview buttons, modal click targets)
- Add local `react-doctor` agent skill docs under `apps/web/.agents/react-doctor`
- Add click handling on diff file headers (`data-title`) to open files via native `openInEditor`
- Resolve file paths against active thread/project cwd before launching editor
- Add header hover affordance and tighten diff panel spacing
- Inject diff palette overrides via `unsafeCSS` in `DiffPanel`
- Add `diff-panel-viewport` background and keep file container border/background styling in `index.css`
- Switch panel root from `bg-card` to `bg-background` for consistent surface tone
- add diff-specific wrapper classes in `DiffPanel` for targeted theming
- override diff renderer color variables to match card/background palette
- soften chat markdown Shiki code-block background for consistency
- Replace `rehype-highlight`/`highlight.js` with `@pierre/diffs` highlighter in `ChatMarkdown`
- Add LRU caching and in-flight dedupe for highlighted code, with streaming-aware behavior
- Extract shared diff theme resolution utility and add unit tests for new LRU cache
- Pass explicit Pierre light/dark theme into diff render options
- Re-key file diffs on resolved theme so views rerender on theme switch
- Stabilize `useTheme` snapshots to propagate system theme updates reliably
- pass a cache scope into `getRenderablePatch` and include resolved theme in DiffPanel cache keys
- add a test proving `buildPatchCacheKey` changes when cache scope changes
- Restructure Chat, DiffPanel, and Sidebar headers for cleaner Electron drag/no-drag behavior
- Keep turn-strip controls interactive while preserving draggable titlebar regions
- Lower inline diff panel minimum width from 28rem to 26rem for tighter layouts