Skip to content

Add desktop chat over WebSocket mirror#150

Merged
pmbstyle merged 5 commits into
mainfrom
desktop-chat-ws
May 31, 2026
Merged

Add desktop chat over WebSocket mirror#150
pmbstyle merged 5 commits into
mainfrom
desktop-chat-ws

Conversation

@pmbstyle

@pmbstyle pmbstyle commented May 31, 2026

Copy link
Copy Markdown
Owner

Summary

Adds the Desktop chat client backed by the existing gateway WebSocket, and changes the WebSocket path into a mirror of the shared conversation history instead of a separate output channel.

What changed

  • Mirrors inbound/outbound chat, worker events, progress, files, and typing state into the WebSocket session.
  • Removes the old WebSocket-only response style/prompt behavior so other configured channels keep working while Desktop observes the same conversation.
  • Adds the Desktop chat tab with message send, markdown rendering, image previews, paste/upload attachments, approvals, and thinking indicator.
  • Stages Desktop chat attachments under workspace/tmp/desktop_chat and rejects WebSocket attachment paths outside that directory.
  • Caps image preview generation at 25 MB so large selected files can be attached without reading the whole file into IPC state.
  • Keeps WebSocket partial streaming compatible with existing internal_progress_send implementations while preferring emit_ws_progress when available.

Validation

  • uv run pytest (910 passed, 1 skipped locally)
  • uv run pytest tests/test_gateway_ws_resolution.py
  • uv run pytest tests/test_router_tool_budget.py::test_plain_completion_can_stream_for_websocket tests/test_telegram_react_tag_sanitization.py::test_telegram_uses_reply_reaction_fallback_when_immediate_loses_tag tests/test_telegram_react_tag_sanitization.py::test_telegram_infers_reaction_from_short_text_edge_emoji -q
  • uv run ruff check src/octopal/gateway/ws.py tests/test_gateway_ws_resolution.py
  • uv run ruff check src/octopal/runtime/octo/router.py tests/test_telegram_react_tag_sanitization.py
  • uv run black --check src/octopal/gateway/ws.py tests/test_gateway_ws_resolution.py
  • uv run black --check src/octopal/runtime/octo/router.py tests/test_telegram_react_tag_sanitization.py
  • npm run build from desktop/
  • GitHub Actions PR Tests #269: success

@socket-security

socket-security Bot commented May 31, 2026

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Addedremark-gfm@​4.0.19910010083100
Addedreact-markdown@​10.1.09910010083100

View full report

@pmbstyle pmbstyle self-assigned this May 31, 2026
@pmbstyle pmbstyle marked this pull request as ready for review May 31, 2026 12:00
@pmbstyle pmbstyle merged commit 28bca57 into main May 31, 2026
4 checks passed
@pmbstyle pmbstyle deleted the desktop-chat-ws branch May 31, 2026 12:01
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