Commit Graph
5529 Commits
Author SHA1 Message Date
Jinjing 8a39450b18 refs/heads/handle-mobile-pull-request-issues (#6598)
* feat(mobile): add commit failure recovery panel with AI fix action

- Surfaces a "Commit failed" panel with a one-tap AI fix button when a
  git commit fails in the source control view or PR creation flow
- Detects commit failures specifically during the committing progress
  step and captures staged entries and commit message for context
- Extracts commit failure summary and prompt logic into
  `src/shared/source-control-commit-failure.ts` and PR checks prompt
  into `src/shared/pr-checks-fix-prompt.ts` so both desktop and mobile
  share the same implementations
- Adds auto-find of an available Metro port starting from 8081 and
  extracts expo CLI bootstrap into `mobile-expo-cli.mjs` shared by
  `start-emulator` and a new `start-expo.mjs` wrapper

* Share source-control AI prompts and simplify mobile PR actions

- Extract conflict, check-fixing, and commit-failure prompt builders
  to shared modules for reuse by both desktop and mobile.
- Configure Metro in the mobile package to watch and bundle modules
  from the repository-root shared directory.
- Remove the desktop-style merge method picker from the mobile PR
  actions panel, opting to use repository defaults automatically.
- Refactor mobile hosted review creation and git preparation logic
  into dedicated helper files.
2026-06-28 00:58:17 -07:00
Brennan Bensonandbrennanb2025 e47b3364d9 Preserve terminal scrollback when restoring a hidden alternate-screen pane (#6532)
* Preserve terminal scrollback when restoring a hidden alternate-screen pane

On Windows, an alternate-screen TUI pane (Claude Code) could lose scroll-up
after being hidden (tab/worktree switch or app backgrounded) and shown again.

Root cause: on hidden->visible restore, applyMainBufferSnapshot
unconditionally wrote a destructive clear (\x1b[2J\x1b[3J\x1b[H) before
replaying the snapshot, wiping xterm's scrollback. The attach/reattach path
already guards this same clear behind !isAlternateScreen (pty-transport.ts);
the snapshot path did not.

Thread an alternateScreen flag from the backend headless serialization
through the pty:getMainBufferSnapshot IPC + preload types into
applyMainBufferSnapshot, and skip the destructive clear when restoring an
alternate-screen buffer. Add a regression test asserting the clear is NOT
emitted for an alt-screen restore (and the existing normal-buffer test still
asserts it IS).

Fixes #5723

* test: account for alternateScreen flag in empty headless snapshot assertions

The alt-screen scrollback fix threads an alternateScreen flag through the
headless snapshot return type. Two sibling empty-buffer tests used exact
toEqual() assertions that did not include the new (legitimately false) key.
Update them to reflect the correct snapshot shape.

---------

Co-authored-by: brennanb2025 <brennanb2025@users.noreply.github.com>
2026-06-28 00:57:56 -07:00
JinjingandOrca 1e187f56a8 Improve failed CI check details panel (#6599)
Extract Annotations and Jobs sections into dedicated components, add
clickable annotation locations that open files at a line, and bucket job
steps with collapsible passing/skipped summaries.

Co-authored-by: Orca <help@stably.ai>
2026-06-28 00:55:33 -07:00
Brennan Bensonandbrennanb2025 b75eed7e02 Fix phantom/overwritten characters when typing into Claude Code on Windows (#6544)
Claude Code echoes prompt keystrokes by redrawing the input line in
place (CR + CHA + reprint + erase-line) WITHOUT DEC 2026 synchronized
output, split across ConPTY chunks. On native Windows ConPTY the xterm
buffer ends up correct, but its DOM renderer paints these rapid rewrites
one frame late, leaving a phantom first char or an overwritten cell
("zzzx" rendered as "zzx") until a window resize forces a repaint.

The existing foreground render-settle forces a single synchronous
refresh for in-place rewrites, but that races the late DOM paint. Only
the DEC 2026 cursor-restore and viewport-scroll cases scheduled a
follow-up next-frame repaint. Extend that follow-up to the native
Windows in-place rewrite pattern so the column desync self-corrects
without the user jiggling the window. Scoped to native Windows ConPTY
foreground in-place rewrites, so plain shells, SSH/remote panes, and
non-Windows renderers are unaffected.

Fixes #5656
Fixes #5653

Co-authored-by: brennanb2025 <brennanb2025@users.noreply.github.com>
2026-06-28 00:49:39 -07:00
Brennan Bensonandbrennanb2025 0af0102957 Resolve PowerShell to a real executable so terminals spawn (Windows error code 5) (#6537)
* Resolve PowerShell to a real executable so terminals spawn (Windows error code 5)

On Windows, launching a PowerShell terminal could fail with:
  Failed to spawn shell "pwsh.exe": Cannot create process, error code: 5

error code 5 = ERROR_ACCESS_DENIED from CreateProcessW inside node-pty's
ConPTY. Orca handed ConPTY a bare family name ("pwsh.exe" /
"powershell.exe"). When pwsh resolved to the Microsoft Store App Execution
Alias stub under WindowsApps (or was blocked by AV/AppLocker/SAC),
CreateProcessW rejected it with access-denied. isPwshAvailable probes via
execFileSync (which DOES follow the alias), so detection and launch disagreed.

Fix: resolve the PowerShell executable to a real absolute path before
spawning, skipping the WindowsApps alias stub, and add a Windows fallback
chain: pwsh (resolved abs) -> Windows PowerShell (System32 abs) -> cmd.exe.
SSH/remote and WSL/Git Bash/cmd paths are unaffected.

Fixes #5161

* test(pty): assert resolved absolute PowerShell path in win32 spawn tests

The PowerShell-resolution fix (#5161) now hands ConPTY a real absolute
executable instead of a bare 'powershell.exe'/'pwsh.exe' family name. The
pre-existing win32 spawn assertions in pty.test.ts (not in the worker's
per-file affected set) still expected the bare names and went red on the
full CI verify suite. Mock the fs seam and pin the install roots the
resolver probes so the resolved path is deterministic on Linux CI and
Windows alike, and assert the resolved System32 / Program Files paths.

* fix(pty): derive Windows shell name with win32 basename for determinism

getForegroundProcess() falls back to the spawned shell's basename when
Windows node-pty reports only the terminal name. The basename was taken
with the host-native path.basename, so on a non-Windows host (Linux CI)
the Windows absolute path 'C:\...\powershell.exe' was not split and the
whole path was stored as the shell name — making getForegroundProcess
return the absolute path instead of 'powershell.exe'. This produced a
host-dependent result for the same forced win32 platform.

Parse the spawned shell basename for the target platform (win32 basename
on Windows, POSIX otherwise), matching the daemon path
(pty-subprocess.ts already uses pathWin32.basename). The win32 spawn
foreground test is now deterministic on Linux CI and Windows alike.

---------

Co-authored-by: brennanb2025 <brennanb2025@users.noreply.github.com>
2026-06-28 00:33:00 -07:00
Brennan Bensonandbrennanb2025 74d564a67e fix(windows): trim macOS safe-area inset so app icon fills the canvas (#6548)
The Windows ICO was rasterized straight from the untrimmed 1024px macOS
render, inheriting Icon Composer's transparent safe-area inset (glyph only
~83% of the canvas). Windows scales the largest ICO frame down for the
taskbar/"Open with" list without compensating, so the icon looked visibly
small next to native apps.

Add config/scripts/trim-windows-icon-source.mjs (pngjs-based): trims the
transparent inset, re-squares with a small 2% margin, and emits a filled
multi-size ICO (~96% fill). Regenerate resources/build/icon.ico from it and
update generate.sh to delegate to the script so the committed binary stays
in sync regardless of whether ImageMagick is installed.

Fixes #5357

Co-authored-by: brennanb2025 <brennanb2025@users.noreply.github.com>
2026-06-28 00:30:24 -07:00
3d22d69d03 feat(terminal): add "Copy Context" to the terminal context menu (#6267)
* feat(terminal): add "Copy Context" to the terminal context menu

Copying an agent session's captured context required opening the Fork
Agent Session dialog and clicking its "Copy context" button — two steps
for something you often just want on its own (e.g. to paste elsewhere).

Add a "Copy Context" item to the terminal right-click menu, right under
"Fork Agent Session…". It reuses the existing capture + clipboard path
(prepareAgentSessionForkFromPane → copyAgentSessionForkContext), so the
copied text is identical to the dialog's, just one click away and without
opening the dialog.

Fixes #5020

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* fix(terminal): copy plain context, not the fork prompt

Copy Context now copies the bounded, cleaned transcript on its own with a
neutral 'Context copied' toast, instead of reusing the fork prompt (with its
'this is a fork… acknowledge and wait' framing) and the fork-copy toast. That
framing is noise when pasting into another tool, which is the issue's use case.

Extracts buildBoundedSessionTranscript() from the fork-prompt builder and adds
copyAgentSessionContextFromPane(); the fork dialog's own copy button is
unchanged.

Co-authored-by: Orca <help@stably.ai>

---------

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-authored-by: Jinjing <6427696+AmethystLiang@users.noreply.github.com>
Co-authored-by: Orca <help@stably.ai>
2026-06-28 00:13:36 -07:00
Brennan BensonandOrca a9ef6f9168 Recover frozen terminal panes after a backgrounded agent exits (#6514)
Co-authored-by: Orca <help@stably.ai>
2026-06-28 00:09:07 -07:00
github-actions[bot] e51b2dfe3d release: v1.4.104-rc.2 v1.4.104-rc.2 2026-06-28 06:23:08 +00:00
Neil 5712cf9f48 Fix right-click paste in the Monaco editor (#6549)
Monaco's context-menu Paste reads navigator.clipboard.readText(), which is blocked in Orca's sandboxed renderer, so right-click Paste did nothing while Cmd/Ctrl+V and right-click Copy worked.

Register a higher-priority implementation on Monaco's PasteAction that reads the clipboard through Orca's trusted IPC bridge (window.api.ui.readClipboardText) and dispatches Monaco's native paste. Falls through for read-only/unfocused/non-editor targets so Cmd/Ctrl+V is untouched, and routes oversized pastes through the existing chunked inserter to preserve the too-large guard for both paste paths.

Verified with unit tests (incl. read-only fall-through, empty/too-large/focus-lost/oversized) and end-to-end in the Electron app.
2026-06-27 23:11:45 -07:00
Jinjing b45cb545c5 fix: shorten mobile toolbar labels (#6553) 2026-06-27 22:59:55 -07:00
Jinjing bffe436aeb fix: address review findings (#6551) 2026-06-27 22:51:33 -07:00
Brennan Benson 640f67d970 Fix Ctrl+C and other Mod-letter shortcuts on non-Latin keyboard layouts (#6534)
Fixes #6274.

Non-Latin layouts (Cyrillic, Greek, ABNT2, …) report a non-Latin logical `event.key` for physical letter keys (physical `KeyC` → `с`) while `event.code` stays `KeyC`. The shortcut matcher only fell back to the physical code when `event.key` was empty/Dead/Unidentified, so Mod+letter/digit chords never matched on those layouts — Ctrl+C copy in Monaco Source mode appeared to do nothing and the chord could not even be rebound in Settings.

Adds a tightly-gated non-Latin physical-code fallback (non-macOS, real Ctrl/Meta modifier held, excludes AltGr/Ctrl+Alt composition, only when no logical Latin token exists). Verified: full keybindings suite (55 tests) + targeted Cyrillic/Greek/AltGr/wrong-key cases pass; web + node typecheck clean.
2026-06-27 22:26:09 -07:00
Brennan Benson bed50606f2 Launch and detect Qwen Code via its qwen executable (#6530) 2026-06-27 22:02:52 -07:00
NeilandOrca 47f66f53f5 chore(deps): bump vite/esbuild/dompurify to clear Dependabot alerts (#6538)
Resolve security advisories without pnpm overrides:

Root:
- vite 7.3.5 -> 7.3.6 (widened esbuild range to ^0.27 || ^0.28)
- esbuild 0.27.7 -> 0.28.1 (GHSA dev-server advisory)
- dompurify 3.4.10 -> 3.4.11 (direct devDep)

Mobile:
- tsx ^4.21.0 -> ^4.22.4 (only hard esbuild consumer; pulls esbuild 0.28.1)
- vitest ^4.1.5 -> ^4.1.9, add explicit vite ^8.0.16 (-> 8.1.0)

Verified: typecheck:web, build:web, and full vitest suite (21246 passed)
all green.

Deferred (override-only, no plain-update path exists):
- dompurify 3.2.7 x18 — monaco-editor@0.55.1 hard-pins it exactly
- js-yaml@3 — @istanbuljs/load-nyc-config; uuid@7 — xcode@3.0.1;
  postcss@8.4 — @expo/metro-config (Expo SDK 55 lock)

Co-authored-by: Orca <help@stably.ai>
2026-06-27 22:01:16 -07:00
Siddiqui QamarandJinjing e40ad6a93a fix(source-control): refresh branch compare after upstream changes (#6522)
* 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>
2026-06-27 20:54:24 -07:00
Jinjing c16aa89ea7 Improve mobile emulator pairing startup (#6527)
* 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
2026-06-27 18:48:14 -07:00
Jinjing 76331ff597 Create pr not working on mobile (#6523)
* 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.
2026-06-27 18:34:58 -07:00
Jinjing 14f0096077 Omit unsupported combined diff tabs from mobile session snapshots (#6520)
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.
2026-06-27 15:56:21 -07:00
Jinjing 32542a8e93 Pass PTY ID directly to terminal restore to prevent race conditions (#6519)
* 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.
2026-06-27 15:27:55 -07:00
github-actions[bot] 70d49af5cd release: v1.4.104-rc.1 [rc-slot:2026-06-27-15] v1.4.104-rc.1 2026-06-27 22:27:08 +00:00
github-actions[bot] a0e7004059 release: v1.4.104-rc.0 v1.4.104-rc.0 2026-06-27 21:55:54 +00:00
Jinjing a94d692cd5 Update quick command button to use plus icon and clearer label (#6517)
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.
2026-06-27 14:40:33 -07:00
Jinjing ef292cb069 Map mobile special keys to terminal PTY bytes (#6515)
Expand live input mapping to handle escape, tab, delete, insert,
arrows, home, end, page navigation, and F1–F12 keys.

- Safe Map lookup avoids collisions with object prototype methods.
- Enter is excluded to prevent double-sent carriage returns.
- Standardizes byte translation via buildTerminalShortcutKey.
2026-06-27 14:06:25 -07:00
Jinjing c0f4bdd020 Default first-seen mobile terminal tabs to direct input mode (#6509)
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.
2026-06-27 12:12:46 -07:00
github-actions[bot] 9f3cd6b934 release: v1.4.103 v1.4.103 2026-06-27 18:48:05 +00:00
github-actions[bot] c7153a51b4 release: v1.4.103-rc.4 v1.4.103-rc.4 2026-06-27 17:49:27 +00:00
Jinwoo HongandOrca c159b5b31a Update xterm beta packages (#6467)
Co-authored-by: Orca <help@stably.ai>
2026-06-27 10:44:00 -07:00
867c57b93c fix(renderer): answer OSC color queries from active terminal theme (#6502)
* 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>
2026-06-27 09:30:29 -07:00
github-actions[bot] 3ce184ca16 Update README downloads badge 2026-06-27 12:46:04 +00:00
github-actions[bot] 62918129d8 release: v1.4.103-rc.3 [rc-slot:2026-06-27-03] v1.4.103-rc.3 2026-06-27 10:43:49 +00:00
Brennan BensonandNeil 38483d5a69 Fix WSL watcher shutdown hang (#6489)
* Fix WSL watcher shutdown hang

* fix: harden WSL watcher startup failures

---------

Co-authored-by: Neil <neil@stably.ai>
2026-06-27 02:47:54 -07:00
Jinjing a8f949d24d Prevent review lookup failures from blocking PR preparation (#6490)
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.
2026-06-27 02:37:59 -07:00
Neil 5363fcd668 Update xterm beta packages (#6486) 2026-06-27 02:37:23 -07:00
github-actions[bot] 85ef5871da release: v1.4.103-rc.2 v1.4.103-rc.2 2026-06-27 09:08:01 +00:00
Jinjing 6729f683f6 Fix Orca CLI path resolution and improve registration UI (#6484)
* 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.
2026-06-27 02:05:23 -07:00
Jinjing e32a62b913 Force viewport refresh for Windows CJK input (#6488)
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.
2026-06-27 02:04:29 -07:00
Jinjing 0cd46ad21e Dim and transition the Create More label on hover (#6479)
Change the "Create more" switch label to use muted foreground by default
and transition to foreground on group hover.
2026-06-27 00:39:44 -07:00
78519d8dce fix: pr-bug-scan validated finding from #6315 (#6471)
* 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>
2026-06-26 23:57:17 -07:00
360ce673e7 Fix wobbling session-history loading spinner (#6464)
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>
2026-06-26 20:19:42 -07:00
Brennan BensonandOrca bf4ed350ae Materialize mobile-only pending session terminals (#6465)
Co-authored-by: Orca <help@stably.ai>
2026-06-26 20:16:52 -07:00
1f968b92c9 Fix browser pane stuck in HTML fullscreen (#6442) (#6451)
* 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>
2026-06-26 20:05:47 -07:00
66b54c4f49 fix(pet): shrink overlay drag area to hug the pet content (#6437)
* 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>
2026-06-26 19:55:02 -07:00
Brennan BensonandOrca 5fd9f0c62c Prevent mobile worktree selection from focusing desktop (#6461)
Co-authored-by: Orca <help@stably.ai>
2026-06-26 19:34:33 -07:00
github-actions[bot] ba88e27cdc release: v1.4.103-rc.1 v1.4.103-rc.1 2026-06-27 01:55:20 +00:00
Brennan Benson d03e99c89a Show accurate PR status for local worktrees (#6460) 2026-06-26 18:51:51 -07:00
github-actions[bot] b899aef1f9 release: v1.4.103-rc.0 v1.4.103-rc.0 2026-06-27 00:55:18 +00:00
Brennan BensonandOrca d18cdc693f Reset agent sleep after terminal visits (#6450)
Co-authored-by: Orca <help@stably.ai>
2026-06-26 17:41:12 -07:00
Brennan BensonandOrca e1f93238d1 Align mobile review actions with desktop (#6444)
Co-authored-by: Orca <help@stably.ai>
2026-06-26 17:35:32 -07:00
Brennan Benson 8c81c30f6a Keep merged PRs visible after refreshes (#6456) 2026-06-26 17:15:14 -07:00