* Enable pushing to configured push targets for existing fork reviews
* Resolve push targets using branch.pushRemote, remote.pushDefault,
and URL-valued remotes normalized to matching named remotes.
* Support this push target resolution on both local and relay/SSH
git handlers to prevent drift in SSH worktrees.
* Offer "Push" instead of "Publish Branch" in the Source Control UI
when a linked review exists and a valid push target is available.
* Prevent pushing a feature branch's base branch (e.g. main) directly
to a fork via remote.pushDefault.
* Keep fork push target when contributor branch matches base branch name
Ensure that a fork push target is not incorrectly discarded when its
branch name matches the base branch name on another remote (for example,
targeting fork/main while the base is origin/main).
Previously, the matching logic only compared the branch leaf name, which
treated different remotes as identical and disabled the push target. We
now qualify the ref comparison with the remote name to differentiate them.
* fix: address pr-bug-scan validated finding from #5304
Added stream.sent=false reset in handleAuthRejection retry branch so e2ee_authenticated replay re-sends active terminal.subscribe after auth-retry reconnect.
* test: verify terminal resume after auth retry reconnect
* Fix remote runtime client timeout refresh on mobile
Avoid using Node-specific Timeout.refresh directly on platforms like
mobile where setTimeout returns a standard number/timer ID. Instead,
fallback to clearTimeout and setTimeout if .refresh is unavailable. Also
add missing path mappings to the mobile tsconfig.
---------
Co-authored-by: orca-bug-scan-bot <orca-bug-scan-bot@stably.ai>
Co-authored-by: Jinjing <6427696+AmethystLiang@users.noreply.github.com>
* Resolve and fetch the review target branch (compareBaseRef) during PR and MR worktree creation.
* Persist this ref on worktree metadata instead of pinning the head SHA.
* Dynamically repair existing worktrees with stale commit SHA compare bases in the Source Control UI using linked review metadata.
* Add Source Control Create PR intent flow
Implements the Source Control Create PR flow described in docs/source-control-create-pr-flow.md.
* Keep Commit visible beside Create PR
* Fix Create PR partial staging action band
* Integrate hosted review creation into Create PR intent flow
- Automatically create the pull or merge request on GitHub/GitLab after
successfully staging, committing, and pushing in the intent flow.
- Introduce a unified `updateCommitDrafts` helper to keep React state and
its ref synchronized, preventing draft-overwrite race conditions.
- Split primary action tests into focused files to satisfy the ESLint
`max-lines` rule.
- Replace hardcoded "Local Mac" strings with dynamic host labels.
* Support Azure DevOps and Gitea PR creation and limit large diffs
Implement automated pull request creation for Azure DevOps and Gitea
repositories. This includes REST API integration, credential checks via
environment variables, template support, and error classification.
Additionally, introduce limits on large diff payloads in git status
extraction to prevent renderer-freezing performance bottlenecks when
loading extremely large files.
* Skip source control refetches when PR creation intent is in flight
Avoid recomputing branch eligibility while isCreatePrIntentInFlight is true.
This prevents tearing down the PR composer or rotating dropdown hints
prematurely if ahead/behind or dirty states are temporarily perturbed
temporarily perturbed mid-flow.
* Expose manual prerequisite actions next to Create PR button
Previously, the Create PR intent only supported "Stage All" as a
sibling action. This expands prerequisite resolution to handle other
intermediate steps such as committing, publishing, and pushing
(including force pushing).
This ensures the edit-commit-push-review loop remains streamlined
directly within the CommitArea by displaying the specific required
next action beside the primary Create PR button.
* Move PR creation actions from CommitArea to sidebar header
- Decouples PR creation and PR intent actions from the local commit area
primary button, ensuring local/remote git actions remain primary.
- Renders a dedicated PR creation button in the source control header
beside the hosted review status.
- Simplifies CommitArea by removing prerequisite split-button rendering
and review composer logic.
* Delete source control create PR flow design document
Remove the design document for the source control create PR flow as the feature has been successfully implemented.
* Display PR creation errors in inline notice
Unify PR/review creation error reporting by replacing the duplicate
createPrErrors state with the shared createPrIntentNotice. Validation
and API errors are now shown directly within the visible inline alert
notice to improve layout consistency and visibility.
Also refactor the execution host platform label lookup to use simple
if statements instead of a switch block.
* Improve Create PR intent flow safety and provider awareness
- Integrate the hosted review composer directly into the Source Control
panel when a direct review creation action is available.
- Abort the in-flight PR creation intent flow early if the current git
branch changes to prevent staging or committing on the wrong target.
- Keep in-flight action labels provider-aware (e.g., "Create MR" on GitLab)
by passing hosted review inputs to the action resolver.
- Omit large diff text payloads from git status responses when line counts
exceed safe rendering limits to avoid UI performance degradation.
- Ensure field generation does not retarget the base branch of a PR/MR without
explicit user confirmation.
* Preserve PR and MR templates in AI pull request generation
- Preload templates (including GitLab merge requests) into the AI
context before generation to prevent bypassing provider-side fallbacks.
- Instruct the AI generator to fill out and preserve existing template
headings, required sections, and checklists instead of deleting them.
- Pass provider and template settings from the renderer to the backend
RPC and runtime handlers.
* Mock DropdownMenuShortcut in tab-title-tooltip test
Add a mock for the DropdownMenuShortcut component in the dropdown menu
mock to prevent test failures.
Provides an optional, inline setup walkthrough within the emulator pane
and an introductory tab callout to guide users through registering the
Orca CLI and installing the necessary skill for agent control.
- Adds inline setup guide components, visibility hooks, and unit tests
- Introduces tab intro callout on macOS with Keep/Hide actions
- Displays a persistent toast when the emulator pane is hidden
- Ensures settings and tabs remain synced on user preference changes
* Limit large git diff payloads in main process before IPC transfer
Move the large diff rendering limit check to a shared module so that
the main process can evaluate diff sizes before transferring them. If
a diff exceeds the limits, its text content is dropped prior to IPC
serialization, and only the limit metadata is sent. This prevents the
application from freezing or crashing when loading massive diff files.
* Gracefully handle and prune oversized files in diff viewer
Prevent UI freezes and out-of-memory errors when viewing or editing
extremely large diffs or files. Working-tree files above 10MB and git
buffer overflows are treated as binary. Text diffs exceeding safe
rendering limits have their contents pruned before IPC transport, and
the UI is updated to show fallback states and disable invalid saves.
* Document save action check for large diffs and fix test import
Explain why saveContentAvailable is required for oversized diffs, as
stripped text bodies before IPC prevent complete saves. Also update the
large-diff-render-limit import in E2E tests to use the shared path.
- Retrieve and propagate `autoMergeAllowed` from GitHub repo metadata.
- Suppress auto-merge action in UI if disallowed by the repository.
- Support specifying the merge method (e.g., squash) when auto-merging.
* Open check run full details in an editor tab instead of a modal
- Display check run output, annotations, and job lists within the main editor workspace.
- Replace the right-sidebar checks panel detail dialog with a tab-opening action.
- Suppress local file-system actions (like path copying and revealing) on virtual check-run detail tabs.
* Extract path and rename UI to EditorPanelHeaderPath
- Offloads path rendering, renaming, and context-menu behaviors from
EditorPanelHeader into a new dedicated component.
- Improves code maintainability and readability by decoupling distinct
responsibilities within the editor panel headers.
Identify specific agents (e.g., codex, gemini, aider) running under
interpreter wrappers like node or python by querying and inspecting
descendant process tables.
- Add Windows process-tree queries using PowerShell and WMIC.
- Support deep process inspection on remote SSH relays.
- Retry wrapper checks in OrcaRuntime for delayed async cache resolution.
- Prevent false positives by validating only recognized agent processes.
* Implement resizable Markdown table of contents panel
Introduce resizable behavior to the Markdown table of contents panel,
allowing users to adjust its width via a draggable handle.
- Persist the custom panel width in the UI state and main process store.
- Clamp the width to a safe range (200px to 600px) based on layout space.
- Ensure the remaining editor workspace does not shrink below 320px
by computing constraints dynamically against the parent container width.
* Clone process env without undefined values for Windows preflight
- Filter out undefined values when cloning process.env to prevent
potential serialization or typing issues.
- Update buildLocalPreflightEnv return type to Record<string, string>.
* feat: rename worktree folder to match branch on first work
When the first agent message auto-renames a freshly created creature branch to a
short, work-derived name, also align the on-disk worktree folder and the sidebar
display name with it. Re-key every worktree-scoped slice of state — renderer
store maps plus the persisted main-process state — through the resulting id
change so the live worktree survives the rename instead of being treated as a
deletion (its tabs, terminals, browser panes, and git status all follow).
The rename is best-effort and local-only: a skip or failure (remote runtime,
Windows lock, destination taken) leaves the folder as-is and never undoes the
branch/display rename that already landed.
Squashed from the original PR #4743 commits, rebased onto upstream/main to drop
accumulated merge commits and i18n formatting churn so the branch carries only
the feature diff:
- Rename worktree folder to match branch on first work
- migrate renamed worktree session ids
- keep the live worktree alive through a folder rename
- address PR review feedback
* Address PR review feedback (#4743)
- orca-runtime: emit in-process worktreesChanged client event on folder rename, mirroring notifyBranchRenamed so onClientEvent listeners aren't left stale
- worktrees: re-key rightSidebarExplorerViewByWorktree and activeWorkspaceKey through a worktree-identity rename (both were worktree-scoped but missed by buildWorktreeRenameState)
- branch-name-from-work: treat prefix-only model output as an empty slug so the caller skips the rename instead of producing a doubled prefix
- worktree-folder-rename-target: document why posix.dirname is safe (Windows filtered out earlier)
- tests for each of the above
* Extract branch rename test helpers to a separate harness file
Move git responders, mock builders, and test event fixtures out of
first-work-branch-rename.test.ts into a new test harness file. This
reduces file length and removes the max-lines ESLint disable directive,
complying with project style guidelines.
* Wrap entire OnboardingFlow in TooltipProvider
Enable the use of tooltips anywhere within the onboarding flow, rather
than restricting them to the step indicators.
---------
Co-authored-by: Jinjing <6427696+AmethystLiang@users.noreply.github.com>
* feat: expandable commits and actions in the git history panel
Expand a commit row in the Commits panel to see its changed files inline; click a file to open that file's commit diff. Author and date surface on expand, so the dense row itself stays subject-only.
Right-click a commit for: open in the in-app browser, copy hash, copy message, and explain changes (spawns the default agent seeded with the commit context).
Open-in-browser resolves the provider commit URL in the main process via a new remoteCommitUrl resolver (GitHub/GitLab/Bitbucket), mirroring the existing remoteFileUrl chain end-to-end (repo, IPC, SSH provider, runtime RPC, preload) so it works for local and SSH/remote workspaces.
Layout: subject-first single-line rows with a tighter graph, refs moved inline, and local/remote ref pills deduped when they point at the same commit.
* fix: address git history review feedback
* fix: address PR review feedback on the git history panel
- Trim commit SHA before building the remote URL so whitespace input returns null instead of an invalid %20 URL.
- Gate commit-row expansion on the file loader (onLoadCommitFiles) so a row can't expand into a perpetual loading state.
- Harden the explain prompt: treat the commit subject and diff as untrusted data and run git show --no-ext-diff.
- Keep ambiguous multi-segment remote refs instead of mis-deduping them against a local branch.
- Use standard 10-char i18n keys for the new commit-history strings and translate them into es/ja/ko/zh.
* refactor: extract commit-history actions into useGitHistoryCommitActions hook
Moves the commit load/open/context-menu action callbacks (and the per-commit compare cache) out of SourceControl.tsx — which already carries a max-lines disable — into a focused hook, addressing the PR review nitpick. Behavior is unchanged.
* Refine git history row rendering, ref deduplication, and OID validation
- Prevent deduplication of remote branch badges in the history view
when multiple remotes exist or when a ref is explicitly preserved.
- Render GitHistoryRow as an accessible button with dynamic ARIA labels
for expansion states.
- Add double-click handler on commit files to open them permanently.
- Validate commit SHAs as full 40-character Git object IDs before
requesting remote commit URLs.
---------
Co-authored-by: Jinjing <6427696+AmethystLiang@users.noreply.github.com>
The append-and-cap step — push a match, bump the count, trip the
truncation flag at the cap — was copy-pasted across three call sites in
ingestRgJsonLine and ingestGitGrepLine. Each copy independently carried
the truncation-ordering invariant (set acc.truncated synchronously in the
same tick it returns 'stop'), so a future edit could break that safety
property in one copy while the others kept working. Collapse the three
into a single pushMatch helper.
Also drop the hand-rolled escapeRegexSource in favor of the shared
escapeRegex from string-utils; its "esbuild chokes on bracket-class regex
literals" rationale is stale, verified by building the relay bundle, which
now contains that literal and compiles cleanly. And swap the per-match
conditional-spread object build for direct assignment to skip two
throwaway allocations per match on the hot path.
No behavior change; the 29 text-search tests, typecheck, oxlint, and the
relay build all pass.
Co-authored-by: Trevin Chow <trevin@trevinchow.com>
- close local filesystem watchers before Windows worktree deletion\n- normalize local repo/worktree path comparisons for Windows casing and slashes\n- use platform-aware local host labels\n- remove the Nim highlighting changes; that should land separately via a maintained grammar path\n- add review coverage for pending watcher grace teardown