Commit Graph

243 Commits

Author SHA1 Message Date
Jinjing 5106e33947
fix(changes-tab): prevent freeze and stale highlights when staging/unstaging (#6229)
* 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>
2026-06-23 22:16:20 -07:00
Jinwoo Hong 1b6e65c4ef
Fix terminal paste cancellation on transient blur (#6232)
Fix terminal paste cancellation on transient blur
2026-06-23 21:24:13 -07:00
Trevin Chow 23d14aaa18
fix: reword folder grouping prompt away from "monorepo"
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.
2026-06-23 21:03:13 -07:00
Jinjing b053e1ac60
Fix diff view scrolling using virtualized scroll anchors (#6190)
* 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
2026-06-23 15:57:29 -07:00
Jinjing 999fbd4217
Prevent redundant SIGWINCH signals on terminal tab restoration (#6177)
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
2026-06-23 10:15:06 -07:00
Brennan Benson 17dee0861f
Fix terminal tab switch resume rendering (#6041)
Co-authored-by: Orca <help@stably.ai>
2026-06-23 00:23:34 -07:00
ChaDongWun 814363c45f
fix: preserve source control commit drafts across remounts (#6120)
Co-authored-by: Jinwoo-H <jinwoo0825@gmail.com>
2026-06-22 22:45:00 -07:00
Jinwoo Hong a0d9505ba5
Fix SSH terminal replay artifacts
Fix SSH reconnect replay ownership and add a Docker-backed regression harness for terminal replay artifacts.
2026-06-22 16:42:20 -07:00
Wolfie e46d4a9267
Fix blank/unclosable mobile emulator tab in floating workspace (#6042)
* 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>
2026-06-22 16:27:33 -07:00
Jinwoo Hong 338540bf73
fix: refit after single terminal restore (#6089)
Co-authored-by: Orca <help@stably.ai>
2026-06-22 12:29:18 -07:00
Jinjing c139c704af
Add visible PR comment queue action (#6057) 2026-06-21 23:59:29 -07:00
Trevin Chow c6d11efbf2
Make PR comments sidebar easier to triage and read (#5996)
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Orca <help@stably.ai>
Co-authored-by: brennanb2025 <brennankbenson@gmail.com>
2026-06-21 23:49:43 -07:00
Trevin Chow bfb778570a
feat(tabs): redesign tab splits and terminal pane discoverability (#5927)
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Orca <help@stably.ai>
Co-authored-by: brennanb2025 <brennankbenson@gmail.com>
2026-06-21 23:09:01 -07:00
Jinwoo Hong 62f1394b44
fix: refit terminals after bulk mobile restore (#5962)
Co-authored-by: Orca <help@stably.ai>
2026-06-20 23:35:37 -07:00
Jinjing 308da355bc
Unify pull request draft title resolution (#5943)
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
2026-06-20 18:47:39 -07:00
Jinjing 26493072c1
Persist AI PR generation state across worktree switches (#5952)
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.
2026-06-20 18:16:50 -07:00
Jinjing 44e4d8d4f5
Fix Windows ConPTY probe failures by removing startup control bytes (#5893)
* 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.
2026-06-20 02:03:24 -07:00
Jinjing 55055b42af
Use runner Node executable and platform quoting in terminal E2E tests (#5890)
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.
2026-06-20 01:27:41 -07:00
Jinjing 5622d0e94f
Stabilize terminal e2e tests on Windows ConPTY (#5881)
* 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.
2026-06-20 00:46:37 -07:00
Jinwoo Hong 3478efca08
fix: stabilize release terminal e2e (#5869)
Co-authored-by: Orca <help@stably.ai>
2026-06-19 19:43:42 -07:00
Brennan Benson 6c941d8e75
Fix terminal pane title focus handling (#2756)
Co-authored-by: Orca <help@stably.ai>
2026-06-19 17:50:16 -07:00
Brennan Benson b212c2b87b
Stabilize Windows raw emoji terminal golden (#5852) 2026-06-19 17:23:47 -07:00
Jinwoo Hong 972078f2c4
Fix paste ownership, input bounds, and IPC validation
Supersedes #5745, #5746, and #5747.
2026-06-19 17:14:55 -07:00
Jinwoo Hong abbfb6d53f
fix: handle macOS terminal command arrow scrolling (#5846)
Co-authored-by: Orca <help@stably.ai>
2026-06-19 15:48:03 -07:00
Brennan Benson e7ef7681ae
Fix flaky e2e tests (#5680) 2026-06-18 00:11:32 -07:00
Jinwoo Hong 84a5def248
Use managed Pi and OMP extensions (#5681)
Co-authored-by: Orca <help@stably.ai>
2026-06-17 23:28:54 -07:00
Brennan Benson ce273c8aef
Improve release validation reliability (#5643)
Co-authored-by: Orca <help@stably.ai>
2026-06-17 20:05:55 -07:00
Jinjing bd546b47d2
Redesign mobile driver overlay layout and clarify action copy (#5647)
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.
2026-06-17 19:21:42 -07:00
slashdevcorpse 0ec3882cb8
Add project Windows runtime selection (#5519)
* Add project Windows runtime selection

* Fix project Windows runtime selection

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

* fix: preserve WSL shell variables

---------

Co-authored-by: Jinwoo-H <jinwoo0825@gmail.com>
Co-authored-by: Orca <help@stably.ai>
Co-authored-by: Neil <neil@stably.ai>
2026-06-17 16:08:14 -07:00
Brennan Benson 0b3cfa7b46
Keep terminal text painted after app resume (#5565)
Co-authored-by: Orca <help@stably.ai>
2026-06-17 10:49:41 -07:00
Brennan Benson 00df8288dc
Simplify support diagnostics settings (#5554)
Co-authored-by: Orca <help@stably.ai>
2026-06-16 23:11:27 -07:00
Jinjing 8dd5256308
Refactor Source Control header toolbar (#5553)
* 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>
2026-06-16 18:56:52 -07:00
Jinjing 3f7e869f0c
Keep Create PR intent pinned to original worktree (#5552)
* 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>
2026-06-16 18:45:24 -07:00
Brennan Benson 1ce1d4c291
Stabilize terminal rendering release checks (#5533)
Co-authored-by: Orca <help@stably.ai>
2026-06-16 15:45:02 -07:00
OrcaWin 68abadba81
Add Windows terminal onboarding step (#5488)
Co-authored-by: Neil <neil@stably.ai>
2026-06-16 14:07:26 -07:00
Jinjing 2740cba2bf
Focus workspace name field initially in new workspace dialog (#5456)
- 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.
2026-06-16 00:19:42 -07:00
Jinjing aee2c0a6a4
Limit large git diff payloads in main process before IPC transfer (#5469)
* 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.
2026-06-15 22:13:46 -07:00
OrcaWin 52f2a32e62
Fix settings search fan-out (#5452)
Co-authored-by: Neil <neil@stably.ai>
2026-06-15 20:52:06 -07:00
Brennan Benson 9e6afad545
Prevent large diffs from freezing the diff view (#5409) 2026-06-15 14:39:56 -07:00
Jinwoo Hong 1d85515a3e
fix: bound gh cli detail calls (#5413)
Co-authored-by: Orca <help@stably.ai>
2026-06-15 13:37:50 -07:00
Jinwoo Hong 719ae00009
Fix remote runtime tab and agent status UX (#5341)
Co-authored-by: Orca <help@stably.ai>
2026-06-14 01:48:26 -07:00
Jinwoo Hong 630bcce530
fix: replace per-5s full-buffer terminal checkpoints with an incremental log (#5292)
Co-authored-by: Orca <help@stably.ai>
2026-06-12 16:31:24 -07:00
Jinjing 2899a60872
Durable persistence for commit message generation across worktree switches (#5243)
* 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.
2026-06-11 23:36:46 -07:00
Jinjing 4d0c449378
Support project reordering with groups and add manual-default notice (#5237)
* 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
2026-06-11 20:39:39 -07:00
Jinwoo Hong b09d7124c4
Persist agent provider sessions at quit and resume them on cold restore (#5240)
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>
2026-06-11 20:17:23 -07:00
Jinwoo Hong 4df412f18e
Keep restored terminals on daemon PTYs when startup is slow (#5234)
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>
2026-06-11 20:17:15 -07:00
Jinwoo Hong 0b19195fd9
Remove startup PTY spawn health probe and guard daemon replacement with live-session check (#5230)
Co-authored-by: Orca <help@stably.ai>
2026-06-11 19:00:44 -07:00
Brennan Benson 7414f17376
test: stabilize release e2e checks (#5212)
Co-authored-by: Orca <help@stably.ai>
2026-06-11 12:46:43 -07:00
Neil 9ceabb43b6
Default agent launches to yolo permissions mode (#5145)
* Default agent launches to yolo mode

* test: update launch default validations
2026-06-10 21:14:53 -07:00
Jinjing 215094ea14 Expose E2E store via build mode 2026-06-10 17:23:12 -07:00