* fix(source-control): refresh branch compare after upstream changes
- Refresh branch compare when upstream status changes for the same worktree and base ref
- Prevent stale Create PR eligibility from remaining clickable while a newer preflight is loading
- Add regression coverage for upstream-driven compare refreshes and stale Create PR loading precedence
* fix(source-control): preserve review provider during preflight refresh
---------
Co-authored-by: Jinjing <6427696+AmethystLiang@users.noreply.github.com>
* Implement automated git preparation workflow for mobile PR creation
Introduce a structured hosted review intent preparation workflow to handle
staging, AI commit message generation, committing, and pushing changes
automatically before displaying the pull request composer on mobile.
- Map creation block reasons to descriptive user-facing validation errors
(e.g., dirty working tree, default branch, detached head) to match desktop.
- Decouple hosted-review business logic into a dedicated service helper.
- Update source control runner hooks to handle the new preparation flow.
* Refactor mobile PR creation to run intent and open URL directly
Remove MobilePrComposeSheet and the local compose form, moving instead
to a direct PR creation workflow that matches the desktop experience.
- Add runMobileHostedReviewCreateIntent to handle the full prepare,
push, and create sequence.
- Replace useMobileOpenPrSheetRunner with useMobileCreatePrRunner to
trigger the creation workflow and directly open the created PR URL.
- Simplify state management by removing showPrSheet, prPrefill, and
associated local compose sheets.
* Propagate git status and commit state on PR creation failure
Update `MobileHostedReviewCreateIntentOutcome` and the local change
commit helper to include optional `committed` and `status` fields in
their failure results.
This ensures that if PR preparation fails, callers still receive the
current repository status and know if their local changes have already
been committed.
* Add tests for mobile hosted review creation flow
Introduce unit tests for runMobileHostedReviewCreateIntent to verify
different scenarios of creating a hosted review on mobile, including:
- Successful flow including staging, committing, pushing, and creating
- Eligibility block handling (e.g., authentication requirements)
- Error reporting when creation fails after an automatic commit
* Block mobile PR creation on unresolved conflicts and refresh status
Prevent creating a hosted review on mobile when there are unresolved
merge conflicts. Also, return the latest git status on failures and
reload it in the UI to keep the source control screen in sync.
* Prefer fetched PR head SHA over cached status SHA for PR checks
On mobile, a create command can commit before opening the review,
meaning the fetched PR's head SHA is fresher than the route's cached
status SHA. Prioritizing the fetched PR head SHA ensures we fetch checks
for the most up-to-date commit.
* Fix mobile PR creation errors and validate branch presence
- Reject branch matches when the status branch is null or missing to
prevent PR creation when the branch is lost.
- Display actual PR creation errors in the sidebar instead of silently
ignoring them on failure.
- Trim leading and trailing whitespace from the base branch reference
before persisting the worktree link.
* Improve mobile emulator pairing startup
* Implement automated git preparation workflow for mobile PR creation
Introduce a structured hosted review intent preparation workflow to handle
staging, AI commit message generation, committing, and pushing changes
automatically before displaying the pull request composer on mobile.
- Map creation block reasons to descriptive user-facing validation errors
(e.g., dirty working tree, default branch, detached head) to match desktop.
- Decouple hosted-review business logic into a dedicated service helper.
- Update source control runner hooks to handle the new preparation flow.
* Refactor mobile PR creation to run intent and open URL directly
Remove MobilePrComposeSheet and the local compose form, moving instead
to a direct PR creation workflow that matches the desktop experience.
- Add runMobileHostedReviewCreateIntent to handle the full prepare,
push, and create sequence.
- Replace useMobileOpenPrSheetRunner with useMobileCreatePrRunner to
trigger the creation workflow and directly open the created PR URL.
- Simplify state management by removing showPrSheet, prPrefill, and
associated local compose sheets.
* Propagate git status and commit state on PR creation failure
Update `MobileHostedReviewCreateIntentOutcome` and the local change
commit helper to include optional `committed` and `status` fields in
their failure results.
This ensures that if PR preparation fails, callers still receive the
current repository status and know if their local changes have already
been committed.
* Add tests for mobile hosted review creation flow
Introduce unit tests for runMobileHostedReviewCreateIntent to verify
different scenarios of creating a hosted review on mobile, including:
- Successful flow including staging, committing, pushing, and creating
- Eligibility block handling (e.g., authentication requirements)
- Error reporting when creation fails after an automatic commit
* Block mobile PR creation on unresolved conflicts and refresh status
Prevent creating a hosted review on mobile when there are unresolved
merge conflicts. Also, return the latest git status on failures and
reload it in the UI to keep the source control screen in sync.
* Prefer fetched PR head SHA over cached status SHA for PR checks
On mobile, a create command can commit before opening the review,
meaning the fetched PR's head SHA is fresher than the route's cached
status SHA. Prioritizing the fetched PR head SHA ensures we fetch checks
for the most up-to-date commit.
* Fix mobile PR creation errors and validate branch presence
- Reject branch matches when the status branch is null or missing to
prevent PR creation when the branch is lost.
- Display actual PR creation errors in the sidebar instead of silently
ignoring them on failure.
- Trim leading and trailing whitespace from the base branch reference
before persisting the worktree link.
Combined diff tabs (such as branch, commit, or uncommitted changes)
use display labels as relative paths and require the desktop-only
combined renderer. Excluding these tabs from the mobile snapshots
prevents mobile clients from incorrectly attempting to read them
via files.read.
* Pass ptyId directly to restorePaneTerminalFit to avoid race conditions
Avoid re-reading the pane transport after a mobile disconnect race,
which could otherwise restore a recycled pane instead. Passing the PTY
ID directly ensures the correct terminal is restored.
* Prevent reclaiming terminal if PTY ID does not match current pane
Avoid restoring a terminal with a stale PTY ID if a different terminal
has already reused the pane slot. Trigger a state override tick to make
stale portals disappear instead.
Replace the play icon with a plus icon and update the label from
"Command" to "Add Quick Command…" (including localizations).
This provides clearer visual and textual cues that the action creates
a new command rather than running an existing one.
Automatically enable direct (live) terminal input for new terminal
handles on mobile, while allowing users to opt out back to buffered
input.
- Track defaulted handles to ensure list refreshes preserve manual
buffered-mode choices.
- Prune tracked handles from live input sets when terminals are closed.
- Add unit tests for defaulting and pruning logic.
- Include a design doc detailing goals and implementation notes.
* fix(renderer): answer OSC color queries from active terminal theme
- reply to OSC 10/11 foreground/background queries using the resolved xterm theme
- suppress replayed OSC color replies to avoid leaking escape output into fresh shells
- cover theme-derived color replies and replay suppression with focused tests
* test(renderer): cover terminal OSC color query replies
Co-authored-by: Orca <help@stably.ai>
---------
Co-authored-by: Jinwoo-H <jinwoo0825@gmail.com>
Co-authored-by: Orca <help@stably.ai>
Catch errors during hosted review lookup if local blockers are present.
This ensures that network or API failures do not completely hide the
Create PR preparation UI if we can still guide the user to resolve local
issues first.
* fix Orca CLI path resolution and improve registration UI
- Hydrate the shell PATH before running installer actions on macOS to
match the user's terminal instead of launchd.
- Resolve the active macOS command path dynamically against shell PATH
candidates, ignoring broken symlinks and non-executable files.
- Detect and report conflicts with unmanaged executables shadowing the
configured command path.
- Add "Preparing..." and "Registering..." loading states to the settings
and setup panels during preflight checks.
* Fix Orca CLI detection and installation path conflict checks
- Allow detecting a managed Orca command located later in PATH when the
default path entry is missing or non-executable.
- Avoid raising installation conflicts for unmanaged commands located
after the default install path, as they will be safely shadowed.
- Translate terminal setup and Orca CLI registration strings for
Spanish, Japanese, Korean, and Chinese locales.
* Only open terminal when pre-install checks succeed
Prevent the terminal from opening and setting the terminal command if
onBeforeOpenTerminal or refreshPreInstallNotice throws an error.
When committing East Asian text (e.g., via Microsoft Pinyin) on Windows,
the local terminal renderer can leave newly printed glyphs blank until
a repaint is triggered.
This detects CJK, Korean, and fullwidth Unicode ranges and forces a
viewport refresh when such output is received immediately following
active terminal input on Windows clients.
* fix: address pr-bug-scan validated finding from #6315
Protect fenced/inline code spans from the HTML stripTags pass in normalizeMobileMarkdownPreviewHtml; blocks stripTags(next) at mobile-markdown-preview-html.ts:95 from deleting <...> inside code.
* Preserve non-tag angle brackets in markdown preview HTML parser
Only strip standard/known HTML tags instead of matching any `<...>`
pattern. This prevents false-positive stripping of generic types
(e.g., `Array<string>`) or math comparisons (e.g., `1 < 2`) in prose.
Additionally, robustify markdown code block preservation by using a
Private Use Area prefix (`\uE000`) and dynamically padding it to avoid
collisions with literal input content.
* Protect code spans when stripping HTML tags in mobile preview
Ensure HTML-like content within code spans is not erroneously removed
by the tag stripping logic. We now protect markdown code blocks and
restore them after stripping tags and decoding HTML entities.
---------
Co-authored-by: orca-bug-scan-bot <orca-bug-scan-bot@stably.ai>
Co-authored-by: Jinjing <6427696+AmethystLiang@users.noreply.github.com>
The "Scanning sessions" loader sat in a `flex items-center gap-2` row
next to a plain text span with no flex-1/min-w-0 sibling to absorb
slack. Both items default to flex-shrink: 1, so the SVG could be
compressed below its 14px width while keeping 14px height — a
non-square box shifts the rotation pivot off center, making the icon
drift instead of spinning in place.
Add `shrink-0`, matching every other text-adjacent spinner in the app.
Co-authored-by: Neil <neil@stably.ai>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
* Fix browser pane stuck in HTML fullscreen (#6442)
Guest content in a browser pane could enter HTML fullscreen but not
exit it: requestFullscreen() resized the host BrowserWindow into native
fullscreen, and exitFullscreen() had nothing to restore, leaving the
pane stuck.
Set the webview's disableHtmlFullscreenWindowResize preference so HTML
fullscreen is contained to the <webview> element. Exit then works and
fullscreenchange fires as guests expect.
* Apply browser guest fullscreen policy consistently
Co-authored-by: Orca <help@stably.ai>
---------
Co-authored-by: Wolfgang Schoenberger <221313372+wolfiesch@users.noreply.github.com>
Co-authored-by: Jinwoo-H <jinwoo0825@gmail.com>
Co-authored-by: Orca <help@stably.ai>
* fix(pet): shrink overlay drag area to hug the pet content
The pet overlay's `pointer-events-auto` handle used `size-full`, so the
entire `size × size` box (default 180px) was draggable even where the pet
was transparent. Non-square pets left a large dead-zone: the bundled
Claudino (320×180) renders 180×101 in the box, leaving a ~79px empty but
draggable band; OpenCode/Gremlin (252×320) render 142×180, leaving ~38px
on the left.
Restructure the overlay into three layers: the outer box and a new
centering layer stay `pointer-events-none`; only an innermost
`w-fit`/`h-fit` wrapper opts back into pointer events and carries the drag
handlers, cursor, bob animation, and `touch-action`. A `min-w`/`min-h`
floor keeps it grabbable during the image-load window when the wrapper
would otherwise collapse to 0×0.
Also size the `DetectedSpriteFrame` canvas to one fixed footprint bounding
the largest scaled frame (instead of the full box) so detected sprites
tighten too, with frames re-centered within that footprint.
Drag math, viewport clamping, and persisted position are unchanged — they
remain keyed to the outer box, so dragging, edge-clamping, and saved
positions behave exactly as before.
* fix(pet): cap the img fallback at the pet size
The w-fit/h-fit drag wrapper is fit-content, so the img's max-w/h-full had
no fixed box to resolve against and rendered at intrinsic size, overflowing
the persisted size box that clamping still assumes. Cap explicitly with
maxWidth/maxHeight: size. Addresses CodeRabbit review on #6437.
* test(pet): cover overlay hit area render branches
Co-authored-by: Orca <help@stably.ai>
---------
Co-authored-by: Jinwoo-H <jinwoo0825@gmail.com>
Co-authored-by: Orca <help@stably.ai>