Skip to content

chat: message a chat working on another computer; it waits in the queue there - #2408

Merged
santoshkumarradha merged 2 commits into
app/v3from
feat/message-elsewhere
Nov 5, 2026
Merged

santoshkumarradha merged 2 commits into
app/v3from
feat/message-elsewhere

Conversation

@santoshkumarradha

Copy link
Copy Markdown
Member

What

A chat that is open or working on another computer now takes messages. Each message goes into that chat's queue on the holding computer and runs after the current turn. The chat stays where it is.

  • Sender: chats.send seals the message into this device's own directory record under outbox. The row lists it under notes as waiting and later as delivered.
  • Holder: reads the message on its chat-list read and calls agents.queue with client id note:<id>. It then lists the id under took in its own record, and the sender drops the message.
  • Addressing: messages go to the chat, not to a computer. A message that hasn't been taken yet goes to whichever computer holds the chat at that point.
  • Relays: both the Go relay and the hosted relay advertise Codeaf-Chat-Notes: 1. A client never writes outbox/took to a relay that doesn't advertise it. The hosted relay caps outbox at 8 and took at 64.
  • No new raft mutation: this rides device-record writes, so a record change wakes the existing watchers.

Stacked on #2375 (working flag). The desktop side is codeaf-desk #196.

Proof

  • New tests:
    • internal/syncsetup/notes_test.go (round-trip and refusals).
    • cmd/codeaf/app_notes_test.go (wire: waiting → delivered, outbox drained).
    • relay/hosted/test/lease.test.js caps.
  • Package suites pass: syncsetup, directory, appwire, clusterstate, chatlist, manual. Two new probes reach desktop-sync.
  • Live run with two homes on one local relay, using DeepSeek V4.1 Flash:
    1. While caf-b was in a 120 s turn, the desk sent "Then add a LICENSE file saying MIT and commit it."
    2. The desk showed Sending to caf-b, then Delivered to caf-b about 4 s later.
    3. caf-b ran the message after its turn and committed 0e7e4be Add MIT LICENSE.
    4. Continue here then brought the chat over with both turns.

Manual

desktop-sync.md has a new section, "Send a message to a chat working on another computer". It covers the composer lines, the limits and refusal sentences quoted exactly, and the wait-for-the-turn behavior of Continue here. The old claim "There is no automatic retry" is corrected.

🤖 Generated with Claude Code

Base automatically changed from feat/working-elsewhere to app/v3 November 5, 2026 16:18
santoshkumarradha and others added 2 commits November 5, 2026 11:18
…eue there

The sender seals the message into its own device record's outbox; the
computer holding the chat queues it after the current turn and lists the id
in its record's took, and the sender drops it. chats.send is the app door,
and rows carry notes with waiting and delivered states. Relays advertise
Codeaf-Chat-Notes: 1 and the client never writes the new fields to one that
does not.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@santoshkumarradha
santoshkumarradha merged commit ba629a3 into app/v3 Nov 5, 2026
1 check passed
@santoshkumarradha
santoshkumarradha deleted the feat/message-elsewhere branch November 5, 2026 16:19
santoshkumarradha added a commit that referenced this pull request Nov 5, 2026
…t's relay cell (#2422)

* Revert "manual: the desktop composer's destination chip (#2420)"

This reverts commit 046003e.

* Revert "chat: message a chat working on another computer; it waits in the queue there (#2408)"

This reverts commit ba629a3.

* Revert "Say when a turn is running on the computer that holds a chat (#2375)"

This reverts commit 8200ddb.
santoshkumarradha added a commit that referenced this pull request Nov 5, 2026
…at, destination chip (#2425)

* Revert "Revert #2420, #2408 and #2375: a second computer writes to a held chat's relay cell (#2422)"

This reverts commit 9316d94.

* chats: guard the note goroutines and count only other computers' writes on a held cell

The re-land of #2375, #2408 and #2420 after #2422. Both note goroutines now run
through guard.Go, and the held-chat drive test no longer counts the holder's own
heartbeat (cellsync's socketMoved renewal when the second window re-dials the
watch socket) as another computer writing to its cell.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* changes: entry for the re-land (#2425)

Co-Authored-By: Claude Opus 5.5 <[email protected]>

---------

Co-authored-by: Claude Opus 5.5 <[email protected]>
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