Skip to content

feat(gateway): mirror desktop thread activity - #32

Closed
apple-ouyang wants to merge 1 commit into
RyensX:mainfrom
CompressionDuck:codex/feat-desktop-running-status
Closed

feat(gateway): mirror desktop thread activity#32
apple-ouyang wants to merge 1 commit into
RyensX:mainfrom
CompressionDuck:codex/feat-desktop-running-status

Conversation

@apple-ouyang

Copy link
Copy Markdown
Contributor

Closes #31.

Summary

  • observe official Codex Desktop IPC following state without becoming a thread owner
  • dynamically subscribe to threads that become active after sidebar bootstrap
  • mirror owner-specific activity and disconnect cleanup to OpenCodex Web
  • refresh subscriptions after browser WebSocket hello

Safety

The observer only sends initialize and thread-stream-following-changed; it never starts, steers, interrupts, or controls a thread. Desktop disconnect cleanup is owner-specific and does not affect Web-owned streams.

Verification

  • pnpm test — 107/107 passing
  • git diff --check
  • independent reviewer: PASS

Remaining validation

A real Desktop + web dual-socket UI smoke test is still recommended before release.

Reason:
- Browser sessions need live task state from the supported Codex Desktop IPC bus without owning or mutating Desktop streams.

Changes:
- Observe visible Desktop threads over Unix sockets or the Windows named pipe with bounded retry behavior.
- Parse fragmented IPC frames without repeated full-buffer copies and reconcile stale thread subscriptions.
- Restore active App Host relays after WebSocket reconnect before any new browser RPC data.
@apple-ouyang
apple-ouyang force-pushed the codex/feat-desktop-running-status branch from c2df9f1 to df2880e Compare July 30, 2026 13:47
@apple-ouyang
apple-ouyang marked this pull request as ready for review July 30, 2026 13:48
@apple-ouyang

apple-ouyang commented Jul 31, 2026

Copy link
Copy Markdown
Contributor Author

Closing as superseded by #34, which has already been merged.

I compared #32 with the current main branch:

  • The App Host reconnect bridge and client-ready WebSocket coverage are already present.
  • The Desktop observer/runtime implementation is present and extended by fix(gateway): keep desktop conversations and activity live #34 with connection reset handling, owner/revision validation, and recent-conversation invalidation.
  • The current test command already includes the new WebSocket tests.

No unique behavior remains in this PR. Merging it now would reintroduce the earlier observer semantics on top of the newer implementation.

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.

Mirror Codex Desktop thread activity in the web sidebar

1 participant