feat: Comparator Phase 2 — persistence, diffs, evaluation, history#22
Merged
feat: Comparator Phase 2 — persistence, diffs, evaluation, history#22
Conversation
…luation, history Add SQLite persistence (rusqlite) for comparisons, panels, evaluations, and file diffs. Add git worktree isolation so each tool runs in its own checkout pinned to a commit. Add post-completion diff view with side-by-side file listing and unified diff rendering. Add 10-dimension manual evaluation panel with radar chart (Recharts). Add JSON export, comparison replay, history browser, and analytics dashboard with win rates and dimension averages. New Rust modules: db.rs, comparator_db.rs, git.rs, evaluation.rs, export.rs. New frontend: DiffView, EvaluationPanel, ScoreRadar, ExportMenu, ComparatorHistoryPage, ComparatorAnalyticsPage. Updated run page with Output/Diffs/Evaluate tabs and review mode. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…lResult - Create git worktrees before spawning panels when pinnedCommit is set - Pass per-panel workingDir to Rust start_comparison for cwd isolation - Collect diffs via getDiffAgainstCommit after all panels complete - Persist diffs to DB and load into DiffView tab - Clean up worktrees after diff collection - Fix savePanelResult firing on every render by tracking saved panels - Remove invalid capabilities (fs:write-scope, security command) - Remove leaked security module references from mod.rs Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…olish - Fix N+1 query in list_comparisons: single batch load + HashMap grouping - Wrap save_file_diffs in BEGIN/COMMIT transaction for atomicity - Consolidate duplicated Rust types into shared commands/types.rs (FileDiffEntry, Evaluation used by git.rs, evaluation.rs, comparator_db.rs) - Add reusable CSS classes (badge, btn, tab, harness-card, form, eval-table) - Replace inline styles across all comparator components with CSS classes - Fix version text overflow in HarnessSelector with text-overflow: ellipsis - Switch harness cards from flex-wrap to CSS grid for predictable sizing - Normalize monospace font stack in DiffView to match comparator-output Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
0adef9b to
986ea62
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds everything needed to make Comparator comparisons useful beyond a single run: SQLite persistence, git worktree isolation, diff view, manual evaluation with radar charts, JSON export, comparison replay, history browser, and analytics dashboard.
Changes
rusqlitebundled) — comparisons, panels, evaluations, and file diffs stored at~/.harness-kit/comparator.dbwith WAL mode/comparator/review/:idloads from DB in read-only tabsNew files (11)
src-tauri/src/db.rssrc-tauri/src/commands/comparator_db.rssrc-tauri/src/commands/git.rssrc-tauri/src/commands/evaluation.rssrc-tauri/src/commands/export.rssrc/components/comparator/DiffView.tsxsrc/components/comparator/EvaluationPanel.tsxsrc/components/comparator/ScoreRadar.tsxsrc/components/comparator/ExportMenu.tsxsrc/pages/comparator/ComparatorHistoryPage.tsxsrc/pages/comparator/ComparatorAnalyticsPage.tsxTest Plan
cargo check— compiles with 0 warningsvitest run— 152 tests passNotes
pinnedCommitfield accepted by Rust backend but worktree creation/cleanup not yet wired into thestart_comparisoncommand handler (frontend callscreateWorktrees/removeWorktreesdirectly) — planned for Phase 3🤖 Generated with Claude Code