Skip to content

Capabilities: one set of switches for all your linked computers - #4014

Merged
backnotprop merged 4 commits into
mainfrom
feat/capabilities-one-set-across-computers
Nov 24, 2026
Merged

backnotprop merged 4 commits into
mainfrom
feat/capabilities-one-set-across-computers

Conversation

@backnotprop

@backnotprop backnotprop commented Nov 24, 2026 •

Copy link
Copy Markdown
Owner

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 flip beats never flipped (see First contact).
  • Then the later time wins.
  • Then the higher Inbox id wins.

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:

  • Its own config key is set (the person chose it before this change): a flip at time 0. It goes over the wire as at: 0.
  • It is at its untouched default: never flipped (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

  • The settings route stamps its flips before Routines waits for its login item. A take reads the flip times again for each switch and after each wait, and saves only the times it takes. saveConfig merges inboxCapabilityFlips key 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.
  • A far time more than one day past this computer's clock is read as now plus one day. The flip is still taken. A local stamp never goes past a safe integer.
  • A take that copies only a time (the switch was already the same) also tells the linked computers, so a computer in a chain A–B–C gets it. The next exchange compares equal and sends nothing.

Forced switches, older computers

  • A switch that 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.
  • An older linked Plannotator (one whose list has no capability-set mark) keeps its own switches. It still has its own per-computer group of this computer, which keeps working.

The agent command

plannotator inbox capability turns 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. --computer is gone: the command treats it as bad usage, the route refuses a computer field, and the agent door carries no ?computer=. The agent tool is unchanged.

Removed

  • packages/inbox/components/LinkedCapabilities.tsx and 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.
  • capabilitiesOn and heldSettled in inbox-machines.ts, and the far-computer branch of the agent command.

The door's GET/POST capabilities and capability_note stay, for older computers. The Routines page across computers is unchanged.

Proof

tests/e2e/inbox-routines-machines.spec.ts test 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).

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."
…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 backnotprop added the ci:e2e Run the full browser suite (Inbox window e2e) on this PR label Nov 24, 2026
@backnotprop
backnotprop marked this pull request as ready for review November 24, 2026 21:23
@backnotprop
backnotprop merged commit d1fb5a2 into main Nov 24, 2026
84 of 85 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci:e2e Run the full browser suite (Inbox window e2e) on this PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant