Skip to content

feat(ru-code): restore WS connection stability + process/IO hardening#9

Merged
ru-code-dev merged 1 commit into
ru-codefrom
feat/refactoring-04
Jun 14, 2026
Merged

feat(ru-code): restore WS connection stability + process/IO hardening#9
ru-code-dev merged 1 commit into
ru-codefrom
feat/refactoring-04

Conversation

@ru-code-dev

Copy link
Copy Markdown
Owner

Restores the WS connection-stability feature that a cleanup commit
deleted, plus process I/O hardening. Success paths unchanged.

  • WS stability: restore effect RpcClient heartbeat patch + intentional-close tracking — a deliberate reconnect/dispose close is no longer misread as a disconnect, so no retry/connection leak.
  • Process I/O: end child stdio on process exit (+250ms drain), not EOF — fixes hangs when AV/git daemon holds the pipe open.
  • Terminal: show real open-failure reason in UI (was generic "Failed to open terminal"); log the cause server-side.
  • RPC: restore per-RPC failure logging lost with telemetry (defect→ERROR, typed/interrupt→DEBUG).
  • Timeouts: consolidate all server timeout literals into timeouts.ts.
  • Tests: haltOnExit, preflight probe, terminal errors.

Enable WS debug logging (web)

In the browser DevTools console:
localStorage.debugging = "ws" // then reload
Combine layers with commas: "ws,mcp". Disable:
delete localStorage.debugging // then reload
Off by default — zero console noise, no cost on hot paths.

Restores the WS connection-stability feature that a cleanup commit
  deleted, plus process I/O hardening. Success paths unchanged.

  - **WS stability:** restore effect RpcClient heartbeat patch +
    intentional-close tracking — a deliberate reconnect/dispose close is
    no longer misread as a disconnect, so no retry/connection leak.
  - **Process I/O:** end child stdio on process exit (+250ms drain), not
    EOF — fixes hangs when AV/git daemon holds the pipe open.
  - **Terminal:** show real open-failure reason in UI (was generic
    "Failed to open terminal"); log the cause server-side.
  - **RPC:** restore per-RPC failure logging lost with telemetry
    (defect→ERROR, typed/interrupt→DEBUG).
  - **Timeouts:** consolidate all server timeout literals into timeouts.ts.
  - **Tests:** haltOnExit, preflight probe, terminal errors.

  ### Enable WS debug logging (web)
  In the browser DevTools console:
      localStorage.debugging = "ws"   // then reload
  Combine layers with commas: "ws,mcp". Disable:
      delete localStorage.debugging   // then reload
  Off by default — zero console noise, no cost on hot paths.
@ru-code-dev
ru-code-dev merged commit b3a4207 into ru-code Jun 14, 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