* fix: fall back to stable release when electron-updater picks an RC
When the latest GitHub release is an RC, electron-updater (with
allowPrerelease enabled) reports it as available and never considers
older stable releases. Previously the code simply rejected the RC and
sent not-available, silently hiding real stable updates.
Now the update-available handler calls findFallbackReleaseVersion()
when it detects a prerelease, which queries the GitHub releases API
(filtering out prereleases/drafts) to find the newest stable version
newer than what's running and offers it as a manual download.
* fix: persist check timestamp when RC fallback fetch fails
The .catch path in the update-available RC handler was missing
recordCompletedUpdateCheck(), which meant a failed GitHub API call
during fallback would not persist the check timestamp. On next app
launch the interval check could fire immediately instead of waiting
the full 36 hours.
The CLI entry-point (out/cli/) requires modules from out/shared/ (e.g.
runtime-bootstrap). Without unpacking both directories, Node's require()
fails when the CLI runs outside the asar archive.
* feat: improve terminal compatibility with default fonts across platforms
Add cross-platform monospace font fallback chain (SF Mono, Menlo, Monaco,
Cascadia Mono, Consolas, DejaVu Sans Mono, Liberation Mono) so the terminal
renders correctly on macOS, Windows, and Linux out of the box.
- Platform-aware default font in settings (SF Mono / Cascadia Mono / DejaVu)
- buildFontFamily deduplicates user font against full fallback chain
- Error handling for pty spawn failures with user-facing error banner
- Zero-dimension diagnostic when terminal container has no layout
- WebGL context loss / unavailability logging for debugging
* feat: improve terminal font fallback and pty error handling
- Add cross-platform terminal font fallbacks
- Surface pty spawn errors to terminal UI
- Fix max-lines eslint error in TerminalPane
- Fix curly braces eslint error in constants.ts
Add guidance for coding agents to keep worktree comments updated at meaningful
checkpoints, making work-in-progress status visible in the Orca UI without
explicit user requests.
Without this, a failed restart is a silent no-op. Now all three
call sites (settings pane, auto-restart, and "Restart Now" toast
action) surface the failure to the user and reset autoRestartAfterDownload
to avoid a stuck state.
Move editor autosave/save-queue logic out of EditorPanel into a
standalone controller that survives tab switches without keeping
the full editor UI mounted. Add updater lifecycle events so
beforeunload guards step aside during quitAndInstall, preventing
stale dirty-file prompts from blocking app restarts.
* feat: save dirty editor files before auto-update quitAndInstall
Dispatch a custom event from the preload quitAndInstall to flush unsaved
editor buffers before Electron's quitAndInstall bypasses the normal close
sequence. The EditorPanel claims the event, saves all dirty files via the
existing queueSave path, and resolves/rejects so the updater knows whether
it is safe to proceed.
* fix: address review findings
- Wrap save-before-update in try/catch so a save failure never silently
prevents the update from installing
- Move detail.claim() inside try/catch to prevent promise hang on
unexpected errors
- Add duplicate dirty tab detection to reject when the same file is
dirty in multiple tabs (prevents silent write races)
- Cap module-scoped caches (combinedDiffViewStateCache, combinedDiffScrollTopCache)
at 20 entries with LRU eviction to prevent unbounded memory growth
- Promote generationRef to useState for use in React key prop so key changes
are properly tracked by React's rendering cycle
- Show user-friendly guidance instead of raw git stderr when worktree
deletion fails due to changed files, directing users to Force Delete.
- Extract toast message logic to reusable getDeleteWorktreeToastCopy
function with comprehensive test coverage.
Local images referenced in markdown (both preview and rich editor) failed
to display in dev mode because file:// URLs are blocked by cross-origin
restrictions when the renderer is served from localhost.
- Load local images via IPC readFile → blob URL conversion
- Add useLocalImageSrc hook for react-markdown preview
- Add loadLocalImageSrc for ProseMirror nodeView in rich editor
- Snapshot cursor position before native file picker to fix insertion point
- Add blob URL cache with LRU eviction (max 100) and revokeObjectURL cleanup
- Add resolveImageAbsolutePath helper with tests
* fix: defer updater quitAndInstall to allow React/UI state to settle
PR #299 introduced a regression where the one-click auto-update flow
would synchronously invoke `quitAndInstall` immediately upon receiving
the `downloaded` state transition. This triggered a synthetic `beforeunload`
event (to capture terminal buffers) and an IPC call to quit in the exact
same event loop tick that React and the Toast library were processing
state updates. This disrupted the renderer's synchronous shutdown and flush
logic, causing the app to fail to quit and install properly.
This adds a `setTimeout` to defer `quitAndInstall`, pushing it to the
bottom of the event queue. This allows the UI state to settle and ensures
the `beforeunload` flush sequence executes cleanly.
Test cases have also been updated to use fake timers.
* fix: centralize updater restart deferral in main process
Replace the activeWorktreeSelectionNonce / frozen-sort-override approach
with the simpler sortEpoch-only strategy. Selection side-effects
(clearing isUnread, PR cache refresh) no longer participate in sort
ordering, so clicking a card never reshuffles the sidebar.
- Remove activeWorktreeSelectionNonce from store
- Remove RecentSortOverride refs and secondary sort memo
- Swap prCache → repos in sortedIds deps (prCache changes are consumed
inside the memo via direct store access when sortEpoch increments)
The `gh api --cache 60s` flag caused stale check-run data even when
the user explicitly clicked refresh. Thread a `noCache` flag through
IPC so manual refreshes skip the gh CLI cache while polling still
benefits from it.