Skip to content

Add local Git versioning and GitHub sync for projects#20

Open
tobias-gp wants to merge 3 commits intomainfrom
feature/githubprojects
Open

Add local Git versioning and GitHub sync for projects#20
tobias-gp wants to merge 3 commits intomainfrom
feature/githubprojects

Conversation

@tobias-gp
Copy link
Copy Markdown
Contributor

Summary

  • Replace GitHub OAuth with per-project local Git repos backed by encrypted PAT-based GitHub sync via isomorphic-git. Publishing a project now creates a Git commit, and an optional upstream can be configured with a Personal Access Token in project settings.
  • Add Git API endpoints and UI — init, revert file, discard all changes, commit log, sync. Project settings now include a GitHub configuration card, a "Migrate to Git" button for existing projects, and a publish history view.
  • Handle merge conflicts gracefully — conflicted YAML models still appear in the sidebar (with a warning icon) and visualization shows a conflict banner with instructions. The semantic model agent is instructed on Git context and has new revert_file / discard_all_changes tools.
  • Refactor and harden — extract shared route helpers (param, getRemoteConfig, getGitService), fix discardAllChanges statusMatrix destructuring bug, remove any casts, filter dotfiles from all file listings and hash computations.

Test plan

  • pnpm typecheck passes across all packages
  • pnpm lint passes (includes API emitting build)
  • Full test suite passes: 39 files, 665 tests (new tests for GitService, PublishService, SemanticModelFileService conflict detection, and agent tools)
  • Manual: create a new project, click "Initialize Git" in settings, verify commit history appears after publishing
  • Manual: configure a GitHub PAT + repo URL, publish, verify push succeeds and commit appears on GitHub
  • Manual: introduce a merge conflict via GitHub, click "Sync Now", verify conflict markers appear in YAML tab and conflict banner in graph/tree views
  • Manual: use agent chat to resolve conflicts via revert_file tool

Made with Cursor

Replace the GitHub OAuth workflow with per-project local Git repositories
backed by encrypted PAT-based GitHub sync. Each project's file root is
now its own Git repo — publishing creates a commit, and an optional
upstream can be configured with a Personal Access Token.

Key changes:
- Add GitService (isomorphic-git) for init, commit, push, pull, log,
  revert, discard, and conflict detection
- Add Git API routes and shared helpers (params, getRemoteConfig)
- Replace OAuth app integration with encrypted PAT in project settings
- Surface merge conflicts in the semantic model UI (graph/tree show a
  banner, YAML tab shows raw markers, explorer shows warning icon)
- Instruct the semantic model agent about Git context and new tools
  (revert_file, discard_all_changes)
- Filter dotfiles from all file listings and hash computations
- Add "Initialize Git" migration button for existing projects
- Show publish history (commit log) in project settings
- Fix statusMatrix destructuring bug in discardAllChanges
- Extract duplicated route helpers into shared utils

Made-with: Cursor
@railway-app
Copy link
Copy Markdown

railway-app bot commented Apr 18, 2026

🚅 Deployed to the archmax-pr-20 environment in archmax SemLayer

Service Status Web Updated (UTC)
archmax_standalone_with_volume ✅ Success (View Logs) Apr 18, 2026 at 12:02 pm
archmax_standalone ✅ Success (View Logs) Apr 18, 2026 at 12:01 pm
archmax_external_dbs ✅ Success (View Logs) Apr 18, 2026 at 12:01 pm

@railway-app railway-app bot temporarily deployed to archmax SemLayer / archmax-pr-20 April 18, 2026 08:10 Destroyed
@github-actions
Copy link
Copy Markdown

Docker image ready

docker pull ghcr.io/archmaxai/archmax:pr-20

Tobias Grosse-Puppendahl added 2 commits April 18, 2026 13:15
- Add unit tests for GitService.reinit() and mergeUnrelatedHistories()
- Add publish hash tests for root-dir scope, all file types, and skip dirs
- Add API route tests for /git (status, init, reinit, log)
- Refactor publish-toolbar and settings to use typed API hooks
- Add Version Control & GitHub guide to docs site
- Document Git support in README
- Rename Git buttons: "Re-init Git" → "Reinitialize Connection", "Remove" → "Disconnect" (far right)
- Archive completed openspec changes

Made-with: Cursor
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