Repository navigation
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (1)
Included review availability: Your plan provides up to 10 included reviews per hour; 7 remain after this review. 📝 WalkthroughWalkthroughThe reattach path now returns the original Priority: ➖ Normal — Schedule the daemon reattach sequence fix because it prevents double-counted terminal output and false remote stream gaps across both attach flows. Severity of issue fixed: Medium Merge Risk: ⚪ Minimal · up to Reattach now retains the original provider sequence while restoring terminal history, preventing false stream gaps and repeated recovery caused by double-counted output. The affected flows have regression coverage, with no active merge-blocking risk identified. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Important
The fix is correct, but it changes behavior an existing test pins — daemon-restore-scrollback-depth.test.ts now fails and will block CI until that assertion is updated to the new baseline semantics.
Reviewed changes
- Preserve attach baseline over post-drain sequence: the reattach branch in
finishSpawn(src/main/daemon/daemon-pty-spawn-result.ts) now emits the originalproviderSequence(derived from the daemon attach response byproviderSequenceFromCreateOrAttach) instead of recomputing it fromreattachSnapshot.outputSequence. - Regression tests: new
daemon-pty-attach-sequence.test.tscovers bothspawn({ attachOnly: true })andattach(), injecting 459 bytes during the durable-history overlay and asserting the next stream sequence stays contiguous.
⚠️ Stale post-drain sequence assertion now fails in daemon-restore-scrollback-depth.test.ts
The existing test uses the post-drain sequence for output produced during warm reattach (src/main/daemon/daemon-restore-scrollback-depth.test.ts:803) asserts expect(reattach.providerSequence?.value).toBe(current?.seq), which encodes the pre-fix behavior this PR removes. Running the daemon suite against this branch fails there: expected 60000 to be 60024. current.seq (60024) is the post-overlay sequence including the 24 injected bytes of FRESH_AFTER_CHECKPOINT\r\n, while providerSequence.value is now correctly the pre-overlay attach baseline (60000). This file is not in the PR diff and was not among the suites listed in the PR body's testing section, so it slipped through local validation; it will fail the full CI suite.
Technical details
# Update the stale reattach-baseline assertion
## Affected sites
- src/main/daemon/daemon-restore-scrollback-depth.test.ts:803 — `expect(reattach.providerSequence?.value).toBe(current?.seq)` pins the removed post-drain baseline.
## Required outcome
- The assertion must reflect the new semantics: `providerSequence.value` is the sequence captured at attach time, before the overlay's injected output is counted. Those injected bytes are streamed live (via `sequenceChars`) rather than folded into the baseline, so the test must assert the pre-overlay baseline (or otherwise prove the injected bytes are accounted exactly once).
## Suggested approach (optional)
- Capture the attach-time baseline (e.g. via a `getBufferSnapshot` taken before the injection, or by subtracting the injected payload length from `current.seq`) and assert `reattach.providerSequence.value` equals that, mirroring the assertion at `daemon-pty-attach-sequence.test.ts:78`.DeepSeek Pro (free via Pullfrog for OSS) | 𝕏
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
- Updated the warm-reattach restore-depth test to the new baseline semantics:
daemon-restore-scrollback-depth.test.tsnow captures the attach-timeseqas abaselinebefore the overlay, assertsreattach.providerSequence.valueequals that baseline (instead of the removed post-drainseq), and proves the overlay-injected bytes are counted exactly once by trackingstreamedCharsand checkingproviderSequence.value + streamedChars === current.seq. This resolves the prior review's stale-assertion finding; the 24-byteFRESH_AFTER_CHECKPOINT\r\ndelta the old test pinned is now the live-streamed amount, not part of the baseline.
The fix itself (daemon-pty-spawn-result.ts emitting the attach-time providerSequence instead of reattachSnapshot.outputSequence) and the new daemon-pty-attach-sequence.test.ts were reviewed against the prior commit and are unchanged here. Both targeted suites pass (25 tests).
DeepSeek Pro (free via Pullfrog for OSS) | 𝕏
…desbloquear el build de Android (#368) * fix(terminal): finish a paste in the terminal that started it instead of cancelling on a focus blip Problem: pasting into a terminal right after switching back to Orca (e.g. Cmd+Tab to another app to copy, then Cmd+Tab back and immediately Cmd+V) could show "Paste cancelled: terminal focus changed before paste started." even though the paste target was correct. When the window regains OS focus, regular-terminal-focus-ownership.ts's resyncTerminalFocusForWindowFocus defers reclaiming the xterm helper textarea's DOM focus to the next animation frame (intentionally, so a click elsewhere during reactivation isn't yanked back). A Cmd+V fired via the app-menu paste path in that window can capture document.body as the paste's activeElementAtDispatch snapshot, before the deferred refocus lands. Fix: isTerminalPanePasteFocusCurrent already treats a transient body/html activeElement at paste time as inert and trusts the rest of the check: it was missing the symmetric case where the *dispatch-time* snapshot itself was body/html. Only reject as stale when the dispatch snapshot was a real, different element outside the pane container; a body/html snapshot falls through to the existing (already correct) final-activeElement checks. A genuinely stale target (pane closed, focus moved to another real control) is still rejected exactly as before. Co-Authored-By: Claude Fable 5.1 <[email protected]> (cherry picked from commit a7e4893f2255f45dbd921365ebfbb0c6350e2d55) * fix(runtime): honor caller deadline and abort on local runtime RPC callRuntimeRpc honored timeoutMs and signal when the target was an environment and discarded both when the target was local. Nothing downstream compensated: the preload contract has no deadline on the local call, and runtime:call dispatches with neither a race nor a context signal, so ipcRenderer.invoke settles only when the handler returns. That made every caller deadline on the local path a no-op. The clearest case is client-hosted-browser-row-close.ts, which defines a 15s constant for a call whose target is hardcoded local, so the constant could never take effect. The user visible symptom is the Automations tab: it mounts with isLoading true, asks for a 15s deadline, and its finally block can only run once the promise settles, so a stalled dispatch leaves the page on its skeleton with no way back. Bound the local call with the caller's timeoutMs and signal, reusing the settle once bookkeeping and the error message from the environment path. No default deadline is added, since long running local RPCs such as git.fetch and worktree.create pass none on purpose. (cherry picked from commit 3182aab1d6369eba360bfef8374db15536e18a96) * fix(sidebar): keep project groups under their execution host (cherry picked from commit f00a936a4969dbfd366cb3a673b974ca5a2d4b52) * fix(daemon): conservar la linea base de secuencia al reatachar (upstream #19593) Port de stablyai/orca#19593. Upstream lo arregla en `daemon-pty-spawn-result.ts`; nuestro equivalente es `daemon-pty-adapter.ts` (mismo codigo, otra ruta tras la divergencia). El diff de prod es identico al de upstream. Al reatachar se tomaba la secuencia del snapshot POST-overlay en vez de la de attach, asi que la salida recibida durante el overlay se contaba dos veces y el cliente reportaba huecos de stream que no existian. Es el camino que corre en cada reconexion contra un runtime remoto. El test de nuestro arbol afirmaba el comportamiento viejo; se porta su actualizacion tal cual (+15 -3). * fix(terminal): make the Orca width provider measure emoji clusters like other terminals A cursor-position probe (STA-6740) measured Orca advancing one cell for sequences Windows Terminal and Ghostty advance two for. The cause is that `OrcaUnicodeProvider` delegated every width decision to xterm's Unicode 11 tables, which measure single code points against a table frozen in 2018, while the TUIs writing into the pane measure whole grapheme clusters against a current one. Each cell of disagreement shifts the columns a TUI's next in-place redraw erases and reprints over. The provider is already the single width authority every Orca terminal activates — the live renderer pane, the headless daemon mirror that snapshot/restore serializes from, the dashboard preview, and the restore-parity fixture. This teaches that one authority three cluster rules it was missing: - U+FE0F promotes a valid emoji-variation base from one cell to two; - a skin-tone modifier joins its base's cluster instead of claiming a second wide cell (a `+2` column shift for every glyph after it); - emoji that default to emoji presentation but postdate Unicode 11 are two cells, not one. Regional indicators are deliberately left alone: xterm has no grapheme segmentation, so a flag already reaches two cells as 1 + 1. U+FE0E text presentation is not implemented — it would have to narrow an already-placed cluster, and xterm's printer only ever advances the cursor for a joined code point. Closes STA-6740. (cherry picked from commit e949f3d422fd22f7e5406f96b09a2b4aed6ff35b) * fix(terminal): scope the skin-tone rule to modifier bases, and gate the tables against staleness Review findings on the width-authority change. The skin-tone rule gated only on the preceding cell being two wide, never on it being something a modifier can attach to. A modifier after a CJK ideograph joined it: `中🏽` measured two cells where it measured four before. The rule now also requires the preceding code point to be an emoji modifier base, which is the standard's own definition of what a modifier may modify — tighter than Extended_Pictographic and, for anything that is not a well-formed modifier sequence, it restores exactly the measurement this provider had before. The frozen tables could go stale the same way xterm's Unicode 11 table did, so the derivation is now committed as a test: it re-derives all three tables from the runtime's Unicode data and xterm's Unicode 11 provider and compares, and reads nothing from the committed ranges to build that expectation. "No missing entries" runs always — an older runtime cannot fail it spuriously — and exact equality runs on the Unicode version the tables were generated against. The module header now records why the tables are frozen at all: this width is a cross-host contract and Electron, Node and the mobile JSC embed different ICU versions, so deriving at runtime would make two Orca processes disagree about one buffer. Also: reuse the width the base provider already resolved instead of asking for it twice on the hot path, and fix two comments that described the ZWJ case as a control and claimed the reported symptom as established. Refs STA-6740, STA-7066. (cherry picked from commit a0d66b58eeb27b2a8356e1306a104dae69d5bb01) * fix(terminal): typecheck the derivation gate, and catch a spurious range on any Unicode version Two review findings on the staleness gate. The unused `name` parameter in the lookup arm failed `tsc --noEmit` with TS6133 on all three projects, which would have reddened the CI typecheck job. The gate also had a hole in one direction. Exact equality only runs when the runner's embedded Unicode version matches the version the tables were generated against, so a bogus entry inserted in sorted position went unnoticed anywhere those versions differ — and they do differ, unpredictably, since the Node the job installs carries whatever ICU that patch release shipped. A new arm closes it without reintroducing that dependency: a committed code point the runtime does not derive is a wrong entry, unless the runtime has never assigned that code point at all, which is exactly how a table generated against a newer Unicode looks from an older one. Both directions now run everywhere; exact equality stays as the strictest form where the versions do line up. Refs STA-6740. (cherry picked from commit 6cb08ec2c1650652692945441c7f9486fe08fd61) * fix(mobile): subir el versionCode de Android, que Play ya tenia usado El build de Android fallo con `Google Api Error: Invalid request - Version code 21 has already been used.` El valor esta hardcodeado en `mobile/app.json:78`, asi que CADA re-dispatch choca hasta que alguien lo sube a mano. iOS tiene `bump_patch_version` en su workflow; Android no tiene equivalente para el versionCode. Esto sube 21 -> 22 para desbloquear el build. El arreglo de fondo —derivarlo o auto-incrementarlo en el workflow— queda pendiente, porque hoy cada release movil necesita este commit manual y es facil olvidarlo. --------- Co-authored-by: Tan Vir <[email protected]> Co-authored-by: Claude Fable 5.1 <[email protected]> Co-authored-by: Alisson Linneker <[email protected]> Co-authored-by: shuning <[email protected]> Co-authored-by: Merge Sim <sim@local>

ELI5
Reattached terminal output is counted once.
What Changed
Keep the attach-time sequence baseline and assert baseline plus streamed output equals the current sequence.
Why
Using the post-overlay snapshot sequence counts live output twice and causes false stream gaps.
Linked Issue
Fixes #19595.
Visual Proof
N/A — internal sequence accounting.
Testing
178 tests passed on macOS; reverting the fix fails the regression. Node typecheck, changed-file lint and formatting passed.
Full macOS validation (Node 24, pnpm 12):
pnpm lint,pnpm typecheck,pnpm test --maxWorkers=4, andpnpm buildall executed. Typecheck and complete desktop/Web/native build passed.Full suite at
763963d6a4: 76,610 passed / 7 failed / 391 skipped. Final-HEAD serial follow-ups: 23 passed; performance/timeout failures cleared without relaxing assertions or policies.Still failing: 4 real Claude CLI startup checks (5/10-second initialization deadlines) and 1 English runtime-catalog test. All reproduced on base
bba68b1. Full lint fails on the same 7 catalog entries; later extraction/coverage gates passed separately. Full lint/test are not green.AI Disclosure
OpenAI Codex.
Review
Self-reviewed; Pullfrog reports no new issues. Human review pending.
Agent skill upstream boundary
Notes
No new permissions, platform-specific paths/shortcuts, Git commands or wire fields. Folder workspaces and remote ownership considered; full mobile/platform QA remains unrun.
Checklist