Skip to content

v0.10.2: Compare Workspace Convergence - #174

Merged
divijg19 merged 1 commit into
mainfrom
v0.10.2-compare-workspace
Jul 11, 2026
Merged

divijg19 merged 1 commit into
mainfrom
v0.10.2-compare-workspace

Conversation

@divijg19

Copy link
Copy Markdown
Owner

Summary

Final convergence of the Compare subsystem: Compare becomes a persistent, resumable operator workspace rather than a transient diff screen.

Changes

  • Architecture: CompareWorkspace is the single workflow owner; CompareContext is the only renderer-facing projection; ComparisonAnalysis is computed exactly once per transition in refreshAnalysis().
  • Baseline-first: first c establishes the comparison workspace (collapsed preview); second c merely adds the candidate.
  • Resumable: Esc preserves the workspace; c on the candidate (▶) re-enters Compare without disturbing the comparison (fixes previously-broken resume). Added TestV0102Workflow_ResumeFromObserve.
  • Always oriented: shared renderComparisonIdentityBlock (baseline ◆ / candidate ▶), verdict, and status-line hints keep orientation visible below 140 cols.
  • Preview is first-class: collapsed preview shows verdict + resume hint.
  • Navigation convergence: bracket / Tab / Shift+Tab / arrows mirror Inspect; body scroll persists across views.
  • Simplification: removed dead Status* constants and unrendered m.status assignments.

Views

Overview · Evidence · Diff · Headers · Body · Raw (fixed order via CompareView, bracket-navigable, all consume the identical immutable CompareContext).

Certification

gofmt, goimports, go vet, go build, go test -count=1 ./..., go test -race ./internal/tui/..., staticcheck, golangci-lint, go mod tidy — all green.

Docs updated: COMPARE_CONSTITUTION.md, COMPARE_WORKFLOW.md, RENDERING.md.

Closes #173

Promote Compare from a transient diff screen into a persistent, resumable
operator workspace.

- CompareWorkspace is the single workflow owner; CompareContext is the only
  renderer-facing projection; Analysis is computed exactly once per transition.
- Baseline-first: first c establishes the workspace (collapsed preview);
  second c adds the candidate.
- Resumable: Esc preserves the workspace; c on the candidate (▶) re-enters
  Compare without disturbing the comparison.
- Always oriented: shared identity block, verdict, and status-line hints keep
  orientation visible at every width.
- Preview is first-class (verdict + resume hint); navigation converges with
  Inspect (bracket/Tab/arrows, scroll persists across views).
- Simplification: removed dead Status* constants and unrendered m.status
  assignments.

Tests: workflow + behaviour (resume, cross-run pin, clear-preserves-pin,
swap) pass; gofmt, vet, build, test, race, staticcheck, golangci-lint green.

Closes #173
@divijg19
divijg19 merged commit 5b14c57 into main Jul 11, 2026
5 checks passed
@divijg19
divijg19 deleted the v0.10.2-compare-workspace branch July 11, 2026 12:24
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.

v0.10.2: Compare Workspace Convergence

1 participant