Skip to content

Release v0.5.3#6

Merged
moreih29 merged 4 commits into
mainfrom
develop
Jun 2, 2026
Merged

Release v0.5.3#6
moreih29 merged 4 commits into
mainfrom
develop

Conversation

@moreih29
Copy link
Copy Markdown
Owner

@moreih29 moreih29 commented Jun 2, 2026

Promote developmain for the v0.5.3 patch release.

Fixed

  • Agent idle watchdog — hardened against false reaps and orphaned processes: monotonic clock anchoring (no more reaps on laptop sleep / NTP step), SSH-only scoping via --idle-watchdog, widened 90s/15s thresholds, PTY cleanup that SIGKILLs process groups on every OS, and EX_TEMPFAIL exit so the client reconnects after a false positive.
  • HTML preview no longer truncates — the iframe parses off the main thread, so the 512 KB cap was removed entirely. Markdown/SVG previews keep a cap but it's raised 512 KB → 1 MB.
  • Split-panel focus on HTML preview — clicking a rendered HTML preview in a split now activates its panel (iframe clicks don't bubble; detected via window blur + activeElement).
  • SSH path picker autocomplete — the first suggestion is now auto-highlighted, so Enter commits the top match without arrowing down first.
  • SSH non-existent path — entering a missing remote path now shows a clear "path not found" message inline and keeps the current directory listing on screen, instead of a generic "connection failed" that wiped the tree. (Also fixes browse-error classification generally — session-expired / connect-failed now route correctly.)

Protocol & Remote 영향

  • 첫 SSH 부팅 재업로드 필요: 원격 Go 에이전트 바이너리가 변경되어(idle watchdog 보강), 기존 SSH 워크스페이스는 첫 연결 시 에이전트가 재업로드됩니다.
  • Ready 프레임에 idleWatchdogMs 필드 추가 (additive, 하위 호환): 클라이언트는 이 값이 양수일 때만 keepalive ping을 보냅니다.

🤖 Generated with Claude Code

moreih29 and others added 4 commits June 2, 2026 16:43
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>
@moreih29 moreih29 merged commit 9351521 into main Jun 2, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant