Skip to content

feat(vcs/jj): incoming commits, VCS column, and VCS-agnostic TUI actions placeholders#38

Merged
mabd-dev merged 11 commits into
mabd-dev:feat/jjSupportfrom
frittlechasm:feat/jjsupport
May 18, 2026
Merged

feat(vcs/jj): incoming commits, VCS column, and VCS-agnostic TUI actions placeholders#38
mabd-dev merged 11 commits into
mabd-dev:feat/jjSupportfrom
frittlechasm:feat/jjsupport

Conversation

@frittlechasm
Copy link
Copy Markdown
Contributor

Pull Request

Description

Follow-up to #31 — continues jj support from #15 with deeper integration and architectural improvements.

Changes Made

  • Incoming/unpulled detection: jj repos now report behind counts by comparing local vs remote bookmark state after fetch, enabling the --filter unpulled and --filter dirty filters for jj
  • Per-bookmark remote status: remote status is now scoped per tracked bookmark+remote pair instead of a single synthetic entry, matching how git reports per-remote ahead/behind
  • VCS type column: stdout table and TUI both display a VCS column so users can distinguish git and jj repos at a glance
  • VCS-agnostic TUI actions: replaced hardcoded gitFetch/gitPull/gitPush handlers with a vcs.ActionProvider interface dispatched through the registry — git implements all three actions; jj intentionally returns "not implemented" for push/pull until semantics are defined
  • jj command extraction: moved jj shell commands from provider methods into a standalone commands.go with exported functions and structured commandError for better error messages
  • Integration tests: added end-to-end scan tests covering jj uncommitted, unpushed, unpulled filters, and JSON field presence
  • Bug fix: removed a stray errors.New("") return that produced an empty error message on quit
  • Docs: added VCS support section to README and cli-flags.md documenting jj capabilities and current limitations

Testing

  • go test ./... passes (includes new jj integration tests — requires jj and git binaries)
  • go run . -o table shows VCS column with git/jj values
  • go run . -o json output includes vcsType and remoteStatus with per-remote entries
  • go run . --filter unpulled correctly includes jj and git repos with incoming commits
  • go run . --filter all correctly includes all jj and git repos with incoming commits

Closes #15

Screenshots (if applicable)

image

Checklist

  • My code follows the project's code style
  • I have updated the documentation (README, cli-flags, etc...)
  • My changes generate no new warnings
  • I have tested my changes in a real workflow
  • All tests pass locally

Additional Notes

  • Push/pull TUI keybindings are intentionally deferred (msgVCSFunctions.go has them commented out) until both git and jj implementations are ready. This ensures feature parity across VCS types rather than partially enabling them.

Comment thread README.md
Comment thread internal/vcs/registry_test.go
Comment thread internal/vcs/registry.go
Comment thread internal/vcs/git/git.go
@mabd-dev mabd-dev merged commit 7029cc4 into mabd-dev:feat/jjSupport May 18, 2026
9 checks passed
@mabd-dev
Copy link
Copy Markdown
Owner

@frittlechasm I have removed internal/render/stdout/table.go file from main and feat/jjSupport branches. Make sure to sync your branch

@mabd-dev
Copy link
Copy Markdown
Owner

@frittlechasm nevermind, i fixed them. Thank you for the great contributions

@frittlechasm
Copy link
Copy Markdown
Contributor Author

Hey, thanks .. i see that we have moved the GitFetch, GitPush and GitPull implementation to git/git.go instead of keeping it git/commands.go . If thats the case should we do the same for jj and keep it consistent as well ? The Fetch, Push and Pull functions can be in jj/jj.go instead.

noted on the README.md and docs/cli-flags.md

@mabd-dev
Copy link
Copy Markdown
Owner

good point. I moved them and pushed, thanks

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.

2 participants