* fix(serve): persist active mobile-session tab so PTY output doesn't snap focus
In `orca serve` (headless host + remote/web client), running a command in a
terminal snapped the active tab back to the last-created tab. The renderer
reconcile forces the client's active tab to the host's reported active
(activeTabId / activeTabType / per-tab isActive), but `activateMobileSessionTab`
only called `focusTerminal` — a no-op for serve tabs no renderer has adopted —
and never persisted the chosen tab into the host's in-memory snapshot. So every
`onPtyData` -> `touchMobileSessionSnapshotsForPty` republish re-emitted the stale
"active = last tab" and the client snapped back on each command.
Persist the activation into the headless snapshot (activeTabId, activeTabType,
exclusive per-tab isActive, rebuilt tabGroups) after the focus dispatch, gated on
`!getAvailableAuthoritativeWindow() && isHeadlessMobileSessionPublication(...)` —
the same guard the hydrate path uses, so renderer-owned snapshots (including
`:headless-merge:`) stay authoritative. No-op when the tab is already active;
adds nothing to the `onPtyData` hot path.
Adds 3 regression tests covering: chosen tab survives a PTY republish, no version
bump on redundant activation, and no server-side persist when a renderer is
authoritative.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* fix(serve): exclude :headless-merge: snapshots from headless active-tab persist
After a renderer detaches there is no authoritative window, so the
!getAvailableAuthoritativeWindow() guard alone let merged (:headless-merge:)
snapshots through this path. A merged snapshot still carries renderer-owned
tabs/groups, so a server-side active-tab rewrite could collapse that mixed
group state. Exclude merged epochs from the persist gate; only pure
`headless:` / `headless-hydrated:` publications are persisted server-side.
Adds a regression test: renderer-detach + `:headless-merge:` snapshot ->
the headless persist is suppressed (no snapshot mutation / event).
Addresses the CodeRabbit review on #5131.
* review: clarify headless active-tab persistence guard
Co-authored-by: Orca <help@stably.ai>
---------
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-authored-by: Jinwoo-H <jinwoo0825@gmail.com>
Co-authored-by: Orca <help@stably.ai>
* 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
* feat: support GitLab MR unlinking and AI generation in ChecksPanel
Integrate GitLab merge request actions alongside GitHub pull requests in
the sidebar checks panel. This includes unlinking GitLab MRs, enabling
AI-driven title and body generation for GitLab, and dynamically adapting
menu labels (e.g. "More MR actions" vs "More PR actions") depending on
the active provider.
* fix: handle null base ref in hosted review creation and add tests
Co-authored-by: Orca <help@stably.ai>
* Extract sub-components and hooks from renderer components
To improve component focus and maintainability, extract large inline
sub-components, custom hooks, and logic helpers into dedicated files:
- Extract `HeroPaired` from `MobileHero` to `MobileHeroPairedDevices`.
- Move `ChromePreview` from `ThemeStep` to `theme-chrome-preview`.
- Refactor `HostedReviewActions` to use `useHostedReviewActions` hook.
- Move MCP config loading from `McpConfigSection` to helper file.
* Refactor usage panes to extract shared formatters and tables
Extract duplicated formatting utilities to a shared helper module. Move
the large, inline recent sessions tables into dedicated sub-components to
reduce duplication and simplify the parent pane components.
* Support self-hosted GitLab instances for MR creation eligibility
* Extract and check the remote host against `glab auth status` to
dynamically recognize and authenticate self-hosted GitLab instances
without requiring them to be in a hardcoded list.
* Refactor stats usage panes by extracting reusable breakdown sections
and sessions tables to eliminate duplication.
* Suggest Linear prompts only if the launcher can resolve the CLI.
* Extract GitLab project ref tests and update usage stats translations
- Move GitLab project ref parsing tests into a dedicated test file to
keep modules focused and add tests for candidate parsing.
- Add missing translations for the usage sessions table and breakdown
section across multiple locales.
* Optimize GitLab ref parsing, deduplicate formatters, and add locales
- Clean up GitLab ref parsing by extracting normalized known hosts.
- Fix an escaped newline sequence in the self-hosted GitLab mock test.
- Deduplicate stats helper functions into a single shared file.
- Translate path status message strings across ES, JA, KO, and ZH.
---------
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>
- Support closing GitHub issues with specific reasons ('completed', 'not planned', or duplicate) via main-process mutations and gh CLI wrappers.
- Replace the legacy comment composer with a tabbed layout supporting a real-time markdown preview, image/attachment inputs, and state transition buttons.
- Refactor assignee and label popovers into dedicated reusable components to clean up the item dialog.
Detect when git push operations fail due to un-pushed or out-of-sync
submodules, and extract the specific submodule name to provide clear,
actionable guidance to the user.
Additionally, update the Source Control error UI to allow better text
wrapping and word-breaking for detailed error alerts.
Unifies file discovery and tree navigation under a single Explorer domain, simplifying the right sidebar activity bar and reducing tab clutter.
* Replaces the standalone 'search' activity bar tab with a nested 'search' subview inside the File Explorer tab
* Introduces 'rightSidebarExplorerView' ('files' | 'search') state to manage the active subview inside the Explorer
* Adds a search button to the File Explorer toolbar and a back button to the search subview for seamless transition
* Exposes 'showRightSidebarFiles' and 'showRightSidebarSearch' store actions to route and seed search queries/include patterns
* Adapts file explorer keybindings, git status polling, and external workspace watchers to respect the active subview
* Maps legacy persisted search tab state to the new explorer search view for backward compatibility
* Improve source control agent action dialog layout and recipe UX
- Constrain dialog and scroll area heights to prevent viewport overflow.
- Add variable chips to easily insert the base prompt with tooltip previews.
- Keep the recipe save controls visible when a recipe is already saved, showing informational status text instead of hiding them.
- Update localized copy across multiple languages and reduce textarea rows.
- Add unit tests for the variable chip preview and save target visibility.
* Fix recipe-saved check in source control action dialog
* Evaluate only the selected save target instead of checking all available targets, as the action only writes to the selected target.
* Update daemon PTY adapter test fake PID to prevent collision with real host OS processes during runtime directory lookups.
* Route task PR queries by upstream source
Implements the routing described in docs/tasks-pr-upstream-source.md so task PR and issue queries stay scoped to the selected source.
* rm design doc
Isolated CredentialDecryptionError per-item in Linear getClients (client.ts:518) and Jira getClients (client.ts:373) on the 'all' selection so one bad credential no longer collapses healthy workspaces
Co-authored-by: orca-bug-scan-bot <orca-bug-scan-bot@stably.ai>
- Gracefully fall back to file-name summaries when staged diffs exceed
node/ssh execution maxBuffer limits, preventing generation failures.
- Split oversized diffs by file and allocate budget via water-filling,
ensuring single huge files do not starve smaller human changes.
- Clip truncated diff sections on line boundaries to avoid half-lines.