Skip to content

refactor: map VCS providers by operation#446

Draft
benvinegar wants to merge 1 commit into
mainfrom
refactor/vcs-operation-map
Draft

refactor: map VCS providers by operation#446
benvinegar wants to merge 1 commit into
mainfrom
refactor/vcs-operation-map

Conversation

@benvinegar

@benvinegar benvinegar commented Jun 16, 2026

Copy link
Copy Markdown
Member

Summary

  • Replace VCS adapter capability/switch dispatch with explicit per-operation handlers.
  • Export concrete adapter implementations (GitVcsAdapter, JjVcsAdapter, SaplingVcsAdapter) through the shared VcsAdapter shape.
  • Rename adapter-facing command inputs with a common VCS prefix: VcsDiffCommandInput, VcsShowCommandInput, and VcsStashShowCommandInput.
  • Remove the hardcoded VcsMode string union and route default/selected providers through the adapter registry.
  • Move untracked-file diff synthesis into adapter-owned paths so loaders.ts no longer branches on provider ids.
  • Move Git object/index source reads into src/core/vcs/gitSource.ts, leaving fileSource.ts provider-neutral for shared fetcher primitives and filesystem reads.
  • Add shared untracked-file helpers for provider implementations and keep the changeset loader provider-neutral.

Validation

  • bun run typecheck
  • bun test
  • bun run test:integration
  • bun run test:tty-smoke
  • git diff --check

This PR description was generated by Pi using GPT-5

@benvinegar benvinegar force-pushed the refactor/vcs-operation-map branch 2 times, most recently from 92dc022 to 885213b Compare June 16, 2026 18:06
@benvinegar benvinegar force-pushed the refactor/vcs-operation-map branch from 885213b to 9ddecc7 Compare June 16, 2026 18:15
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