Repository navigation
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: 📥 CommitsReviewing files that changed from the base of the PR and between 81b7ca3cbe75999ae41faea5a1693e2902176b61 and bd9ad06. 📒 Files selected for processing (2)
🚧 Files skipped from review as they are similar to previous changes (2)
Included review availability: Your plan includes up to 10 reviews per rolling hour; 8 remain after this review. 📝 WalkthroughWalkthroughThe change adds source-aware authority restart classification for agent hook events. Local and remote ingestion validate restart metadata, reopen eligible retired panes, and exclude the marker from persistence and replay. Main-process status events forward the marker to the renderer. Renderer state accepts only live authority restarts through retirement tombstones while preserving closed-tab suppression. Tests cover local, remote, SSH, and renderer restart flows. Merge Risk: ⚪ Minimal · up to The PR adds narrowly scoped restart recovery while preserving validation and closed-tab protections; no actionable merge-blocking risk remains after normal checks and review. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 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 |
f8a748d to
d1ca2cb
Compare
|
Note GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer. |
d1ca2cb to
81b7ca3
Compare
|
Note GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer. |
There was a problem hiding this comment.
Actionable comments posted: 1
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 8b2f77a4-015c-4948-accd-f94093eff121
📥 Commits
Reviewing files that changed from the base of the PR and between 2f0f9a8 and 81b7ca3cbe75999ae41faea5a1693e2902176b61.
📒 Files selected for processing (12)
src/main/agent-hooks/server-closed-tab-suppression.test.tssrc/main/agent-hooks/server.tssrc/main/index.tssrc/main/ssh/ssh-relay-session-agent-hooks.integration.test.tssrc/main/ssh/ssh-relay-session.tssrc/renderer/src/hooks/ipc-events-agent-status-store-test-fixtures.tssrc/renderer/src/hooks/useIpcEvents-agent-status-pane-teardown.test.tssrc/renderer/src/hooks/useIpcEvents.tssrc/renderer/src/store/slices/agent-pane-authority.test.tssrc/renderer/src/store/slices/agent-status.tssrc/shared/agent-hook-listener.tssrc/shared/agent-status-types.ts
🚧 Files skipped from review as they are similar to previous changes (10)
- src/main/ssh/ssh-relay-session-agent-hooks.integration.test.ts
- src/main/ssh/ssh-relay-session.ts
- src/renderer/src/store/slices/agent-pane-authority.test.ts
- src/renderer/src/hooks/useIpcEvents-agent-status-pane-teardown.test.ts
- src/renderer/src/hooks/ipc-events-agent-status-store-test-fixtures.ts
- src/main/index.ts
- src/shared/agent-status-types.ts
- src/renderer/src/hooks/useIpcEvents.ts
- src/renderer/src/store/slices/agent-status.ts
- src/shared/agent-hook-listener.ts
Included review availability: Your plan includes up to 10 reviews per rolling hour; 9 remain after this review.
81b7ca3 to
bd9ad06
Compare
|
Follow-up on the scope of this pane-recovery safety net, based on current released builds rather than a new run of this PR. With Windows Orca 1.4.224 paired to Linux headless Orca Server 1.4.224, a fresh OMP 18.10.4 turn running only This makes the distinction important: recovering a legitimately live new turn after retirement is complementary to preventing a false retirement during an existing turn. Accepting a future I have not rebased or tested this branch against current main during this investigation and am not extending its fix claim. Any updated validation should preserve its replay/source/closed-tab fences and test the new-turn fallback separately from mid-turn authority retention. Detailed isolated reproduction: comment on #24436. AI assistance disclosure: prepared with an OpenAI coding assistant via OMP, using my reported behavior and local runtime diagnostics/source inspection. Reproduction and validation limits are stated above. |
ELI5
#14624 fixes the normal detach/reattach path by lifting pane-retirement fences when a live PTY binds again. This PR adds the secondary safety net: if that attach signal was not observed on both sides, a real live new turn can reclaim the retired pane. Replays, malformed relay metadata, invalid payloads, declared-source mismatches, and closed-tab events remain blocked.
What Changed
before_agent_startcan identify a legitimate fallback restart.sourceremains optional, and a source-less legacy event is classified only after deriving a valid source from the canonical normalized payload.source; a malformed declaration cannot fall through to source-less authority.authorityRestartsignal from main to renderer and clear only the matching retired-pane tombstone.restorePaneAuthorityfence restoration before emitting restart authority; closed-tab fences remain stronger.Relationship to #14624
#14624 is the primary contract: authoritative PTY attach restores pane authority immediately, including idle and mid-turn reattach. This PR is complementary, not a replacement: it covers live-new-turn recovery when a remote relay or process restart did not produce an attach observation on both sides.
Linked Issue
Related to #14236; complements the merged fix in #14624.
Visual Proof
N/A — no UI layout changed. The behavior is an agent-hook authority transition. It was exercised through the real loopback HTTP server plus remote relay ingestion in the runtime smoke described below.
Testing
corepack pnpm exec vitest run --config config/vitest.config.ts src/main/agent-hooks/server-*.test.ts src/main/ssh/ssh-relay-session-agent-hooks.integration.test.ts src/renderer/src/hooks/useIpcEvents-agent-status-*.test.ts src/renderer/src/store/slices/agent-pane-authority.test.ts— 46 files, 415 tests passedcorepack pnpm run typecheck:node— passedcorepack pnpm run typecheck:web— passedcorepack pnpm run check:code-quality:changed -- upstream/main— 0 new code-quality, type-aware, or React Doctor findings across 12 filesoxfmt --checkon all 12 changed files — passedoxlint, React Doctor oxlint,oxfmt) — passedAgentHookServerruntime smoke using the real HTTP listener and relay ingestion:workingand emittedauthorityRestartworkingAI Disclosure
OpenAI Codex GPT-5.6 Sol via OMP was used to investigate, implement, rebase, test, review, and prepare this PR. CodeRabbit and a separate reviewer were used for review. All review-found trust-boundary defects were fixed before this update.
Review
sourceremains optional andauthorityRestartis additive; existing valid status events retain their previous behavior.Checklist
pnpm lint,pnpm test, andpnpm buildpass locally — focused checks passed; remaining coverage is left to CIAuthor