Headless automation launches (launchAgentBackgroundSession) created an
inactive tab via createTab(..., { activate: false }) without first telling
the renderer to background-mount that worktree's terminal surface. As a
result the hidden surface either never mounted (no entry in
mountedWorktreeIdsRef) or mounted with display:none (zero-size, can't be
measured/fit), so the eager PTY buffer never flushed on the first mount —
the run tab showed only the shell prompt until an unmount/remount gave the
off-screen xterm a real layout box.
Dispatch BACKGROUND_MOUNT_TERMINAL_WORKTREE_EVENT immediately before
createTab, mirroring the established renderer-backed Codex startup path in
useIpcEvents. The Terminal.tsx listener adds the worktree to
mountedWorktreeIdsRef and marks it measurable for a 3000ms window, so the
hidden surface renders with opacity-0/pointer-events-none (a measurable box)
instead of display:none, letting the first xterm fit flush the buffer.
Extract the inline measurable-mount block into
background-terminal-worktree-visibility.ts (behavior-identical, now
unit-tested) and add unit + E2E coverage.
Fixes#6244
Co-authored-by: ChaDongWun <66347959+lovewave02@users.noreply.github.com>
* 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>
* fix(changes-tab): prevent freeze and stale highlights when staging/unstaging
When files are staged/unstaged while the Changes tab is open, the
diff viewer was re-rendering all sections, causing UI freezes and
highlight flickering.
- Add resolveCombinedUncommittedSnapshotEntries() to reconcile
snapshot entries with live git status without destroying existing
loaded diff content.
- Track retainedResolvedSnapshotEntries from current sections to
preserve area state when live git status temporarily loses entries.
- Use Map-based O(snapshot + live) algorithm instead of nested loops.
- Add unit tests for the resolver logic.
- Add e2e test with performance measurement for stale unstaged diffs.
Co-authored-by: Orca <help@stably.ai>
* Prevent duplicate entries in uncommitted snapshot resolution
Track resolved snapshot entries using composite area and path keys to
ensure staged and unstaged sections remain distinct and do not duplicate
when live Git status changes or disappears.
Additionally, switch the retained entries from a Map to a list to support
multiple areas per path, and update CombinedDiffViewer to avoid rebuilding
the snapshot list on row load state changes.
* test: add test coverage for duplicate-path snapshot remapping
- Add unit test verifying that duplicate-path snapshots do not remap
to a retained fallback area.
- Robustify E2E large diff freeze repro test by ensuring interval
timers are always cleared in a finally block.
- Standardize path utilities in large diff fixtures to ensure cross-platform
compatibility.
---------
Co-authored-by: Orca <help@stably.ai>
Reword the nested repository import dialog so it asks users whether to group discovered repositories rather than asserting they are a monorepo.
Also keeps locale catalogs aligned with live nested-import strings and updates Electron folder-import coverage for the new affirmative action label.
* Restore combined diff scroll position using virtualized scroll anchors
Fixes scroll jumping and incorrect restoration in virtualized combined
diff views by tracking scroll position via a stable row anchor (key and
offset) rather than a fragile raw scrollTop.
- Track active row anchors across tab switches and component remounts
- Prevent programmatic scroll events from writing incorrect anchors
- Avoid redundant state updates and re-renders when focusing an
already focused group
* fix: address review findings
Avoid triggering unnecessary terminal PTY resizes and SIGWINCH signals
when restoring terminal tabs or replaying hidden snapshot backlogs. This
prevents alternate-screen TUIs from resetting their viewports or
scrolling to the top when switching tabs.
- Track hidden startup measurement as state and clear it after first visibility
- Suppress forwarding terminal resizes while a pane is hidden
- Avoid resizing or sending SIGWINCH on snapshot replay when dimensions are unchanged
* Fix blank/unclosable mobile emulator tab in floating workspace
FloatingTerminalPanel only handled terminal/browser/editor content types, so simulator tabs rendered no pane and routed close through closeFile (a no-op for simulator tabs). Treat simulator as its own content type: render EmulatorPane for the active simulator tab, wire activeSimulatorTabId into TabBar, and close via closeUnifiedTab.
* Add floating Mobile Emulator tab E2E smoke test
Adds a deterministic Electron/Playwright spec that seeds a simulator unified tab in the floating workspace, asserts the emulator pane renders, and closes it through the real tab-strip X. Adds stable data-emulator-pane selectors and a data-tab-close-button hook on the simulator tab chrome, plus a targeted package script. No live iOS Simulator or Orca Computer/AX dependency.
* Exclude simulator tabs from floating Close All Files
Close All Files filtered out only terminal/browser tabs, so after the simulator render/close fix it would also close the Mobile Emulator. Simulator tabs are not files; exclude contentType 'simulator' to match terminal/browser behavior, and add a regression test asserting Close All Files closes the editor tab but leaves the simulator open.
* Keep floating simulator tabs mounted
---------
Co-authored-by: Wolfgang Schoenberger <221313372+wolfiesch@users.noreply.github.com>
Co-authored-by: Jinwoo-H <jinwoo0825@gmail.com>
Extract title resolution into a dedicated helper to ensure both inline
and dialog pull request creation flows consistently fall back to
a normalized and humanized branch slug when no eligibility title is
available.
- Normalize remote refs before humanizing branch slugs
- Pre-populate dialog titles when eligibility title is missing
- Update E2E tests to expect pre-populated draft titles
Connect the ChecksPanel PR draft generation to the global generation
slice, aligning its behavior with SourceControl. This allows detail
generation to continue in the background when navigating away or
switching worktrees, and guarantees that generated fields, terminal seeds,
and branch-preparation push requirements are restored on remount.
* Fix Windows ConPTY probe failures by removing startup control bytes
Avoid prepending terminal probes with interrupt (`\x03`) or line-kill
(`\x15`) control characters on fresh shell launches. In Windows ConPTY,
echoing a startup Ctrl+C can print a literal "^C" and corrupt the subsequent
PowerShell commands.
- Extract probe command sequence generation to a dedicated helper
- Include E2E unit tests in the Vitest test suite config
* Rename terminal probe E2E test to match unit test pattern
Update the Vitest configuration glob pattern to target only E2E tests
ending in `.unit.test.ts`, and rename the terminal probe input sequence
test to match. This ensures only unit-like E2E tests are picked up
by Vitest.
Ensure terminal E2E probes run reliably on Windows CI, where the shell
does not always inherit setup-node's PATH.
- Add `nodeTerminalCommand` helper to resolve and quote `process.execPath`
for either POSIX shells or PowerShell depending on the platform.
- Update terminal tests and probes to use the new helper instead of
hardcoded `node` invocations.
* Stabilize terminal e2e tests on Windows ConPTY
Windows ConPTY can drop or reorder the tail of large synchronized terminal
frames or stdout writes when they are written all at once or when the process
exits too quickly.
* Wait for PTY shell readiness before running test scripts.
* Chunk large table writes line-by-line and yield with a short timeout on
Windows to let the stream drain.
* Add and poll for a synchronized frame tail marker to ensure the entire
content is rendered before proceeding.
* Remove flaky preflight shell echo in terminal emoji scroll test
The Ctrl+C/Ctrl+U preflight keys sent by `waitForPtyShellEcho` can race
Windows ConPTY startup and eat subsequent test input. Remove this wait
and rely on the fixture marker as the readiness signal instead.
Clarify the mobile-driving experience by updating outdated terminology and
making actions more precise. Generic "Mobile" references are replaced with
"Phone", and action buttons now explicitly distinguish between "this"
terminal and "all" terminals. Also introduces a modern card layout featuring
a smartphone icon badge and a live status indicator, complete with updated
locales, tests, and a standalone HTML preview.
* Refactor SourceControl header into extracted, testable subcomponents
Co-authored-by: Orca <help@stably.ai>
* Extract branch context stats into dedicated module with upstream status
Co-authored-by: Orca <help@stably.ai>
* Refine source control header layout and add branch comparison i18n
* Right-align branch status stats in the context row and left-align the base ref button to optimize space usage.
* Make the expanded filter input occupy the full toolbar width, hiding PR links and overflow menus when active, to prevent squeezed input.
* Add translation keys and localizations for commits "behind" and "even with" the base branch.
---------
Co-authored-by: Orca <help@stably.ai>
* Make Create PR intent resilient to worktree switching
Co-authored-by: Orca <help@stably.ai>
* Restrict PR creation sidebar actions to foreground worktrees
- Prevent switching tabs and opening the PR URL when a background
worktree's PR creation finishes.
- Extract commit eligibility checking into a dedicated module and
disable the commit message textarea during operations or when
ineligible.
- Fix flakiness in the remote runtime request connection test.
* Abort Create PR if branch changes during details generation
If the branch changes within the active worktree while review details
are being generated, the Create PR flow now aborts and shows a muted
notice prompting the user to retry.
- Allows worktree navigation during PR details generation without
treating it as an intent conflict.
- Adds localized strings for the new retry notice.
- Uses platform-independent paths in tests for cross-platform support.
---------
Co-authored-by: Orca <help@stably.ai>