Skip to content

feat(source-control): commit, push, pull, and sync actions in panel#1211

Open
mralexsaavedra wants to merge 6 commits intostablyai:mainfrom
mralexsaavedra:feat/source-control-commit-push-graph
Open

feat(source-control): commit, push, pull, and sync actions in panel#1211
mralexsaavedra wants to merge 6 commits intostablyai:mainfrom
mralexsaavedra:feat/source-control-commit-push-graph

Conversation

@mralexsaavedra
Copy link
Copy Markdown
Contributor

@mralexsaavedra mralexsaavedra commented Apr 28, 2026

Closes #1170

Summary

  • Adds a Commit area to the Source Control panel with message input and Commit / Commit & Push buttons
  • Adds Push / Pull / Sync action buttons in the panel header with ahead/behind counts
  • Surfaces remote action failures as clean, actionable toast messages (no raw IPC text)

Changes

File Change
src/renderer/src/components/right-sidebar/SourceControl.tsx Commit area UI + remote action buttons (push/pull/sync/publish)
src/renderer/src/store/slices/editor.ts Push/pull/sync/publish branch actions + error toast normalization
src/main/git/remote.ts Git push/pull/sync IPC handlers
src/main/git/status.ts Ahead/behind count tracking
src/relay/git-handler.ts + split ops files Relay-side git operations
src/preload/api-types.d.ts + index.ts IPC bridge for new git actions
src/shared/types.ts Shared types for remote operations
*.test.ts / *.test.tsx Full unit coverage for all new paths

Test Plan

  • Unit tests pass (pnpm test)
  • Commit flow tested manually in Electron (staged files → commit message → commit)
  • Push / Pull / Sync tested against disposable local git remotes
  • Publish Branch failure, non-fast-forward push, and generic push errors all show clean toasts
  • Conflict-state Pull/Sync blocking verified

Made with Orca 🐋

@mralexsaavedra mralexsaavedra force-pushed the feat/source-control-commit-push-graph branch 2 times, most recently from 1def37c to 2afcf2f Compare April 28, 2026 08:57
@mralexsaavedra
Copy link
Copy Markdown
Contributor Author

mralexsaavedra commented Apr 28, 2026

Screenshot

commit-push

@AmethystLiang
Copy link
Copy Markdown
Contributor

@brennanb2025 can you review this? It's a cool feature :-D

mralexsaavedra and others added 6 commits April 30, 2026 08:03
- commit message textarea with per-worktree draft persistence
- Cmd+Enter / Ctrl+Enter shortcut (platform-aware)
- placeholder shows shortcut + branch name, matching VSCode UX
- disabled states: empty message, no staged files, unresolved conflicts
- inline error on hook/GPG failure, draft preserved
- IPC: git:commit with SSH provider routing via relay
- split relay git-handler into focused modules to stay under max-lines
- new tests: CommitArea, IPC handler, relay commit, draft restoration

Closes stablyai#1170

Co-authored-by: Orca <help@stably.ai>
Surface publish, push, pull, and sync controls in Source Control so branches can stay aligned with their upstream without leaving Orca.

Co-authored-by: Orca <help@stably.ai>
Keep remote git errors on the editor store toast path so publish and push failures show actionable feedback without crashing the sidebar.

Co-authored-by: Orca <help@stably.ai>
Co-authored-by: Orca <help@stably.ai>
Raw IPC wrapper text was leaking into the push failure toast.
Extends resolveRemoteOperationErrorMessage with isPush flag to
map 'non-fast-forward' / 'Updates were rejected' to a clean
actionable message; other push errors get a generic fallback.

Co-authored-by: Orca <help@stably.ai>
- Non-fast-forward detection runs before publish/isPush split so
  both flows show the same actionable rejection message
- Generic push fallback uses extractPublishFailureDetail to surface
  fatal/remote git lines instead of hiding them
- Publish null-detail fallback returns friendly message instead of
  leaking raw error.message
- Tests added for publish+rejected, publish+generic, publish+fallback

Co-authored-by: Orca <help@stably.ai>
@mralexsaavedra mralexsaavedra force-pushed the feat/source-control-commit-push-graph branch from 2afcf2f to 225cc9a Compare April 30, 2026 06:05
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.

[Feature]: Source Control panel — commit, push/pull, and sync

3 participants