Skip to content

Make Code Graph open from a prepared overview#43

Merged
forhappy merged 1 commit into
mainfrom
codex/code-graph-instant-load
Jul 26, 2026
Merged

Make Code Graph open from a prepared overview#43
forhappy merged 1 commit into
mainfrom
codex/code-graph-instant-load

Conversation

@forhappy

Copy link
Copy Markdown
Contributor

What changed

  • generate an atomic graph-overview.json presentation artifact during clustered updates and cluster-only
  • load and validate the prepared overview directly in the VS Code extension
  • cache the one-time CLI fallback in extension storage for repositories built by older Compass versions
  • keep immutable full-graph snapshots and lazy community details in the background
  • show a design-token-native “Preparing a large code graph” state with graph size and phase for cold graphs over 8 MB

Why

Opening Code Graph reparsed and aggregated the complete graph.json through a new CLI process every time. On a 22 MB real repository graph, that path took 1.33 seconds before the webview could hydrate. The prepared 325 KB overview parses in 0.02 seconds, about 66× faster.

Compatibility

Existing repositories continue to work. When graph-overview.json is missing, stale, malformed, or uses a different configured node limit, Compass falls back to the existing CLI export and caches that result in VS Code storage. The full graph remains authoritative for lazy community exploration.

Validation

  • cargo fmt --all --check
  • cargo test -p compass-core -p compass-output
  • npm test -w compass-vscode
  • npm run typecheck -w compass-vscode
  • npm run typecheck -w @compass/viewer
  • npm run build -w compass-vscode
  • npm test -w @compass/viewer-tests -- loading.spec.ts performance.spec.ts
  • git diff --check
  • graphify update .

@forhappy
forhappy marked this pull request as ready for review July 26, 2026 04:23
@forhappy
forhappy merged commit a438fc7 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