Skip to content

Diff preview pop-out from Accomplished panel rows #10

Description

@SuperLogicAI

The Accomplished panel lists what the agent did — "Wrote src/foo.ts", "Edited src/bar.rs". Reading the actual change means leaving the app.

Proposed in docs/IDEAS.md § "Diff/file preview pop-out", and it's cheap because both halves already exist:

  • git_diff_cached is already a Tauri command (src-tauri/src/pty.rs:458, exposed via src/lib/pty.ts), added for the Commit & Push footer.
  • Each Accomplished row already carries file_path (listToolEvents, src/lib/repo.ts:98).

What to do

Make a "Wrote"/"Edited" row clickable, and show that file's diff in a pop-out.

Scope this deliberately small for v1:

  • Read-only. Raw diff text, monospace. No syntax highlighting — that's a follow-up if it turns out to be worth a dependency.
  • No schema change, no new migration, no new npm dependency.
  • Follow the existing modal pattern (LandingNoteModal.tsx, IsolateLoopModal.tsx) rather than building new chrome.

git_diff_cached shows staged changes; a file the agent touched may be unstaged, or the row may point at a file in a different repo than the tab's cwd. Decide what a row with no available diff does — an empty state saying so is a fine answer, a crash isn't.

Explicitly rejected, don't build it: an editable code view. docs/IDEAS.md has the reasoning — new editor dependency, undo semantics, and a real save-race when the agent is mid-edit on the same file. The read-only version gets ~90% of the value with none of that.

Done when: npx tsc --noEmit clean, clicking a file row shows its diff, a row with no diff shows an empty state, and nothing about the terminals or panels changes when the diff lookup fails.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesthelp wantedExtra attention is needed

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions