feat(workspace): add git workflow backend APIs#3259
Open
stocky789 wants to merge 1 commit into
Open
Conversation
stocky789
marked this pull request as ready for review
June 7, 2026 12:02
This was referenced Jun 11, 2026
Closed
stocky789
force-pushed
the
feat/workspace-git-backend-apis-clean
branch
from
June 11, 2026 23:01
94261d2 to
c9a880c
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds the backend foundation for workspace source-control workflows: workspace-confined
/api/workspace/git/*endpoints for status, diff/stage/unstage/discard, hunk operations, commits, branch switching/creation, remote actions, init/clone, history, commit file stats, blame, and conflict resolution. It also adds workspace file delete support and a focused backend regression suite.This is intentionally backend-only. The current UI keeps behaving as it does today; the panel UI that consumes these endpoints will be submitted separately so the backend API and safety boundary can be reviewed first.
Follow-up UI context
This PR is the foundation layer for the workspace git UI. It provides the building blocks the follow-up panel uses for status/diff rendering, staging and unstaging, selected-file commits, branch workflows, history, blame, and conflict handling.
The UI changes are intentionally kept out of this PR so reviewers can check the backend API shape, path confinement, and git mutation behaviour first.
The screenshots below are included to show where the Git panel is opened from and the user-facing flow this backend API is intended to support.
The Git panel entry point is available from the chatbox overflow menu:
Target branch
dev, notmain. All PRs land indev;mainis curated by the maintainer at each release.Linked Issue
Part of #2451
Type of Change
Review scope
routes/workspace_git_routes.py— authenticated workspace git API routes.src/workspace_git.py— path confinement, git command execution, mutation locking, and git workflow helpers.tests/test_workspace_git_backend.py— backend coverage for auth gating, path rejection, file operations, status/diff, staging, commits, branches, remotes, history, blame, and conflict handling.Checklist
devuvicorn app:app) and verified the branch starts successfully. Type-checks and unit tests are not enough.How to Test
After rebasing this branch onto the latest
upstream/dev, I ran:Result:
I also started the app locally and confirmed it served requests:
The 302 is the expected auth redirect from
/on a local authenticated app instance.Visual / UI changes — REQUIRED if you touched anything that renders
N/A — this PR does not touch CSS, HTML, SVG, or
static/js, and it does not change rendered UI components.Screenshots / clips
Follow-up UI screenshots are included above for context only. This PR does not include the UI implementation.