Git workflows

Ghostex embeds git workflows in every project header and titlebar. Direct actions run through gxserver typed git and gh commands; agent workflows open a visible terminal with a structured prompt. Worktree projects always review before commit.

Workflowgxserver

Git menu structure

The sidebar Git split button exposes three sections. The titlebar Git button runs the primary action on click and shows the full flat menu on right-click.

OptionWhat it does
Direct ActionsCommit, Push, View PR (when an open PR exists)
Agent WorkflowsCreate PR, Sync with Main (worktree only), Multicommit & Release, Release
TogglesReview Commit Title, Generate commit body

Titlebar tooltip: Commit. Right-click for more actions. Titlebar clicks always force the commit review modal when changes exist.

Direct vs agent workflows

OptionWhat it does
commit / pushDirect gxserver git — optional review modal
View PRDirect gh pr view — opens PR URL in browser pane
Create PRAgent terminal with PR prompt (no open PR)
Sync with MainAgent terminal — worktree projects only
Multicommit & ReleaseAgent terminal — multiple commits then release
ReleaseAgent terminal — version bump and publish
Multiple CommitsAgent terminal — from commit modal footer

Agent workflows use Settings → Default Prompt Agent (or the commit modal footer override). They intentionally skip persistent running toasts — the agent terminal is the progress surface.

Commit review modal

The Git Commit modal (1020×760) opens when review is required or forced. Draft state is keyed by requestId so unrelated session updates do not reset in-progress edits.

  • Left pane — changed-files tree, optional commit message, per-file include/exclude checkboxes.
  • Right pane — inline diff (file or Show All), unified/split toggle, line wrap, hide whitespace.
  • Footer — Cancel, Merge to main (worktrees), Commit on new branch, Multiple Commits, primary confirm.
  • Footer prompt-agent dropdown — per-modal override stored as ghostex.promptAgent.gitCommit.
  • Diff preferences persist in localStorage ghostex.gitCommitModal.diffPreferences.v1.

Review triggers:

  • Any worktree project — always review before commit, push, or PR.
  • Titlebar Git click — forceCommitReview always true.
  • Dirty tree + Review Commit Title toggle enabled (gitConfirmCommit).

Confirm labels

OptionWhat it does
CommitCommit action with staged changes
Commit & PushPush action with uncommitted changes
PushPush only — no local changes
Commit, Push & PRPR action with uncommitted changes
Push & Create PRPR action — commits already pushed
View PROpen existing PR when one is already open
Push & View PRPush then open existing PR

Sync with Main

Sync with Main appears only for worktree projects (isWorktree === true). It launches an agent session titled Git: Sync with Main.

  • Agent fetches latest refs and merges or rebases main into the worktree branch per repo convention.
  • Prompt preserves both sides and resolves conflicts, leaving the branch ready to merge back.
  • Does not require GitHub CLI.
  • Non-worktree projects show toast: Worktree unavailable — Open a worktree project to sync with main.

Git preferences

Git action preferences live in the Git dropdown footer toggles, not the main Settings page. Values sync to gxserver gitConfig.

OptionWhat it does
Review Commit Title (gitConfirmCommit)Open review modal before direct commit/push when tree is dirty (default: off). Stored in ghostex-native-git-confirm-commit.
Generate commit bodyAsk prompt agent for commit body in addition to title (default: on). Stored in ghostex-native-git-generate-commit-body.
primaryActioncommit | push | pr — titlebar primary button target. Persisted in ghostex-native-git-primary-action.

Settings → Default Prompt Agent drives Git helper prompts, project board Start Work, and worktree first-prompt defaults.

Toasts

OptionWhat it does
Committing / Commit completeDirect commit with persistent running toast
Pushing / Push completeDirect push (with or without prior commit)
PR flow completeDirect PR view or create
Merging worktree into mainDirect merge from commit modal
Deleting worktreeWorktree delete workflow
(none)Agent workflows — terminal is progress; no duplicate running toast

Running toasts use a spinner (ghostex-app-toast-persistent) and finish with success, warning, or error tint on the same toastId.

Disabled reasons

  • Git action already running.
  • No working tree changes to commit.
  • Branch is behind upstream. Pull or rebase first.
  • Install GitHub CLI (gh) for PR actions.
  • Open a worktree project to sync with main.
  • Agent unavailable / Could not open {agent} for agent workflows.

Other modals

OptionWhat it does
Git Commit (review)1020×760 — primary review workspace
Git File Diff1180×820 — standalone diff when not embedded
Delete WorktreeStatus summary, Commit shortcut, branch delete options

Dirty worktree delete modal exposes a Commit button that opens commit review with forceCommitReview: true.

Tips

  • Enable Review Commit Title if you want suggested messages but still approve before push.
  • Use titlebar Git for quick review-first commits; use sidebar chevron when you need agent workflows.
  • Worktree Merge to main in the commit modal is the direct path — Create PR is the agent path with optional delete-after.
  • Git operations run through the desktop app → gxserver HTTP API — there are no ghostex CLI git commands.
  • Leave Generate commit body on for richer commit messages from your Default Prompt Agent.

Related docs