Skip to content

fix(chat): keep messages and Computer responsive during media playback - #294

Merged
The1UNeed merged 5 commits into
mainfrom
t3/fix-demon-computer-running
Nov 23, 2026
Merged

The1UNeed merged 5 commits into
mainfrom
t3/fix-demon-computer-running

Conversation

@The1UNeed

@The1UNeed The1UNeed commented Nov 23, 2026 •

Copy link
Copy Markdown
Owner

Opening a chat with 45 recordings started downloading every chapter over the WebSocket. A message that had reached the daemon appeared as “Not sent,” and the Computer tab could stay blank.

Audio and video now load when selected. The daemon returns a small file descriptor over the chat connection, and the player streams and seeks over HTTP. Each range request checks the paired device, the chat’s file permissions, and the file revision. Reload opens the latest version if a recording changes. Older daemons and clients keep their inline playback path.

Bot chats now show “Delivery unconfirmed” when the daemon’s reply is late. Retry keeps the original message ID. The Computer tab shows loading or retry feedback and ignores status replies from earlier connections.

Verification

  • Reopened the affected chat against the older daemon. All 45 recordings stayed unloaded, selecting Chapter 20 loaded its 20:36 player, and the Computer screen streamed.
  • Sought to 31:40 in a 32 MiB recording with a 482-byte metadata reply. The Rust integration test also received a Computer status reply while a download remained open.
  • Changed a recording between selection and playback on paired iOS and Android builds. Both recovered from HTTP 410 through Reload, played over HTTP 206, and left the second chapter unloaded. The named iOS Share copy matched the daemon file byte for byte.
  • Full Rust suite and Clippy passed. Web passed 1,619 tests, mobile 286, desktop 179 with two skipped, and site 34. Mobile export and smoke passed.
Web and iOS screenshots from the playback fixture

Web player at 31:40 with the second chapter available to load

iOS playing one chapter with the next chapter still unloaded

Council review

Five review rounds. The first three covered the client changes. Round four added HTTP streaming. Round five covered playback recovery and native verification. All four reviewers approved the proposed head, 77e046a0.

Reviewer Initial client Reconnect recovery Status ordering HTTP transport Final
Sol 8/10 9/10 9/10 8/10 9/10
Astra 9/10 9/10 10/10 9/10 9/10
Gemini no score 8.5/10 9/10 no score 9/10
Opus no score 8/10 8/10 no score 9/10

Created with GPT-6.2 Astra in T3 Code.


Note

Medium Risk
Adds authenticated HTTP media serving and changes how clients load large files and handle send-delivery UX; falls back for older daemons but touches chat, mobile playback, and connection-sensitive Computer state.

Overview
Chat audio and video no longer bulk-download over the WebSocket. With stream_media: true, hexbot.files.read returns a short-lived media_path; the daemon serves range-aware HTTP at /api/media/{key} so playback and seeking stay off the RPC connection. Links are tied to the issuing connection and file revision (stale links return 410).

Web, mobile, and desktop prefer those streams via mediaSource, load audio/video on demand, and offer Reload when the player errors or the file changes. Inline data_url playback remains for older daemons. Desktop CSP allows daemon media URLs.

Messaging copy distinguishes daemon refusal (Not sent) from late or lost acknowledgement (Delivery unconfirmed), with retry still using the same input key.

Computer panel tracks status per connection, shows loading/retry instead of a blank tab, and drops stale API answers after reconnect.

Reviewed by Cursor Bugbot for commit 77e046a. Bugbot is set up for automated code reviews on this repo. Configure here.

@vercel

vercel Bot commented Nov 23, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
hexbot-connect Ready Ready Preview Nov 23, 2026 3:58am UTC
hexbot-site Ready Ready Preview Nov 23, 2026 3:58am UTC

Request Review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 23, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-23T04:00:42.589191Z 77e046a PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@cursor

cursor Bot commented Nov 23, 2026

Copy link
Copy Markdown

Bugbot couldn't run - usage limit reached

Bugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit.

A user or team admin can review and increase usage limits in the Cursor dashboard.

(requestId: 4beda446-fceb-43b4-93e3-b8e4dba535d8)

@The1UNeed
The1UNeed merged commit 179f094 into main Nov 23, 2026
18 checks passed

This branch was successfully deployed

2 active deployments
Preview – hexbot-site — 77e046a0 Deployed Nov 23, 2026 by vercel[bot]
Preview – hexbot-connect — 77e046a0 Deployed Nov 23, 2026 by vercel[bot]
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