Conversation
Follow-up to the idle watchdog (e528ccd). Review surfaced six issues across correctness, scope, and recovery; this addresses all of them. #1 Monotonic clock: lastInbound was stored as wall-clock UnixNano and compared via time.Since on a time.Unix value, which silently falls back to wall-clock arithmetic. A laptop waking from sleep (local agent) or an NTP step (remote) made elapsed jump past the limit and reap a live session. Now anchored to a monotonic startMono via stampInbound/ idleElapsed. #2 Scope: the watchdog ran for local agents too, where parent death already arrives as stdin EOF (plus Pdeathsig on Linux) — pure downside. Now gated on a new --idle-watchdog flag the SSH launch sets and the local launch omits. #3 Threshold: 60s limit with 3-ping margin was tight enough that a stalled Electron main thread (ping is event-loop bound; ssh ServerAlive is not) could trip it. Widened to 90s limit / 15s ping (6 slots), with the check interval decoupled to limit/6 so the kill window stays tight. #4 Contract: client ping was gated on heartbeat advertisement, the agent watchdog on nothing — drift-prone. The agent now advertises idleWatchdogMs in the Ready frame; the client pings iff positive, at idleWatchdogMs/6. #5 Orphans: drainAndExit reaches os.Exit, which skips the `defer pty.Close()`. Linux survived via Pdeathsig; a darwin remote (supported, shipped) had only SIGHUP-on-fd-close, so SIGHUP-ignoring children orphaned. PTY cleanup is now a shutdown hook that SIGKILLs each process group on every OS. #6 Recovery: the watchdog exited 0, which the client's handleClose treats as a clean terminal exit (no reconnect). On a false positive (client alive but stalled) the session died permanently. Now exits 75 (EX_TEMPFAIL) so the client reconnects. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…p on iframe click - HTML preview renders via sandboxed iframe (parsed off the main thread), so the 512KB cap was an unnecessary truncation; remove it entirely. - Markdown/SVG still parse on the renderer's main thread, so keep a cap but raise it from 512KB to 1MB. - Clicks inside the sandboxed iframe don't bubble out, so splitting panels and clicking the HTML preview never activated the group. Detect focus entering the iframe via window blur + document.activeElement and activate the owning group. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…n-destructively
Add-workspace SSH directory picker had two path-input issues:
1. The autocomplete dropdown never highlighted a suggestion (index started
at -1), so Enter ignored the list and the user had to arrow down first.
Highlight the top match on every keystroke; an empty filtered list clears
it so Enter still submits the raw typed path.
2. Entering a non-existent path produced a generic "connection failed" error
that wiped the directory tree, and logged a spurious "unmapped
browse-session error". Root cause: the agent's NOT_FOUND code mapped to
ssh.unknown, and Electron IPC drops the Error.code property — so the
renderer (which classifies by matching the code substring in the message)
always fell through to the generic fallback.
- Add an ssh.path-not-found code; map agent NOT_FOUND to it.
- Embed the code in the Error message so it survives IPC serialization
(the renderer's existing message-matching classification now works).
- Treat path-not-found as non-destructive: keep the last valid listing and
show an inline notice by the path bar instead of replacing the tree.
- Add en/ko messages for the not-found case.
Side effect: session-expired / connect-failed browse errors now classify
correctly too (previously all browse errors hit the generic fallback).
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Promote
develop→mainfor the v0.5.3 patch release.Fixed
--idle-watchdog, widened 90s/15s thresholds, PTY cleanup that SIGKILLs process groups on every OS, andEX_TEMPFAILexit so the client reconnects after a false positive.Protocol & Remote 영향
idleWatchdogMs필드 추가 (additive, 하위 호환): 클라이언트는 이 값이 양수일 때만 keepalive ping을 보냅니다.🤖 Generated with Claude Code