Skip to content

Inbox: combine threads that live on two linked computers - #3872

Merged
backnotprop merged 16 commits into
mainfrom
feat/inbox-combine-across-computers
Nov 22, 2026
Merged

backnotprop merged 16 commits into
mainfrom
feat/inbox-combine-across-computers

Conversation

@backnotprop

@backnotprop backnotprop commented Nov 22, 2026 •

Copy link
Copy Markdown
Owner

Draft: Combine threads that live on this computer and one linked computer (approval "inbox-combine-across-computers"). The owner sees the real dialog before any merge.

How it works

  • "Who writes it" always offers every running agent on both computers, also when every pick is on one of them (the owner: "Any running agent on either computer, always"): the ones that wrote in a pick first, then the rest; each line ends with its computer while one is linked. With no linked computer, every running agent here, without computer names. An agent that wrote in none of the picks can be chosen and owns the new thread. With every pick on the other computer, the wake goes in the chosen agent's own last thread on its computer (an agent with no thread there is not offered for such picks).
  • The chosen agent's computer runs the Combine and keeps the new thread. It reads the other computer's picks there, then marks them busy there (POST combine/hold), so neither computer can combine them twice at once. The hold lasts 2 minutes until the Combine is written here (confirmed), then at most 26 h, so a start that stopped halfway leaves nothing busy for long. The wake goes into one of its own picks.
  • Every pick's files and pictures go on the new thread's first message: this computer's copied (the version sent, a clone where the disk has them) into the new thread's own uploads folder, so they open after the old thread is deleted; the other computer's copied in while the Combine waits (agent-file, with the same caps and refusals, and checked against the SHA-256 that computer named), so all open from the new thread, also while that computer is off. A file that can't be copied is left out and the Combine goes on; one never reached because that computer stayed away for the day is named too.
  • One quiet line on the combined thread (a Tidy note's style, under the first message's files) names what stayed or was left out: "Still open on Mini: Refund totals · Not copied: plan.pdf" (combine_left on the message, written as the Inbox learns it); a thread archived there since, as that computer's list says, drops out of it. Its mark is the neutral note mark.
  • On arrival, the other computer's picks are archived there through the outbox. Each archive carries what the read saw (seen_through_message, seen_questions). If the thread moved on, has an open question the read never saw, or was unarchived there by the person after the read (seen_cursor), it is skipped there. An archive not landed within a day is never sent again, also one that left once (outbox send_by), and taken back quietly.
  • Undo takes back an archive that never left; behind any other it queues the Undo on that computer's queue (outbox follows), with no time bound: it goes once the archive landed or may have, and is dropped only with an archive that surely did not land. waiting_on tells the window to wait before it says "Combine undone.".
  • A Combine's wake note reads "Combine sent to · " (a Tidy's still "Tidy sent to …"), same-computer Combines included.
  • These writes are the Inbox's own (auto), so they are never listed as the person's waiting writes and never raise a notice.
  • Every failure the other computer causes shows the dialog's existing person-facing lines. Picks on two linked computers neither of which is this one, or on three, show main's "These threads are on … machines" line.

Tests

  • packages/server/inbox-combine-far.test.ts, inbox-combine-across.test.ts, the two-Inbox inbox-combine-across-world.test.ts (CI only).
  • packages/server/inbox-combine-across-files.test.ts, packages/core/inbox-combine-left.test.ts.
  • DOM: pickWork.test.tsx, combines.test.tsx, tidyNote.test.tsx.
  • e2e: tests/e2e/inbox-combine-machines.spec.ts, with screenshots in inbox-window-proof-<shard> under combine-across-computers/ (07-dialog-picks-on-one-computer.png, 08-dialog-picks-on-both-computers.png, 09-combined-thread-quiet-line.png for the three decisions).

The Combine dialog lists the running agents of both computers (each asked about
its own picks, each line ending with its computer). The chosen agent's computer
runs the Combine and keeps the new thread: it reads the other computer's picked
threads there with the agents' far read, and once the new thread arrives
archives them there through the outbox, each under a key made from the
Combine's id; Undo brings them back the same way, queued behind the archive.
Nothing is written on either computer before every far thread was read.

New linked mark combine-across, so an older linked Inbox is said to need an
update instead of being asked.
@backnotprop backnotprop added the ci:e2e Run the full browser suite (Inbox window e2e) on this PR label Nov 22, 2026
…th computers, says the person's lines, and Undo waits for the other computer
…unning agents too; the world test reads the busy refusal by its code
… capped at 500 MB, picked up after a restart and attached once; Undo of a landed archive is not held to its guard; the Undo toast says the other computer's true state; a thread deleted there is not 'away'; this Inbox's own failing writes step aside for the person's
…re less-than, which Semgrep's TypeScript parser read as type arguments
…nction named using reads as a using declaration to Semgrep's TypeScript parser
…ite it, every pick's files go on the new thread, and one quiet line names what stayed open or was not copied
…by its link, and gives its seventh test the time it takes
…puter, nothing lands after its day, copies that outlive their threads, and the quiet line follows the other computer

- Undo queues behind the archive on that computer's queue (outbox follows), with no time bound; an archive not landed within its day is never sent again (outbox send_by), also one that left once.
- An archive there is skipped after the person's own Unarchive there (seen_cursor); one written in since its archive is one write (again).
- This computer's files and pictures are copied to the new thread's own uploads folder; a copy is checked against the sha256 the other computer named; files never reached in their time are named as not copied.
- The quiet line drops a thread archived there since (that computer's list as held), and uses the neutral note mark.
- A hold whose Combine was never written lets go after 2 minutes; a written one is confirmed.
- A Combine's wake note reads Combine sent to, not Tidy sent to.
- The GuideCard ternary is back as on main.
@backnotprop
backnotprop marked this pull request as ready for review November 22, 2026 22:58
@backnotprop backnotprop removed the ci:e2e Run the full browser suite (Inbox window e2e) on this PR label Nov 22, 2026
@backnotprop
backnotprop merged commit f7329f8 into main Nov 22, 2026
64 checks 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