Repository navigation
Let a teammate's shared machine run the Planner of a document whose creator has none - #736
Merged
Merged
Conversation
…reator has none A document on Default machine ran its Planner only on its creator's machines. When a teammate without a paired machine created a document, its Planner never started, even with someone else's machine paired, connected and able to run Planners in the same repository. Chat stayed on "Planner: none attached". A machine's owner can now share it with teammates. Shared, it runs the Planner of a document on Default machine whose creator has no connected machine that can, as its owner, only in repositories its owner can push to. Sharing is off unless the owner turns it on. Routing (apps/server/src/experiments/routes.ts): - Default machine keeps the creator's own machine first. With none that can run Planners, it takes a teammate's shared one, each owner's favorite first. - Before using a shared machine for a repository, Chopin checks with the machine's own GitHub token that its owner can push there (documentAccess), and keeps the answer for 10 minutes, or 1 minute after a refusal. Opening or asking the document checks again once it lapses. - A document opened before the shared machine connected, or before it was shared, is asked again as the machine connects or is shared. - Once the creator connects a machine of their own, the Planner moves there, unless it is already attached on the shared machine; then it stays. - Turning sharing off stops the Planners the machine runs for teammates and tells the connector "<owner> stopped sharing <machine> with teammates". - A document whose creator chose a machine never uses a shared one, and builds, runs and investigations still go only to the presser's own machine. - The machine button's Planner state names the teammate while it starts: "starting" with their login. Storage: machines.shared (migration 028_machine_sharing, default false), set by `POST /api/connector/machines/:id/shared` for the owner only, and by pairing (a key minted with `shared`, or approval with `shared`). Live connections follow a change at once. Interface (DESIGN.md patterns, no new tokens): - Machines table: a Teammates column with the same switch the Add server page uses, named "Share <machine> with teammates", changed at once like the star. On a phone, the machine's view has "Share with teammates" with what it does. - Pairing card: "Let teammates' documents plan on this machine", off. - Add a cloud machine: "Plan teammates' documents", off; the key carries it. - UsersIcon for the phone row, in the icon catalogue. Docs: chopin-cli.md, "Share a machine with teammates". Assistant-model: Claude Opus 5.5 (fast) Assistant-workflow: inline Assistant-verification: bun test unit passed: GIT_CONFIG_GLOBAL=/dev/null bun test (6746 pass, 0 fail), including 7 new shared-machine dispatch tests and a pairing-key test Assistant-verification: PostgreSQL contract passed: bun test apps/server/src/storage/postgres against postgres:17 (123 pass), including migration 028 and the share contract Assistant-verification: Chromium E2E passed: bun run e2e e2e/machines.e2e.ts e2e/connector.e2e.ts e2e/planner-picker.e2e.ts (16 pass); the table switch saves and survives a reload, a key minted shared pairs a shared machine, both pairing switches start off Assistant-verification: typecheck and lint passed: bun run types and bun run ci (design contract renewed for UsersIcon and two shifted owners) User-preference: A teammate without a machine of their own should get a Planner on a teammate's designated default machine, only when its owner opts in Co-authored-by: Alex Lavaee <lavaman131@github.com>
… Chromium hubot creates the document and has no machine; mona's machine can run Planners. hubot's Chat says "Planner: none attached" until mona turns on studio's Teammates switch on Machines, then "starting on @mona's machine" and "mona attached" once the backend attaches; hubot's @chopin reaches it, and turning the switch off stops it. Assistant-model: Claude Opus 5.5 (fast) Assistant-workflow: inline Assistant-verification: Chromium E2E passed: bun run e2e e2e/planner-picker.e2e.ts (5 pass) Co-authored-by: Alex Lavaee <lavaman131@github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A document on Default machine ran its Planner only on its creator's machines.
When a teammate without a paired machine created a document, its Planner never
started, even with someone else's machine paired, connected and able to run
Planners in the same repository. Chat stayed on "Planner: none attached".
A machine's owner can now share it with teammates. Shared, it runs the Planner
of a document on Default machine whose creator has no connected machine that
can, as its owner, only in repositories its owner can push to. Sharing is off
unless the owner turns it on.
Routing (apps/server/src/experiments/routes.ts):
run Planners, it takes a teammate's shared one, each owner's favorite first.
machine's own GitHub token that its owner can push there (documentAccess),
and keeps the answer for 10 minutes, or 1 minute after a refusal. Opening or
asking the document checks again once it lapses.
shared, is asked again as the machine connects or is shared.
unless it is already attached on the shared machine; then it stays.
tells the connector " stopped sharing with teammates".
builds, runs and investigations still go only to the presser's own machine.
"starting" with their login.
Storage: machines.shared (migration 028_machine_sharing, default false), set
by
POST /api/connector/machines/:id/sharedfor the owner only, and by pairing(a key minted with
shared, or approval withshared). Live connectionsfollow a change at once.
Interface (DESIGN.md patterns, no new tokens):
uses, named "Share with teammates", changed at once like the star.
On a phone, the machine's view has "Share with teammates" with what it does.
Docs: chopin-cli.md, "Share a machine with teammates".
Screenshots
Machines table, studio shared with teammates:
Add a cloud machine, with "Plan teammates' documents":
A machine's view on a phone:
Assistant-model: Claude Opus 5.5 (fast)
Assistant-workflow: inline
Assistant-verification: bun test unit passed: GIT_CONFIG_GLOBAL=/dev/null bun test (6746 pass, 0 fail), including 7 new shared-machine dispatch tests and a pairing-key test
Assistant-verification: PostgreSQL contract passed: bun test apps/server/src/storage/postgres against postgres:17 (123 pass), including migration 028 and the share contract
Assistant-verification: Chromium E2E passed: bun run e2e e2e/machines.e2e.ts e2e/connector.e2e.ts e2e/planner-picker.e2e.ts (16 pass); the table switch saves and survives a reload, a key minted shared pairs a shared machine, both pairing switches start off
Assistant-verification: typecheck and lint passed: bun run types and bun run ci (design contract renewed for UsersIcon and two shifted owners)
User-preference: A teammate without a machine of their own should get a Planner on a teammate's designated default machine, only when its owner opts in
Co-authored-by: Alex Lavaee lavaman131@github.com