Repository navigation
Capabilities: one set of switches for all your linked computers - #4014
Merged
Merged
Conversation
Each Settings → Capabilities switch keeps when the person last flipped it, and linked computers take each other's newer flip (a recorded time beats none, then the later time, then the higher Inbox id; with no flip on either side, on wins). The per-computer groups in Settings → Capabilities and the code that only served them are gone. plannotator inbox capability turns a switch here, so every linked computer takes it; --computer is accepted for one release and ignored, with a note. An older linked Plannotator keeps its own switches.
- A switch whose own key is set but has no recorded flip counts as a flip at time 0 (sent as at 0 on the wire); one at its untouched default as never flipped. A choice beats a default either way; two choices with no time still settle on on; any recorded time beats a choice. - The settings route stamps its flips before Routines' wait for the login item, and a take reads the flip times again for each switch and after each wait, saving only the times it takes. saveConfig merges inboxCapabilityFlips key by key, so a stamp saved meanwhile is kept. - A far time more than a day past this clock is read as a day ahead, and a local stamp never passes a safe integer. - A take that copies only a time tells the linked computers too; the next exchange compares equal and tells nothing. - plannotator inbox capability: --computer, the computer field and the agent door's ?computer= are gone; the result says "Turned on X."
…outines server test
…never take an untouched default, serialize the login item - A flip time more than a day past the reading computer's clock is not trusted and counts as a choice at 0, the same rule for a far flip, a time kept here and the held time a click is stamped past. Times are stored and given on as they came. Replaces the clamp that moved with the reader's clock and kept undoing a later click on every read. - A far switch at its untouched default (no time) is never taken or written, so no choice is made up here. - Routines' login-item add and remove run one at a time, so a late add never leaves an item while Routines are off. - Docs describe the real rule and its outcome with a clock days ahead.
backnotprop
marked this pull request as ready for review
November 24, 2026 21:23
1 task
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.
What a person sees
Settings → Capabilities is now one set of switches for every linked computer. Flip Board, Checklist, Routines, Code review, Chapter diagrams, Bro mode, Float reply drafts, Decision mode or Grid on one computer, and it flips on the others too. Open windows follow without a reload. The groups under "Capabilities" that showed each linked computer's switches are gone. Nothing else in Settings looks different.
The latest flip wins
Each switch keeps when the person last flipped it (config.json
inboxCapabilityFlips, written by the server). Linked computers read each other's lists. For each switch the newer flip wins, and both computers settle on the same answer:A computer that is away gets the flip when it is back. Two computers that both flipped while apart settle on the newer flip of each switch. A flip made right after taking one from a computer whose clock runs ahead still wins.
First contact
When two computers first compare, a switch with no recorded flip counts as follows:
at: 0.at: null).So a choice always beats an untouched default, on or off. For example, Chapter diagrams left at its default (on) on one computer takes an explicit off from the other. When two choices disagree and neither has a recorded time, on wins, so nothing in use on one computer quietly turns off. Any recorded flip time beats time 0. An older Plannotator without the mark is not affected.
Safety of the flip times
saveConfigmergesinboxCapabilityFlipskey by key under the config lock. So a Settings flip made while a take waits is never turned back, and its stamp is never overwritten.Forced switches, older computers
PLANNOTATOR_EXPERIMENTAL, the build or a test forces stays forced on that computer. Its row stays locked, and that computer neither sends nor takes flips for it.capability-setmark) keeps its own switches. It still has its own per-computer group of this computer, which keeps working.The agent command
plannotator inbox capabilityturns a switch on this computer, and every linked computer then takes the flip. The one line for the person ("Turned on Routines.") is posted only on the computer where the switch was turned. The agent's result says "Turned on Routines." and names no computer.--computeris gone: the command treats it as bad usage, the route refuses acomputerfield, and the agent door carries no?computer=. The agent tool is unchanged.Removed
packages/inbox/components/LinkedCapabilities.tsxand its use in Settings.packages/server/inbox-capabilities-machines.ts: the forward's kept read of a linked computer's switches and its held turns.capabilitiesOnandheldSettledininbox-machines.ts, and the far-computer branch of the agent command.The door's
GET/POST capabilitiesandcapability_notestay, for older computers. The Routines page across computers is unchanged.Proof
tests/e2e/inbox-routines-machines.spec.tstest 1 links two sandboxed Inboxes. It flips the Checklist in one computer's window and checks that it shows in the other's, light and dark, desktop and phone. The pictures go to.local/proof/capabilities-one-set/(CI artifact).