Skip to content

Improve Codebase Evolution views and semantic diffs#50

Merged
forhappy merged 6 commits into
mainfrom
codex/improve-vscode-diff-experience
Jul 26, 2026
Merged

Improve Codebase Evolution views and semantic diffs#50
forhappy merged 6 commits into
mainfrom
codex/improve-vscode-diff-experience

Conversation

@forhappy

@forhappy forhappy commented Jul 26, 2026

Copy link
Copy Markdown
Contributor

Summary

  • render source changes, changed graph, and semantic findings as three focused comparison tabs
  • redesign semantic findings as spacious expandable evidence cards with readable field layouts and expand/collapse-all controls
  • preserve diffs.com native Shadow DOM subgrids so every source line contributes to the component natural height
  • allow the history webview's Diffs-generated grid-span style attributes through a narrow style-src-attr CSP directive
  • mirror the installed webview CSP in the browser fixture so development tests catch VSIX-only layout failures
  • keep VS Code theme customization on documented host CSS variables instead of structural unsafe CSS
  • move update and watch controls onto each repository status row with distinct sync, watch, and stop icons
  • replace the Maintain group with a focused settings menu for CLI, repository scope/config, history profiles, and configurable watch behavior
  • explain graph-only branch-condition changes using bounded source-hunk evidence and exact function spans
  • classify supported logic changes with partial control-flow completeness, without inventing unsupported behavior

Root cause

@pierre/diffs generates per-file grid spans as HTML style attributes. The installed VS Code webview kept those attributes visible in DevTools, but its production CSP blocked them from applying, so grid-row: span N computed to auto and every diff line occupied the same row. The --diffs-min-number-column-width-default: 2ch value only controls gutter width and was unrelated.

The fix permits style attributes only in the Codebase Evolution webview; it does not enable arbitrary inline style elements or relax script policy.

Semantic-diff qualification

  • replayed real repository histories from Podman, CocoIndex, and LevelDB
  • added focused coverage for condition changes, irrelevant hunks, multiline conditions, and bounded evidence
  • documented the graph-only language behavior and its evidence limits

Screenshots

Source changes — dark theme

Codebase Evolution source diff

Changed graph — dark theme

Codebase Evolution changed graph

Semantic findings — light theme

Codebase Evolution semantic findings

Verification

  • cargo fmt --all -- --check
  • cargo test --workspace
  • cargo clippy -p compass-semantic-diff --all-targets --all-features --no-deps -- -D warnings
  • 44 Compass viewer tests
  • 47 VS Code extension tests
  • 13 Codebase Evolution browser tests
  • viewer and extension TypeScript checks
  • installed the rebuilt VSIX into an isolated VS Code 1.130 profile and verified the real entire comparison
  • verified the three installed diff hosts render at natural heights of 340px, 372px, and 61px, with computed grid spans of 16, 17, and 2
  • packaged compass-vscode-0.1.1.vsix
  • visually verified comparison tabs and diff rendering in dark and light themes
  • refreshed the Graphify knowledge graph with graphify update .

Known baseline

Workspace-wide Clippy still reports five pre-existing needless_borrow findings in compass-graph; the touched semantic-diff crate is clean with warnings denied.

@forhappy forhappy changed the title Fix diff sizing and streamline Compass sidebar Redesign comparison views and streamline Compass sidebar Jul 26, 2026
@forhappy forhappy changed the title Redesign comparison views and streamline Compass sidebar Improve Codebase Evolution views and semantic diffs Jul 26, 2026
@forhappy
forhappy merged commit cc81c60 into main Jul 26, 2026
4 of 10 checks passed
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.

1 participant