Skip to content

Let a teammate's Planner finish its current work when its machine stops being shared - #738

Merged
lavaman131 merged 1 commit into
mainfrom
fix/share-off-finishes-work
Oct 29, 2026
Merged

lavaman131 merged 1 commit into
mainfrom
fix/share-off-finishes-work

Conversation

@lavaman131

@lavaman131 lavaman131 commented Oct 29, 2026 •

Copy link
Copy Markdown
Collaborator

Turning a machine's sharing off stopped every teammate's Planner on it at
once. A teammate whose Planner was replying lost the reply mid-stream, an
open question was cancelled, and a live workflow run was paused, all
because of someone else's click.

Now turning sharing off takes no new teammate documents, and:

  • a teammate's Planner that is idle, or waits only on a paused run, stops
    at once, as before;
  • one that is replying, has a question open, or has a live run keeps going
    until that work finishes, then stops on the next sweep (every 15 s) with
    the same reason, " stopped sharing with teammates";
  • sharing the machine again meanwhile keeps it, with nothing stopped later.

A paused run doesn't hold the Planner: it waits on people for as long as
they take, and stays on the machine to resume if its owner shares it again.

The busy documents are recorded before sharing ends, so no poll in between
moves their Planner. link.busy and attachments.busy say whether an
attached client is replying, asking or running; waiting (used by the idle
rule) is unchanged.

The Machines table shows "Finishing 1 teammate document" under the switch
while this lasts, described to screen readers by the switch, and the phone
view says the same. GET /api/connector/machines reports finishing.

Assistant-model: Claude Opus 5.5 (fast)
Assistant-workflow: inline
Assistant-verification: bun test unit passed: planner-dispatch.test.ts (27 pass) with 3 new cases: an open question, a reply in progress, a live run versus a paused one and sharing again meanwhile; src/harness/remote and src/experiments (219 pass)
Assistant-verification: Chromium E2E passed: bun run e2e e2e/planner-picker.e2e.ts e2e/machines.e2e.ts (15 pass), including hubot's reply in progress while mona stops sharing studio
Assistant-verification: typecheck and lint passed: bun run types and bun run ci
User-preference: When a shared machine stops being shared, a teammate's Planner finishes its current work before it stops
Co-authored-by: Alex Lavaee lavaman131@github.com

Machines table: studio not shared, Finishing 1 teammate document

…ps being shared

Turning a machine's sharing off stopped every teammate's Planner on it at
once. A teammate whose Planner was replying lost the reply mid-stream, an
open question was cancelled, and a live workflow run was paused, all
because of someone else's click.

Now turning sharing off takes no new teammate documents, and:

- a teammate's Planner that is idle, or waits only on a paused run, stops
  at once, as before;
- one that is replying, has a question open, or has a live run keeps going
  until that work finishes, then stops on the next sweep (every 15 s) with
  the same reason, "<owner> stopped sharing <machine> with teammates";
- sharing the machine again meanwhile keeps it, with nothing stopped later.

A paused run doesn't hold the Planner: it waits on people for as long as
they take, and stays on the machine to resume if its owner shares it again.

The busy documents are recorded before sharing ends, so no poll in between
moves their Planner. `link.busy` and `attachments.busy` say whether an
attached client is replying, asking or running; `waiting` (used by the idle
rule) is unchanged.

The Machines table shows "Finishing 1 teammate document" under the switch
while this lasts, described to screen readers by the switch, and the phone
view says the same. GET /api/connector/machines reports `finishing`.

Assistant-model: Claude Opus 5.5 (fast)
Assistant-workflow: inline
Assistant-verification: bun test unit passed: planner-dispatch.test.ts (27 pass) with 3 new cases: an open question, a reply in progress, a live run versus a paused one and sharing again meanwhile; src/harness/remote and src/experiments (219 pass)
Assistant-verification: Chromium E2E passed: bun run e2e e2e/planner-picker.e2e.ts e2e/machines.e2e.ts (15 pass), including hubot's reply in progress while mona stops sharing studio
Assistant-verification: typecheck and lint passed: bun run types and bun run ci
User-preference: When a shared machine stops being shared, a teammate's Planner finishes its current work before it stops
Co-authored-by: Alex Lavaee <lavaman131@github.com>
@lavaman131
lavaman131 merged commit 419631d into main Oct 29, 2026
24 checks passed
@lavaman131
lavaman131 deleted the fix/share-off-finishes-work branch October 29, 2026 05:08
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