* 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>
- Shifts the initial autofocus from the project combobox to the smart
name input or pre-filled source pill so users can start typing
immediately.
- Pins the typed text action row (e.g., "Use name...") to the top of
the search results dropdown with a sticky header.
- Accepts an external GitHub source context override in the smart name
field to improve contextual suggestions.
- Updates unit and E2E tests to verify the new focus target behavior.
* 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.
* Persist commit message generation state across worktree switches
Introduce a new global store slice for commit message generation to prevent
in-flight requests from being orphaned or lost when the Source Control
sidebar is unmounted or when switching between worktrees.
- Key commit generation records by worktree ID/path in the Zustand store
- Hydrate completed messages back into the draft input when returning to
the originating worktree without overwriting active user edits
- Ensure the agent-selection dialog state remains bound to the target
worktree that initiated the generation
- Wait for the PR composer eligibility check before hydrating completed
PR field generations on sidebar remounts
* Route cancellations to starting runtime and prune stale worktree records
Ensure commit message and pull request generation cancellation requests
are always routed to the runtime environment that was selected when
the generation started, even if active settings change before
cancellation.
Additionally, prune commit message and pull request generation records
when worktrees are removed to prevent stale records from lingering in
the store.
* Support project reordering with groups and add manual-default notice
Refactors the project header drag-and-drop implementation to work correctly
with project groups by tracking ordering within buckets and updating project
group assignments on drop. Also introduces a dismissible sidebar education
card notifying upgraded profiles that manual project ordering is now the default.
* Split oversized translated UI modules
* Fix localized option test regressions
Agent provider session ids lived only in the in-memory
agentStatusByPaneKey map, so a daemon/session death while the app was
closed (reboot, crash, update kill) left nothing to resume from -
terminals cold-restored as plain shells with no Claude/Codex/Gemini
session (#5232, Bug 2).
The quit flush now captures resumable live agents into the persisted
sleeping-session map with origin 'quit'. Quit-origin records are
consumed only by the pane-level cold-restore resume (which injects the
agent's resume command into the replacement shell); worktree activation
skips them so a warm-reattached agent never gets a duplicate resume
tab. Sleep-origin behavior is unchanged, and a warm reattach clears the
record on the agent's next status event.
Co-authored-by: Orca <help@stably.ai>
The 12s first-window timeout used to abort daemon init and open the PTY
spawn gate, so a slow (but succeeding) daemon start flipped restored
panes onto LocalPtyProvider fallback terminals. Those are killed on app
quit and their numeric ids overwrite the persisted daemon session ids,
permanently orphaning the live daemon sessions (#5232, Bug 1).
The window still fails open at 12s, but the PTY gate now waits for the
service attempts themselves and only fails open (aborting the services)
at a 60s deadlock backstop. Failure fallback is unchanged: a daemon init
that errors still resolves the gate onto the local provider.
Co-authored-by: Orca <help@stably.ai>