feat(12-01): wire compare toggle and ComparisonTable into thread detail

- Extend uiStore candidateViewMode union to include "compare" value
- Add columns-3 compare toggle button, shown only when thread has 2+ candidates
- Hide "Add Candidate" button when in compare view (read-only intent)
- Import and render ComparisonTable when candidateViewMode === "compare"
- Pass displayItems so compare view reflects any pending reorder state
- Existing list/grid views unchanged; all 135 tests pass
This commit is contained in:
2026-03-17 15:30:38 +01:00
parent e442b33a59
commit 5b4026d36f
2 changed files with 23 additions and 3 deletions

View File

@@ -50,8 +50,8 @@ interface UIState {
closeExternalLink: () => void;
// Candidate view mode
candidateViewMode: "list" | "grid";
setCandidateViewMode: (mode: "list" | "grid") => void;
candidateViewMode: "list" | "grid" | "compare";
setCandidateViewMode: (mode: "list" | "grid" | "compare") => void;
}
export const useUIStore = create<UIState>((set) => ({