* Preserve unsaved diff-note draft on outside click
Clicking outside the diff-note popover while it held unsaved text
discarded the draft. Dismiss-on-outside-click now only fires when the
draft is empty or whitespace-only; with content the popover stays open
so an accidental click can't lose an in-progress note. Escape and the
Cancel button still dismiss explicitly.
Mirror the draft into a ref so the document mousedown listener (empty
dependency array) reads the freshest body, matching the existing
onCancelRef/topRef pattern in the component.
* Preserve large diff-note drafts on outside click
Co-authored-by: Orca <help@stably.ai>
---------
Co-authored-by: Jinwoo-H <jinwoo0825@gmail.com>
Co-authored-by: Orca <help@stably.ai>
Consolidate session binding resolution into a dedicated helper that scans
active PTY states, restored tab PTY IDs, and split-pane layout wake
hints. This ensures that deferred-reattach terminal sessions are not
falsely classified as orphaned before their UI panes mount.
* Scope Claude Keychain lookup and disable PTY fallback for system auth
* Scope macOS Keychain credential lookups to the config directory first to support Claude Code 2.1+, falling back to the legacy system default.
* Disable Claude CLI PTY execution fallback for system-default accounts during usage refreshes to avoid launching unexpected browser auth flows.
* Disable Claude PTY fallback when auth preparation is unavailable
Treat missing Claude auth preparation as system-default. This aligns
the PTY fallback gate to prevent background refreshes from triggering
interactive authentication flows when no auth is configured.
- iOS `textContentType` overrides `autoComplete` and restricts keyboard
layouts, preventing switching to non-Latin input methods (IMEs).
- Use `autoComplete="off"` instead to ensure the keyboard remains
default and IME switching stays available.
- Update tests to assert these changes.
Introduce support for detecting and activating 'task_' prefixed links
in terminal panes.
Because orchestration tasks are stable records but can be retried
onto new dispatches, clicking a task link queries the runtime database
via 'orchestration.dispatchShow' to retrieve the latest assigned
terminal handle, then navigates to that terminal.
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
* Keep repos visible with missing project groups
* Preserve shared project metadata on host refresh
* Prune stale source repos in projects and fix sidebar group rendering
- Filter sourceRepoIds against currently known repo IDs to prevent
removed or stale remote repos from lingering in shared project metadata.
- Prevent project-group assigned repos from rendering as missing metadata
fallback rows if the group exists.
* Preserve multi-host project metadata and source repos on refresh
- Keep source repos owned by other hosts during a single-host refresh
- Ensure client-local Windows runtime preferences are not overwritten
by remote refreshes, while allowing local refreshes to clear them
- Prevent sidebar key errors when repo groups have not yet loaded
- Apply extra left-padding pullback to experimental cards when the status lane is shown, keeping title text aligned to tree steps.
- Use negative left margin on shallow rows when the minimum content inset clamps the padding adjustment.
- Resolve experimental card style setting dynamically in the folder workspace panel instead of hardcoding it.
Remove the logic that defers activation of slept worktrees behind the
input-quiet scheduler when clicked in the sidebar.
Since the underlying state transition and terminal preparation are
already properly deferred where needed, sidebar clicks can update the
active workspace immediately. This simplifies the activation flow and
eliminates complex cancellation race conditions.
* Speed up Markdown preview local images
Implement fast local image prewarming for Markdown preview as described in docs/markdown-preview-fast-local-images.md.
* Encode markdown image paths to support spaces on insertion
Unescaped spaces and delimiters in markdown image destinations can make
screenshot filenames with spaces render as literal text or broken partial
paths.
- Encode the image basename using encodeURIComponent when inserting.
- Preserve encoded local image paths during markdown round trips.
- Remove outdated markdown-preview-fast-local-images design doc.
* fix: address review findings
* Improve accessibility and refactor GitHub work item status helpers
- Add aria-label and aria-hidden attributes to the task ID pill and icons to make them screen-reader friendly.
- Refactor getTaskPageGitHubPRIconTone to use an exhaustive switch statement with explicit type-safety fallbacks.
- Add comprehensive test coverage for draft checks, state labels, and icon tone edge cases.
* Don't enqueue local PR refresh for remote-host repos (fix renderer OOM)
The renderer enqueues GitHub PR refreshes for worktrees. Remote/SSH/runtime
worktrees are meant to refresh through the runtime route (getRuntimeRepoTarget),
but when that route is unavailable — host not the active environment, or
disconnected — the call falls through to the local `gh:enqueuePRRefresh` IPC.
The local handler only resolves repos registered in the local store, so it
rejects every such call with "Access denied: unknown repository path".
With a remote worktree active (e.g. a runtime "Project server" workspace), this
fires on a loop (worktree activation + SWR polling), flooding the renderer with
failed invokes and unhandled rejections. Observed hundreds of these per session;
the renderer JS heap climbs to the V8 ceiling (~3.5GB) and V8 aborts the process
(crash-reports.json: renderer crash, exitCode 5, usedHeapMB == heapLimitMB).
Add isLocalHostPRRefreshCandidate and gate all four enqueue sites on it, so the
local handler only ever receives local-host candidates. Remote candidates with
no available runtime route are skipped (their PR status refreshes once the host
is active/reconnected) instead of spamming a handler that can't serve them.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* test: cover local executionHostId in PR-refresh host guard
Address CodeRabbit nitpick on #6094: add a positive case where a local repo
carries an explicit executionHostId === LOCAL_EXECUTION_HOST_ID, completing
predicate coverage for isLocalHostPRRefreshCandidate.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* fix: route PR refreshes by repo host
Co-authored-by: Orca <help@stably.ai>
* fix: skip disconnected SSH PR refreshes
Co-authored-by: Orca <help@stably.ai>
---------
Co-authored-by: Omar Shahine <10343873+omarshahine@users.noreply.github.com>
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>
* defer committing workspace directory path changes until blur or enter
Introduce draft state for the workspace directory path input, only
committing the changes on blur, Enter, or Browse completion. This
prevents the backend from creating incomplete directory path prefixes on
disk with `mkdir` during intermediate typing states.
* Fix agent-hooks test mock and clean up unused imports
* Update the RuntimeClient mock in agent-hooks test to return a fully
typed instance with the correct schema, eliminating type assertions.
* Remove an unused React import in WorkspaceDirectorySetting test.
* Detect agents in the serve user's package-manager bins; don't pin empty remote-detect results
Two defects prevent the desktop client from detecting agents installed on a
remote `orca serve`:
D1 (src/relay/relay-command-env.ts): the relay probes agents with a login shell
(`/bin/sh -lc`), which sources ~/.profile but not the interactive ~/.bashrc that
real PTY sessions source. Per-user package-manager bins added to PATH only in
~/.bashrc are therefore invisible to detection. Resolve the serve user's
package-manager bins from $HOME (.local/bin, .npm-global/bin, .cargo/bin,
.bun/bin, go/bin, .deno/bin, .local/share/pnpm), honor npm_config_prefix, append
to the POSIX fallback set, dedupe against inherited PATH; win32 unchanged.
D2 (src/renderer/src/store/slices/detected-agents.ts): an empty detection result
([], truthy in JS) was pinned by the `if (existing)` short-circuit, so detection
never retried after the server env was fixed. Changed to `if (existing?.length)`;
in-flight dedup still prevents re-detect storms; failures stay uncached.
No new transport, no PowerShell/bash bridge. D1 and D2 are independent.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* Also patch the runtime (orca serve) detection path against the empty-pin bug
The D2 fix guarded only ensureRemoteDetectedAgents (the SSH path). The
desktop client's headline scenario — pairing to a remote `orca serve` —
routes through ensureRuntimeDetectedAgents (kind: 'runtime'), which had
the identical bug: an empty detection result ([], truthy in JS) was pinned
by the `if (existing)` short-circuit, so a later install / PATH fix was
never picked up without a reconnect.
Change the runtime guard to `if (existing?.length)`, mirroring the remote
path. In-flight dedup still collapses concurrent re-detects; failed
requests stay uncached. Add a runtime regression test proving detection
re-runs after an empty result (fails on the pre-fix guard).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* Honor package-manager relocation env vars in relay PATH detection
Extend the existing npm_config_prefix precedence to cargo, bun, deno, go,
and pnpm so relocated installs (CARGO_HOME, BUN_INSTALL, DENO_INSTALL,
GOBIN/GOPATH, PNPM_HOME/XDG_DATA_HOME) are detected, falling back to the
$HOME defaults. Mirrors the remote-node probe's NVM_DIR handling (#6037).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* Tighten remote agent detection retries
Co-authored-by: Orca <help@stably.ai>
---------
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-authored-by: LesleyMurfin <260182349+LesleyMurfin@users.noreply.github.com>
Co-authored-by: Jinwoo-H <jinwoo0825@gmail.com>
Co-authored-by: Orca <help@stably.ai>
Apply styling via data attributes and custom CSS in main.css instead
of basic utility classes. This provides a more distinct background color
for selected files in both light and dark modes, and adds a subtle border
to ensure legibility against panel backgrounds.