Skip to content

Node-based terminal manager for AI coding agents — tmux-backed terminals and parallel agent sessions as draggable nodes on an infinite pan/zoom canvas. macOS, Linux, and a browser Server Edition.

docs(live-links): checklist gaps and wording from review

reviewa398233e8ff7
diff --git a/CLAUDE.md b/CLAUDE.md
index 15ba67c7d..f2763cad5 100644
--- a/CLAUDE.md
+++ b/CLAUDE.md
@@ -5763,9 +5763,10 @@ A live link shows ONE node in a plain browser — read-only, or typeable on a Co
who also has its password — until it expires (≤ 24 h, or never for Unlimited) or is stopped; creating
one is Pro and the backend is the gate. Reference: **`docs/live-links.md`**. Invariants:
- `watchLink:*` (owner IPC) is host-only: no relay peer, hosted editors included, may create, list (a
- view carries the secret URL), stop, kick, chat, or change a link's control (typing, password, lock). The viewer protocol is `watch:*` and must never
- start with `watchLink:` — relay-host refuses host-only channels before any policy, so it could never
- arrive (`src/shared/host-control.test.ts`, `src/core/relay/scoped-guest-policy.test.ts`).
+ view carries the secret URL), stop, kick, chat, or change a link's control (typing, password, lock).
+ The viewer protocol is `watch:*` and must never start with `watchLink:` — relay-host refuses
+ host-only channels before any policy, so it could never arrive (`src/shared/host-control.test.ts`,
+ `src/core/relay/scoped-guest-policy.test.ts`).
- A watcher never goes through `decideAccess` (it would get the VIEW table): `watcher-policy.ts` refuses
every request and every cast but `watch:chat` (Commenter and Control links) and, on a Control link
only, the three controller casts `watch:unlock` / `watch:input` / `watch:release`; it passes out only
@@ -5775,25 +5776,26 @@ one is Pro and the backend is the gate. Reference: **`docs/live-links.md`**. Inv
a viewer that is not controlling is a breach, except within 5 s of losing control (dropped silently);
every loss of control goes through `loseControl`, and every chunk is re-checked (control period,
the record read live, the same session) before it goes.
-- A controller's input reaches the node's PANE, never a tmux CLIENT: keys as `send-keys -H` lines read by
- `tmux source-file -` from stdin, after a mode cancel, on the exact `=nt-<id>:`; pastes as
- `load-buffer -` + `paste-buffer -d -p -r`, so tmux frames them by the pane's real state. A byte written
- into a client is its keyboard, and the prefix is the security boundary (`C-b s` = every session on the
- socket, `C-b :` = tmux's command prompt). Keys never ride a paste buffer (tmux 3.7 vis-encodes control
- bytes there), and no payload ever rides argv, local or SSH. The viewer frames every paste itself and
- sends each emulator answer as its own cast, which the host drops whole (`isTerminalReport`); the
- contract is in `protocol.ts`. Zellij is refused (`watcherInputRoute` → `none`,
- `nodeControlSupport` → `unsupported`). Routing: `pty-manager.control-input.test.ts`; meaning on a real
- tmux: `pane-input.realtmux.test.ts`.
+- A controller's input reaches the node's PANE, never a tmux CLIENT: keys as `send-keys -H` lines read
+ by `tmux source-file -` from stdin, after a mode cancel, on the exact `=nt-<id>:`; pastes as
+ `load-buffer -` + `paste-buffer -d -p -r`, so tmux frames them by the pane's real state. A byte
+ written into a client is its keyboard, and the prefix is the security boundary (`C-b s` = every
+ session on the socket, `C-b :` = tmux's command prompt). Keys never ride a paste buffer (tmux 3.7
+ vis-encodes control bytes there), and no payload ever rides argv, local or SSH. The viewer frames
+ every paste itself and sends each emulator answer as its own cast, which the host drops whole
+ (`isTerminalReport`); the contract is in `protocol.ts`. Zellij is refused (`watcherInputRoute` →
+ `none`, `nodeControlSupport` → `unsupported`). Routing: `pty-manager.control-input.test.ts`; meaning
+ on a real tmux: `pane-input.realtmux.test.ts`.
- The Control password is a scrypt hash only (no plaintext kept or logged anywhere; every scrypt run in
one FIFO gate of 2; `timingSafeEqual`). Host throttles: 1 attempt per 2 s per viewer, 3 wrong end the
- connection, 10 wrong across the link lock it (lock persisted, count in memory, only Allow control again
- clears it). Owner changes go by direction: narrowing (typing off, a new password) applies at once,
- widening (typing on, allow again) only after the write; a failed new-password save rolls back to the
- OLD password and the owner is told.
+ connection, 10 wrong across the link lock it (lock persisted, count in memory, only Allow control
+ again clears it). Owner changes go by direction: narrowing (typing off, a new password) applies at
+ once, widening (typing on, allow again) only after the write; a failed new-password save rolls back to
+ the OLD password and the owner is told.
- Unlimited = `ttlSeconds: 0` → `expiresAt: null`: no expiry timer, never pruned for time. The backend
grants it only with no TTL cap and asks the license's liveness at host-token at most once per 24 h per
- license (dead → 402 → the host stops minting, the view reads `refused`; keygen unreachable fails open).
+ license (dead → 402 → the host stops minting, the view reads `refused`; keygen unreachable fails
+ open).
A build older than this one drops Control and unlimited records on load and its next write removes
them (their server rows live on with no host until they expire or Stop all).
- Watchers are QUIET (no broadcast, not in `clientIds()`) and SELF-PACED (never paused, dropped or
diff --git a/docs/live-links.md b/docs/live-links.md
index 880e0d25a..902f3dbfe 100644
--- a/docs/live-links.md
+++ b/docs/live-links.md
@@ -335,8 +335,8 @@ Control is per CONNECTION, never per session or per person: a reconnect unlocks
- **Required** for a Control link: 8 to 128 code points, no line breaks or control characters
(`controlPasswordProblem`, `src/shared/watch-link-password.ts`, one rule for the dialog and core).
- **Generate** makes 16 symbols from Crockford's 32-letter alphabet (no lookalikes, ~80 bits,
- `crypto.getRandomValues`).
+ **Generate** makes 16 symbols from Crockford's 32-symbol alphabet (10 digits + 22 letters, no
+ lookalikes, ~80 bits, `crypto.getRandomValues`).
- **Shown once**, in the dialog's done step, with **Copy password**, beside the link and never in it.
The dialog says to send the two separately. The plaintext lives in the dialog's state only and is
cleared on every way out (Done, Escape, the scrim, Cancel); it is never logged and never written to
@@ -427,7 +427,10 @@ host closes the connection.
`PtyManager.controlInput`) stops the batch with the `dropped` notice, and the chain moves on.
- A session that ends drops the pending batch and discards an open paste (the viewer is told). Input is
never held for a later session.
-- Nothing typed is ever logged; the two log lines on this path carry an error's name only.
+- Nothing typed is ever logged. The path's three warnings carry an error's name or a fixed sentence
+ ("the input chain failed", "a pane delivery timed out", "delivering input failed"), and the flush
+ guard (`safe('an input flush')`) logs the text of an error the host's own flush code threw, which
+ carries no input.
### The splitter and paste framing
@@ -657,9 +660,10 @@ until Stop, Stop all, a server 410, node-gone, or (for new joins) a lapse of the
- The 5-links-per-machine cap is unchanged.
**Downgrade.** A build older than this one drops Control and unlimited records when it loads the links
-file (it knows neither the role nor a null expiry), and its next write removes them. Their server rows
-stay live with no host: nobody can join them, a finite Control link until it expires, an unlimited link
-until **Stop all** (from any machine on the license) reaches the server.
+file (it knows neither the role nor a null expiry), and its next write removes them. A launch alone
+writes nothing (`init()` writes only when it pruned something); the next create, Stop or prune does.
+Their server rows stay live with no host: nobody can join them, a finite Control link until it expires,
+an unlimited link until **Stop all** (from any machine on the license) reaches the server.
## Live chat drawer
@@ -708,21 +712,22 @@ It uses the Explorer's drawer shape and pin rules.
## Lifecycle
-**Create** (`service.create`, in order): `unsupported` shell → parse (`bad-request`; then, for a
-Control link only, `bad-password` when the password breaks the rule — a password on a Viewer or
-Commenter request is ignored) → a build that may not relay (`relay-unavailable`) → wait for `init()`
-(bounded) → the node must be **present** (`node-missing` otherwise; `unknown` answers node-missing too,
-so the dialog flushes the canvas save first — R47) → for Control, a node that refuses it
+**Create** (`service.create`, in order): `unsupported` shell → parse (`bad-request`; then, for a Control
+link only, `bad-password` when the password breaks the rule — a password on a Viewer or Commenter
+request is ignored) → a build that may not relay (`relay-unavailable`) → wait for `init()` (bounded) →
+the node must be **present** (`node-missing` otherwise; `unknown` answers node-missing too, so the
+dialog flushes the canvas save first — R47) → for Control, a node that refuses it
(`control-unsupported`, before any request) → 5 per machine (`limit-machine`, counting links being
written and opaque entries) → an entitlement (`not-entitled`) → for Control, the password hashed through
the scrypt gate (a hash that fails answers `unsupported`, "Live links can't be created here right now.",
and nothing is created anywhere) → `POST /v1/watch-links` (its refusals pass through: `not-entitled`,
`limit-active` (15 per license), `limit-daily` (50 per 24 h), `rate-limited`, `license-check`,
`ttl-unsupported` (Unlimited against an older backend), `network` — which covers timeouts, 5xx and a
-malformed reply, so the copy never says "offline") → the record is written (bounded at `PERSIST_TIMEOUT_MS`, 10 s; on failure the server row is revoked and the
-answer is `persist-failed`: no half-created link survives) → the node is checked AGAIN (absent → revoke,
-`node-missing`) → the host starts. Label and title lose C0/C1, DEL and bidi controls and are capped by
-UTF-16 units without splitting a pair.
+malformed reply, so the copy never says "offline") → the record is written (bounded at
+`PERSIST_TIMEOUT_MS`, 10 s; on failure the server row is revoked and the answer is `persist-failed`: no
+half-created link survives) → the node is checked AGAIN (absent → revoke, `node-missing`) → the host
+starts. Label and title lose C0/C1, DEL and bidi controls and are capped by UTF-16 units without
+splitting a pair.
**The clock.** The expiry timer is derived from the server's `expiresAt` and the response's `Date`
header (`tokenTtlMs`'s rule), never from the local clock alone; it is re-checked on every host change,
@@ -757,18 +762,18 @@ and resurrect a revoked link at the next boot).
- `init()` writes only when it actually pruned something, so a boot never rewrites the file.
**Resume** (`init()`, idempotent, never rejects): wait for the boot workspace load (bounded,
-`WORKSPACE_READY_TIMEOUT_MS` 10 s), load, drop expired (never an unlimited link), revoke and drop ABSENT, KEEP unknown, cap at 5
-(extras revoked: a hand-edited file of 200 entries must not start 200 schedulers), start hosts only when
-`relayAllowed()` (an unpackaged dev build lists them `refused` and hosts nothing: a dev run must not host
-the installed app's links).
+`WORKSPACE_READY_TIMEOUT_MS` 10 s), load, drop expired (never an unlimited link), revoke and drop
+ABSENT, KEEP unknown, cap at 5 (extras revoked: a hand-edited file of 200 entries must not start 200
+schedulers), start hosts only when `relayAllowed()` (an unpackaged dev build lists them `refused` and
+hosts nothing: a dev run must not host the installed app's links).
**Node gone is tri-state** (R40, `workspaceNodeState`). Present = some project holds it; absent = the
store has a complete read of every project (`knownNodeIdsStrict()`) and the id is not in it; anything
-else is unknown. **Only absent** ends a link (`node-gone`, server revoke). An empty answer during the launch-time
-load, or for a node in a project whose file was not read, is not evidence, and a revoke cannot be
-undone. The check runs on every workspace load/save (`onWorkspaceChanged`, which also covers a node
-removed by the canvas authority on a peer's op) and before every join (R29). **An index rebuilt from
-nothing is never a complete read** (R44, R54, R55): a `workspace.json` that is missing, unreadable,
+else is unknown. **Only absent** ends a link (`node-gone`, server revoke). An empty answer during the
+launch-time load, or for a node in a project whose file was not read, is not evidence, and a revoke
+cannot be undone. The check runs on every workspace load/save (`onWorkspaceChanged`, which also covers a
+node removed by the canvas authority on a peer's op) and before every join (R29). **An index rebuilt
+from nothing is never a complete read** (R44, R54, R55): a `workspace.json` that is missing, unreadable,
corrupt, or parses but is no index this build recognises marks the run, and `knownNodeIdsStrict()`
answers unknown until the next launch — otherwise the renderer's empty boot save made every node absent
and every link was revoked a second after launch (probe-confirmed). A genuinely empty v2/v3 index is not
@@ -843,8 +848,9 @@ carry it to teammates and the canvas authority would write it into the git-share
the card modal header action, the palette ("Manage live links", and "Stop all live links (every
machine on this license)" for a Pro owner or while a link is listed), Settings → Live links (Remote &
team). Each row is judged by its node's OWN project's session (`liveLinkMenuItemsFor`, D2/M1).
- ProCompare lists "Live read-only
- links to a terminal — viewers need nothing installed"; the Core list is untouched. **Availability is
+ ProCompare lists "Live links to a
+ terminal: watch, chat, or let people type — viewers need nothing installed"; the Core list is
+ untouched. **Availability is
checked before the Pro gate** (`liveLinkUnavailable` then `requireProOr`), so a Server Edition or relay
tab never sees an Upgrade dialog; an unavailable row is disabled with its reason, never hidden.
- **Desktop where local terminals are not tmux** (Windows' session host; tmux switched off or missing;
@@ -859,28 +865,31 @@ carry it to teammates and the canvas authority would write it into the git-share
follow-up.
- **The LIVE chip** (`LiveLinkChip`, one component): node header (beside `PresenceChips`), kanban card,
card modal header, sessions-sidebar row. `● LIVE`, `● LIVE · 2`, `LIVE · 3 · 1 typing` (someone typed
- in the last 4 s; the title names who, quoted), amber `LIVE · offline` (reconnecting), amber
- `LIVE · 1 waiting` (a viewer's join was refused — R63), muted `LIVE · refused`; an unread COUNT
- (`99+` past 99, summed over the node's links) for Commenter and Control chat. A viewer is reported waiting only once a join is REFUSED: a session
- that merely ends rejoins in seconds and is no news. **Not hideable** — it is the
- owner's signal that a terminal is being broadcast. It shows only for a node viewed through a LOCAL
- session (R57): a relay tab's copy of a git-shared node with the same id must not show this machine's
- chip, and the boards and the sidebar sit outside the node's SessionProvider, so they resolve the
- session from the project id. The popover (per link): the role name with its label, the countdown ("No end time" for
- Unlimited), Copy, **Open chat** (Commenter and Control: the Live chat drawer), Stop, the Control
- section for a Control link (see "The owner's controls"), viewers with Kick (a typing dot and "can
- type" on controllers), and the chat with reply and "Copy to card comments" (an explicit act, as the
- owner; mention tokens defused). A join raises an info strip, "Someone started watching <title> (2 watching)." — how an owner
- notices a leaked link.
+ in the last 4 s; the title names who, quoted), amber `LIVE · offline` (reconnecting), amber `LIVE · 1
+ waiting` (a viewer's join was refused — R63), muted `LIVE · refused`; an unread COUNT (`99+` past 99,
+ summed over the node's links) for Commenter and Control chat. A viewer is reported waiting only once a
+ join is REFUSED: a session that merely ends rejoins in seconds and is no news. **Not hideable** — it
+ is the owner's signal that a terminal is being broadcast. It shows only for a node viewed through a
+ LOCAL session (R57): a relay tab's copy of a git-shared node with the same id must not show this
+ machine's chip, and the boards and the sidebar sit outside the node's SessionProvider, so they resolve
+ the session from the project id. The popover (per link): the role name with its label, the countdown
+ ("No end time" for Unlimited), Copy, **Open chat** (Commenter and Control: the Live chat drawer),
+ Stop, the Control section for a Control link (see "The owner's controls"), viewers with Kick (a typing
+ dot and "can type" on controllers), and the chat with reply and "Copy to card comments" (an explicit
+ act, as the owner; mention tokens defused). A join raises an info strip, "Someone started watching
+ <title> (2 watching)." — how an owner notices a leaked link.
- **Server Edition:** the same core service is registered, with `entitlement: () => null` and
`unsupported: true` (R43), because that edition has no license layer yet (`initLicense` is
desktop-only). Create answers `unsupported` and the renderer shows "Live links need a Pro license on
this server — not available in the Server Edition yet", no Upgrade button; list answers `[]`; nothing
- is loaded or hosted. The ws-bridge has a REAL `watchLink` member (`buildWatchLinkApi`, spread only into
- the Server Edition's own api, never a relay-shared builder): its browser clients are the host's own
- user, not relay peers, so the host-only prefix does not refuse them. Its four control requests are
- real too, and answer `false` / `'unknown'` there. A server license layer is the
- follow-up. A Server Edition that does not own its data dir skips `init()` and logs it.
+ is loaded or hosted. The ws-bridge has a REAL `watchLink` member (`buildWatchLinkApi`, spread only
+ into the Server Edition's own api, never a relay-shared builder): its browser clients are the host's
+ own user, not relay peers, so the host-only prefix does not refuse them. Its four control requests are
+ real too: the three changes (`set-control`, `set-password`, `allow-control`) answer `false` there (no
+ link exists), while `control-support` answers the node's real support (the server wires
+ `controlSupport` like the desktop, and the service does not refuse it in `unsupported` mode). A server
+ license layer is the follow-up. A Server Edition that does not own its data dir skips `init()` and
+ logs it.
- **Relay tab:** the API is an inert stub (`stubs.ts`); the row is disabled with "Live links are created
on the machine that runs this terminal."; the chip is not shown. On the peer, every `watchLink:`
channel is host-only, refused `E_FORBIDDEN` to every relay peer — Team Access guests and hosted owners
@@ -943,8 +952,9 @@ Found while building it:
watcher join is the follow-up.
- **A tmux < 3.2 host cannot be watched** (fail closed, "waiting").
- **After a run whose index was missing, unreadable or corrupt, node-gone waits for the next launch**
- (R44/R54): a link to a node deleted in that run lives until its expiry (≤ 24 h) with nobody able to
- join it (its session is destroyed). The agent-status mirror is not affected (R64/M2).
+ (R44/R54): a link to a node deleted in that run lives until its expiry (≤ 24 h) — an Unlimited link
+ until the next complete read at a later launch, or Stop — with nobody able to join it (its session is
+ destroyed). The agent-status mirror is not affected (R64/M2).
Likewise a link to a truly deleted node in an unread project lingers until the next complete read.
- **Opaque entries** (an unsealable secret) live in the file ≤ 24 h, or until Stop all for an unlimited
one.
@@ -1026,7 +1036,8 @@ Found while building them:
From the spec:
1. Create a link on a Mac; open it in Safari on a phone.
-2. Typing in the viewer does nothing.
+2. Typing in the viewer does nothing (on a Viewer or Commenter link, or on a Control link before
+ unlocking).
3. Narrowing the viewer's window does not resize the owner's terminal.
4. The owner scrolling back (tmux copy-mode) is visible to the viewer.
5. Stop sharing cuts viewers immediately.
@@ -1091,8 +1102,9 @@ The Control role, Unlimited links and the Live chat drawer. From the spec (§9):
35. **Mac, a shell:** create a Control link to a shell node, open it in a browser on a second
computer, Take control with the password, type `ls` and Enter. Expect: the command runs in the
- owner's terminal, every viewer sees the output, the owner gets the "can now type" strip and (window
- unfocused) an OS notification.
+ owner's terminal, every viewer sees the output, the owner gets the "can now type" strip and, with
+ notifications enabled (`notifyOnClaudeDone` on and its one-time consent answered) and the window
+ unfocused, an OS notification.
36. **Mac, a Claude session:** the same on a Claude node: type a prompt and Enter, then press Esc while
it works. Expect: the prompt is submitted, Esc interrupts the turn within one batch (no second key
needed).
@@ -1111,7 +1123,9 @@ The Control role, Unlimited links and the Live chat drawer. From the spec (§9):
41. **An unlimited link survives an app restart and stops when Pro lapses:** create an Unlimited link,
quit and relaunch. Expect: it resumes, "No end time" in the popover and in Settings, the viewer
page reconnects. With a test license that lapses: within a day of the lapse the chip reads
- `LIVE · refused` and a new viewer cannot join; renewing the license brings it back.
+ `LIVE · refused` and a new viewer cannot join; renewing the license brings it back. The backend
+ keeps the liveness answer in memory for 24 h: to shorten the wait, restart the (test) backend after
+ the lapse, and the next host-token mint (≤ ~90 s) asks keygen again.
42. **The drawer on the canvas and over the board:** Open chat from a node's chip, pinned and unpinned;
then from a kanban card modal's chip (per-project board and Omni board). Expect: on the board the
drawer sits ABOVE the card modal, pinned and unpinned.
@@ -1146,8 +1160,10 @@ From the build:
50. **The exit chord:** while typing, press Ctrl+Shift+. (⇧⌘. on a Mac). Expect: the focus moves to
Release and nothing reaches the pane. Repeat on AZERTY and another non-US layout (the chord is
matched on the physical Period key, so the label may not match the key face) and with an OS or IME
- shortcut on the same keys (Windows' emoji or IME switch, macOS input source switching): note what
- wins.
+ shortcut on the same keys (Windows' emoji or IME switch, macOS input source switching). Pass: on
+ every layout tried, the chord moves the focus to Release and nothing reaches the pane. A layout or
+ an OS/IME shortcut that takes the chord before the page (the focus stays in the terminal, or a
+ character reaches the pane) is a FAIL to report, naming the layout and the shortcut.
51. **Password manager prompts on the viewer's password field:** unlock in Chrome, Safari, Firefox and
with 1Password installed. Expect: no save prompt, or one the viewer can decline; a password saved
for one link is never filled into another link's form unasked.
@@ -1170,9 +1186,10 @@ From the build:
56. **The wheel while typing:** as a controller on a tmux node, scroll the wheel over the terminal.
Expect: nothing is typed into the pane (no history recall into the prompt).
57. **Downgrade:** with a Control link and an Unlimited link live, run a build older than this one on
- the same userData, then this build again. Expect: the older build lists neither link and removes
- them from the file; both server rows stay live with nobody able to join; Stop all from this build
- ends them.
+ the same userData. It lists neither link. Its launch alone writes nothing (`init()` writes only when
+ it pruned something), so in the older build create or Stop another link (its next write), then
+ quit and start this build again. Expect: both links are gone from the file and the list; both
+ server rows stay live with nobody able to join; Stop all from this build ends them.
Visual checks (Mac, default look and Liquid Glass, dark and light) — the create dialog:
@@ -1229,7 +1246,7 @@ The Live chat drawer:
and zone snap clear both. With a card modal open, the drawer docks at the right edge instead.
78. Raised over a card modal (per-project and Omni boards): the drawer above the modal, pinned and
unpinned; never above Settings. Escape typed in the drawer's reply box leaves the card modal open.
-79. Pinned over the board with no card modal: above the board, beside the controls cluster.
+79. Pinned over the board with no card modal: above the board, docked BELOW the controls cluster.
80. Liquid Glass: the blur behind the drawer, its hairline, the pinned card on a wallpaper, dark and
light; nothing inside paints a surface token.
81. The head: "Live chat", the Pin button (accent when pinned) and the Close ×.
@@ -1240,11 +1257,13 @@ The Live chat drawer:
hover), and the status wash under it when the link is reconnecting, refused or viewers are waiting.
84. People: the uppercase muted heading, the Control section fitting 320 px pinned (the Typing row with
its switch, the password edit row with Generate), viewer rows with the typing dot, bold name, muted
- "can type" / "watching", and Kick on the right. A Viewer link's People fill the whole body.
-85. The thread: one line per message — muted time, the **Sharer** badge on the owner's lines, the name in
- the viewer's colour (the same colour as on the web viewer page; on the light theme mixed toward the
- ink), a muted ": ", the text wrapping. Readable on light, dark and Liquid Glass. An empty thread says
- "No messages yet. Viewers of this link can chat with you here."
+ "can type" / "watching", and Kick on the right. People take at most 40 % of the drawer's height and
+ scroll past it (many viewers). A Viewer link's People fill the whole body.
+85. The thread: one line per message — muted time, the **Sharer** badge on the owner's lines, the name
+ in the viewer's colour (the same colour as on the web viewer page; on the light theme mixed toward
+ the ink), the owner's own name in `--success`, a muted ": ", the text wrapping. Readable on light,
+ dark and Liquid Glass. An empty thread says "No messages yet. Viewers of this link can chat with you
+ here."
86. The "N new messages ↓" pill: scroll up, have a viewer post, click the pill: the list goes to the
bottom and the pill disappears.
87. The composer: "Reply to viewers…" and Send; its error line sits above the form.
@@ -1252,3 +1271,7 @@ The Live chat drawer:
chat on another link's chip waits until Done (or moves at once if the save failed).
89. The chip's unread count keeps rising while another app is in front, even with the drawer pinned on
that link, and clears when the window comes back.
+90. The palette: "Live chat" in section View, with the chat icon, offered only while a link is live
+ (stop the last link: the entry is gone).
+91. An unpinned drawer open on the last link: stop that link. Expect: the drawer stays open and says "No
+ live links." (only a PINNED drawer disappears with the last link), and × still closes it.
diff --git a/src/core/remote-ssh/control-master.ts b/src/core/remote-ssh/control-master.ts
index 04806638b..dfb1d2e39 100644
--- a/src/core/remote-ssh/control-master.ts
+++ b/src/core/remote-ssh/control-master.ts
@@ -20,7 +20,7 @@ import {
import { sanitizePasteText } from '../paste-injection'
import { canControlCanvas } from '../../shared/agents/config'
import { COMBINED_PANE_MARKER, PANE_OWNER_FMT, PS_FOREGROUND_FLAGS } from '../agents/pane-owner'
-import { VISIBLE_CAPTURE_FORMAT, exactPaneTarget } from '../watch-link/capture-route'
+import { VISIBLE_CAPTURE_FORMAT, capturePaneTarget } from '../watch-link/capture-route'
import { WATCHER_CLIENT_FLAGS, WINDOW_SIZE_FORMAT } from '../watch-link/watcher-client'
// Dependency-free (no node-pty): safe to import from these pure builders.
@@ -531,7 +531,7 @@ export function remoteCapturePaneArgs(conn: SshConnection, controlPath: string,
* `=name:` target and the `#{…}` format. Proven under a real /bin/sh in capture-visible.realsh.test.ts.
*/
export function remoteCaptureVisibleArgs(conn: SshConnection, controlPath: string, sessionId: string): string[] {
- const target = posixQuote(exactPaneTarget(sessionId))
+ const target = posixQuote(capturePaneTarget(sessionId))
return childArgs(
conn,
controlPath,
@@ -560,7 +560,7 @@ export function remoteTmuxWatcherArgs(conn: SshConnection, controlPath: string,
controlPath,
tmuxCmd(
`tmux -L ${RMT_TMUX_SOCKET} attach-session -E -f ${posixQuote(WATCHER_CLIENT_FLAGS)} ` +
- `-t ${posixQuote(exactPaneTarget(sessionId))}`
+ `-t ${posixQuote(capturePaneTarget(sessionId))}`
)
)
]
@@ -572,7 +572,7 @@ export function remoteWindowSizeArgs(conn: SshConnection, controlPath: string, s
conn,
controlPath,
tmuxCmd(
- `tmux -L ${RMT_TMUX_SOCKET} display-message -p -t ${posixQuote(exactPaneTarget(sessionId))} ` +
+ `tmux -L ${RMT_TMUX_SOCKET} display-message -p -t ${posixQuote(capturePaneTarget(sessionId))} ` +
posixQuote(WINDOW_SIZE_FORMAT)
)
)
diff --git a/src/core/watch-link/capture-route.realtmux.test.ts b/src/core/watch-link/capture-route.realtmux.test.ts
index f23a24ecd..94c0744cf 100644
--- a/src/core/watch-link/capture-route.realtmux.test.ts
+++ b/src/core/watch-link/capture-route.realtmux.test.ts
@@ -66,7 +66,7 @@ function start(name: string, script: string, ready: string, cols = 30, rows = 4)
tmux(['-L', SOCKET, '-f', '/dev/null', 'new-session', '-d', '-s', name, '-x', String(cols), '-y', String(rows), script])
sessions.push(name)
for (let i = 0; i < 100; i++) {
- // Polled with the literal spelling, not `exactPaneTarget`: a broken target must fail the test
+ // Polled with the literal spelling, not `capturePaneTarget`: a broken target must fail the test
// that is about it, not this setup.
if (tmux(['-L', SOCKET, 'capture-pane', '-p', '-t', `=${name}:`]).includes(ready)) return
sleepMs(20)
diff --git a/src/core/watch-link/capture-route.test.ts b/src/core/watch-link/capture-route.test.ts
index 0605900af..ca147b13b 100644
--- a/src/core/watch-link/capture-route.test.ts
+++ b/src/core/watch-link/capture-route.test.ts
@@ -1,7 +1,7 @@
import { describe, it, expect } from 'vitest'
import {
VISIBLE_CAPTURE_FORMAT,
- exactPaneTarget,
+ capturePaneTarget,
localCaptureVisibleArgs,
parseVisibleCapture,
unavailableCapture,
@@ -30,11 +30,11 @@ describe('visibleCaptureRoute', () => {
})
})
-describe('exactPaneTarget', () => {
+describe('capturePaneTarget', () => {
it('is the exact-session, active-pane spelling measured on tmux 3.4', () => {
// `=name` alone is "can't find pane" for capture-pane (and silently EMPTY for display-message);
// a bare `name` prefix-matches another node's session. Only `=name:` is exact AND resolves.
- expect(exactPaneTarget('nt-abc')).toBe('=nt-abc:')
+ expect(capturePaneTarget('nt-abc')).toBe('=nt-abc:')
})
})
diff --git a/src/core/watch-link/capture-route.ts b/src/core/watch-link/capture-route.ts
index fb5cb2df5..14ba7ba22 100644
--- a/src/core/watch-link/capture-route.ts
+++ b/src/core/watch-link/capture-route.ts
@@ -12,7 +12,7 @@
// both describe the same instant: a cursor read in a second round trip could describe a screen that has
// since scrolled.
//
-// The target is EXACT (`exactPaneTarget`). Node ids end in a counter, so `nt-x-1` is a prefix of
+// The target is EXACT (`capturePaneTarget`). Node ids end in a counter, so `nt-x-1` is a prefix of
// `nt-x-12`, and tmux resolves a bare target by fnmatch then PREFIX on a miss: a bare target would
// capture ANOTHER node's screen and send it to this link's viewers. Measured on tmux 3.4, with only
// `nt-x-12` alive:
@@ -72,8 +72,11 @@ export function visibleCaptureRoute(
export const VISIBLE_CAPTURE_FORMAT = '#{cursor_x} #{cursor_y}'
/** "Exactly this session, its active pane" — the only spelling that is exact AND resolves for a
- * target-pane command (see the measurement at the top of this file). */
-export function exactPaneTarget(sessionName: string): string {
+ * target-pane command (see the measurement at the top of this file). It does NOT validate the name:
+ * every caller passes the result as one argv element or `posixQuote`s it. A target spliced UNQUOTED
+ * into tmux command text must use pane-input.ts's `exactPaneTarget`, which refuses a name this app
+ * did not generate (named differently so an auto-import cannot pick the wrong one). */
+export function capturePaneTarget(sessionName: string): string {
return `=${sessionName}:`
}
@@ -83,7 +86,7 @@ export function exactPaneTarget(sessionName: string): string {
* No `-S`: capture-pane without it starts at the first VISIBLE row.
*/
export function localCaptureVisibleArgs(socket: string, sessionName: string): string[] {
- const target = exactPaneTarget(sessionName)
+ const target = capturePaneTarget(sessionName)
return [
'-L',
socket,
diff --git a/src/core/watch-link/watcher-client.ts b/src/core/watch-link/watcher-client.ts
index d3131e0eb..b815c654e 100644
--- a/src/core/watch-link/watcher-client.ts
+++ b/src/core/watch-link/watcher-client.ts
@@ -29,13 +29,13 @@
//
// Client flags (`-f`) need tmux 3.2. Locally the version is probed (`supportsWatcherClient`) and an
// older or unreadable one refuses the watcher; over SSH the remote tmux rejects the flags itself.
-import { exactPaneTarget } from './capture-route'
+import { capturePaneTarget } from './capture-route'
export const WATCHER_CLIENT_FLAGS = 'ignore-size,read-only'
/** The local tmux argv (after the binary) for a watcher's own client. */
export function localWatcherAttachArgs(socket: string, sessionName: string): string[] {
- return ['-L', socket, 'attach-session', '-E', '-f', WATCHER_CLIENT_FLAGS, '-t', exactPaneTarget(sessionName)]
+ return ['-L', socket, 'attach-session', '-E', '-f', WATCHER_CLIENT_FLAGS, '-t', capturePaneTarget(sessionName)]
}
/**
@@ -48,7 +48,7 @@ export function localWatcherAttachArgs(socket: string, sessionName: string): str
export const WINDOW_SIZE_FORMAT = '#{window_width} #{window_height} #{status}'
export function localWindowSizeArgs(socket: string, sessionName: string): string[] {
- return ['-L', socket, 'display-message', '-p', '-t', exactPaneTarget(sessionName), WINDOW_SIZE_FORMAT]
+ return ['-L', socket, 'display-message', '-p', '-t', capturePaneTarget(sessionName), WINDOW_SIZE_FORMAT]
}
/** `"<width> <height> <status>"` → the client size for that window (see `WINDOW_SIZE_FORMAT`), both
diff --git a/src/renderer/components/settings/sections/ProCompare.test.tsx b/src/renderer/components/settings/sections/ProCompare.test.tsx
index 0d1d366af..d5ec40057 100644
--- a/src/renderer/components/settings/sections/ProCompare.test.tsx
+++ b/src/renderer/components/settings/sections/ProCompare.test.tsx
@@ -14,7 +14,7 @@ describe('ProCompare', () => {
const html = renderToStaticMarkup(<ProCompare />)
it('lists live links under Pro', () => {
- expect(column(html, 'Pro<')).toContain('Live read-only links to a terminal — viewers need nothing installed')
+ expect(column(html, 'Pro<')).toContain('Live links to a terminal: watch, chat, or let people type — viewers need nothing installed')
})
it('leaves the free Core list exactly as it was', () => {
diff --git a/src/renderer/components/settings/sections/ProCompare.tsx b/src/renderer/components/settings/sections/ProCompare.tsx
index 7f637f970..5eb94d7de 100644
--- a/src/renderer/components/settings/sections/ProCompare.tsx
+++ b/src/renderer/components/settings/sections/ProCompare.tsx
@@ -11,7 +11,7 @@ const CORE = [
const PRO = [
'nodeterm mobile Pro included',
'3 team seats included (extra seats $5/seat/mo)',
- 'Live read-only links to a terminal — viewers need nothing installed'
+ 'Live links to a terminal: watch, chat, or let people type — viewers need nothing installed'
]
/** Core vs Pro comparison. */
diff --git a/src/shared/watch-link/protocol.ts b/src/shared/watch-link/protocol.ts
index 7ad44e416..c9e23fdbb 100644
--- a/src/shared/watch-link/protocol.ts
+++ b/src/shared/watch-link/protocol.ts
@@ -77,8 +77,9 @@ export interface WatchMeta {
* `off`: the owner turned typing off. `locked`: too many wrong passwords across the link. */
export type WatchControlState = 'controlling' | 'available' | 'off' | 'locked'
/** Why an unlock was refused or control was taken away: `wrong` password, the link is `locked`,
- * typing is `off`, an attempt `too-soon` after the last, the terminal is `unsupported`, or input was
- * `dropped` (typing too fast, or no session to type into). */
+ * typing is `off`, an attempt `too-soon` after the last, the terminal is `unsupported`, or some input
+ * was `dropped` — over the rate limit, with no session to type into, or a delivery to the pane that
+ * failed. The host does not say which, so a viewer must not name a cause. */
export type WatchControlReason = 'wrong' | 'locked' | 'off' | 'too-soon' | 'unsupported' | 'dropped'
const CONTROL_STATES: readonly WatchControlState[] = ['controlling', 'available', 'off', 'locked']
const CONTROL_REASONS: readonly WatchControlReason[] = ['wrong', 'locked', 'off', 'too-soon', 'unsupported', 'dropped']