@vibelord/lanes 1.8.0 → 1.9.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/payload/lanes/README.md +29 -11
- package/payload/lanes/VERSION +1 -1
- package/payload/lanes/bin/lanes +159 -59
- package/payload/lanes/bin-rs/BINARIES.json +2 -17
- package/payload/lanes/client/lanes-launch +51 -2
- package/payload/lanes/container/lane +142 -19
- package/payload/lanes/container/lane-mcp +168 -55
- package/payload/lanes/container/lane-peerd +6 -6
- package/payload/lanes/container/lane-signal +48 -3
- package/payload/lanes/container/lane_core.py +1040 -164
- package/payload/lanes/container/throttle-pulse +13 -4
- package/payload/lanes/docs/AGENTS-lanes.md +15 -7
- package/payload/lanes/docs/ARCHITECTURE.md +478 -101
- package/payload/lanes/docs/DESIGN.md +7 -2
- package/payload/lanes/docs/INSTALL.md +20 -3
- package/payload/lanes/docs/PLAN-1.9.1-SIDEBAR-CODEX.md +128 -0
- package/payload/lanes/docs/RUNBOOK.md +1428 -107
- package/payload/lanes/docs/USERGUIDE.md +488 -86
- package/payload/lanes/holders/tmux.sh +3 -3
- package/payload/lanes/install/services.py +68 -11
- package/payload/lanes/libexec/agent_state.py +2 -5
- package/payload/lanes/libexec/attach.py +11 -3
- package/payload/lanes/libexec/cursor_sync.py +22 -2
- package/payload/lanes/libexec/docsd.py +38 -4
- package/payload/lanes/libexec/lanes_lib.py +377 -39
- package/payload/lanes/libexec/mdlite.py +43 -3
- package/payload/lanes/libexec/notify.py +69 -26
- package/payload/lanes/libexec/registrations.py +5 -0
- package/payload/lanes/libexec/session_actions.py +114 -27
- package/payload/lanes/libexec/sidebar.py +246 -64
- package/payload/lanes/libexec/site_hooks.py +65 -0
- package/payload/lanes/libexec/statusd.py +139 -189
- package/payload/lanes/libexec/studio_host.py +8 -2
- package/payload/lanes/libexec/tokens.py +6 -2
- package/payload/lanes/libexec/update.py +13 -5
- package/payload/lanes/libexec/view.sh +39 -4
- package/payload/lanes/libexec/workspace_keys.py +54 -0
- package/payload/lanes/site/protocol.py +15 -5
- package/payload/lanes/site/relay.py +5 -2
- package/payload/lanes/site/server.py +29 -18
- package/payload/lanes/systemd/lanes-economy.service +3 -1
- package/payload/lanes/tokens/README.md +10 -0
- package/payload/lanes/tokens/generate.py +1 -1
- package/payload/lanes/web/Caddyfile +9 -2
- package/payload/lanes/web/README.md +2410 -95
- package/payload/lanes/web/browser.css +2 -0
- package/payload/lanes/web/browser.js +18 -6
- package/payload/lanes/web/directory.js +1 -1
- package/payload/lanes/web/docs.js +23 -0
- package/payload/lanes/web/links.js +157 -0
- package/payload/lanes/web/manifest.webmanifest +0 -2
- package/payload/lanes/web/mobile.css +30 -32
- package/payload/lanes/web/mobile.js +286 -227
- package/payload/lanes/web/upload.js +65 -22
- package/payload/lanes/web/workspace-keys.js +65 -0
- package/payload/lanes/zellij/config.kdl +1 -1
- package/payload/manifest.json +5 -22
- package/payload/lanes/bin-rs/THIRD-PARTY-NOTICES +0 -18953
- package/payload/lanes/bin-rs/x86_64-unknown-linux-musl/lanes-hook +0 -0
- package/payload/lanes/bin-rs/x86_64-unknown-linux-musl/lanes-terminal +0 -0
|
@@ -18,10 +18,36 @@ undoes the client's per-load single-pane start once
|
|
|
18
18
|
view's sidebar shows beside its lanes. `tests/web/activation.test.mjs` (`node --test`) pins the activation matrix,
|
|
19
19
|
the picker model and that render preference; `tests/unit/test_web_view.py` pins the size budgets and runs that
|
|
20
20
|
suite when node is installed; `tests/web/phone.test.mjs` boots `mobile.js` as a phone against a fake page and
|
|
21
|
-
client
|
|
22
|
-
|
|
21
|
+
client (in the document's order, with a terminal socket that follows the WebSocket standard) and records every frame
|
|
22
|
+
it sends (input v2's bytes, keyboard, clipboard, dock and menu; cockpit v3 S5's filter
|
|
23
|
+
Esc and prompt quick row; BEY-8609 slice 2a's key strip and **Keys** panel, with a model of the CSS for the layout;
|
|
24
|
+
slice 2b's header, status line, words and workspace list; E1a's (BEY-8667) Paste in a phone's header and the captured
|
|
25
|
+
screen; E1c-2's reopen the last tab; E3's coming back to a dead page; E4's notification and address links;
|
|
26
|
+
`test_web_view.PhoneKeys` names S5's tests and counts the file's); `tests/web/links.test.mjs` boots `mobile.js` and the
|
|
27
|
+
on-demand `links.js` together on a fake phone page (E1b-1, BEY-8667: a tapped address in a lane). After an upgrade,
|
|
23
28
|
check that `__zjMobileUi`, `__zjSendControl`, `__zjSoftKbdCapture` (with `sendFn` = `websockets.sendAnsiKey`),
|
|
24
|
-
`__zjSyncInactiveCursorStyle` and `window.term` still exist in the served `app.js`.
|
|
29
|
+
`__zjSyncInactiveCursorStyle` and `window.term` still exist in the served `app.js`. Since BEY-8609 slice 2a the shell
|
|
30
|
+
also depends on the client's modifier bar: the class `zj-mobile-modbar`, the `data-cell` ids `esc`, `up`, `down`,
|
|
31
|
+
`minus`, `ctrl` and `alt`, the class `zj-armed`, `getState().armed` and `__zjMobileMergeKey`. Re-read
|
|
32
|
+
`buildModifierBar` and `renderModifierBar` for a listener on the bar itself or one delegated for its cells before `y`
|
|
33
|
+
and `n` stay inside the bar (Code notes, `build()`). The `armed` read is guarded (`?.`), so a client state without
|
|
34
|
+
`armed` reads not pressed and stops nothing. Since E1b-1 (BEY-8667) `links.js` also reads the client's private xterm
|
|
35
|
+
mouse service (`term._core._mouseService.getMouseReportCoords`, as `app.js`'s own `reportCoords` does), `term.buffer`,
|
|
36
|
+
`term.cols` and `window.__zjMobilePan` (`isActive()`, `getOffset()`). Its listeners are capture-phase listeners on
|
|
37
|
+
`#terminal`, so they run before upstream's own and before xterm's. They rely on no capture-phase touch listener above
|
|
38
|
+
`#terminal` (on `window`, `document`, `html` or `body`) stopping propagation. Re-read `installTouchGestures` and
|
|
39
|
+
`reportCoords` after an upgrade ([Links in a lane](#links-in-a-lane-bey-8667-e1b-1)).
|
|
40
|
+
Since E3 (BEY-8667) the shell also depends on four things: Zellij answering `GET /info/version` with a 2xx through
|
|
41
|
+
Caddy's `@backend` matcher (`Caddyfile`); close code 4001 still meaning that the server ended this client; `#terminal`
|
|
42
|
+
(now also dimmed inline); and the client's `isPageUnloading` never being cleared after a `pagehide`. If an upgrade
|
|
43
|
+
clears it, the shell's triggers race the client's own reconnection; if it drops or renames `/info/version`, every
|
|
44
|
+
check fails, a tap on **Reconnect** included, and a page put away comes back only by a manual reload ([Coming back to
|
|
45
|
+
a dead page](#coming-back-to-a-dead-page-bey-8667-e3)).
|
|
46
|
+
Since E4 (BEY-8667) the shell also depends on the client leaving a view's query in the address until the attach: at
|
|
47
|
+
the pinned version `app.js` rewrites the address only when its path does not end with the session's name (3501-3503),
|
|
48
|
+
and its token login is a modal and a request that leaves the address alone. If an upgrade rewrites the address before
|
|
49
|
+
the attach, `?ws=` is lost and the page loads as it would without it ([Notification and address
|
|
50
|
+
links](#notification-and-address-links-bey-8667-e4)).
|
|
25
51
|
|
|
26
52
|
The phone keyboard opens through a native tap on an input field. The bottom **Type here** field contains
|
|
27
53
|
Zellij's original capture input in its closed shadow root, preserving its keyboard/IME handling. The client
|
|
@@ -51,7 +77,11 @@ Serve sets (the client's tailnet address), so the redeem rate limit counts per d
|
|
|
51
77
|
stripped) goes to the docs service on 127.0.0.1:8185 (`lanes-docsd.service`,
|
|
52
78
|
[runbook](../docs/RUNBOOK.md#docs-service-lanes-docsd-w10-w3)): it is the FIRST handle of the site, keeps Serve's
|
|
53
79
|
`X-Forwarded-For` the same way, and the site-wide `header` block skips it (`header @notdocs`, `@notdocs not path
|
|
54
|
-
/lanes-docs/*`) so docsd's own per-route security headers are the only ones a document gets.
|
|
80
|
+
/lanes-docs/*`) so docsd's own per-route security headers are the only ones a document gets. `/lanes-docs` without the
|
|
81
|
+
slash (`handle @docsbare`, BEY-8667 E1b-2) is a `308` to `/lanes-docs/?<query>`: before, the page route took it for a
|
|
82
|
+
view named lanes-docs. It is one path declared among the single-path routes, so Caddy's sort keeps it ahead of that
|
|
83
|
+
page route (`test_docs_assets.DocsBareRoute`, on a model of Caddy's sort; no Caddy runs in the tests; RUNBOOK
|
|
84
|
+
"Operator verification" step 4 checks it on a running Caddy).
|
|
55
85
|
Run `lanes web <device> --token` on the server (it also adds that Tailscale Serve mapping when it is missing),
|
|
56
86
|
`lanes-launch web phone|laptop` from an installed client, or `sh install/enable-phone.sh --host lanes` (`--local` on
|
|
57
87
|
the server).
|
|
@@ -66,8 +96,16 @@ window hooks against the new version before changing the pinned binary. The mobi
|
|
|
66
96
|
clearing login cookies. There is no service worker caching terminal data or credentials.
|
|
67
97
|
|
|
68
98
|
Layout uses the visual viewport and safe-area insets, with independent handling for portrait, landscape,
|
|
69
|
-
keyboard-open and Home Screen views. The default terminal font is 16 px; the user's text-size choice
|
|
70
|
-
|
|
99
|
+
keyboard-open and Home Screen views. The default terminal font is 16 px; the user's text-size choice is stored locally.
|
|
100
|
+
Its face is the token `web_client.font` (`libexec/tokens.py`, rendered into `zellij/config.kdl`): since E8 (BEY-8667,
|
|
101
|
+
the lane lead's ruling of 21 November 2026) the generic `ui-monospace, monospace`, never a named family, so Safari draws
|
|
102
|
+
the system monospace (SF Mono) instead of the bare `monospace`, INFERRED to be Courier on iOS; a browser without
|
|
103
|
+
`ui-monospace` (Chromium and Firefox on Android and desktop Linux) falls back to `monospace` as before. A known
|
|
104
|
+
difference, kept on purpose: the shell's own chrome keeps its CSS stacks, which name families outside the tokens
|
|
105
|
+
(`mobile.css` `.lanes-quick button`: `ui-monospace, Menlo, monospace`; `docs.css` `code, pre`:
|
|
106
|
+
`ui-monospace, SFMono-Regular, Menlo, Consolas, monospace`), so on Safari both resolve to the same system face
|
|
107
|
+
(INFERRED) and elsewhere they can differ from the terminal's. Minimum touch targets are 44 px (workspace cards are 74
|
|
108
|
+
px). The lane picker in
|
|
71
109
|
`libexec/sidebar.py` uses three terminal rows per lane on mobile: name, state and age, the agent's task.
|
|
72
110
|
`tests/mobile_view.py` verifies the touch-to-lane path with isolated holders; sidebar unit tests cover the
|
|
73
111
|
complete touch target.
|
|
@@ -80,12 +118,59 @@ bar and xterm `onData` use (an armed CTRL/ALT on the modifier bar therefore appl
|
|
|
80
118
|
upstream's `__zjMobileMergeKey`). Until 2026-10-07 the shell posted `__zjSendControl({type: 'Write', bytes})` on the
|
|
81
119
|
control socket, whose message enum has no `Write` variant: the server logged "Ignoring unknown control message type"
|
|
82
120
|
and dropped every quick key and filter keystroke (DEF-1733). The quick keys send `\r`, `y`, `n`, `\x1b`, `\x03`,
|
|
83
|
-
`\x1b[A`, `\x1b[B` — upstream's own arrow bytes (CSI, never SS3; Zellij re-encodes a key for its pane).
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
refuses (it throws while not open) is dropped, never replayed later into whatever lane is focused then. There is no
|
|
121
|
+
`\x1b[A`, `\x1b[B` — upstream's own arrow bytes (CSI, never SS3; Zellij re-encodes a key for its pane). Since BEY-8609
|
|
122
|
+
slice 2a the strip sends `\r`, `\x1b[A`, `\x1b[B`, `\x1b` and `\x03`, and `y` and `n` sit in the **Keys** panel
|
|
123
|
+
([Keyboard strip and Keys panel](#keyboard-strip-and-keys-panel-bey-8609-slice-2a)). There is no
|
|
87
124
|
focus-and-type fallback: the focus guard above would make it type nowhere (DEF-1529).
|
|
88
125
|
|
|
126
|
+
What became of input (trustworthy input, BEY-8609 slice 1; the owner's review of 17 November 2026, sections 2A and 5).
|
|
127
|
+
`sendAnsiKey` calls `wsTerminal.send()` with no `readyState` check, and a browser WebSocket throws (`InvalidStateError`)
|
|
128
|
+
only while it is still CONNECTING; once CLOSING or CLOSED it discards the data and returns normally (the WebSocket
|
|
129
|
+
standard, and the pinned `app.js` read again on 2026-11-17). This section used to say that a refused key "throws while
|
|
130
|
+
not open"; that held only for a socket still in its handshake, so a key or a paste into a closed socket looked sent.
|
|
131
|
+
The shell therefore watches the terminal socket itself. Directly after `__zjSoftKbdEnabled` (phone and tablet only; a
|
|
132
|
+
desktop page keeps the `WebSocket` it was given) it replaces `window.WebSocket` with a `Proxy` whose one trap is
|
|
133
|
+
`construct`: the real constructor builds every socket (`Reflect.construct`, so statics such as `WebSocket.OPEN`,
|
|
134
|
+
`instanceof` and subclasses behave as without it), and only a socket whose URL contains `/ws/terminal` is observed —
|
|
135
|
+
kept as `sock`, with a `message`, an `open` (since BEY-8609 slice 2b) and a `close` listener beside upstream's `on*`
|
|
136
|
+
properties. Every other socket (the
|
|
137
|
+
control socket) passes untouched, and a page with no `WebSocket` global is left alone (`&&=`). The observation sits in
|
|
138
|
+
`try` with an empty `catch`, and the socket is returned after it: a guard, pinned by the test whose terminal socket's
|
|
139
|
+
`addEventListener` throws (`tests/web/phone.test.mjs`). A real socket does not throw there; the guard only keeps a
|
|
140
|
+
failure in the shell from breaking the client's socket. It relies on load order: `mobile.js` is a deferred script in
|
|
141
|
+
`<head>`, and `app.js`
|
|
142
|
+
a module at the end of `<body>` that makes its sockets in its `DOMContentLoaded` handler, so the wrapper is in place
|
|
143
|
+
before the one `new WebSocket(wsTerminalUrl)` (INFERRED from the HTML standard's script order and a reading of
|
|
144
|
+
`app.js`; no browser has shown it). If the observation ever misses the socket, nothing breaks and nothing says so:
|
|
145
|
+
input flows as before, Paste says `Paste unconfirmed`, and the closed-socket words below never appear.
|
|
146
|
+
|
|
147
|
+
`send(...frames)` returns what became of the frames of that call: `0` not handed over (refused or dropped); `1` handed
|
|
148
|
+
to `sendFn`, which returned, while the observed terminal socket read OPEN; `2` waiting behind a pause marker; `3`
|
|
149
|
+
handed to `sendFn`, which returned, with no terminal socket observed (the shell cannot tell). It refuses and empties
|
|
150
|
+
the whole queue in three cases. When `sendFn` is absent or the observed socket is not OPEN, nothing is called. When
|
|
151
|
+
`sendFn` throws, it was called: the frames before the one that threw (earlier frames of the same call, or frames that
|
|
152
|
+
waited behind a pause from an earlier call) may already be handed over, while the word says `Not sent`. A refusal of
|
|
153
|
+
a call that carried frames says `Not sent: no connection` on the header's status line from inside `send()`, so
|
|
154
|
+
every caller is covered, the lane filter included; a zero-frame flush (`refresh()`, `tick()`) never says anything.
|
|
155
|
+
Since BEY-8609 slice 2b that word stands until the next input that reaches `send()` with frames, while no close has
|
|
156
|
+
been seen (when the terminal socket opens it becomes `Not sent: try again`, which stands the same way); after a close it is shown for 8 ticks and the close word is back
|
|
157
|
+
([Header, words and workspace list](#header-words-and-workspace-list-bey-8609-slice-2b)).
|
|
158
|
+
`1` is "handed to the browser on an open socket", never "received": the server sends no acknowledgement.
|
|
159
|
+
|
|
160
|
+
There is no unbound queue. Until this slice a key pressed while `sendFn` was absent was queued and sent by the next
|
|
161
|
+
`refresh()`. That is withdrawn: the pinned client sets `sendFn` before the capture element in one synchronous call
|
|
162
|
+
(`installSoftKeyboardCapture`) and the shell attaches only once that element exists, so the state cannot occur once
|
|
163
|
+
the shell has attached, and a key held for later is a replay into whatever is current then. Frames now wait only
|
|
164
|
+
behind a pause marker (the filter's 60 ms, below). `at()` names the live target: the current tab's name and the active
|
|
165
|
+
pane's `is_plugin` and `pane_id`, read with optional chaining (before any state they read as undefined). At the start
|
|
166
|
+
of every `send()` call, before that call's frames join the queue, a target that differs from the one recorded by the
|
|
167
|
+
previous call (a zero-frame flush included) empties the old queue; when that removed waiting frames while a filter
|
|
168
|
+
query was held, the filter is forgotten as a tab change forgets it (`clearLaneFilter()`: the field emptied, its picker
|
|
169
|
+
owed the lone `Esc`), so the next letter starts a new filter (`Esc`, pause, `/`, text) and never goes out as a bare
|
|
170
|
+
key. What this promises: input
|
|
171
|
+
that waits is not written once the phone has seen another tab or pane become current. It is not bound to a lane: a
|
|
172
|
+
phone view has one pane per workspace, and the lane under it can change with no state the page can see.
|
|
173
|
+
|
|
89
174
|
The lane filter bar never puts an Esc and other bytes in one frame. The server parses each text frame with termwiz,
|
|
90
175
|
which holds a leading ESC while more bytes follow: `\x1b/abc` became one Alt-`/` key whose raw bytes are the whole
|
|
91
176
|
frame, then `a`, `b`, `c` again as keys of their own, so the picker sidebar got `\x1b/abc` + `abc` and filtered on
|
|
@@ -134,14 +219,18 @@ directly before `[201~` is removed (a run, so `\x1b\x1b[201~` or `\x1b[20\x1b[20
|
|
|
134
219
|
clipboard cannot end the bracket early and run the rest as typed keys, while a deliberate ANSI paste keeps its other
|
|
135
220
|
escape sequences (until DEF-1755 every ESC was removed). On a picker tab there is no paste: the picker sidebar turns
|
|
136
221
|
on bracketed paste to take file drops and reads any paste as one (text says `that was not a file drop`; a pasted path
|
|
137
|
-
becomes an upload attempt), so
|
|
222
|
+
becomes an upload attempt), so **Paste** is hidden there and a paste into **Type here** is cancelled,
|
|
138
223
|
sends nothing and says `Open a lane to paste` (DEF-1754). Explicit markers rather than xterm's `term.paste` (also
|
|
139
224
|
reachable, as `window.term`): `term.paste` brackets only when the server has turned on xterm's bracketed-paste mode,
|
|
140
225
|
which nothing in this tree shows; Zellij reads the markers as a paste and removes them for a pane that has not asked
|
|
141
226
|
for bracketed paste.
|
|
142
227
|
|
|
143
|
-
**Copy** and **Paste**
|
|
144
|
-
|
|
228
|
+
**Copy** and **Paste** sat in the header beside **More** until BEY-8609 slice 2a (nine 44 px quick keys did not fit a
|
|
229
|
+
390 px phone, so the row kept its seven). **Copy** stayed there. From slice 2a until E1a (BEY-8667) a phone's
|
|
230
|
+
**Paste** was the strip's first key, drawn only while the software keyboard was up; a tablet kept it in the header
|
|
231
|
+
([Keyboard strip and Keys panel](#keyboard-strip-and-keys-panel-bey-8609-slice-2a)). (Changed in E1a, BEY-8667: on a
|
|
232
|
+
phone **Paste** is in the header beside **Copy** again, as on a tablet, with the keyboard down or up, and **Copy** also
|
|
233
|
+
opens the captured screen; [Copy and paste in the header](#copy-and-paste-in-the-header-bey-8667-e1a).) Copy writes the terminal's selection when xterm has one, else the visible rows of
|
|
145
234
|
`window.term.buffer.active` (`translateToString(true)` per row, trailing blank rows dropped), with
|
|
146
235
|
`navigator.clipboard.writeText` called inside the tap: Safari refuses a write outside a user gesture, which is why the
|
|
147
236
|
client's clipboard add-on (OSC 52) and copy-on-select never reached the phone — upstream cancels `touchstart`, a drag
|
|
@@ -149,17 +238,102 @@ scrolls and a long press is a right click (DEF-1736). The buffer is the only tex
|
|
|
149
238
|
WebGL renderer (`addon-webgl`), so the DOM holds no row text. The copy is the whole visible screen, Zellij's frames
|
|
150
239
|
and bars included. Paste calls `navigator.clipboard.readText()` inside the tap (iOS shows its own Paste confirmation)
|
|
151
240
|
and sends the text through the bracketed path above; it is hidden on a picker tab. Both cancel `mousedown`, so an open
|
|
152
|
-
keyboard stays open.
|
|
153
|
-
|
|
241
|
+
keyboard stays open. (Changed in E1a, BEY-8667: both still cancel `mousedown`, so a tap does not move the focus, and
|
|
242
|
+
Paste leaves an open keyboard open; Copy closes it, because opening the captured screen runs `unfocus()`, as opening
|
|
243
|
+
the Workspaces sheet does.) Copy says `Copied`; no clipboard API, or a refusal, says `Clipboard blocked`. Paste records
|
|
244
|
+
`at()` at the tap, before the clipboard read (iOS can hold its confirmation open while the view moves). When the text
|
|
245
|
+
arrives: a different `at()` says `Not sent: view changed` and sends nothing; empty text says `No text to paste` and
|
|
246
|
+
sends nothing; on a picker tab, `Open a lane to paste`; otherwise the word follows `send()`'s result — `Paste sent` (1;
|
|
247
|
+
it said `Pasted` until BEY-8609), `Paste unconfirmed` (3), nothing more for 0 (`send()` already said `Not sent: no
|
|
248
|
+
connection`) or 2. A paste into **Type here** goes through the same function and words. A quick key or a QuickType
|
|
249
|
+
word adds no word of its own; `send()` words a refusal. Every word is on the header's status line since BEY-8609
|
|
250
|
+
slice 2b. `Copied` and `Paste sent` last 8 ticks there; `Clipboard blocked`, `Not sent: view changed`, `No text to
|
|
251
|
+
paste`, `Open a lane to paste` and `Paste unconfirmed` stand until the next input that reaches `send()` with frames
|
|
252
|
+
([Header, words and workspace list](#header-words-and-workspace-list-bey-8609-slice-2b)).
|
|
253
|
+
|
|
254
|
+
When the observed terminal socket closes, the header's status line says, until the page reloads, `Check last input`
|
|
255
|
+
or `Disconnected`, and the workspace and the lane stay in the header's first row (since BEY-8609 slice 2b; until then
|
|
256
|
+
the word replaced the lane in the subtitle). `Check last input` means the shell handed input over and no frame has come from
|
|
257
|
+
the server on the terminal socket since, or it handed some over within 5 s before the close (`unacked`, set by every
|
|
258
|
+
hand-over and cleared by any server frame; `sentAt`); otherwise `Disconnected`. Neither is an acknowledgement: any
|
|
259
|
+
terminal output clears `unacked`, so on a busy lane a lost key can end as plain `Disconnected`, and `Check last input`
|
|
260
|
+
says only that the input's arrival is not shown, not that it was lost. The close listener calls `refresh()` itself
|
|
261
|
+
(nothing else does once the sockets are gone; before `build()` it returns at once). A timed word is shown over the
|
|
262
|
+
close word for its ticks, and a refusal after the close for 8 ticks; then the close word is back (slice 2b: the close
|
|
263
|
+
word outranks a standing word).
|
|
264
|
+
|
|
265
|
+
The pinned client answers the same close with a notice of its own (`app.js`, read, not seen on a device). For any code
|
|
266
|
+
but 4001, `handleReconnection` puts up its reconnect notice at once and, after a countdown that starts at 1 s, once its
|
|
267
|
+
connection check passes, reloads the document. It does that only when its terminal socket opened before in this
|
|
268
|
+
document and no `pagehide` or `beforeunload` has been seen in it: both set `isPageUnloading`, and nothing clears it
|
|
269
|
+
(there is no `pageshow` handler, and `resetConnectionState` has no caller; the owner's review, section 2C). So after
|
|
270
|
+
any `pagehide`, after Cancel on the notice, and for code 4001 (the client's own `Disconnected` notice, closed with
|
|
271
|
+
Acknowledge) nothing reloads, and nothing on the page reconnects: the person has to reload the page. The resume repair
|
|
272
|
+
is the review's slice 3 and needs a separate, qualified update of the pinned client.
|
|
273
|
+
(Changed in E3, BEY-8667: the pinned client is still untouched, but after a `pagehide` `mobile.js` now checks the
|
|
274
|
+
server and reloads the page itself once the terminal socket is no longer open, **Reconnect** stands in **Paste**'s
|
|
275
|
+
place while the socket is gone, and nothing reloads by itself after code 4001. It is an interim departure from the
|
|
276
|
+
review's repair, which BEY-8676 tracks; [Coming back to a dead page](#coming-back-to-a-dead-page-bey-8667-e3).)
|
|
277
|
+
|
|
278
|
+
What a person can see of these words (INFERRED from the CSS, not seen on a device). The notice is `.security-modal`:
|
|
279
|
+
fixed, the full viewport, z-index 9999 (`modals.js`), sized by `mobile.css` to the visual viewport, above the Lanes
|
|
280
|
+
header (z-index 510). The reconnect notice sets its own inline background, `rgba(28, 28, 28, 0.85)`, which outranks
|
|
281
|
+
`mobile.css`'s opaque `--lanes-bg`, so the header shows through it dimmed at best (the 4001 notice has no inline
|
|
282
|
+
background and is opaque). The shell's close listener and the client's `onclose` run for the same close event, and the
|
|
283
|
+
client builds its notice in that call, so the standing word is never on screen before the notice; while the notice is
|
|
284
|
+
up nothing under it can be tapped, and whether the word can be read through it is a device question. The words are
|
|
285
|
+
seen clearly in three cases only: the `Check last input` note after the automatic reload (uncertain closes only; a
|
|
286
|
+
plain `Disconnected` leaves no trace after the reload); the standing word after Cancel or Acknowledge on the notice;
|
|
287
|
+
the standing word when the client shows no notice (after a `pagehide`, or when its terminal socket never opened). The
|
|
288
|
+
node suite reads the status line's text (the subtitle's until slice 2b) in a fake page with no layout and no notice;
|
|
289
|
+
the runbook's device steps are where this is looked at.
|
|
154
290
|
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
291
|
+
An uncertain close is carried across the reload: when the word becomes `Check last input` while the page is not being
|
|
292
|
+
unloaded (a `pagehide` listener sets a flag, `pageshow` clears it), the shell sets `lanes:unsure` in `sessionStorage`
|
|
293
|
+
(inside `try`; data-model row DM-LANES-PHONE-UNSURE); the next page, right after `build()`, removes it and, a tick or
|
|
294
|
+
two later, shows `Check last input` on the status line, where it stands until the next input that reaches `send()`
|
|
295
|
+
with frames (decision O7 of the slice 2 plan, since BEY-8609 slice 2b; until then a hint for 40 ticks, 8 s). Only that
|
|
296
|
+
word is carried; `Disconnected` is not. Nothing is ever
|
|
297
|
+
replayed. What these words do not see:
|
|
298
|
+
input that never passes `send()` — one typed character, the modifier bar, xterm's own data — goes into a closed socket
|
|
299
|
+
with only the standing `Disconnected` to tell; the uncertain note covers only what the shell itself handed over; while
|
|
300
|
+
a socket whose network is gone still reads OPEN (which can last long after the network went), `send()` returns `1` and
|
|
301
|
+
Paste says `Paste sent`, and only the later close turns that into `Check last input`; a tab the system discards in the
|
|
302
|
+
background ends with no close the page can observe, so its reload says nothing (INFERRED); a refused owed `Esc` or
|
|
303
|
+
filter tail is not repaired (reload the page); a waiting key dropped by a view change, or by a refused zero-frame
|
|
304
|
+
flush, gets no word. Two more limits. The reload note `lanes:unsure` is one flag per tab, not tied to a page: a note
|
|
305
|
+
raised on one page shows on whatever page that tab loads next. And a note for the later resume slice: a client update
|
|
306
|
+
that reconnects without a reload must clear the standing word, or the header would say `Disconnected` over a live
|
|
307
|
+
lane; and the `open` listener reads neither `gone` nor which socket opened, so a second terminal socket in the same
|
|
308
|
+
page would need both.
|
|
309
|
+
(Changed in E3, BEY-8667: the shell's own reload writes `lanes:unsure` too, just before it, when the close was
|
|
310
|
+
uncertain or a write is unanswered, on a page that was put away as well; and such a client update must also undo
|
|
311
|
+
E3's dim and **Reconnect**: [Coming back to a dead page](#coming-back-to-a-dead-page-bey-8667-e3).)
|
|
312
|
+
|
|
313
|
+
Words (`Hold to send`, `Press again to send`, `Not sent: …`, the clipboard and paste words, the reload's `Check last
|
|
314
|
+
input`) go to the header's status line since BEY-8609 slice 2b, through `hint(s, n)`, and live in two ways there: a
|
|
315
|
+
timed word holds the line for `n` ticks of the one 200 ms interval (`Copied`, `Paste sent` and `Hold to send` 8 ticks,
|
|
316
|
+
1.6 s; `Press again to send` 20), and a refusal, a clipboard failure and the reload note stand until the next input
|
|
317
|
+
that reaches `send()` with frames (`Not sent: no connection` becomes `Not sent: try again` when the terminal socket
|
|
318
|
+
opens), adding no timer. `hint()` re-arms the interval, `tick()` counts a timed word down,
|
|
319
|
+
restores the line through `refresh()` and clears the interval again, and `refresh()` leaves the line alone while a
|
|
320
|
+
timed word is up (before input v2, the next `MobileState` refresh overwrote it at once, DEF-1739). The
|
|
321
|
+
rules for each word are in [Header, words and workspace list](#header-words-and-workspace-list-bey-8609-slice-2b).
|
|
322
|
+
Until slice 2b every word was a hint for `n` ticks (`hint(s, n = 8)`; 40 for the reload note) in the header subtitle,
|
|
323
|
+
in the place of the lane, inside a button labelled `Choose workspace`, and was not announced. The status line is one
|
|
324
|
+
12 px line cut with an ellipsis, as wide as the header less its padding: 296 px at 320 px, 351 px at 375 px and
|
|
325
|
+
366 px at 390 px (calculated from `mobile.css`; INFERRED, no layout run). `Not sent: no connection` is 23 characters,
|
|
326
|
+
which at 12 px needs about 130 to 140 px (scaled from an average glyph width, not measured), so it should be read
|
|
327
|
+
whole at 320 px; under the old header, in the 13 px subtitle beside the brand, it was likely cut at 375 px. The
|
|
328
|
+
runbook's device steps read each word at the narrowest phone. **More** toggles:
|
|
329
|
+
upstream's capture-phase `pointerdown` hook closes an open menu before the button's
|
|
159
330
|
click, which then reopened it (DEF-1738), so a window capture-phase `pointerdown` listener records whether the menu was
|
|
160
331
|
open and the click then leaves it closed. On a picker tab the dock shows the filter bar and hides **Panes** (a picker
|
|
161
332
|
tab has one pane, and upstream's pane list duplicates the picker): four items for the four grid columns, where five
|
|
162
|
-
wrapped **Type here** below the fixed-height dock (DEF-1737).
|
|
333
|
+
wrapped **Type here** below the fixed-height dock (DEF-1737). Since E5a (BEY-8667) **Panes** also hides on any tab
|
|
334
|
+
with fewer than two terminal panes, and on such a tab that is not a picker **Type here** spans the freed cell, so the
|
|
335
|
+
dock still fills its four columns on every tab ([Moving between
|
|
336
|
+
workspaces](#moving-between-workspaces-bey-8667-e5a)).
|
|
163
337
|
|
|
164
338
|
The pinned `app.js` facts this section relies on (`sendFn` = `sendAnsiKey`, the capture input's attributes and
|
|
165
339
|
handlers, the menu dismiss hook, `window.term`, the WebGL addon) were read on 2026-10-07 from the asset embedded in
|
|
@@ -168,33 +342,76 @@ the zellij 0.45.1 release binary: the bytes between the `app.js` and `auth.js` n
|
|
|
168
342
|
on those facts (`node --test`, no jsdom).
|
|
169
343
|
|
|
170
344
|
Attention counts come from the picker sidebar's pane title (`WS · ◆1 ◇2 ▸6`, written by the sidebar as OSC 2):
|
|
171
|
-
`parseCounts` (also `window.__lanesParseCounts`) feeds the picker
|
|
172
|
-
|
|
173
|
-
|
|
345
|
+
`parseCounts` (also `window.__lanesParseCounts`) feeds the header's lane line on a picker tab (the subtitle until
|
|
346
|
+
BEY-8609 slice 2b), `document.title`, the Lanes button's `data-count` and the workspace cards (in words since slice
|
|
347
|
+
2b), inside the existing `refresh()` / `renderCards()` — no fetch, file or timer.
|
|
348
|
+
The shell makes one request per page load (W9 V3, LNS-85): when it builds, `installFontControls()` asks
|
|
174
349
|
`/enrol/site` on the same origin (the `/enrol/*` route above; the enrolment service's `GET /site` answers
|
|
175
350
|
`{alias, host_name, host_key, version, request_mode, caller, source}`) and shows its `version` as the first row of
|
|
176
351
|
the client's **More** menu, **Lanes v1.2.0**, above **Text size** — the same `.lanes-font-controls` row, so no CSS.
|
|
177
352
|
Only a release is shown (`^\d[\w.+-]{0,31}$`, as text): `dev`, anything else, an error answer, a non-JSON 502 while
|
|
178
353
|
the service is down, or no network shows nothing and throws nothing. The version is the enrolment service's tree
|
|
179
354
|
(the server installer restarts it on every install). `tests/web/version.test.mjs` boots `mobile.js` against a fake
|
|
180
|
-
logged-in page to pin this; `test_web_view` pins
|
|
355
|
+
logged-in page to pin this; `test_web_view` pins this fetch inside `installFontControls()`, which `build()` runs once.
|
|
356
|
+
Since E3 (BEY-8667, the lane lead's ruling E3-R4, 19 November 2026) the rule is one request per load, plus one check
|
|
357
|
+
per reconnect attempt, only after an event, never at load: `reconnect()` asks `GET /info/version` on the same origin
|
|
358
|
+
(`cache: 'no-store'`, and a 5 s `AbortSignal.timeout` where the browser has one) and reloads the page on a 2xx answer.
|
|
359
|
+
`test_web`, `test_web_view` and `tests/web/activation.test.mjs` count two fetches and pin the second as
|
|
360
|
+
`reconnect()`'s whole line; `tests/web/phone.test.mjs` pins when it runs.
|
|
181
361
|
Until plan Task 26 (2026-10-04) this reader was inert (DEF-1531): `bin/lanes` `mobile_workspace_tab` gave the
|
|
182
362
|
picker pane a fixed `name="Lanes"`, and Zellij reports a pane's layout name instead of its OSC 2 title, so
|
|
183
363
|
`pickerTitle()` read `Lanes`, `parseCounts` returned null and the shell showed no counts ("Choose a lane to continue").
|
|
184
364
|
Task 26 dropped that `name=` (pinned by `tests/unit/test_layout.py`) for sessions laid out since: an existing
|
|
185
365
|
phone device keeps the old picker pane until `lanes rebuild <device>` (`upgrade-session` never re-lays-out a tab;
|
|
186
|
-
`lanes doctor` names such a device).
|
|
187
|
-
|
|
188
|
-
|
|
366
|
+
`lanes doctor` names such a device). E6 (BEY-8667, the lane lead's rulings E6-R1 to E6-R3 of 20 November 2026)
|
|
367
|
+
does the same for the lane tab's pane. `mobile_workspace_tab` gives it no name and passes the workspace title to
|
|
368
|
+
`view.sh` as a fifth argument. `view.sh --mobile` names the pane with an OSC 2 title: the lane's title (or its id)
|
|
369
|
+
after each resolve, and the workspace's at the start and while no lane shows. It writes only when the title changed,
|
|
370
|
+
with C0, DEL, C1, bytes that are no UTF-8 and the bidirectional controls taken out, and cuts it to 100 characters on
|
|
371
|
+
a character boundary. `lanes doctor` now gives each stale phone layout its own line, naming its picker pane, its lane
|
|
372
|
+
tab pane or both (`stale_phone_layouts`). `mobile.js` is unchanged: `refresh()` already showed `pane?.title`.
|
|
373
|
+
Whether either OSC 2 title now reaches `panes[].title` is still unchecked in a browser (no WebKit pass has run, and
|
|
374
|
+
the RUNBOOK's E6 device steps from 135 are not yet done; fallback for the counts: they stay in the sidebar header). The
|
|
375
|
+
quick-key row (`.lanes-quick`; `⏎ y n Esc ^C ↑ ↓` until BEY-8609 slice 2a, now the strip
|
|
376
|
+
`⏎ ↑ ↓ Esc ^C Keys`, [below](#keyboard-strip-and-keys-panel-bey-8609-slice-2a)) shows on view
|
|
189
377
|
tabs; on the picker tab it shows only while the sidebar asks for a key (a close, the Register confirmation or Add to
|
|
190
378
|
workspace, which the sidebar announces by ending its pane title with ` · › <verb>`, ` · > <verb>` under ASCII glyphs;
|
|
191
379
|
DM-LANES-SIDEBAR-TITLE), and then only `⏎ y Esc` (cockpit v3 S5) — `^C`, `n` and the arrows have no use in a prompt.
|
|
192
380
|
A name field (Rename, Register as) is never announced: there `y` is a letter of the name (DEF-1819). `refresh()` sets
|
|
193
|
-
`--lanes-quick` (48 px or 0), which the terminal height subtracts.
|
|
194
|
-
only when `pointerup.timeStamp − pointerdown.timeStamp ≥ 400` (no `setTimeout
|
|
381
|
+
`--lanes-quick` (48 px or 0), which the terminal height subtracts. `^C` sends
|
|
382
|
+
only when `pointerup.timeStamp − pointerdown.timeStamp ≥ 400` (no `setTimeout`; `n` did too until slice 2a, whose
|
|
383
|
+
decision O1 made `y` and `n` alike, one tap each); `pointercancel` and `pointerleave`
|
|
195
384
|
disarm a key, and a `pointerup` without the key's own `pointerdown` sends nothing (before, a cancelled hold stayed
|
|
196
385
|
armed, so a pointer released over `^C` later sent it, DEF-1739). The buttons cancel `mousedown` so a tap never moves
|
|
197
|
-
focus
|
|
386
|
+
focus, and nothing calls `focus()`. One activation path per key (BEY-8609 slice 1, brief 2B): every `pointerup` on a
|
|
387
|
+
key records `up = Date.now()`. The key's `click` listener ignores a click in two cases: when a pointer made it
|
|
388
|
+
(`detail` of 1 or more; UI Events gives a pointer's click its click count there and a keyboard activation's click 0),
|
|
389
|
+
and when it comes less than 500 ms after a pointer release on that key. The first guard is why a tap's own click
|
|
390
|
+
cannot send a second time however late it arrives: a main thread blocked for more than 500 ms between the release and
|
|
391
|
+
the click would otherwise send a plain key twice. The 500 ms rule stays as the second guard, for a `detail` 0 click
|
|
392
|
+
that follows a pointer release. Any other click is an ordinary activation: a click that no pointer made, which is what
|
|
393
|
+
a keyboard's Space or Return delivers. Not checked on a device: whether VoiceOver's double-tap delivers such a click,
|
|
394
|
+
pointer events (then `^C` says `Hold to send` and cannot be reached), or a pointer-made click with no pointer
|
|
395
|
+
events (which now does nothing). A plain key sends once. `^C` arms on the first activation (`Press again to
|
|
396
|
+
send` for 20 ticks, 4 s) and sends on a second activation while that word is still up, then disarms; any
|
|
397
|
+
other hint, a `pointerdown` on any quick key and the word's expiry disarm it. A repeated `keydown` (`ev.repeat`) of
|
|
398
|
+
Space or Return on a quick key is cancelled, so a held Return should not arm and then send (read, not shown: the fake
|
|
399
|
+
page has no keydown-to-click step; not checked on a device); other repeated keys keep their
|
|
400
|
+
default (Tab still moves on). Open: a `^C` armed by keyboard is not disarmed by a view change,
|
|
401
|
+
so a second activation within its 4 s sends into whatever is current then. `Press again to send` was a subtitle hint
|
|
402
|
+
that assistive technology was not told of until BEY-8609 slice 2b; it is now on the header's status line, a polite
|
|
403
|
+
live region, so a screen reader should say that the key armed (INFERRED, not heard on a device; it does not say that
|
|
404
|
+
4 s are running). The labelled **Keys** control, `y` and `n` behaving alike, and a bare `y` named "Send y"
|
|
405
|
+
rather than anything that reads as an approval came in slice 2a.
|
|
406
|
+
|
|
407
|
+
Asked by the owner's review (sections 2A and 2C) and not delivered in this slice. Retained text for a failed longer
|
|
408
|
+
input: a refused paste is dropped by the page (it is still on the clipboard); the retained composer is the review's
|
|
409
|
+
later slice (slice 6, Compose and return links). A fleeting subtitle word, which 2A calls insufficient: in slice 1 a
|
|
410
|
+
refusal showed for 1.6 s in the subtitle only, and that was the only sign of it. Keep the current workspace and lane
|
|
411
|
+
visible while disconnected: in slice 1 the standing word replaced the lane title in the subtitle, and only the
|
|
412
|
+
workspace name stayed in the heading. Both were delivered in BEY-8609 slice 2b: a refusal stands on the header's
|
|
413
|
+
status line until the next input, and the close word stands there beside the workspace and the lane
|
|
414
|
+
([Header, words and workspace list](#header-words-and-workspace-list-bey-8609-slice-2b)).
|
|
198
415
|
|
|
199
416
|
Colour (spec §6.3; the operator legend, token table and phone mockup are in [`docs/DESIGN.md`](../docs/DESIGN.md)):
|
|
200
417
|
`mobile.css` uses only the generated `--lanes-*` tokens (legacy names such as `--lanes-bg` stay
|
|
@@ -208,17 +425,37 @@ chaining `window.__zjSyncInactiveCursorStyle`, which the pinned `app.js` calls i
|
|
|
208
425
|
assigning the server theme wholesale (`SetConfig` is sent on each config-file reload). The handler then runs
|
|
209
426
|
`applyTerminalBackground`, which writes the dark background inline on `<body>` and `#terminal`; the stylesheet's
|
|
210
427
|
`!important` `--lanes-surface` rule for those two elements outranks it in either variant. An SRI bump of `app.js`
|
|
211
|
-
re-opens this contract: re-read `startWsControl`, `installSoftKeyboardCapture`, `initWebSockets` (`sendAnsiKey`)
|
|
212
|
-
`installMenuDismissHook`
|
|
428
|
+
re-opens this contract: re-read `startWsControl`, `installSoftKeyboardCapture`, `initWebSockets` (`sendAnsiKey`),
|
|
429
|
+
`installMenuDismissHook`, the one `new WebSocket(wsTerminalUrl)` (the terminal socket the shell observes, made after
|
|
430
|
+
every deferred script) and the `/ws/terminal` path that URL is built on (the text the observer matches),
|
|
431
|
+
`handleReconnection` (its modal and reload), and, since BEY-8609 slice 2a, `buildModifierBar`, `renderModifierBar`,
|
|
432
|
+
`handleModCell` and `installKeyMergeHook` (the Keys panel) before accepting it.
|
|
213
433
|
`index.html` carries one `theme-color` per colour scheme, each that variant's `surface` token, and the manifest's
|
|
214
434
|
`background_color` and `theme_color` are the dark `surface`; they are hand-written, so `test_tokens.GeneratedSurfaces`
|
|
215
|
-
holds them to the table (cockpit v3 P5). The
|
|
435
|
+
holds them to the table (cockpit v3 P5). The manifest names no `start_url` and no `id` (E1c-1, BEY-8667): by the W3C
|
|
436
|
+
defaults an installed app starts at the address it was added from (`/<device>-phone`; the pinned app.js rewrites the
|
|
437
|
+
path only when it does not end with the booted session's name, upstream app.js:3501-3502) and takes that address as
|
|
438
|
+
its identity, so each view is its own Home Screen app. Until E1c-1 both were `/phone`, the device `enable-phone.sh`
|
|
439
|
+
makes by default, so any view's icon could open that view or a new bare `bash` session named `phone` (INFERRED; no
|
|
440
|
+
device has shown it). `test_web.Html.test_manifest_launches_the_view_it_was_added_from` pins both absences; the
|
|
441
|
+
RUNBOOK's device check "Home Screen identity" is NOT YET DONE, and so is whether the server sends the manifest as
|
|
442
|
+
`application/manifest+json` (no Caddyfile rule names the type, so Caddy takes it from the host's MIME tables). The
|
|
443
|
+
icon (`icon.svg`, `icon-192.png`, a raster with anti-aliased edges) is
|
|
216
444
|
the brand mark, drawn before the token table and not generated: palette v2 did not recolour it, and its bars keep
|
|
217
|
-
v1's dark accent.
|
|
218
|
-
|
|
445
|
+
v1's dark accent. It is the page's icon, the Home Screen icon and the manifest's; since BEY-8609 slice 2b the phone
|
|
446
|
+
header no longer shows it. Bundle budget (spec §8, `test_web.test_bundle_growth`):
|
|
447
|
+
`mobile.css` ≤ 18 982 B and `mobile.js` ≤ 29 168 B (E1a, BEY-8667, moved neither and left 37 B and 33 B under them,
|
|
448
|
+
MEASURED; E1b-1's loader for the on-demand `links.js` then took 30 B of the 33, MEASURED, so 3 B were left; E1c-2's
|
|
449
|
+
named `JS_RESUME_TAB`, 247 B, moved the JS cap from 27 025 B to 27 272 B, E3's named `JS_RESUME_PAGE`, 985 B, from
|
|
450
|
+
27 272 B to 28 257 B, E4's named `JS_DEEP_LINK`, 149 B, from 28 257 B to 28 406 B, and E5a's named
|
|
451
|
+
`JS_WORKSPACE_MOVES`, 362 B, from 28 406 B to 28 768 B, and E7a's named `JS_TYPED_GUARD`, 149 B, from 28 768 B to 28 917
|
|
452
|
+
B, and E9's named `JS_TEXT_SIZE`, 251 B, from 28 917 B; below);
|
|
453
|
+
the
|
|
454
|
+
rules sit one per line and the explanations live here rather
|
|
219
455
|
than in the shipped files. MEASURED 2026-10-04 with `wc -c` after LNS-31 (plan Task 31) met Tasks 13/28: `mobile.js`
|
|
220
456
|
21 964 B (23 268 B before its comments moved to Code notes below) and `mobile.css` 18 945 B. A laptop or tablet also
|
|
221
|
-
fetches `browser.js` and `browser.css` (1 947 B
|
|
457
|
+
fetches `browser.js` (4 312 B since Ed, BEY-8667) and `browser.css` (1 947 B; 2 043 B since BEY-8609 slice 2b);
|
|
458
|
+
`test_web_view` pins that download at `LAPTOP_TABLET_JS_RATCHET` and
|
|
222
459
|
`LAPTOP_TABLET_CSS_CAP` (DEF-1569).
|
|
223
460
|
|
|
224
461
|
The two lines that met at the cockpit v3 main sync (D2, LNS-99, 2026-10-07). On `wave/lanes-cockpit-v3`: after
|
|
@@ -273,18 +510,1575 @@ unchanged 24 747 B cap; the laptop/tablet download 24 709 + 3 318 = 28 027 B, un
|
|
|
273
510
|
`test_web_view` changed; `inbox.js` has a row of its own, bound by `tests/unit/test_web_inbox.py` and
|
|
274
511
|
`tests/web/inbox.test.mjs` (`INBOX_JS_CAP` in both, required to agree).
|
|
275
512
|
|
|
513
|
+
Trustworthy input (BEY-8609 slice 1, 2026-11-17;
|
|
514
|
+
[Input, keys and clipboard](#input-keys-and-clipboard-phone-shell-input-v2-cap-142)
|
|
515
|
+
above) is the first step since the docs cockpit to move the phone budget. The owner's review of 17 November 2026
|
|
516
|
+
(`docs/superpowers/specs/2026-11-17-lanes-mobile-web-owner-review.md`, the lane's specification) commissions this code
|
|
517
|
+
in its section 9, row 1; it says nothing about bytes, so the step is booked as phone shell input v2's was: measured,
|
|
518
|
+
then pinned exact. It was paid first with 171 B of equivalent code, each edit MEASURED with `wc -c` on the 24 709 B
|
|
519
|
+
file: `connect()`'s two guards as one (37 B), `nativeRoot` inlined (35 B), the header's two loops as one that still
|
|
520
|
+
leaves **More** not cancelling `mousedown` (28 B), the focus guard's input-type list as an anchored regular expression
|
|
521
|
+
(26 B), the two `resize` listeners in one loop (18 B), `Object.assign(term.options, …)` (11 B) and two redundant
|
|
522
|
+
`String()` calls (`setItem` and `setAttribute` convert; 8 + 8 B) — 24 538 B. Two candidates were not booked because
|
|
523
|
+
they are not equivalent everywhere: the `inert` property (absent before Safari 15.5, and the attribute then never in
|
|
524
|
+
the DOM) and `sheet.role` (ARIA reflection). The slice then MEASURED `mobile.js` 26 333 B (`wc -c`): 1 586 B over the
|
|
525
|
+
24 747 B cap, so the phone JS cap rose by exactly those bytes to the measured size
|
|
526
|
+
(`test_web_view.JS_TRUSTWORTHY_INPUT`)
|
|
527
|
+
and the DEF-1569 ratchet by the same 1 586 B, to 26 333 + 3 318 = 29 651 B (`browser.js` unchanged); `mobile.css` is
|
|
528
|
+
unchanged at 18 945 B. Every copy is pinned exact: `test_web_view` (both phone sums and `LAPTOP_TABLET_JS_RATCHET`),
|
|
529
|
+
`test_web.test_bundle_growth`, `test_web_directory.MOBILE_JS_CAP`, `test_web_inbox.MOBILE_JS_CAP`,
|
|
530
|
+
`tests/web/inbox.test.mjs` (`MOBILE_JS_CAP`, `LAPTOP_TABLET_JS_RATCHET`) and the one-byte-over legs of
|
|
531
|
+
`tests/web/prove_inbox.sh` and `tests/web/prove_directory.sh`. A separate script was not the way out: a phone would
|
|
532
|
+
still fetch it, and `test_web_view`'s phone-download test counts every static `/lanes-assets/` script "so moving bytes
|
|
533
|
+
to another file that a phone still fetches cannot pass"; `index.html`'s static assets are pinned to the two phone
|
|
534
|
+
files; and of the new code only the socket observer could stand alone. One more saving is known and not taken: in
|
|
535
|
+
`send()`'s refusal test, `!f ||` is redundant for every call that carries frames, because calling an absent `sendFn`
|
|
536
|
+
throws into the same `catch` (6 B; a sabotage leg without it stayed green in the fix stage's managed job
|
|
537
|
+
7a7aea8d924c4a559897bdac21b63e95, MEASURED; the equivalence is read, INFERRED).
|
|
538
|
+
|
|
539
|
+
The keyboard layout (BEY-8609 slice 2a, 2026-11-18;
|
|
540
|
+
[Keyboard strip and Keys panel](#keyboard-strip-and-keys-panel-bey-8609-slice-2a) below) moves the phone budget again.
|
|
541
|
+
The slice 2 plan of 18 November 2026 expected about +600 B (a cap of about 26 930 B), and its Bytes rule made the
|
|
542
|
+
final figures the `wc -c` after the build, pinned exact in every copy. So the step is booked as slice 1's was: paid
|
|
543
|
+
first, measured, then pinned exact. It was paid first with 436 B of equivalent code, each edit MEASURED alone in bytes
|
|
544
|
+
on the 26 333 B file and then composed: `id()` for six `document.getElementById` calls (88 B), `bare()` for the
|
|
545
|
+
workspace name read three times (36 B), the Workspaces dock button inlined (27 B), four falsy initialisers dropped
|
|
546
|
+
(21 B), bare `dispatchEvent` and `addEventListener` (14 B), `setKeyboard()` inlined into `viewport()`, its one caller
|
|
547
|
+
(50 B), the sheet's Tab trap as one test (130 B), `act()` for `document.activeElement` (66 B) and `set()` for
|
|
548
|
+
`setAttribute` (21 B). Alone these sum to 453 B; composed they save 436 B, 26 333 → 25 897 B, because the Tab trap and
|
|
549
|
+
`act()` both shorten the same `document.activeElement` reads (17 B, calculated). `!f ||` in `send()` stays, as above.
|
|
550
|
+
The slice then MEASURED `mobile.js` 26 769 B (`wc -c`), and the completeness review of the same day added 2 B (`?.` on
|
|
551
|
+
`getState().armed`; the tablet's header order cost no byte): 26 771 B MEASURED. The new code is 874 B net
|
|
552
|
+
(26 771 − 25 897, calculated), and the file 438 B over the 26 333 B cap. So the phone JS cap rose by exactly those bytes
|
|
553
|
+
to the measured size (`test_web_view.JS_KEYBOARD_LAYOUT`), and the DEF-1569 ratchet by the same 438 B, to
|
|
554
|
+
26 771 + 3 318 = 30 089 B (`browser.js` unchanged). Every copy is pinned exact in the same places as slice 1's.
|
|
555
|
+
`mobile.css` paid for its rules inside itself, with no cap moved: 236 B of equivalent rules first (the two label rules
|
|
556
|
+
merged into the button's, 60 + 8 B; the two placeholder rules as one, 30 B; the two hand-written comments, 87 B; `flex`
|
|
557
|
+
on the filter bar, a grid item on a phone, 16 B; `-webkit-overflow-scrolling`, 35 B, equivalent from iOS 13, where
|
|
558
|
+
Safari scrolls such a box with momentum by default, INFERRED from public documentation), 18 945 → 18 709 B, MEASURED
|
|
559
|
+
alone in bytes; then the slice's rules, with two `display: none` rules merged into its one, MEASURED 18 981 B
|
|
560
|
+
(`wc -c`). The completeness review then scoped the four hidden cells to the built shell (+18 B) and paid for it by
|
|
561
|
+
moving the five declarations `.lanes-button` and `.lanes-input-label` share into one rule for both (−57 B; same
|
|
562
|
+
specificity, `.lanes-button`'s place unchanged, and every later rule that sets these properties on the label still
|
|
563
|
+
wins), each MEASURED alone on the 18 981 B file: 18 942 B MEASURED (`wc -c`), 40 B under the unchanged 18 982 B cap.
|
|
564
|
+
The legacy colour aliases stay.
|
|
565
|
+
Not taken: design C's own Keys panel with proxy buttons (about 300 B more JavaScript) and design B's strip inside the
|
|
566
|
+
dock (about +1 370 B), both figures from the plan's drafts, not measured here; and a separate script, which a phone
|
|
567
|
+
would still fetch (as slice 1's paragraph says).
|
|
568
|
+
|
|
569
|
+
Identity and words (BEY-8609 slice 2b, 2026-11-18;
|
|
570
|
+
[Header, words and workspace list](#header-words-and-workspace-list-bey-8609-slice-2b) below) moves the phone JS
|
|
571
|
+
budget again, booked as slice 2a's was: paid first, measured, then pinned exact. It was paid first with 213 B of
|
|
572
|
+
equivalent code, each edit MEASURED alone in bytes on the 26 771 B file and then composed: `queue` and `fontSize`
|
|
573
|
+
joined to the third `let` line (14 B), `pickerTitle()` as one arrow (56 B), the close word picked by index (12 B),
|
|
574
|
+
`openSheet()` no longer clearing `previousCards` (24 B; the list already shows what that signature renders) and
|
|
575
|
+
`workspaces()` in two statements (107 B). Alone these sum to 213 B, and composed they save 213 B, 26 771 → 26 558 B.
|
|
576
|
+
The slice then rewrote the line the close-word saving had shortened. The slice MEASURED `mobile.js` 26 933 B, and its
|
|
577
|
+
review's fixes added 51 B (the close word over a standing word, the reload note and an earlier close word written a
|
|
578
|
+
tick or two after the build, `pos >= 0` in `paneAt()`): 26 984 B MEASURED (`wc -c`). The completeness review's fix
|
|
579
|
+
added 10 B (`!hintN && ` in `send()`: a key sent under a timed word ends the standing word but leaves the timed word
|
|
580
|
+
up): 26 994 B MEASURED (`wc -c`). The new code is 436 B net (26 994 − 26 558, calculated; 1 B of it the path owner's
|
|
581
|
+
`?` in `state()?.armed`), and the file 223 B over the 26 771 B cap. So the phone JS cap rose by exactly those bytes to
|
|
582
|
+
the measured size (`test_web_view.JS_IDENTITY_AND_WORDS`), and the DEF-1569 ratchet by the same 223 B, to
|
|
583
|
+
26 994 + 3 318 = 30 312 B (`browser.js` unchanged). The path owner's rule on this slice came after that (a word
|
|
584
|
+
that names a state must not outlive the state, and the act it reports stays told: the terminal socket's `open`
|
|
585
|
+
listener, below): 116 B, MEASURED alone on the 26 994 B file (92 B in the rule's first form, which emptied the line).
|
|
586
|
+
It was paid first with 85 B of equivalent code, each edit MEASURED alone (`viewport()`'s three constants as one
|
|
587
|
+
expression with the same truth table, 60 B; `screen()`'s row loop as one `Array.from`, 25 B): 27 025 B MEASURED
|
|
588
|
+
(`wc -c`), so the cap rose by those 31 B (`test_web_view.JS_NO_CONNECTION_ENDS_AT_OPEN`; the path owner allowed up
|
|
589
|
+
to 64 B) and the ratchet to 27 025 + 3 318 = 30 343 B. Every copy is pinned exact in the same places as slice 1's. The
|
|
590
|
+
plan expected the cap at about 26 930 B after both halves of slice 2; it is 27 025 B. `mobile.css` paid for its rules inside itself, with no
|
|
591
|
+
cap moved (the path owner's ruling R1 for this slice: the CSS cap is not raised and the seven legacy colour aliases are
|
|
592
|
+
not retired): the slice's rules alone came to +123 B on the 18 942 B file (19 065 B), and 137 B of equivalent rules
|
|
593
|
+
paid for them, each MEASURED alone (the three `display: none !important` rules as one, 58 B; the attribute values
|
|
594
|
+
`true`, `password` and `checkbox` unquoted, 6 B; `.lanes-context *` for the button's two lines, 26 B, on the base;
|
|
595
|
+
the sheet's count line, an `<output>` now, in the row count line's rule, 47 B, on the slice's build): 18 928 B. The
|
|
596
|
+
review then gave the status line its height (+14 B): 18 942 B MEASURED (`wc -c`), 40 B under the unchanged 18 982 B
|
|
597
|
+
cap. `browser.css` keeps a tablet's header one row (+96 B): 2 043 B MEASURED, under its own 2 048 B cap, and the
|
|
598
|
+
laptop/tablet CSS download 18 942 + 2 043 = 20 985 B, 8 B under its unchanged 20 993 B cap. Not taken: the Lanes badge in the context button's name (about 55 B, the plan's figure; a follow-up), and a separate
|
|
599
|
+
script, which a phone would still fetch.
|
|
600
|
+
|
|
601
|
+
Copy and paste in the header (BEY-8667 E1a, 2026-11-19;
|
|
602
|
+
[Copy and paste in the header](#copy-and-paste-in-the-header-bey-8667-e1a) below) moves no budget. It was paid first,
|
|
603
|
+
each edit MEASURED alone in bytes on the 27 025 B file: the phone's `if (mode == 'phone') row.prepend(pasteKey)` line,
|
|
604
|
+
which the lane lead's ruling R2 removes (48 B), and `q()` for five `document.querySelector` calls, equivalent code
|
|
605
|
+
(83 B) — 26 894 B with both, calculated. The slice then spent 97 B net (26 991 − 26 894, calculated): both sheets
|
|
606
|
+
made by one `dialog()` builder, the captured screen, and its head word (`text(said, s)` in `hint()`, 15 B, and
|
|
607
|
+
emptying it as the dialog opens, 23 B), 26 991 B. The review before the pull request added two repairs, the scrim
|
|
608
|
+
closing only a press that began on it (40 B) and the dialog holding the focus (`tabIndex = -1`, and the Tab trap
|
|
609
|
+
wrapping from the dialog itself, 31 B), paid by 70 B more of equivalent code (`D = document` for eleven `document.`
|
|
610
|
+
references). `mobile.js` MEASURED 26 992 B (`wc -c`), 33 B under the unchanged 27 025 B cap, and the laptop/tablet
|
|
611
|
+
download 26 992 + 3 318 = 30 310 B, 33 B under the unchanged 30 343 B ratchet (`browser.js` unchanged). `mobile.css` paid for
|
|
612
|
+
its rule inside itself: the two selectors R2 leaves dead (`html:not(.lanes-keyboard) .lanes-quick .lanes-more`, 52 B,
|
|
613
|
+
and `.lanes-keyboard :not([hidden])+[aria-label=Enter]`, 51 B; 103 B) out, the `.lanes-shot` rule (106 B) in: 18 945 B
|
|
614
|
+
MEASURED (`wc -c`), 37 B under the unchanged 18 982 B cap, and the laptop/tablet CSS download
|
|
615
|
+
18 945 + 2 043 = 20 988 B, 5 B under its unchanged 20 993 B cap (`browser.css` unchanged). No allowance was asked and
|
|
616
|
+
no cap moved: the lane lead's ruling C1 of 19 November 2026 keeps the slack and drops "(exact)" from the two JS rows
|
|
617
|
+
of the table below, whose caps are no longer the measured sizes. `test_web_view`, `test_web`, `test_web_directory`,
|
|
618
|
+
`test_web_inbox` and `tests/web/inbox.test.mjs` compare with `≤`, so their copies stay as they are (read on
|
|
619
|
+
19 November 2026). The gate job `023c0491c4e34caa89696f771445786d` (E1a's head 2880cd0ce5: `26992 lanes/web/mobile.js`, `18945 lanes/web/mobile.css`) measured the final files again.
|
|
620
|
+
|
|
621
|
+
Links in a lane (BEY-8667 E1b-1, 2026-11-19; [Links in a lane](#links-in-a-lane-bey-8667-e1b-1) below) moves no cap.
|
|
622
|
+
The lane lead's ruling R8 of that day made it a module loaded on demand through `js()`, not bytes in `mobile.js`.
|
|
623
|
+
`mobile.js` gains one loader, the last statement of `connect()`: `js('/lanes-assets/links.js');`, 30 B MEASURED alone
|
|
624
|
+
(`wc -c`, 26 992 -> 27 022 B), 3 B under the unchanged 27 025 B cap, and the laptop/tablet download
|
|
625
|
+
27 022 + 3 318 = 30 340 B, 3 B under the unchanged 30 343 B ratchet. `links.js` itself is 5 397 B MEASURED (`wc -c`),
|
|
626
|
+
pinned exact by its own row, `test_web_view.LINKS_JS_CAP`, as `directory.js` and `inbox.js` are: every phone and
|
|
627
|
+
tablet fetches it once after the attach, and `index.html` never lists it, so the phone-download test, which counts the
|
|
628
|
+
page's static assets, does not count it. The plan's draft was about 2.4 KB and the first build 3 241 B. The review's
|
|
629
|
+
repairs and a rewrite for reading (descriptive names, one statement a line) made it 5 397 B with no comment line: 694 B
|
|
630
|
+
of it is layout (536 B of indentation and 158 line breaks) and 4 703 B code (MEASURED). Its explanations are in Code
|
|
631
|
+
notes below, by the lane lead's rule for shipped web JS (it measured 8 609 B with them in the file). The lane lead
|
|
632
|
+
granted `LINKS_JS_CAP` = 5 397 B by name on 19 November 2026. PR 1150's review the same day made the label the whole
|
|
633
|
+
host (or a docs link's resolved path) in a right-to-left `<span>` around a left-to-right `<bdi>`, and counts a
|
|
634
|
+
`/lanes-docs/` path only as the URL parser resolves it: 5 397 -> 5 432 B MEASURED (`wc -c`), granted by name at that
|
|
635
|
+
figure (the lead's bound: up to 5 800 B). `index.html` keeps its 9 integrity pins; `links.js`
|
|
636
|
+
has none, like the other Lanes files. No CSS changed: the control reuses the `.lanes-context` rules (5 B of CSS are
|
|
637
|
+
left under the laptop/tablet CSS cap, calculated from the MEASURED sizes).
|
|
638
|
+
|
|
639
|
+
One listener helper (BEY-8667, the commit before E1c-2, 2026-11-19; the lane lead's word of that day: pay with
|
|
640
|
+
equivalent code first) moves no cap. `on = (t, ...a) => t.addEventListener(...a)`, declared after the focus guard,
|
|
641
|
+
replaces 27 calls of the form `x.addEventListener(` with `on(x, `; the bare and optional-chained calls (`globalThis`,
|
|
642
|
+
`window`, `visualViewport`) stay as they were. Two local names it would shadow are renamed at the same length: the
|
|
643
|
+
keyboard test in `viewport()` is `kb`, and `openKeys()` takes `to`. `mobile.js` 27 022 -> 26 723 B MEASURED (`wc -c`,
|
|
644
|
+
299 B less), and the laptop/tablet download 26 723 + 3 318 = 30 041 B; nothing it does changes.
|
|
645
|
+
|
|
646
|
+
Reopen the last tab (BEY-8667 E1c-2, 2026-11-19; [Reopen the last tab](#reopen-the-last-tab-bey-8667-e1c-2) below)
|
|
647
|
+
takes a named allowance: `JS_RESUME_TAB` = 247 B, granted by the lane lead by name on 19 November 2026 (ruling R1;
|
|
648
|
+
option B, with the listener helper above paying first). The phone JS cap goes from 27 025 B to 27 272 B, and DEF-1569's
|
|
649
|
+
laptop/tablet ratchet from 30 343 B to 30 590 B. `mobile.js` MEASURED 27 272 B (`wc -c`), equal to its cap; the
|
|
650
|
+
laptop/tablet download is 27 272 + 3 318 = 30 590 B, equal to its ratchet. No CSS changed.
|
|
651
|
+
|
|
652
|
+
The parts, MEASURED as the bytes each adds (lines with their newlines): the key, `tabKey()`, 60 B; the read and the
|
|
653
|
+
one restore in `connect()`, 214 B; the starting tab, the end of the wait and the write in `refresh()`, 294 B; the
|
|
654
|
+
first press ending the wait, 15 B; `lastTab`, `lastKey` and `restoring` on the third `let` line, 29 B. That is 612 B.
|
|
655
|
+
Equivalent code pays 63 B of it: `W = window`, declared on the helper's `const` line (12 B), for 15 older `window`
|
|
656
|
+
references. With the key's own `W.` the alias saves 68 B against spelling `window` out (MEASURED with `wc -c`). The
|
|
657
|
+
client's cursor-style hook keeps `window.` only on its assignment, which `test_web` pins as
|
|
658
|
+
`window.__zjSyncInactiveCursorStyle = () =>`; the read on the line before it is `W.`. `W` is declared after the focus
|
|
659
|
+
guard: a desktop page, and the bare fake pages of `activation.test.mjs`, `inbox.test.mjs` and `directory.test.mjs`,
|
|
660
|
+
stop before it. So the slice adds 549 B to the helper's 26 723 B.
|
|
661
|
+
|
|
662
|
+
What the review of the slice changed, MEASURED step by step from the reviewed file (27 571 B, on E1b-1's 27 022 B): an
|
|
663
|
+
update with no current tab no longer ends the wait (+61 B); the restore records `{}` and `refresh()` takes the tab it
|
|
664
|
+
started on, so `was` is gone (−26 B); the write compares the key as well as the name (+45 B); the key is
|
|
665
|
+
`W.location?.pathname`, with no empty fallback that only a fake page without `location` used (−12 B); the `W` alias
|
|
666
|
+
(−55 B); the cursor-style hook's read as `W.` (−5 B). That made 27 579 B on 27 022 B, which asked 554 B (option A).
|
|
667
|
+
On the helper's commit the same slice measures 27 272 B: 8 B less again, because `W` shares the helper's line.
|
|
668
|
+
|
|
669
|
+
Also considered. Not taken: a plain tab name as the value (40 B less, MEASURED on the first build), which E5 could not
|
|
670
|
+
extend without a second key or two shapes to read; a key read once at load (calculated 10 B less), which is wrong
|
|
671
|
+
after the client's `pushState`. `localStorage` cannot take an alias: reading it can throw.
|
|
672
|
+
|
|
673
|
+
Every copy of the two figures moved in this slice's commit: `tests/unit/test_web_view.py` (`JS_RESUME_TAB = 247` in
|
|
674
|
+
both sums of the phone JS cap, `LAPTOP_TABLET_JS_RATCHET` 30 590, and the module docstring's MEASURED history);
|
|
675
|
+
`tests/unit/test_web.py` (`test_bundle_growth`); `MOBILE_JS_CAP` in `tests/unit/test_web_directory.py`,
|
|
676
|
+
`tests/unit/test_web_inbox.py` and `tests/web/inbox.test.mjs` (with `LAPTOP_TABLET_JS_RATCHET` there); the "one byte
|
|
677
|
+
over its unchanged cap" legs of `tests/web/prove_inbox.sh` and `tests/web/prove_directory.sh`; this README (the
|
|
678
|
+
paragraph above and the two JS rows below); `lanes/docs/ARCHITECTURE.md`; `lanes/docs/DESIGN.md`'s Budgets phone row;
|
|
679
|
+
and the §8 phone row of `docs/superpowers/specs/2026-10-03-lanes-cockpit-design.md`.
|
|
680
|
+
|
|
681
|
+
Equivalent code before E3 (BEY-8667, the commit before E3, 2026-11-19; the lane lead's word of that day: this commit
|
|
682
|
+
first and alone, no behaviour change) moves no cap. The four bare `addEventListener(…)` calls (the `pointerdown` in
|
|
683
|
+
`build()`, `pagehide`, `pageshow` and `zellij:soft-keyboard-visibility`) become `on(W, …)` (−44 B); `classes` names
|
|
684
|
+
`root.classList` for its eight uses (−30 B); the existing `keep(ev)` replaces five `ev.preventDefault()` calls (the
|
|
685
|
+
typing field's input and paste, the sheet's Escape and Tab trap, the lane filter's keys; −55 B); `now()` names
|
|
686
|
+
`Date.now()` (−1 B). `mobile.js` 27 272 -> 27 142 B MEASURED (`wc -c`, 130 B less), and the laptop/tablet download
|
|
687
|
+
27 142 + 3 318 = 30 460 B; nothing it does changes.
|
|
688
|
+
|
|
689
|
+
Coming back to a dead page (BEY-8667 E3, 2026-11-19; [Coming back to a dead
|
|
690
|
+
page](#coming-back-to-a-dead-page-bey-8667-e3) below) takes a named allowance: `JS_RESUME_PAGE` = 985 B, granted by
|
|
691
|
+
the lane lead (hypervibe.lanes) by name on 19 November 2026 at the measured figure (their bound: up to 1 000 B over the
|
|
692
|
+
27 272 B cap), with the equivalent code above paying first. It is a reload made by `mobile.js` alone (the lead's
|
|
693
|
+
ruling E3-R0): the pinned client is never edited, and BEY-8676 tracks the qualified client update. The phone JS cap
|
|
694
|
+
goes from 27 272 B to 28 257 B, and DEF-1569's laptop/tablet ratchet from 30 590 B to 31 575 B. `mobile.js` MEASURED
|
|
695
|
+
28 257 B (`wc -c`), equal to its cap, 1 115 B over the 27 142 B of the commit before and 15 B under the lead's bound
|
|
696
|
+
(1 085 B before the review of E3's commit B, whose fix, a close ending the stale path's doubt and its word, added
|
|
697
|
+
30 B); the laptop/tablet download is 28 257 + 3 318 = 31 575 B, equal to its ratchet. No CSS changed and no CSS
|
|
698
|
+
cap moved (E3-R2: the terminal's dim while the socket is gone is an inline style that `mobile.js` sets);
|
|
699
|
+
`mobile.css` stays 18 945 B.
|
|
700
|
+
|
|
701
|
+
Every copy of the two figures moved in E3's commit, as in E1c-2's: `tests/unit/test_web_view.py`
|
|
702
|
+
(`JS_RESUME_PAGE = 985` in both sums of the phone JS cap, `LAPTOP_TABLET_JS_RATCHET` 31 575, and the module
|
|
703
|
+
docstring's MEASURED history); `tests/unit/test_web.py` (`test_bundle_growth`); `MOBILE_JS_CAP` in
|
|
704
|
+
`tests/unit/test_web_directory.py`, `tests/unit/test_web_inbox.py` and `tests/web/inbox.test.mjs` (with
|
|
705
|
+
`LAPTOP_TABLET_JS_RATCHET` there); the "one byte over its unchanged cap" legs of `tests/web/prove_inbox.sh` and
|
|
706
|
+
`tests/web/prove_directory.sh` (28 257); this README (the budget line above, this paragraph and the two JS rows
|
|
707
|
+
below); `lanes/docs/ARCHITECTURE.md`; `lanes/docs/DESIGN.md`'s Budgets phone row; and the §8 phone row of
|
|
708
|
+
`docs/superpowers/specs/2026-10-03-lanes-cockpit-design.md`. The same commit moves the three fetch counts from 1 to 2
|
|
709
|
+
(`test_web.test_js_timers_unchanged`, `test_web_view.Budget.test_one_timer_one_fetch_no_scroll_time_paint` and the
|
|
710
|
+
event-driven test of `tests/web/activation.test.mjs`), each with an exact pin on `reconnect()`'s line (E3-R4; the
|
|
711
|
+
request rule is above, after the release row).
|
|
712
|
+
|
|
713
|
+
Reopen the last workspace and lane on a laptop (BEY-8667 Ed, 2026-11-20;
|
|
714
|
+
[below](#reopen-the-last-workspace-and-lane-on-a-laptop-bey-8667-ed)) takes a named allowance in `browser.js`, the
|
|
715
|
+
first growth of that file DEF-1569's ratchet takes: `JS_DESKTOP_RESUME` = 994 B, granted by the lane lead by name on
|
|
716
|
+
20 November 2026 at the measured figure. `browser.js` MEASURED 3 318 -> 4 312 B (`wc -c`), 216 B over its 4 096 B
|
|
717
|
+
cap of then, which moves to 4 312 B, exact; the laptop/tablet download is 28 257 + 4 312 = 32 569 B, and the ratchet
|
|
718
|
+
moves from 31 575 B by those 994 B. `mobile.js` and both CSS files are unchanged, so a phone downloads exactly what
|
|
719
|
+
it did. The parts, MEASURED as the bytes each adds (lines with their newlines): the pure `laneDesktopPane()`, 424 B;
|
|
720
|
+
its export, 17 B; the read, the one restore and the write in the desktop `render()`, 464 B; `render()` building the
|
|
721
|
+
model at every state, not only with the bar open, 39 B; `seen`, `wait` and `wrote` on the `let` line, 23 B; a pick
|
|
722
|
+
ending the wait, 17 B; a `go(pane)` helper for the two `FocusPane` sends, 70 B, which saves 50 B at the pick. Not
|
|
723
|
+
taken: dropping the guard that moves nothing when the remembered lane is gone from the current workspace (about
|
|
724
|
+
85 B; the lead kept it). Every copy moved in Ed's commit: `tests/unit/test_web_view.py` (`JS_DESKTOP_RESUME`,
|
|
725
|
+
`BROWSER_JS_CAP`, `LAPTOP_TABLET_JS_RATCHET` and the docstring's MEASURED history), `tests/web/inbox.test.mjs`
|
|
726
|
+
(`LAPTOP_TABLET_JS_RATCHET`), this README (this paragraph and the two rows below), `lanes/docs/ARCHITECTURE.md`,
|
|
727
|
+
`lanes/docs/DESIGN.md`'s Budgets row and the spec's §8 row.
|
|
728
|
+
|
|
729
|
+
Equivalent code before E4 (BEY-8667, the commit before E4, 2026-11-19; the lane lead's ruling E4-R1 of that day: this
|
|
730
|
+
commit first and alone, with its own gate and prove, no behaviour change) moves no cap. Seventeen strict comparisons
|
|
731
|
+
on sixteen lines become `==` or `!=` (−17 B) where both sides are of one type by construction: strings or `undefined`
|
|
732
|
+
(the mode, a key, a tab, card or workspace name, a card's signature, the filter's text), booleans (the keyboard test)
|
|
733
|
+
or elements. None of them compares `null` with `undefined`. `===` and `!==` stay where a side may be `null`, a number
|
|
734
|
+
or of another type, and where a test pins the spelling (`if (mode === 'desktop') return;`, in `test_web_directory.py`
|
|
735
|
+
and `test_web_inbox.py`). `mobile.js` 28 257 -> 28 240 B MEASURED (`wc -c`, 17 B less), and the laptop/tablet download
|
|
736
|
+
28 240 + 4 312 = 32 552 B (on Ed's base); nothing it does changes.
|
|
737
|
+
|
|
738
|
+
Notification and address links (BEY-8667 E4, 2026-11-19; [Notification and address
|
|
739
|
+
links](#notification-and-address-links-bey-8667-e4) below) take a named allowance: `JS_DEEP_LINK` = 149 B, granted by
|
|
740
|
+
the lane lead (hypervibe.lanes) by name on 19 November 2026 (ruling E4-R1), with the equivalent code above paying 17 B
|
|
741
|
+
first. The phone JS cap goes from 28 257 B to 28 406 B, and DEF-1569's laptop/tablet ratchet from 32 569 B to
|
|
742
|
+
32 718 B. `mobile.js` MEASURED 28 406 B (`wc -c`), equal to its cap, 166 B over the 28 240 B of the commit before. The
|
|
743
|
+
parts, MEASURED as the bytes each adds (lines with their newlines, a line diff of the two files): the read of `?ws=`
|
|
744
|
+
in `connect()`, 66 B; the query's lane list chosen before the remembered tab, 23 B; the query taken out of the
|
|
745
|
+
address, 77 B. The laptop/tablet download is 28 406 + 4 312 = 32 718 B, equal to its ratchet (`browser.js` 4 312 B
|
|
746
|
+
unchanged). No CSS changed and no CSS cap moved; `mobile.css` stays 18 945 B. No request is added, so no fetch count
|
|
747
|
+
moves.
|
|
748
|
+
|
|
749
|
+
Every copy of the two figures moved in E4's commit, as in E3's: `tests/unit/test_web_view.py` (`JS_DEEP_LINK = 149`
|
|
750
|
+
in both sums of the phone JS cap, `LAPTOP_TABLET_JS_RATCHET` 32 718, and the module docstring's MEASURED history);
|
|
751
|
+
`tests/unit/test_web.py` (`test_bundle_growth`); `MOBILE_JS_CAP` in `tests/unit/test_web_directory.py`,
|
|
752
|
+
`tests/unit/test_web_inbox.py` and `tests/web/inbox.test.mjs` (with `LAPTOP_TABLET_JS_RATCHET` there); the "one byte
|
|
753
|
+
over its unchanged cap" legs of `tests/web/prove_inbox.sh` and `tests/web/prove_directory.sh` (28 406); this README
|
|
754
|
+
(the budget line above, this paragraph and the two JS rows below); `lanes/docs/ARCHITECTURE.md`;
|
|
755
|
+
`lanes/docs/DESIGN.md`'s Budgets phone row; and the §8 phone row of
|
|
756
|
+
`docs/superpowers/specs/2026-10-03-lanes-cockpit-design.md`.
|
|
757
|
+
|
|
758
|
+
Equivalent code before E5 (BEY-8667, the commit before E5, 2026-11-19; the lane lead's ruling E5-R0 of that day: this
|
|
759
|
+
commit first and alone, with its own gate and prove, no behaviour change) moves no cap. Six strict comparisons become
|
|
760
|
+
`==` or `!=` (−6 B) by the rule of the commit before E4 (both sides of one type by construction, none comparing `null`
|
|
761
|
+
with `undefined`): the two `typeof` tests, whose sides are both strings, `t != seen` and `v != view` (strings from
|
|
762
|
+
`at()`, or undefined before the first), `restoring?.name != tab.name` and `tabKey() != lastKey`. `tab.name !==
|
|
763
|
+
lastTab`, `act() === controls.at(…)` and `quick !== quickOn` stay strict. `mobile.js` 28 406 -> 28 400 B MEASURED (`wc
|
|
764
|
+
-c`, 6 B less), and the laptop/tablet download 28 400 + 4 312 = 32 712 B; nothing it does changes.
|
|
765
|
+
|
|
766
|
+
Moving between workspaces (BEY-8667 E5a, 2026-11-19; [Moving between
|
|
767
|
+
workspaces](#moving-between-workspaces-bey-8667-e5a) below) takes a named allowance: `JS_WORKSPACE_MOVES` = 362 B,
|
|
768
|
+
granted by the lane lead (hypervibe.lanes) by name on 19 November 2026, with the equivalent code above paying 6 B
|
|
769
|
+
first. The phone JS cap goes from 28 406 B to 28 768 B, and DEF-1569's laptop/tablet ratchet from 32 718 B to
|
|
770
|
+
33 080 B. `mobile.js` MEASURED 28 768 B (`wc -c`), equal to its cap, 368 B over the 28 400 B of the commit before. The
|
|
771
|
+
parts, MEASURED as the bytes each adds (lines with their newlines, a line diff of the two files): the **Lanes**
|
|
772
|
+
toggle, 44 B; a row's click, 56 B; `focusTab()`'s second tab, the row's own, 28 B; `tabNamed()`, which `pickerTab()`
|
|
773
|
+
now calls, 36 B; the map in the memory, 35 B (`mem` for `lastTab` on the third `let` line, 7 B; the write in
|
|
774
|
+
`refresh()`, 13 B; the read in `connect()`, 15 B); `panesAt()`, 42 B; and the hide of **Panes** and the span of
|
|
775
|
+
**Type here** in `refresh()`, 127 B. The laptop/tablet download is 28 768 + 4 312 = 33 080 B, equal to its ratchet
|
|
776
|
+
(`browser.js` 4 312 B unchanged). No CSS changed and no CSS cap moved (ruling E5-R9: the span is an inline style that
|
|
777
|
+
`mobile.js` sets); `mobile.css` stays 18 945 B. No request is added, so no fetch count moves. The **Workspaces** count
|
|
778
|
+
of what needs you elsewhere is E5b's (ruling E5-R13) and is not in these bytes.
|
|
779
|
+
|
|
780
|
+
Every copy of the two figures moved in E5a's commit, as in E4's: `tests/unit/test_web_view.py`
|
|
781
|
+
(`JS_WORKSPACE_MOVES = 362` in both sums of the phone JS cap, `LAPTOP_TABLET_JS_RATCHET` 33 080, and the module
|
|
782
|
+
docstring's MEASURED history); `tests/unit/test_web.py` (`test_bundle_growth`); `MOBILE_JS_CAP` in
|
|
783
|
+
`tests/unit/test_web_directory.py`, `tests/unit/test_web_inbox.py` and `tests/web/inbox.test.mjs` (with
|
|
784
|
+
`LAPTOP_TABLET_JS_RATCHET` there); the "one byte over its unchanged cap" legs of `tests/web/prove_inbox.sh` and
|
|
785
|
+
`tests/web/prove_directory.sh` (28 768); this README (the budget line above, this paragraph and the two JS rows
|
|
786
|
+
below); `lanes/docs/ARCHITECTURE.md`; `lanes/docs/DESIGN.md`'s Budgets phone row; and the §8 phone row of
|
|
787
|
+
`docs/superpowers/specs/2026-10-03-lanes-cockpit-design.md`.
|
|
788
|
+
|
|
789
|
+
Typed letters go through the no-connection guard (BEY-8667 E7a, 2026-11-21; [Typed letters and the no-connection
|
|
790
|
+
guard](#typed-letters-and-the-no-connection-guard-bey-8667-e7a) below) take a named allowance: `JS_TYPED_GUARD` =
|
|
791
|
+
149 B, granted by the lane lead (hypervibe.lanes) by name on 21 November 2026 at the figure measured at the fix
|
|
792
|
+
commit, because the defect is reachable (a typed letter lost with no word). No equivalent code comes first. The phone
|
|
793
|
+
JS cap goes from 28 768 B to 28 917 B, and DEF-1569's laptop/tablet ratchet from 33 080 B to 33 229 B. `mobile.js`
|
|
794
|
+
MEASURED 28 917 B (`wc -c`), equal to its cap: the two lines of the wrapper in `connect()`, 149 B. The laptop/tablet
|
|
795
|
+
download is 28 917 + 4 312 = 33 229 B, equal to its ratchet (`browser.js` 4 312 B unchanged). No CSS changed, no word
|
|
796
|
+
is new, and no request is added. Every copy of the two figures moved in E7a's commit, as in E5a's:
|
|
797
|
+
`tests/unit/test_web_view.py` (`JS_TYPED_GUARD = 149` in both sums, `LAPTOP_TABLET_JS_RATCHET`, the docstring),
|
|
798
|
+
`tests/unit/test_web.py`, `MOBILE_JS_CAP` in `tests/unit/test_web_directory.py`, `tests/unit/test_web_inbox.py` and
|
|
799
|
+
`tests/web/inbox.test.mjs` (with its ratchet), the one-byte-over legs of `tests/web/prove_inbox.sh` and
|
|
800
|
+
`tests/web/prove_directory.sh` (28 917), this README (the budget line, this paragraph and the two JS rows),
|
|
801
|
+
`lanes/docs/ARCHITECTURE.md`, `lanes/docs/DESIGN.md`'s Budgets phone row and the spec's §8 phone row.
|
|
802
|
+
|
|
803
|
+
A pinch kept and page zoom (BEY-8667 E9, 2026-11-21; [A pinch kept, and page
|
|
804
|
+
zoom](#a-pinch-kept-and-page-zoom-bey-8667-e9) below) take a named allowance: `JS_TEXT_SIZE` = 251 B, granted by the
|
|
805
|
+
lane lead (hypervibe.lanes) by name on 21 November 2026 at the figure measured at the fix commit. No equivalent code
|
|
806
|
+
comes first. The phone JS cap goes from 28 917 B to 29 168 B, and DEF-1569's laptop/tablet ratchet from 33 229 B to
|
|
807
|
+
33 480 B. `mobile.js` MEASURED 29 168 B (`wc -c`), equal to its cap: the pinch listener, `setFont()` shared with the
|
|
808
|
+
A−/A+ buttons (their click shrinks), the store written only when the size changes, and viewport()'s zoom guard, 251 B.
|
|
809
|
+
The laptop/tablet download is 29 168 + 4 312 = 33 480 B, equal to its ratchet (`browser.js` 4 312 B unchanged). No CSS
|
|
810
|
+
changed, no word is new, no request is added. Every copy moved in E9's commit, as in E7a's.
|
|
811
|
+
|
|
276
812
|
| File | Cap | MEASURED (`wc -c`) | Bound by |
|
|
277
813
|
| --- | --- | --- | --- |
|
|
278
|
-
| `mobile.js` |
|
|
279
|
-
| `mobile.css` | 18 982 B | 18 945 B | spec §8 phone row |
|
|
280
|
-
| `browser.js` | 4
|
|
281
|
-
| `browser.css` | 2 048 B | 1 947 B | `test_web_view.BROWSER_CSS_CAP` |
|
|
282
|
-
| `mobile.js` + `browser.js` |
|
|
283
|
-
| `mobile.css` + `browser.css` | 20 993 B | 20 892 B | DEF-1569's CSS twin, `LAPTOP_TABLET_CSS_CAP` |
|
|
284
|
-
| `directory.js` (on demand) | 60
|
|
814
|
+
| `mobile.js` | 29 168 B | 29 168 B (2026-11-21, BEY-8667 E9, `JS_TEXT_SIZE` 251 B by the lead's grant; 28 917 B the same day, BEY-8667 E7a, `JS_TYPED_GUARD` 149 B by the lead's grant; 28 768 B on 2026-11-19, BEY-8667 E5a, `JS_WORKSPACE_MOVES` 362 B by the lead's grant; 28 400 B the same day, equivalent code before E5; 28 406 B the same day, E4, `JS_DEEP_LINK` 149 B by the lead's grant; 28 240 B the same day, equivalent code before E4; 28 251 B the same day, E3, `JS_RESUME_PAGE` 985 B by the lead's grant, 30 B of it the review's fix; 27 142 B the same day, equivalent code before E3; 27 272 B the same day, E1c-2, `JS_RESUME_TAB` 247 B by the lead's grant; 26 723 B the same day, the listener helper; 27 022 B the same day, E1b-1; 26 992 B the same day, E1a; 27 025 B on 2026-11-18, BEY-8609 slice 2b; 26 771 B the same day, slice 2a; 26 333 B on 2026-11-17, slice 1; 24 709 B on 2026-11-01, W30-B) | spec §8 phone row, `test_web.test_bundle_growth`, `test_web_view` `JS_IDENTITY_AND_WORDS` and `JS_NO_CONNECTION_ENDS_AT_OPEN` |
|
|
815
|
+
| `mobile.css` | 18 982 B | 18 945 B (2026-11-19, BEY-8667 E1a; 18 942 B on 2026-11-18, BEY-8609 slices 2a and 2b; 18 945 B before) | spec §8 phone row |
|
|
816
|
+
| `browser.js` | 4 312 B | 4 312 B (2026-11-20, BEY-8667 Ed, `JS_DESKTOP_RESUME` 994 B by the lead's grant; 3 318 B before, under a 4 096 B cap) | `test_web_view.BROWSER_JS_CAP` |
|
|
817
|
+
| `browser.css` | 2 048 B | 2 043 B (2026-11-18, BEY-8609 slice 2b; 1 947 B before) | `test_web_view.BROWSER_CSS_CAP` |
|
|
818
|
+
| `mobile.js` + `browser.js` | 33 480 B | 33 480 B (2026-11-21, BEY-8667 E9; 33 229 B the same day, BEY-8667 E7a; 33 080 B on 2026-11-20, BEY-8667 E5a; 32 712 B the same day, equivalent code before E5; 32 718 B the same day, E4; 32 552 B the same day, equivalent code before E4; 32 569 B the same day, Ed; 31 575 B on 2026-11-19, BEY-8667 E3; 30 460 B the same day, equivalent code before E3; 30 590 B the same day, E1c-2; 30 041 B the same day, the listener helper; 30 340 B the same day, E1b-1; 30 310 B the same day, E1a; 30 343 B on 2026-11-18, BEY-8609 slice 2b; 30 089 B the same day, slice 2a; 29 651 B on 2026-11-17, slice 1; 28 027 B on 2026-11-01, W30-B) | DEF-1569, `LAPTOP_TABLET_JS_RATCHET` |
|
|
819
|
+
| `mobile.css` + `browser.css` | 20 993 B | 20 988 B (2026-11-19, BEY-8667 E1a; 20 985 B on 2026-11-18, BEY-8609 slice 2b; 20 889 B after slice 2a; 20 892 B before) | DEF-1569's CSS twin, `LAPTOP_TABLET_CSS_CAP` |
|
|
820
|
+
| `directory.js` (on demand) | 60 427 B (exact) | 60 427 B (2026-11-08, the third section's title; 60 417 B on 2026-11-03, INT-1 FC-X22; 60 239 B on 2026-10-30) | `test_web_directory.DIRECTORY_JS_CAP` |
|
|
285
821
|
| `directory.css` (on demand) | 7 394 B (exact) | 7 394 B (2026-10-30) | `test_web_directory.DIRECTORY_CSS_CAP` |
|
|
822
|
+
| `links.js` (on demand) | 5 432 B (exact) | 5 432 B (2026-11-19, PR 1150's review, the lane lead's named grant; 5 397 B the same day, BEY-8667 E1b-1; 8 609 B with comments and 3 241 B in its first build the same day) | `test_web_view.LINKS_JS_CAP` |
|
|
286
823
|
| `inbox.js` (on demand) | 72 864 B (exact) | 72 864 B (2026-11-05, FC-I-6 builds panel members; 72 626 B on 2026-11-02, review repair after BEY-7130, dev-container) | `test_web_inbox.INBOX_JS_CAP`, `tests/web/inbox.test.mjs` `INBOX_JS_CAP` |
|
|
287
824
|
|
|
825
|
+
### Keyboard strip and Keys panel (BEY-8609 slice 2a)
|
|
826
|
+
|
|
827
|
+
The owner's review of 17 November 2026 asks for one keyboard accessory strip while typing, with the less common keys
|
|
828
|
+
in a deliberate panel behind a labelled **Keys** control (its sections 3 and 2B). The slice 2 plan of 18 November 2026
|
|
829
|
+
answers it. This slice builds the plan's decisions D1 to D6, D8 and D12 and the
|
|
830
|
+
`aria-pressed` mirror for CTRL and ALT. The header rebuild and its status line, standing refusals, spoken words and
|
|
831
|
+
the workspace list (D7, D9, D10, D11) are slice 2b: in slice 2a the header kept its 58 px, its brand and its subtitle
|
|
832
|
+
([Header, words and workspace list](#header-words-and-workspace-list-bey-8609-slice-2b) has what slice 2b made of
|
|
833
|
+
it; the figures below give the 64 px header first, then slice 2a's). Every
|
|
834
|
+
pixel figure here is calculated from `mobile.css` by the node suite's CSS model ([tests/README.md](../tests/README.md)),
|
|
835
|
+
for a 440 × 956 phone with a 346 px keyboard assumed. None was measured on a device, and nothing here was checked in
|
|
836
|
+
Safari or on an iPhone.
|
|
837
|
+
|
|
838
|
+
**One strip** (D1, `buildQuickRow()`, `.lanes-quick`). On a lane tab the strip is `⏎ ↑ ↓ Esc ^C Keys`, named Enter,
|
|
839
|
+
Up, Down, Escape, Control C and, by its visible word, Keys. At a picker prompt it is `⏎ y Esc`, and `y` is named
|
|
840
|
+
"Send y". The strip lies directly on the dock (its top is the viewport height less the dock and the strip) and sits
|
|
841
|
+
above it in the stacking order (`z-index` 511, the dock 510). Its keys are columns placed by `grid-auto-flow: column`
|
|
842
|
+
at `1fr` each, so the three prompt keys fill the row. The strip no longer scrolls sideways: `overflow-x` and its two
|
|
843
|
+
companions are gone. Reading on a lane, the bars take 194 px (header 64, strip 48, dock 66, 16); with slice 2a's 58 px
|
|
844
|
+
header they took 188 px, as before slice 2a.
|
|
845
|
+
|
|
846
|
+
**One band while typing** (D2, CSS only). While a phone types in **Type here** (`lanes-keyboard` on `<html>` and
|
|
847
|
+
`is-typing` on the field), one rule sets `--lanes-quick: 0px !important`: the strip folds onto the dock's band, so one
|
|
848
|
+
row of keys sits on the keyboard. `!important` is needed because `refresh()` writes `48px` inline. The dock and the
|
|
849
|
+
capture input never move, hide or resize: the strip covers the dock while the keyboard is up, and the capture input
|
|
850
|
+
keeps the focus under it. The bars then take 128 px (header 64, strip 48, 16; 122 px with slice 2a's 58 px header)
|
|
851
|
+
where they took 218 px; in landscape 112 px where they took 208 px. The `:has(.is-typing)` part keeps the fold off
|
|
852
|
+
while the picker's lane filter has the keyboard: the strip then stays above the dock, the filter stays uncovered, and
|
|
853
|
+
the bars take 176 px (170 px with the 58 px header).
|
|
854
|
+
`html.lanes-keyboard` no longer sets `--lanes-keys`, so upstream's modifier bar no longer rises with the keyboard.
|
|
855
|
+
|
|
856
|
+
**Paste while typing** (D3). From this slice until E1a (BEY-8667), on a phone **Paste** was the strip's first key, and
|
|
857
|
+
`mobile.css` drew it only under `lanes-keyboard`, in the place of `⏎` (the keyboard has its own Return). The rule that
|
|
858
|
+
hid `⏎` was `.lanes-keyboard :not([hidden])+[aria-label=Enter]`: `⏎` gave way only to a Paste drawn right before it. A
|
|
859
|
+
picker hides Paste, so a prompt kept `⏎ y Esc` whichever field had the keyboard. Paste kept its handler, its `at()` at
|
|
860
|
+
the tap, its words and its `mousedown` cancel. A tablet kept **Paste** in the header and `⏎` on the strip. (Changed in
|
|
861
|
+
E1a, BEY-8667: the owner's words of 19 November 2026, "the current legacy mobile experience have no copy paste", and
|
|
862
|
+
the lane lead's ruling R2 of that day reverse D3. On a phone **Paste** is in the header beside **Copy** again, as on a
|
|
863
|
+
tablet, drawn with the keyboard down or up; `⏎` stays on the strip while typing, and both rules of this decision are
|
|
864
|
+
gone; [Copy and paste in the header](#copy-and-paste-in-the-header-bey-8667-e1a).)
|
|
865
|
+
|
|
866
|
+
**The Keys panel** (D4, D5). **Keys** toggles `lanes-keys-open` on `<html>` (`openKeys()`). That class shows
|
|
867
|
+
upstream's modifier bar (`.zj-mobile-modbar`) as a panel directly above the strip and sets `--lanes-keys: 48px`, with
|
|
868
|
+
or without the keyboard. The panel reads `y TAB CTRL ALT ← → n`: the shell's own `y` and `n` buttons at its two ends
|
|
869
|
+
and upstream's `TAB`, `CTRL`, `ALT`, `←` and `→` between them. Its `ESC`, `↑` and `↓` cells are hidden (the strip has
|
|
870
|
+
them), and so is `-` (the keyboard has it). That rule is scoped to the built shell
|
|
871
|
+
(`.lanes-ready :is([data-cell=esc], [data-cell=up], [data-cell=down], [data-cell=minus])`): `index.html` loads
|
|
872
|
+
`mobile.css` on every device, and where the shell is not built while upstream's own mobile UI is active (Lanes'
|
|
873
|
+
desktop mode, a fine pointer, with a user agent upstream reads as mobile or upstream's stored `on`; for example an
|
|
874
|
+
Android tablet with a mouse) upstream's bar keeps
|
|
875
|
+
all nine cells (the node suite's desktop-page test). **Keys** carries `aria-expanded`, cancels `mousedown` and calls no
|
|
876
|
+
`focus()`, so a tap keeps the keyboard open. The panel stays open until **Keys** is tapped again or the view changes:
|
|
877
|
+
`refresh()` closes it whenever the mode (lane tab, prompt, none) or `at()` changes (the tab, the plugin flag, the
|
|
878
|
+
pane: the identity slice 1 binds waiting input to). So a panel left open on one lane never leaves `y` one stray tap
|
|
879
|
+
from another lane's prompt (the path owner's condition P1). Closing clicks every `.zj-armed` cell, so no hidden CTRL
|
|
880
|
+
or ALT is left to change the next typed letter. `refresh()` copies upstream's `getState().armed` into
|
|
881
|
+
`aria-pressed` on the `CTRL` and `ALT` cells; the read is guarded (`armed?.`), so a client state without `armed`
|
|
882
|
+
reads not pressed and the refresh still writes the title and the cards. With the panel open the bars take 176 px
|
|
883
|
+
while typing and 242 px while reading (170 and 236 px with slice 2a's 58 px header).
|
|
884
|
+
|
|
885
|
+
**y and n alike** (D6). One tap, or one ordinary activation, sends one byte. They have the same class, no red, and
|
|
886
|
+
the names "Send y" and "Send n" (never Yes, Approve or Allow). This is the plan's decision O1, taken by the path owner
|
|
887
|
+
hypervibe.lanes on 18 November 2026: until this slice `n` needed a 400 ms hold or a second press. `^C` stays on the
|
|
888
|
+
strip (decision O4) and keeps its 400 ms hold, its `Press again to send` and its red. The panel's `y` and `n` go
|
|
889
|
+
through `send()` and `sendFn` like the strip's keys, so an armed CTRL or ALT merges into them as into a typed letter:
|
|
890
|
+
CTRL then `y` sends Ctrl+Y (`\x19`), and the merge releases the modifier. The Keys panel's `y` and `n` honour an armed
|
|
891
|
+
CTRL or ALT as a typed letter does; the path owner may rule that they always send plain `y` and `n` (the question is
|
|
892
|
+
on BEY-8623). The strip's `⏎`, `↑`, `↓`, `Esc` and `^C` are not one printable character, so upstream's merge passes
|
|
893
|
+
them unchanged and an armed CTRL or ALT stays lit after them (read in `installKeyMergeHook`). In the panel, upstream's
|
|
894
|
+
`←` and `→` take CTRL and ALT, and its `TAB` takes only ALT: CTRL then `TAB` sends a plain Tab and still turns CTRL
|
|
895
|
+
off (`serializeKey`, read in the pinned `app.js`).
|
|
896
|
+
|
|
897
|
+
**Done** (D8, decision O2). While the software keyboard is up, a **Done** button (its visible word, no `aria-label`)
|
|
898
|
+
shows in the header in the place of **More**, which is hidden then. The plan places Done in slice 2b's rebuilt
|
|
899
|
+
header; fitted to slice 2a's header, it is one more header button after **Copy**, shown only under `lanes-keyboard`,
|
|
900
|
+
and slice 2b keeps it there. (Changed in E1a, BEY-8667: on a phone it now follows **Paste**, which is back in the
|
|
901
|
+
header after **Copy**.)
|
|
902
|
+
Done cancels `mousedown`, and its click runs the two blur lines `openSheet()` uses (`unfocus()`: the capture input's
|
|
903
|
+
`blur()`, then the focused element's). So it closes the keyboard from **Type here** and from the lane filter alike,
|
|
904
|
+
and it calls no `focus()`. On a tablet `build()` puts the dock into the header before **Done** (`done.before(dock)`),
|
|
905
|
+
so the header reads the names (brand and title until slice 2b), **Copy**, **Paste**, the dock, **Done**, **More**,
|
|
906
|
+
then (since slice 2b) the status line, and **Done** takes **More**'s place after the dock when the keyboard comes up
|
|
907
|
+
(the node suite's tablet header test). Until the completeness review of
|
|
908
|
+
18 November 2026 the dock stood before **More** and after **Done**, so a keyboard coming up moved the dock, with the
|
|
909
|
+
focused **Type here** in it, one place along. The dock now keeps its place while **Done** is no wider than **More**'s
|
|
910
|
+
48 px; the word's width is not measured, and a wider **Done** moves the dock left by the difference (INFERRED from the
|
|
911
|
+
flex rules: the title takes what is left).
|
|
912
|
+
|
|
913
|
+
**Narrow phones** (D12). There is no width media query. From the declared minimums the strip needs
|
|
914
|
+
16 + 6 × 44 + 5 × 4 + 16 = 316 px and the panel 7 × 44 = 308 px, so both fit at 320 px, where a key is about
|
|
915
|
+
44.7 px wide. In this slice a phone's header had no Paste, so the names got 136 px at 320 px (78 px before this slice),
|
|
916
|
+
and 180 px once slice 2b took the brand and its gap away. (Changed in E1a, BEY-8667: **Paste** is in a phone's header
|
|
917
|
+
again, so the names get 122 px at 320 px, calculated.) The text widths of the names and of the word Done are not
|
|
918
|
+
measured. Target sizes, calculated from the declared CSS and not
|
|
919
|
+
measured: a strip key is 44 px high and (width − 32 − 5 × 4) / 6 wide, 44.7 px at 320 px and 53.8 px at 375 px; a
|
|
920
|
+
panel cell is 48 px high and width / 7 wide, 45.7 px at 320 px; **Done** is at least 48 × 48 px.
|
|
921
|
+
|
|
922
|
+
**Lost on purpose.** CTRL or ALT with `↑` or `↓`, and ALT with `Esc` (the client's ESC cell never read CTRL): those
|
|
923
|
+
keys are on the strip now and do not pass through upstream's modifier cells, so an armed modifier does not reach them
|
|
924
|
+
(before, the bar's own `↑` honoured an armed CTRL); BEY-8623 carries it. The `-` cell: the keyboard has `-`. The modifier bar no longer rises with the keyboard: it
|
|
925
|
+
shows only while **Keys** is open. Also lost; each is described above as part of the layout:
|
|
926
|
+
|
|
927
|
+
- `n`'s 400 ms hold. With the panel left open, a stray tap on `y` or `n` sends it to whatever is current in that view
|
|
928
|
+
(the panel closes at any change of view, P1, so not to another lane's prompt).
|
|
929
|
+
- One tap to `y` on a lane tab: the first time it takes two, **Keys** and then `y`.
|
|
930
|
+
- On a phone, **Paste** with the keyboard down: there was none until **Type here** was tapped. (Changed in E1a,
|
|
931
|
+
BEY-8667: given back. Paste is in a phone's header with the keyboard down or up.)
|
|
932
|
+
- One tap to `TAB`, `CTRL`, `ALT`, `←` and `→`, with the keyboard up or down: **Keys** comes first.
|
|
933
|
+
- While a phone types: **More**'s menu (Text size, Docs, the theme) and the dock's **Workspaces**, **Lanes**, **Panes**
|
|
934
|
+
and **Type here** are out of reach until **Done**; the title (since slice 2b the workspace and lane names) still
|
|
935
|
+
opens the workspace sheet.
|
|
936
|
+
|
|
937
|
+
Not changed in this slice, and waiting for their owner's dated amendment: the parity manifest's row E33
|
|
938
|
+
(`docs/contracts/lanes2/manifests/parity.json`), the Lanes 2.0 specification
|
|
939
|
+
(`docs/superpowers/specs/2026-10-25-lanes-2.0-continuous-workspace.md`) and `docs/contracts/lanes2/manifests/keymap.json`
|
|
940
|
+
still name a hold for `n`. The E33 test keeps its title byte for byte until then.
|
|
941
|
+
|
|
942
|
+
**`:has()` on older Safari.** The fold is the shell's one `:has()` rule. Safari reads `:has()` from 15.4 (INFERRED
|
|
943
|
+
from public documentation, not checked on a device). An older Safari drops the whole rule with the unknown selector,
|
|
944
|
+
so the strip stays above the dock while typing and two bands stand, the strip and the dock (INFERRED): the bars take
|
|
945
|
+
176 px (header 64, strip 48, dock 48, 16; 170 px with slice 2a's 58 px header; calculated by the same sums). Before this slice typing showed three bands,
|
|
946
|
+
the dock, the modifier bar and the quick row, 218 px. The modifier bar still shows only behind **Keys**, and **Paste**
|
|
947
|
+
and **Done** still show, because their rules do not use `:has()`. (Changed in E1a, BEY-8667: no rule draws a phone's
|
|
948
|
+
**Paste** by the keyboard now; it is in the header on a lane tab, keyboard or not.) The merged `display: none` rule does use `:is()`
|
|
949
|
+
since the completeness review (the four cells' scope). Safari reads `:is()` from 14 (INFERRED from public
|
|
950
|
+
documentation). `mobile.js` itself needs Safari 14 (`&&=` and `||=`, in the file since before this slice), so on an
|
|
951
|
+
older Safari the script does not parse, the shell is not built and this rule has nothing to hide: the scope adds no
|
|
952
|
+
new floor (INFERRED, not checked on a device).
|
|
953
|
+
|
|
954
|
+
Limits, INFERRED from the code and not seen on a device:
|
|
955
|
+
|
|
956
|
+
- Below 316 px the strip is cut off at its right edge and cannot scroll.
|
|
957
|
+
- Whether the word "Keys" fits its 44.7 px key at 320 px with the browser's own button padding is a device check.
|
|
958
|
+
- If Safari pans the visual viewport for the keyboard instead of shrinking it, `viewport()` never sets
|
|
959
|
+
`lanes-keyboard`: there is then no single band and no Done, and until E1a there was no Paste either (the runbook's
|
|
960
|
+
device check 25). Since E1a (BEY-8667) Paste is in the header whether or not `lanes-keyboard` is set.
|
|
961
|
+
- A phone with a hardware keyboard and no software keyboard never gets `lanes-keyboard`, so until E1a it never showed
|
|
962
|
+
Paste (plan D3). Cmd+V into **Type here** still pastes, through the field's `paste` handler. (Changed in E1a,
|
|
963
|
+
BEY-8667: the header's **Paste** is drawn with a hardware keyboard too.)
|
|
964
|
+
- `TAB`, `←` and `→` in the panel are upstream's cells and bypass `send()`. On a closed socket they show no refusal
|
|
965
|
+
word and are not counted as unanswered input (`unacked`); only the standing `Disconnected` tells (device check 31).
|
|
966
|
+
- With no `.zj-mobile-modbar` to take them (a later client that renames the bar), `y` and `n` stay in the strip. A lane
|
|
967
|
+
tab hides both and the panel is upstream's cells alone; at a picker prompt a second `y` shows beside the first.
|
|
968
|
+
- While a phone types, the strip covers the dock: **Workspaces**, **Lanes**, **Panes** and **Type here** cannot be
|
|
969
|
+
touched until **Done**. They stay in the accessibility tree, and what a VoiceOver activation of a covered dock button
|
|
970
|
+
does (it may land on the strip key drawn over it) is not known (device step 36).
|
|
971
|
+
- The panel is upstream's bar inside `#zj-mobile-root`, which the client appends to `<body>` when it starts, before
|
|
972
|
+
`build()` appends `#lanes-shell`. So in reading and Tab order the panel comes before the header, far from **Keys**.
|
|
973
|
+
**Keys** has `aria-expanded` and no `aria-controls`. The plan names this as the loss of its decision O5.
|
|
974
|
+
- The panel's `←` and `→` are upstream's cells: their text is the arrow and they have no name (the strip's `↑` and `↓`
|
|
975
|
+
are named Up and Down). `TAB`, `CTRL` and `ALT` keep upstream's text.
|
|
976
|
+
- The plan's Chromium calibration job (stub A at 320, 375, 390 and 440 px) was not run: the repository has no browser
|
|
977
|
+
driver. The layout figures above rest on the CSS model alone.
|
|
978
|
+
|
|
979
|
+
### Header, words and workspace list (BEY-8609 slice 2b)
|
|
980
|
+
|
|
981
|
+
The owner's review of 17 November 2026 asks that the header identify the work, that a refusal stay readable, that the
|
|
982
|
+
workspace and the lane stay visible while disconnected, and that the workspace rows hold still during updates (its
|
|
983
|
+
sections 2A, 2C and 3). This slice builds the slice 2 plan's decisions D7, D9, D10 and D11. The path owner
|
|
984
|
+
hypervibe.lanes took its open decisions O6 (**Copy** stays in the header) and O7 (the reload note stands). Every pixel
|
|
985
|
+
figure here is calculated from `mobile.css` (and `browser.css` for a tablet) by the node suite's CSS model
|
|
986
|
+
([tests/README.md](../tests/README.md)). None was measured on a device, and nothing here was checked in Safari or on an
|
|
987
|
+
iPhone.
|
|
988
|
+
|
|
989
|
+
**The header** (D7, `build()`). There is no brand image. The first row is one button, `button.lanes-context`: the
|
|
990
|
+
workspace (`strong`), a space, and the lane (`span`, the lane line). The button is a flex column, so the first row
|
|
991
|
+
holds two lines of text, the workspace above the lane; the status line under them is the third line a person sees. **Copy** follows it, then **More**, or **Done**
|
|
992
|
+
in **More**'s place while a phone types. (Changed in E1a, BEY-8667: on a phone **Paste** follows **Copy**, then **Done**
|
|
993
|
+
or **More**.) The button has no `aria-label`, so its name is its content, for example
|
|
994
|
+
"Sakio api server" (the node suite reads it so; what VoiceOver says is a device check). It has
|
|
995
|
+
`aria-haspopup="dialog"`, because it opens the workspace sheet. The second row is the status line,
|
|
996
|
+
`output.lanes-status` with `aria-live="polite"`. It is built empty, sits outside the button, and is 12 px on one line
|
|
997
|
+
cut with an ellipsis, 15 px high whether a word is up or not. Its width is the header's less its padding: 296 px at
|
|
998
|
+
320 px, 351 px at 375 px. `--lanes-head` is 64 px (58 px until this slice): row 1 is 48 px, row 2 is 15 px, and the
|
|
999
|
+
bottom border 1 px. Because the status line has a height of its own, row 1 does not move when a word comes or goes
|
|
1000
|
+
(without it the empty line was 0 px high and row 1 moved 3.75 px, INFERRED from the Flexbox rules; the review's F5).
|
|
1001
|
+
The lane line shows only the lane: the active pane's title on a lane tab, the picker's counts (`◆1 ◇2`) or
|
|
1002
|
+
`Choose a lane to continue` on a picker tab, and `Your workspace` when the pane has no title. No word is written there.
|
|
1003
|
+
On a lane tab, the pane's title is the lane's title since E6 (BEY-8667), as `view.sh` writes it. Until E6 the lane tab's
|
|
1004
|
+
pane carried its workspace's name, which Zellij reports instead (DEF-1531), so this line repeated the workspace.
|
|
1005
|
+
|
|
1006
|
+
Widths, calculated from the declared minimums with no safe areas: from this slice until E1a, on a phone the names got
|
|
1007
|
+
W − 140 px (W − 16 − 8 − 48 − 48 − 2 × 10): 180 px at 320 px, 235 px at 375 px, 250 px at 390 px and 300 px at 440 px.
|
|
1008
|
+
The brand took 44 px of that (34 px and a 10 px gap). (Changed in E1a, BEY-8667: with **Paste** in the row the names
|
|
1009
|
+
get W − 198 px (W − 16 − 8 − 3 × 48 − 3 × 10): 122 px at 320 px, 177 px at 375 px, 192 px at 390 px and 242 px at
|
|
1010
|
+
440 px.) While a phone types, **Done** stands in **More**'s place; its width is its
|
|
1011
|
+
word's, which the model does not measure, so the typing figure is not computed.
|
|
1012
|
+
|
|
1013
|
+
In landscape (at most 500 px high) the header keeps one 48 px row (`flex-wrap: nowrap`), and the status line stands in
|
|
1014
|
+
it after the buttons, as wide as its word (`width: auto`). The empty status line still costs one 10 px gap, so the
|
|
1015
|
+
names got W − 150 px, 806 px at 956 px, until E1a. (Changed in E1a, BEY-8667: with **Paste** in the row the names get
|
|
1016
|
+
W − 208 px (W − 16 − 8 − 3 × 48 − 4 × 10), 748 px at 956 px.)
|
|
1017
|
+
|
|
1018
|
+
On a tablet `browser.css` keeps the header one row, as before this slice (`.lanes-tablet .lanes-header { flex-wrap:
|
|
1019
|
+
nowrap; }` and `.lanes-tablet .lanes-status { width: auto; }`; the review's F6). It reads the names, **Copy**,
|
|
1020
|
+
**Paste**, the dock, **Done** or **More**, then the status line with its word. A tablet's header is 64 px high too
|
|
1021
|
+
(58 px before), with its 48 px row centred. Whether that row fits a narrow tablet (an iPad in Split View, 678 px) is
|
|
1022
|
+
not shown: the dock's width is its content's, which the model does not measure. It was not shown before this slice
|
|
1023
|
+
either. On a tablet, as in landscape, the status line is as wide as its word and takes that width from the names: the
|
|
1024
|
+
names are `flex: 1` with `min-width: 0`, and the status line keeps its width until the names have none left. The
|
|
1025
|
+
completeness review of this slice estimated that on a lane tab at 744 px (an iPad mini in portrait) the names and the
|
|
1026
|
+
word share about 83 px, and about 160 px at 820 px; `Check last input` needs about 92 px and `Not sent: no
|
|
1027
|
+
connection` about 135 px at 12 px (INFERRED from estimated text and dock widths, not measured). So on a portrait iPad
|
|
1028
|
+
a standing word can leave the names little or no room, and the review's 2C (the workspace and the lane stay readable
|
|
1029
|
+
while disconnected) may not hold there. Before this slice the word was in the lane line and the names kept their
|
|
1030
|
+
width. Limits below has more; device step 52 reads it.
|
|
1031
|
+
|
|
1032
|
+
**Words** (D9; `hint()`, `refresh()`, `send()`). Every word goes to the status line. Since E1a (BEY-8667) every word `hint()` writes also goes
|
|
1033
|
+
to the captured screen's head ([Copy and paste in the header](#copy-and-paste-in-the-header-bey-8667-e1a)); the close
|
|
1034
|
+
words, the reload note and `Not sent: try again`, which `refresh()`, `connect()` and the socket's `open` listener
|
|
1035
|
+
write, do not:
|
|
1036
|
+
|
|
1037
|
+
| Words | How long | What ends it |
|
|
1038
|
+
| --- | --- | --- |
|
|
1039
|
+
| `Not sent: no connection` (before a close) | stands | the next input that reaches `send()` with frames, or the next standing word; the terminal socket's opening replaces it with `Not sent: try again` |
|
|
1040
|
+
| `Not sent: try again` (after that opening) | stands | the next input that reaches `send()` with frames, or the next standing word |
|
|
1041
|
+
| `Not sent: view changed`, `No text to paste`, `Open a lane to paste`, `Paste unconfirmed`, `Clipboard blocked` | stand | the next input that reaches `send()` with frames, or the next standing word |
|
|
1042
|
+
| `Copied`, `Paste sent`, `Hold to send` | 8 ticks (1.6 s) | the timer; a word standing under it comes back |
|
|
1043
|
+
| `Press again to send` | 20 ticks (4 s) | the timer, the second press, a pointer press on any quick key, or another word; a word standing under it comes back |
|
|
1044
|
+
| `Disconnected`, `Check last input` (the close words) | while the terminal socket is closed (`gone`) | the page's reload |
|
|
1045
|
+
| `Check last input` after the client's reload (the reload note) | stands (decision O7; 40 ticks until this slice) | the next input that reaches `send()` with frames |
|
|
1046
|
+
| `Reconnecting…` (E3, BEY-8667) | 25 ticks (5 s) | the timer, the check's answer (the reload, or the failure word), or any later word; in the stale path's doubt also a terminal frame, a `MobileState` or the socket's close |
|
|
1047
|
+
| `No connection to Lanes` (E3, a failed check) | 8 ticks (1.6 s) while the terminal socket is closed, then the close word is back; stands while it reads OPEN (the stale path) | the timer; while OPEN, the next input that reaches `send()` with frames, or the next standing word |
|
|
1048
|
+
|
|
1049
|
+
Input that reaches `send()` with frames: a strip key, the panel's `y` and `n`, **Paste** or a paste into **Type here**
|
|
1050
|
+
once it has passed its checks, a QuickType word or a replacement, the lane filter's keystrokes, and the lone `Esc` a
|
|
1051
|
+
picker left filtered is owed when it is current again. Input that does not: a single letter typed on the software
|
|
1052
|
+
keyboard (upstream's own input handler sends it), the panel's TAB, CTRL, ALT, `←` and `→` (upstream's cells), opening
|
|
1053
|
+
a lane from the workspace sheet (a `FocusPane` on the control socket), and **Copy**.
|
|
1054
|
+
|
|
1055
|
+
A standing word that names a state does not outlive the state, and the act it reports stays told (the path owner's
|
|
1056
|
+
rule on this slice, 18 November 2026). `Not sent: no connection` says two things: this key was not sent, and there
|
|
1057
|
+
is no connection. Before a close it stands while the terminal socket is still in its handshake, and neither a typed
|
|
1058
|
+
letter nor anything else on the page ended it, so the header could say "no connection" over an open connection while
|
|
1059
|
+
letters went out. The observed socket's `open` listener now replaces that one word with `Not sent: try again`: the
|
|
1060
|
+
key was dropped (`send()` empties the queue on a refusal) and has to be pressed again, which stays true after the
|
|
1061
|
+
opening. The new word stands like the other words about one act, until the next input that reaches `send()` with
|
|
1062
|
+
frames. Under a timed word the listener changes the standing word underneath and leaves the timed word up; the new
|
|
1063
|
+
word is what comes back when the timer ends. It touches no other word, sends nothing, starts no timer and does not
|
|
1064
|
+
run `refresh()` (which would pay a picker's owed `Esc` at the opening). The rule's first form, the same day, emptied
|
|
1065
|
+
the line; after a reload that left nothing to say that a key pressed during the handshake had been dropped.
|
|
1066
|
+
|
|
1067
|
+
`send()` ends a standing word when it takes frames. It empties the status line too, unless a timed word is up over
|
|
1068
|
+
the standing word: that word then stays until its timer ends, and the line is empty after it. Until the completeness
|
|
1069
|
+
review of this slice (its C12) `send()` emptied the line under a timed word too: with a word standing, `^C` armed by
|
|
1070
|
+
keyboard and another strip key pressed by keyboard, `Press again to send` went while `^C` stayed armed, so the next
|
|
1071
|
+
`^C` sent with no word in sight. `send()` then words its own result.
|
|
1072
|
+
|
|
1073
|
+
How the words meet:
|
|
1074
|
+
|
|
1075
|
+
- A timed word is shown over a standing word, and the standing word comes back when the timer ends (the review's F2).
|
|
1076
|
+
- A new standing word replaces the one before it.
|
|
1077
|
+
- The close word outranks a standing word: a word that stood before the close gives way to it (the review's F1).
|
|
1078
|
+
While the socket is closed, a word that would stand (every input is refused then) is shown for 8 ticks (1.6 s,
|
|
1079
|
+
read from the 200 ms interval, not measured), and then the close word is back.
|
|
1080
|
+
- A standing word adds no timer. `hint()` leaves `hintN` at 0 for it, so the one 200 ms interval stops at its next
|
|
1081
|
+
tick, as before. The words' timer is the one `setInterval`; there is no `setTimeout`.
|
|
1082
|
+
- The reload note, and a close word that came before the shell was built, are written a tick or two after `build()`
|
|
1083
|
+
(`hintN = 2`), into a status line already on the page. A live region made with its text in it is not announced
|
|
1084
|
+
(INFERRED from how live regions are specified, not heard with VoiceOver; the review's F4).
|
|
1085
|
+
|
|
1086
|
+
**Announcements** (D10). The status line is the one live region for words: an `<output>`, whose role is status, with
|
|
1087
|
+
`aria-live="polite"`. It sits outside the context button, so a word never joins the button's name. The workspace
|
|
1088
|
+
sheet's count line is an `<output>` too, so a changed count is spoken. The page's third `<output>` is the **Text
|
|
1089
|
+
size** value in **More**, there since before slice 2. (Changed in E1a, BEY-8667: the captured screen's head is a
|
|
1090
|
+
fourth `<output>`, and `hint()` writes every word to it as well; it can be spoken only while the captured screen is
|
|
1091
|
+
open, because it is hidden otherwise, INFERRED.) Not announced: the lane line, `document.title` and the patched
|
|
1092
|
+
rows. What a screen reader says, and when, is INFERRED here from how live regions are specified; nothing was heard
|
|
1093
|
+
with VoiceOver, and the runbook's device steps listen for it:
|
|
1094
|
+
|
|
1095
|
+
- Written once, so expected once: a timed word, and a standing word the first time it is written.
|
|
1096
|
+
- Written again, so possibly spoken again: a standing word each time a timed word over it ends; the close word after
|
|
1097
|
+
each refused key while the socket is closed (the refusal is shown for 8 ticks, then the close word is written
|
|
1098
|
+
back); and a standing refusal repeated while it stands, because `send()` empties the line and `hint()` writes the
|
|
1099
|
+
same word back in the same run (whether a screen reader speaks a change that ends where it began is not known).
|
|
1100
|
+
- Not written, so not spoken: a word equal to the text already on the line (`text()` writes only a changed text), for
|
|
1101
|
+
example a refusal repeated while the same refusal is still timed after a close.
|
|
1102
|
+
- Possibly not spoken: any word while the shell is hidden (the client's state is inactive); a word that comes while
|
|
1103
|
+
the workspace sheet is open, because the status line is outside that `aria-modal` dialog; the reload note or an
|
|
1104
|
+
early close word, if one or two ticks after the build are too short for the region to be taken as live. The sheet's
|
|
1105
|
+
count is written in the run that shows the sheet, so whether its first value is spoken when the sheet opens is
|
|
1106
|
+
open too.
|
|
1107
|
+
|
|
1108
|
+
Target sizes, calculated from `mobile.css`: the names button is row 1's 48 px high and W − 140 px wide (180 px at
|
|
1109
|
+
320 px; since E1a, BEY-8667, W − 198 px, 122 px at 320 px); a workspace row keeps `min-height: 74px`; the slice adds no control.
|
|
1110
|
+
|
|
1111
|
+
**The workspace list** (D11, `renderCards()`). The rows are rebuilt only when the JSON of every workspace's
|
|
1112
|
+
`[tab name, tab position]` changes. Otherwise each row is patched in place behind a signature of its own (whether it
|
|
1113
|
+
is current, and its count words): its `hidden` flag for the query, the `is-current` class, `aria-current`, its name,
|
|
1114
|
+
its count line and its icon (check or arrow). A row's click calls `focusTab()` with the tab last shown in that
|
|
1115
|
+
workspace, read from the state at the click, or, when none is remembered there, no tab has that name or that tab has
|
|
1116
|
+
no terminal pane, with the tab it was built with (its lane list, or the one tab of a workspace with no lane list);
|
|
1117
|
+
the current workspace's row only closes the sheet (Changed in E5a, BEY-8667: until E5a the click always took the tab
|
|
1118
|
+
it was built with; [Moving between workspaces](#moving-between-workspaces-bey-8667-e5a)). Any
|
|
1119
|
+
change of a tab's name or position rebuilds the rows, so that tab is the newest, and `focusTab()` reads its pane from
|
|
1120
|
+
the state at the click. The count line says `13 workspaces`, `1 workspace`, or with a query `3 of 13 workspaces`. A
|
|
1121
|
+
row's count line uses the repository's words ([`docs/DESIGN.md`](../docs/DESIGN.md)): `◆ 1 need approval · ◇ 2 need
|
|
1122
|
+
you · ▸ 6 working`, and `✓ 3 done`, on one line cut with an ellipsis. A picker with no counts says `Choose a lane`; a
|
|
1123
|
+
lane tab with no picker says `Open workspace`. A row's name is the workspace, its counts and the current mark:
|
|
1124
|
+
`Sakio, 1 need approval, 2 need you, current workspace`. The order is the one `workspaces()` has always given: the
|
|
1125
|
+
picker workspaces in tab order, then the lane tabs that have no picker, in tab order. The empty line (`No matching
|
|
1126
|
+
workspaces`) is made once in `build()`, kept after the rows and shown only while no row matches. The query survives an
|
|
1127
|
+
update: only `openSheet()` empties it. `openSheet()` no longer forces a rebuild, so an unchanged list is reused.
|
|
1128
|
+
|
|
1129
|
+
**Two guards.** `refresh()` reads `state()?.armed?.[c]` (the path owner's ask on pull request 1128; it was
|
|
1130
|
+
`state().armed?.[c]`). A later client whose `getState()` returned nothing would have made `refresh()` throw there,
|
|
1131
|
+
before the title and the cards were written. With no state the shell takes itself as inactive: it hides itself and
|
|
1132
|
+
drops `lanes-ready`, so upstream's own bars come back; its lane line says `Your workspace`, the page title reads `Lanes
|
|
1133
|
+
· Lanes`, CTRL and ALT read not pressed, and an open sheet says `0 workspaces` with its empty line. It comes back with
|
|
1134
|
+
the state. And `paneAt()` answers only a position (`pos >= 0`; the second review's F7): `pickerTitle()` asks it for a
|
|
1135
|
+
workspace with no picker tab too, and a pane with no `tab_position` (the pinned client gives every pane one) would
|
|
1136
|
+
have lent its counts to every such workspace.
|
|
1137
|
+
|
|
1138
|
+
**Lost on purpose.**
|
|
1139
|
+
|
|
1140
|
+
- The brand image in the header. The page's icon, the Home Screen icon and the manifest keep `icon.svg` and
|
|
1141
|
+
`icon-192.png`.
|
|
1142
|
+
- The fixed name `Choose workspace`. The button's name is now what it shows.
|
|
1143
|
+
- 6 px of terminal height in portrait, on a phone and on a tablet: the header is 64 px.
|
|
1144
|
+
- A refusal's 1.6 s. It stands until the next input, so it can still be up after its cause has gone, for example
|
|
1145
|
+
`Not sent: view changed` after the view moved back. (`Not sent: no connection` is the one that changes with its
|
|
1146
|
+
cause: at the terminal socket's opening it becomes `Not sent: try again`.)
|
|
1147
|
+
- The reload note's 8 s. It stands until the next input.
|
|
1148
|
+
- In landscape, one 10 px gap after **More** while no word is up.
|
|
1149
|
+
- Counts on a workspace row that do not fit. A row's count line was `◆ 1 · ◇ 2 · ▸ 6` and showed every count; it now
|
|
1150
|
+
says each count in words on one line cut with an ellipsis. The text column of a row is W − 142 px in portrait
|
|
1151
|
+
(panel border 2 and padding 32, row border 2 and padding 24, monogram 40, arrow 18, two 12 px gaps; calculated from
|
|
1152
|
+
`mobile.css`): 178 px at 320 px, 233 px at 375 px, 248 px at 390 px, 298 px at 440 px.
|
|
1153
|
+
`◆ 1 need approval · ◇ 2 need you · ▸ 6 working` is 46 characters, about 290 to 310 px at 13 px, and `◆ 1 need
|
|
1154
|
+
approval · ◇ 2 need you` about 210 px (INFERRED from an average glyph width, not measured). So the working count is
|
|
1155
|
+
likely cut on every phone up to 390 px wide, and the second count at 320 px. The row's name keeps every count in
|
|
1156
|
+
words. The design rules beside the plan suggest words for `◆` and `◇` only; whether `working` and `done` keep their
|
|
1157
|
+
words on screen is carried to the path owner. Device step 48 reads it.
|
|
1158
|
+
|
|
1159
|
+
**Limits**, INFERRED from the code and not seen on a device:
|
|
1160
|
+
|
|
1161
|
+
- A letter typed on the software keyboard and opening a lane from the sheet do not clear a standing word: they do
|
|
1162
|
+
not reach `send()` with frames, which is how D9 words it. Whether they should is the path owner's decision (the
|
|
1163
|
+
review's F3; BEY-8630). The terminal socket's opening replaces `Not sent: no connection` and touches no other word
|
|
1164
|
+
(above).
|
|
1165
|
+
- `Not sent: no connection` worded while the socket is open (the client's `sendFn` missing or throwing) has no
|
|
1166
|
+
opening to end it; it stands until the next sent key, as the other refusals do.
|
|
1167
|
+
- The owed `Esc` of a picker left filtered clears a standing word when that picker is current again, because it
|
|
1168
|
+
reaches `send()` with frames.
|
|
1169
|
+
- The sheet may open at the scroll position it had when it was closed, because its rows are reused.
|
|
1170
|
+
- The sheet's count line may be about 3 px taller than the `<p>` it replaced: an inline `<output>` sits on a line of
|
|
1171
|
+
its parent's larger font. A rule to match would cost about 16 B of CSS.
|
|
1172
|
+
- Zellij's reconnect notice still covers the header (above, and the review's slice 3). The stale-output mark, input
|
|
1173
|
+
marked unavailable and a recovery action are slice 3 too.
|
|
1174
|
+
- A note for the later resume slice: a client update that reconnects without a reload must clear the standing word,
|
|
1175
|
+
or the header would say `Disconnected` over a live lane. The `open` listener reads neither `gone` nor which socket
|
|
1176
|
+
opened: with a second terminal socket in one page it would have to.
|
|
1177
|
+
- After a reload with the note `Check last input` up, a key pressed while the terminal socket is still in its
|
|
1178
|
+
handshake ends the note (it reached `send()` with frames), is refused, and says `Not sent: no connection`; the
|
|
1179
|
+
opening then says `Not sent: try again`. The note about the input before the reload is gone by then: that a
|
|
1180
|
+
REFUSED key ends it is older than this slice (D9: any key that reaches `send()` with frames ends the standing
|
|
1181
|
+
word), and whether it should is the path owner's decision after the slice (BEY-8630). Whether the shell is on the
|
|
1182
|
+
page at all during the handshake with the pinned client is not known; the test page shows it.
|
|
1183
|
+
- On a picker tab the context button's name is its content: `Sakio ◆1 ◇2`, or `Sakio Choose a lane to continue` when
|
|
1184
|
+
the picker has no counts. VoiceOver may read the glyphs as symbol names or drop them, and the second form reads as
|
|
1185
|
+
an instruction on a button that opens the workspace sheet, not the lane picker (INFERRED, not heard). Before this
|
|
1186
|
+
slice the name was the fixed `Choose workspace`. Saying the counts in words there costs bytes in `mobile.js`; it is
|
|
1187
|
+
carried to the path owner as a follow-up beside the Lanes badge. Device step 47 listens for it.
|
|
1188
|
+
- On a tablet, and in landscape, a word takes its width from the names (above). On a portrait iPad a standing word
|
|
1189
|
+
can leave the names little or no room, and a hardware keyboard, usual on an iPad, never clears a standing word
|
|
1190
|
+
(typed letters do not reach `send()`). Giving a tablet's names a floor, or putting the word on the second row the
|
|
1191
|
+
64 px header already has, is the path owner's decision; any change needs a device step, since the model does not
|
|
1192
|
+
measure the dock.
|
|
1193
|
+
- Two asks of the review's section 3 are not delivered here. "One overflow action": **Copy** stays in the header
|
|
1194
|
+
(decision O6), and the names get W − 140 px (W − 198 px since E1a, BEY-8667, which puts **Paste** beside **Copy**
|
|
1195
|
+
on a phone). "A person reaching to tap a row should not have the interface change
|
|
1196
|
+
its target": while counts change the rows hold still, but when a workspace is added, closed, renamed or moved every
|
|
1197
|
+
row is rebuilt, so a row under the finger can change and the focus or the VoiceOver cursor on a row is lost. Rows
|
|
1198
|
+
kept across such a change are out of this slice (the plan says so).
|
|
1199
|
+
- A refusal after a close is shown for 8 ticks, not until the next input, although the plan's D9 lists it among the
|
|
1200
|
+
words that stand: on a closed socket every input is refused again, so the close word wins (the review's F1). The
|
|
1201
|
+
path owner confirmed this rule, and the tablet's one-row header (the review's F6), on 18 November 2026; the
|
|
1202
|
+
tablet's limit above stays as written, not measured.
|
|
1203
|
+
- BEY-8630 carries the follow-ups named here and under "Lost on purpose": what clears a standing word, a tablet's
|
|
1204
|
+
names while a word shows, the count words on a narrow row, the header's name on a picker tab, the Lanes badge in
|
|
1205
|
+
the button's name, and rows kept when the set of workspaces changes.
|
|
1206
|
+
|
|
1207
|
+
Tests: `tests/web/phone.test.mjs`, the 26 tests named after the slice 2b comments in `test_web_view.PhoneKeys.NAMES`
|
|
1208
|
+
(the last three came with the path owner's rule: the word that changes at the socket's opening, the reload case its
|
|
1209
|
+
first form left with an empty line, and keyboard mode's 120 px threshold, which the sabotage legs for that change
|
|
1210
|
+
found unread by any test),
|
|
1211
|
+
and the older tests changed on purpose (each says "Changed on purpose in BEY-8609 slice 2b (was …)"). The 40-tick
|
|
1212
|
+
reload-note test is retired: decision O7 replaced it with the test that pins the note standing. (Changed in E1a,
|
|
1213
|
+
BEY-8667: three of these titles now name **Paste**, one of them 122 px, and one counts three live regions, the
|
|
1214
|
+
captured screen's word among them; [Copy and paste in the header](#copy-and-paste-in-the-header-bey-8667-e1a) lists
|
|
1215
|
+
them.)
|
|
1216
|
+
|
|
1217
|
+
### Copy and paste in the header (BEY-8667 E1a)
|
|
1218
|
+
|
|
1219
|
+
The owner wrote on 19 November 2026: "the current legacy mobile experience have no copy paste". The lane's
|
|
1220
|
+
specification is the start brief of that day (`docs/superpowers/specs/2026-11-19-lanes-mobile-ergonomics-brief.md`,
|
|
1221
|
+
BEY-8667). Its slice E1a answers two of its findings: `paste-hidden-keyboard-down` (on a phone, **Paste** existed only
|
|
1222
|
+
while the software keyboard was up) and `no-partial-copy` (**Copy** takes the whole screen, and touch cannot select a
|
|
1223
|
+
part of it). The lane lead hypervibe.lanes ruled the same day: R2, **Paste** returns to a phone's header beside
|
|
1224
|
+
**Copy**, which reverses decision D3 of BEY-8609 slice 2a; S1 to S4, named below; S5, text of the first phone lane
|
|
1225
|
+
(BEY-8609) that E1a makes false is amended in place and marked "Changed in E1a", its history and figures kept; and C1
|
|
1226
|
+
for the bytes (Bundle budget, above). Every pixel figure here is calculated from the declared CSS, not measured. The
|
|
1227
|
+
node suite's CSS model ([tests/README.md](../tests/README.md)) checks 122 and 177 px in portrait and 748 px in
|
|
1228
|
+
landscape; the other widths follow from the same sum, and the tablet panel's `min(400px, 85vw)` is read from
|
|
1229
|
+
`browser.css`, which the model does not read.
|
|
1230
|
+
Nothing here was checked in Safari, in the Home Screen app or on an iPhone.
|
|
1231
|
+
|
|
1232
|
+
**Paste in the header** (R2). On a phone **Paste** is in the header right after **Copy**, as on a tablet. It is drawn
|
|
1233
|
+
with the software keyboard down or up, and with a hardware keyboard, which never sets `lanes-keyboard`. It is hidden on
|
|
1234
|
+
a picker tab, as before (`panesButton.hidden = pasteKey.hidden = !!picker` in `refresh()`). `buildQuickRow()` no longer
|
|
1235
|
+
prepends it to the strip: the line `if (mode == 'phone') row.prepend(pasteKey);` is gone. `mobile.css` loses the two
|
|
1236
|
+
selectors that drew it only while typing and hid `⏎` behind it, `html:not(.lanes-keyboard) .lanes-quick .lanes-more`
|
|
1237
|
+
and `.lanes-keyboard :not([hidden])+[aria-label=Enter]`; with Paste off the strip they matched nothing. So `⏎` stays on
|
|
1238
|
+
the strip while typing. A lane tab's strip shows `⏎ ↑ ↓ Esc ^C Keys`; a picker prompt shows `⏎ y Esc`. Paste keeps its
|
|
1239
|
+
handler, its `at()` at the tap, its words and its `mousedown` cancel: one tap calls `readText()` inside the tap (iOS
|
|
1240
|
+
may show its own Paste confirmation first; INFERRED, not yet checked on a device) and sends one bracketed paste.
|
|
1241
|
+
(Changed in E3, BEY-8667: `refresh()` now hides **Paste** while the terminal socket is gone as well,
|
|
1242
|
+
`pasteKey.hidden = !!picker || !!gone`, and **Reconnect** stands in its place;
|
|
1243
|
+
[Coming back to a dead page](#coming-back-to-a-dead-page-bey-8667-e3).)
|
|
1244
|
+
|
|
1245
|
+
**The header.** On a phone the first row reads the context button (the workspace and the lane), **Copy**, **Paste**,
|
|
1246
|
+
**Done** (only while typing, in the place of **More**), **More**; the status line is the second row, or the end of the
|
|
1247
|
+
one row in landscape. **Copy** and **Paste** are icons on a phone: their words are hidden, as before
|
|
1248
|
+
(`.lanes-more span`), and their names are in `aria-label` (`Copy screen`, `Paste`). The lead's ruling S3 keeps them
|
|
1249
|
+
icons only; a runbook step asks whether a person finds them. The names' room, calculated from the declared minimums with
|
|
1250
|
+
no safe areas: in portrait W − 198 px (W − 16 − 8 − 3 × 48 − 3 × 10), 122 px at 320 px, 177 px at 375 px, 192 px at
|
|
1251
|
+
390 px and 242 px at 440 px (W − 140 px from slice 2b until E1a: 180, 235, 250 and 300 px); in landscape W − 208 px
|
|
1252
|
+
(W − 16 − 8 − 3 × 48 − 4 × 10), 748 px at 956 px (W − 150 px, 806 px, until E1a). While a phone types, **Done**
|
|
1253
|
+
stands in **More**'s place; its word's width is not measured, so the typing figure is not computed. A tablet's header
|
|
1254
|
+
is unchanged: the names, **Copy**, **Paste**, the dock, **Done** or **More**, then the status line.
|
|
1255
|
+
|
|
1256
|
+
**The captured screen** (finding `no-partial-copy`). **Copy** still writes the whole visible screen, or the terminal's
|
|
1257
|
+
selection when it has one, to the clipboard synchronously inside the tap, and says `Copied`, or `Clipboard blocked` when
|
|
1258
|
+
the clipboard API is missing or refuses. In the same tap it opens a second dialog of the shell, "Captured screen":
|
|
1259
|
+
`role="dialog"`, `aria-modal="true"`, an `aria-label` and an `h2` that both say `Captured screen`, a head `<output>`
|
|
1260
|
+
that repeats the word (emptied as the dialog opens), a `<pre class="lanes-shot">` that holds exactly the text given to
|
|
1261
|
+
the clipboard, and one **Close** button (no "Copy all"). The name follows the owner's review of 17 November 2026
|
|
1262
|
+
(section 5): "A future selectable terminal-output view can help, but it should be labeled as captured output." The head
|
|
1263
|
+
repeats the word because the header's status line lies under the dialog's scrim. The dialog opens even when the
|
|
1264
|
+
clipboard is missing or refuses, so selecting by hand is still possible. **Close**, Escape and a tap on the scrim close
|
|
1265
|
+
it; a tap on the text does not, nor does a press that began on the text and is let go over the scrim (a mouse or
|
|
1266
|
+
trackpad selection, whose click the browser gives to the dialog, their common ancestor). The shell records where each
|
|
1267
|
+
press began in the capture-phase `pointerdown` listener it already had for **More**. The focus moves to its **Close**,
|
|
1268
|
+
and `#terminal` is `inert` while it is open. It lives in the shell (`.zj-mobile-chrome`), after the workspace sheet,
|
|
1269
|
+
never under `#terminal`, where upstream cancels `touchstart`. Its one rule is `.lanes-shot { margin: 0; overflow: auto;
|
|
1270
|
+
font: 13px ui-monospace, monospace; -webkit-user-select: text; }`: the text is monospace, rows are not wrapped (a wide
|
|
1271
|
+
row scrolls sideways), and the text scrolls inside the sheet. It is selectable by touch: a long press and the selection
|
|
1272
|
+
handles, then iOS's own Copy (INFERRED, not yet checked on a device). `-webkit-user-select: text` is set explicitly
|
|
1273
|
+
because the pinned client's own stylesheet was not read for a rule that turns selection off (the brief says so).
|
|
1274
|
+
|
|
1275
|
+
**One dialog builder** (S2, S4). Both sheets are made by one `dialog(name, head, ...body)`: the role, the `aria-label`,
|
|
1276
|
+
`aria-modal`, the head with its `h2` and its second line (the workspace count, or the captured screen's word),
|
|
1277
|
+
**Close**, the scrim's click, Escape and the Tab trap. The Workspaces sheet's **Close** is now named `Close` (it was
|
|
1278
|
+
`Close workspaces`; ruling S2), and that dialog is named by `aria-label` `Workspaces` (it was `aria-labelledby` to its
|
|
1279
|
+
`h2`, whose id `lanes-sheet-title` is gone). `openSheet()` opens either dialog (the workspace sheet unless told
|
|
1280
|
+
otherwise), and `closeSheet()` closes the one that is open. A dialog holds the focus itself (`tabIndex = -1`): a press
|
|
1281
|
+
on its text or its head, which take no focus, moves the focus to the dialog (HTML's focus fixup), so Escape still closes
|
|
1282
|
+
it, and the Tab trap wraps from the dialog itself as from its first and last controls, so the focus cannot leave for the
|
|
1283
|
+
controls under the scrim. Before E1a a press on the Workspaces sheet's heading let the focus out the same way (INFERRED
|
|
1284
|
+
from the code). On a tablet the captured screen takes `browser.css`'s left panel (`.lanes-tablet .lanes-sheet-panel`,
|
|
1285
|
+
`min(400px, 85vw)` wide), like the workspace sheet, so wide rows scroll sideways there too (S4).
|
|
1286
|
+
|
|
1287
|
+
**The keyboard** (S1). Opening the captured screen closes an open software keyboard, as the Workspaces sheet does:
|
|
1288
|
+
`openSheet()` runs `unfocus()`. **Copy** and **Paste** still cancel `mousedown`, so a tap does not move the focus, and
|
|
1289
|
+
**Paste** leaves an open keyboard open.
|
|
1290
|
+
|
|
1291
|
+
Limits of the captured screen, INFERRED from the code and not seen on a device:
|
|
1292
|
+
|
|
1293
|
+
- It is captured output, not the lane: a copy of the visible screen only, taken at the tap. It does not follow the
|
|
1294
|
+
lane while it is open.
|
|
1295
|
+
- No scrollback: older output must be scrolled into view in the lane first, then copied (`initTerminal` in the pinned
|
|
1296
|
+
`app.js` gives xterm `scrollback: 0` as a default, which the server's terminal options are merged over; read on
|
|
1297
|
+
19 November 2026).
|
|
1298
|
+
- Zellij's frames and bars are included, as in the clipboard's text.
|
|
1299
|
+
- A row the terminal wrapped stays split into two lines; nothing rejoins wrapped rows.
|
|
1300
|
+
- With a selection in xterm, the dialog shows that selection only, the same text as the clipboard.
|
|
1301
|
+
- The head is emptied as the dialog opens, then shows the clipboard's word when the write answers (the write is a
|
|
1302
|
+
promise; a missing clipboard answers at once). `hint()` writes every word there, but while the dialog is open its
|
|
1303
|
+
scrim covers the other controls, so only the clipboard's word comes (INFERRED from the CSS). The close words, the
|
|
1304
|
+
reload note and `Not sent: try again` never reach it, so after a close it still says `Copied` while the status line
|
|
1305
|
+
under the scrim says `Disconnected`: the word is about the copy, not the connection. `Copied` stays in the head after
|
|
1306
|
+
the status line's 8 ticks.
|
|
1307
|
+
- The `<pre>` takes no focus (no `tabindex`). A press on it moves the focus to the dialog, which holds it
|
|
1308
|
+
(`tabIndex = -1`), so the arrow keys do not scroll the text.
|
|
1309
|
+
|
|
1310
|
+
**Lost on purpose.**
|
|
1311
|
+
|
|
1312
|
+
- **Copy** no longer leaves an open software keyboard open: the captured screen closes it (S1). When the dialog
|
|
1313
|
+
closes, the focus goes back only to a button, so **Type here** has to be tapped again to type (INFERRED from
|
|
1314
|
+
`closeSheet()`).
|
|
1315
|
+
- The Workspaces sheet's **Close** is named `Close`, not `Close workspaces` (S2); the dialog's name, `Workspaces`,
|
|
1316
|
+
says what it closes.
|
|
1317
|
+
- Header room for the names: 58 px less on a phone, in portrait (122 px at 320 px, was 180) and in landscape (748 px
|
|
1318
|
+
at 956 px, was 806). Long workspace and lane names are cut sooner.
|
|
1319
|
+
- The owner's review of 17 November 2026 (section 3): "Paste belongs beside typing or composition. Neither needs to
|
|
1320
|
+
consume permanent header space in every state." Since E1a both take header space on a lane tab in every state, and
|
|
1321
|
+
while typing **Paste** is at the top of the screen, not on the strip above the keyboard. The owner's later words and
|
|
1322
|
+
R2 decide it.
|
|
1323
|
+
|
|
1324
|
+
Not yet checked on a device (the runbook's E1a steps, from step 62; NOT YET DONE, each to be run in a Safari tab and
|
|
1325
|
+
in the Home Screen app): whether a person finds **Copy** and **Paste** as icons (S3); **Paste** with the keyboard
|
|
1326
|
+
down, with it up and with a hardware keyboard, iOS's own Paste confirmation, one bracketed paste per tap, `⏎` on the
|
|
1327
|
+
strip while typing and no **Paste** on a picker tab; `Copied` and the captured screen in the same tap, with the same
|
|
1328
|
+
text and the head's word; a long press and the selection handles selecting one line, address or command, and iOS's own
|
|
1329
|
+
Copy copying only that part; a wide row scrolling sideways and the text scrolling, at 320 px and in an iPad's left
|
|
1330
|
+
panel; **Close**, Escape and a tap on the scrim closing it, and a long press on the text not closing it; the software
|
|
1331
|
+
keyboard going down when it opens; what VoiceOver says for the dialog, its head and **Close**; the names at 320 px
|
|
1332
|
+
beside **Copy**, **Paste** and **More** (step 45, amended).
|
|
1333
|
+
|
|
1334
|
+
Tests: `tests/web/phone.test.mjs` retires 'Paste moves into the strip: CSS shows it only while typing, in the place
|
|
1335
|
+
of ⏎, and it still pastes' (slice 2a, D3) and adds 'on a phone lane tab with the keyboard down Paste is drawn in the
|
|
1336
|
+
header beside Copy, and one tap pastes' and 'Copy opens the captured screen as selectable text, and its head says
|
|
1337
|
+
what became of the copy'; `test_web_view.PhoneKeys.FILE_TESTS` goes from 115 to 116. Five titles are renamed: 'at
|
|
1338
|
+
320 px the strip and the panel fit without sideways scrolling, and the names get 122 px'; 'the header names the
|
|
1339
|
+
work: no brand, a context button named by its workspace and lane that opens a dialog, then Copy, Paste, Done and
|
|
1340
|
+
More'; 'a phone header holds two rows in 64 px: the workspace and lane with Copy, Paste and More, then the status
|
|
1341
|
+
line, 12 px on one line cut with an ellipsis'; 'at 320 px the workspace and lane names get 122 px beside Copy, Paste
|
|
1342
|
+
and More, at 375 px 177 px'; 'the workspace count is an output, and the shell has three live regions: the status
|
|
1343
|
+
line, that count, then the captured screen's word'. The other tests changed on purpose say "Changed on purpose in E1a (BEY-8667; was …)".
|
|
1344
|
+
|
|
1345
|
+
### Links in a lane (BEY-8667 E1b-1)
|
|
1346
|
+
|
|
1347
|
+
The owner wrote on 19 November 2026: "links dont open". The lane's start brief of that day
|
|
1348
|
+
(`docs/superpowers/specs/2026-11-19-lanes-mobile-ergonomics-brief.md`, finding `terminal-url-tap-never-opens`) says
|
|
1349
|
+
why: a web address printed in a lane cannot be opened by touch. The pinned client opens a link only through xterm's
|
|
1350
|
+
mouse events, and its touch handler cancels `touchstart` (`app.js` 1440, MEASURED), so a tap on an address reaches the
|
|
1351
|
+
lane as a click and nothing opens. That the browser then fires no mouse events is INFERRED, as upstream's own comment
|
|
1352
|
+
at 1437 says. The lane lead hypervibe.lanes ruled the same day: R8, a module loaded on demand; B1, the control's
|
|
1353
|
+
expiry is one timer of `links.js`'s own; B2, the control takes the names' place in the header; B3, OSC 8 label links
|
|
1354
|
+
are later work. Nothing here was checked in Safari, in the Home Screen app or on an iPhone.
|
|
1355
|
+
|
|
1356
|
+
**Loading** (R8). `connect()` in `mobile.js` appends `/lanes-assets/links.js` once, as its last statement: on a phone
|
|
1357
|
+
and a tablet, after the client attached and the header was built. A desktop never loads it, and `index.html` never
|
|
1358
|
+
lists it. It is a classic script with no integrity pin, like the other Lanes files. In a page it needs `#terminal` and
|
|
1359
|
+
`window.term`, or it does nothing; under node it adds `laneLinkAt` to `module.exports` beside `laneShellMode`.
|
|
1360
|
+
Bytes: Bundle budget, above.
|
|
1361
|
+
|
|
1362
|
+
**What a tap does.** `links.js` listens on `#terminal` for `touchstart`, `touchmove`, `touchend` and `touchcancel` in
|
|
1363
|
+
the capture phase, as `passive` listeners. So it runs before upstream's own handlers and cannot cancel anything. It
|
|
1364
|
+
keeps upstream's tap rule (`app.js` 1341-1342 and 1503-1510): one finger, no move of more than 16 px from where it
|
|
1365
|
+
began (a move out and back still counts), lifted before 500 ms. At `touchstart` it reads the cell as upstream's
|
|
1366
|
+
`reportCoords` does (1346-1357): `term._core._mouseService.getMouseReportCoords` on the touch point, with
|
|
1367
|
+
`window.__zjMobilePan`'s offset added while panning is active. It reads the visible rows and the terminal's width then
|
|
1368
|
+
too, as **Copy** reads the rows. At `touchend`, for a tap, `laneLinkAt(rows, cols, col, row)` looks for an address
|
|
1369
|
+
under that cell. `links.js` sends nothing and calls no `preventDefault` or `stopPropagation`, so the lane still gets
|
|
1370
|
+
upstream's click for the tap (INFERRED for Safari; the node suite shows it against a fake of upstream's handler).
|
|
1371
|
+
|
|
1372
|
+
**What counts as an address.** `http://` or `https://` (also in capitals) followed by a host; or a same-origin path
|
|
1373
|
+
that starts with `/lanes-docs/` and does not continue a longer path. Such a path counts only as the URL parser resolves
|
|
1374
|
+
it (`new URL(path, base)`; PR 1150's review): its resolved path must still start with `/lanes-docs/`, and the resolved
|
|
1375
|
+
path, query and fragment are what opens and what the label shows. So `/lanes-docs/../x`, `/lanes-docs/%2e%2e/x` and
|
|
1376
|
+
`/lanes-docs/../lanes-hooks/x` give nothing, and `/lanes-docs/./x` gives `/lanes-docs/x`. The base is a constant: only
|
|
1377
|
+
the path, query and fragment are kept, so any origin gives the same result, and `laneLinkAt` stays pure. An address
|
|
1378
|
+
with a user part, an `@` before the host such as `https://trusted.example.com@other.example.com/`, is refused: it goes
|
|
1379
|
+
to the host after the `@`, and its label could show the trusted name. An `@` in the path or the query is kept. An
|
|
1380
|
+
address ends at a space, a quote, `<`, `>`, a backslash, `^`, a backtick, `{`, `|`, `}` or a box-drawing character
|
|
1381
|
+
such as `│`. It also ends at `…`, where an agent cut a long address, and at any Unicode format character (category Cf,
|
|
1382
|
+
`\p{Cf}`). Those include the zero-width and bidi controls (U+061C, U+200B to U+200F, U+202A to U+202E, U+2066 to
|
|
1383
|
+
U+2069), which could reorder what the label shows. A trailing `.`, `,`, `;`, `:`, `!`, `?`, `*`, `_` or `~` is dropped
|
|
1384
|
+
(the last three are Markdown emphasis, the set E1b-2's `mdlite` trims), and so is a trailing `)` or `]` with no
|
|
1385
|
+
partner inside the address. So `(see https://a.example/x).` gives `https://a.example/x`, and
|
|
1386
|
+
`https://a.example/wiki/Foo_(bar)` keeps its `)`. An address that reaches the last column continues on the next row,
|
|
1387
|
+
after that row's indent, and a tap on either row finds the whole address. In a framed pane the frame's `│` stands for
|
|
1388
|
+
the last column: the address continues after the next row's `│` and indent. `laneLinkAt` is linear in the screen's
|
|
1389
|
+
text. A full screen of 100 rows of 300 columns of hostile text (dots, schemes, `/lanes-docs/` repeats, closing
|
|
1390
|
+
brackets) took about 0.1 to 1.2 ms a call (MEASURED in memory with node on the dev container, 19 November 2026; not a
|
|
1391
|
+
bound).
|
|
1392
|
+
|
|
1393
|
+
**The Open control** (B2). On a hit, the context button (the workspace and lane names) is hidden, and an
|
|
1394
|
+
`<a class="lanes-context">` takes its place in the header's first row, right after it. Its first line reads `Open`.
|
|
1395
|
+
Its second line is the label (PR 1150's review): the host as the browser's URL parser reads it (`new URL(address).host`:
|
|
1396
|
+
lowercase, a look-alike host in its punycode `xn--` form, the port only when it is not the scheme's own; the host as
|
|
1397
|
+
written when the parser refuses it), or a same-origin address's resolved path. No scheme, no user part, and no path,
|
|
1398
|
+
query or fragment beside a host: the new tab's address bar shows those. JS never cuts it. The names' ellipsis rule
|
|
1399
|
+
(`.lanes-context *`) cuts it to their room (122 px at 320 px, calculated), and the label is a right-to-left `<span>`
|
|
1400
|
+
around a left-to-right `<bdi>`, so that ellipsis falls on its left: on a narrow screen the start of a long host is
|
|
1401
|
+
cut, never its end, where its registrable domain is (`…d.abcdefgh.evil.example`; INFERRED for Safari, the runbook's
|
|
1402
|
+
step 80). The `<bdi>` stays inline, so the width, overflow and ellipsis the same rule names do not apply to it (CSS
|
|
1403
|
+
gives them to block containers); `test_web_view.LinksOnDemand` holds every stylesheet to that. Its `href` is the whole
|
|
1404
|
+
address (a same-origin path stays relative, in its resolved form), with `target="_blank"` and `rel="noopener noreferrer"`. Tapping it opens the address in a new tab;
|
|
1405
|
+
`links.js` never calls `window.open`. No CSS changed. `.lanes-context` gives it the names' room and their height,
|
|
1406
|
+
48 px (46 px on a phone in landscape). `Open` is 17 px (`.lanes-context strong`), in the colour the page gives a link;
|
|
1407
|
+
the label is 13 px in the names' muted colour (`.lanes-context span`). The link colour and underline are INFERRED:
|
|
1408
|
+
they are the browser's, unless upstream's `/assets/style.css`, which is not in the repository, sets them. The control
|
|
1409
|
+
goes and the names come back at once:
|
|
1410
|
+
|
|
1411
|
+
- after 8 s (B1: one `setTimeout`, replaced by a new hit). A press on the control stops that timer, so the control
|
|
1412
|
+
cannot go from under the finger; the tap that follows hides it. A press that ends in no tap leaves it up until the
|
|
1413
|
+
next key or press;
|
|
1414
|
+
- at any key typed (`keydown` on the document, capture phase), with the focus on the control or in the lane (B2: the
|
|
1415
|
+
names come back at once when a key is pressed);
|
|
1416
|
+
- at any press outside it (`pointerdown` on the window, capture phase): a strip key, a header or dock button, or the
|
|
1417
|
+
terminal;
|
|
1418
|
+
- when it is tapped. It is hidden then, not removed, so the tap still opens the link.
|
|
1419
|
+
|
|
1420
|
+
A tap on another address replaces it; a tap on no address takes it away.
|
|
1421
|
+
|
|
1422
|
+
Limits, INFERRED from the code and not seen on a device:
|
|
1423
|
+
|
|
1424
|
+
- An address that ends exactly at the last column is joined with the next row's first word, even when that word is
|
|
1425
|
+
not part of it: `…/abc` then `and then more` gives `…/abcand` (MEASURED in memory). The brief's rule accepts this.
|
|
1426
|
+
- An address wrapped short of the last column opens cut. A row that stops before the last column (or before a frame's
|
|
1427
|
+
`│`) is not continued, so only the part on the tapped row is taken. An agent that wraps its own lines with a right
|
|
1428
|
+
margin does this; the runbook's step 74 checks one agent lane.
|
|
1429
|
+
- Each wide character left of the address on its row (a CJK character, `✅`) moves the tapped spot one character to
|
|
1430
|
+
the right; an emoji outside the BMP does not. A row that holds such a wide character is never joined to the next
|
|
1431
|
+
(both MEASURED in memory on rows written as the terminal gives them).
|
|
1432
|
+
- The label shows no path; the new tab's address bar shows the whole address.
|
|
1433
|
+
- A keyboard cannot use the control: any key takes it away and brings the names back, with the focus on the control
|
|
1434
|
+
or in the lane (B2).
|
|
1435
|
+
- Safari putting the ellipsis on the left of the right-to-left label is INFERRED from the CSS rules, not seen; the
|
|
1436
|
+
runbook's step 80 reads a long host at 320 and 440 px.
|
|
1437
|
+
- xterm's own `isWrapped` mark is not used: Zellij draws each row itself, so it is very likely never set here
|
|
1438
|
+
(INFERRED from the pinned xterm.js 5.5.0).
|
|
1439
|
+
- OSC 8 label links, a word that carries a hidden address, are not read (B3, later work).
|
|
1440
|
+
- Only the visible screen is read, never the scrollback.
|
|
1441
|
+
- Touch only: a mouse or a trackpad keeps upstream's own Shift-click.
|
|
1442
|
+
- The control is a plain link named `Open …`. Nothing announces it when it appears (the status line is not used), so
|
|
1443
|
+
VoiceOver finds it only by moving to it.
|
|
1444
|
+
|
|
1445
|
+
Not yet checked on a device (the runbook's E1b-1 steps, from step 74; NOT YET DONE, each to be run in a Safari tab and
|
|
1446
|
+
in the Home Screen app): a tap on a wrapped docs address, on an address an agent lane printed, and on a same-origin
|
|
1447
|
+
`/lanes-docs/` path; that the label holds the host and the new tab the whole address; that the new tab opens, also from
|
|
1448
|
+
the Home Screen app; that a hold and a swipe open nothing; whether a person finds the control in the names' place
|
|
1449
|
+
(B2); that the lane still receives the tap; the cell under a finger with the view panned; which end of a long host's
|
|
1450
|
+
label the ellipsis cuts, at 320 and 440 px (step 80).
|
|
1451
|
+
|
|
1452
|
+
Tests: `tests/web/links.test.mjs` has seven tests of `laneLinkAt` (the brief's wrapped address, a framed pane,
|
|
1453
|
+
punctuation and emphasis, a user part and control characters, same-origin paths, their resolution by the URL parser,
|
|
1454
|
+
no address) and ten of the page, where `mobile.js` and `links.js` boot together on a fake phone page. Those ten cover
|
|
1455
|
+
the loader, the control, both rows and a same-origin path, the label (the parser's host), the whole host in its
|
|
1456
|
+
right-to-left `<span>` and left-to-right `<bdi>` and a docs link's resolved path, the tap rule, the cell, rows and
|
|
1457
|
+
width read at `touchstart` with the pan offset, the four ways the control goes, any key taking it away, and a second
|
|
1458
|
+
tap. The fake pages have the URL parser, as Safari has.
|
|
1459
|
+
`test_web_view.LinksOnDemand` pins the budget row, the loader line, `index.html`, the timer rules and the `<bdi>` that no
|
|
1460
|
+
stylesheet gives a box of its own.
|
|
1461
|
+
`tools/bazel/node_parity.py` lists the new file. `phone.test.mjs` is unchanged (`PhoneKeys.FILE_TESTS` stays 116): its
|
|
1462
|
+
fake page now gets the loader's one `<script>` in `<head>`, which no test there reads.
|
|
1463
|
+
|
|
1464
|
+
### Reopen the last tab (BEY-8667 E1c-2)
|
|
1465
|
+
|
|
1466
|
+
The owner wrote on 19 November 2026: "it dont default open on the last workspace/lane you used". The lane's start
|
|
1467
|
+
brief of that day (`docs/superpowers/specs/2026-11-19-lanes-mobile-ergonomics-brief.md`, findings `no-last-tab-memory`
|
|
1468
|
+
and `reload-loses-lane`) says why: until E1c-2 the shell stored no tab, so every page load opened wherever Zellij put
|
|
1469
|
+
the new client (INFERRED: the first tab, the first workspace's picker). The lane each workspace tab shows is kept on
|
|
1470
|
+
the server, so going back to the tab brings its lane back. Nothing here was checked in Safari, in the Home Screen app
|
|
1471
|
+
or on an iPhone.
|
|
1472
|
+
|
|
1473
|
+
**The memory.** One `localStorage` key per address: `lanes:tab:` and the page's path, for example
|
|
1474
|
+
`lanes:tab:/anna-mbp-phone`. Its value is JSON, `{"tab": "<tab name>"}`, the whole Zellij tab name: `Build` is
|
|
1475
|
+
Build's lane tab, `Build ☰` its picker. It holds no lane, no input and nothing else
|
|
1476
|
+
(`docs/master-datamodel.md`, DM-LANES-PHONE-LAST-TAB). A phone and a tablet keep it; a desktop page runs no shell.
|
|
1477
|
+
(Changed in E5a, BEY-8667: the same value also holds `ws`, a map of each workspace to the tab last shown in it,
|
|
1478
|
+
`{"tab": "Build", "ws": {"Build": "Build", "Sakio": "Sakio ☰"}}`: tab and workspace names only, still no lane and no
|
|
1479
|
+
input. Rows read it; [Moving between workspaces](#moving-between-workspaces-bey-8667-e5a).)
|
|
1480
|
+
|
|
1481
|
+
**Going back.** At the attach, before its first `refresh()`, `connect()` reads the name. When a tab has exactly that
|
|
1482
|
+
name and is not the current tab, the shell sends one `FocusPane` to that tab's first terminal pane, as a tap on a
|
|
1483
|
+
workspace row does. Nothing is typed into any lane. This runs once per page load: after a reload, after the client's
|
|
1484
|
+
own reload when it reconnects (`app.js` 165), and when iOS starts the page or the app afresh (swiped away, or
|
|
1485
|
+
discarded). A page that was only in the background does not load again. The pinned client sets `isPageUnloading` at
|
|
1486
|
+
`pagehide` (`app.js` 183-185) and nothing calls `resetConnectionState()`, the one place that clears it, so it does not
|
|
1487
|
+
reconnect or reload by itself (`handleReconnection`, `app.js` 134). It shows the old screen with `Disconnected` until
|
|
1488
|
+
it is reloaded, and no restore runs (E3 was not built then; since E3 the shell reloads it, see the note below). A
|
|
1489
|
+
Home Screen launch goes back to its own view only with E1c-1 (Limits, below).
|
|
1490
|
+
(Changed in E3, BEY-8667: the shell now checks the server and, when it answers, reloads such a page itself: after a
|
|
1491
|
+
`pagehide`, once the page is shown again with its terminal socket no longer open; and after a hide longer than 30 s
|
|
1492
|
+
with the socket still OPEN, when 25 ticks bring nothing from the server. That reload runs the restore, as any reload
|
|
1493
|
+
does; [Coming back to a dead page](#coming-back-to-a-dead-page-bey-8667-e3).)
|
|
1494
|
+
(Changed in E4, BEY-8667: a `?ws=<workspace title>` in the address names the tab for that one load, the workspace's
|
|
1495
|
+
lane list, in the memory's place, when a tab carries that name; the restore is the same `FocusPane`, and the query
|
|
1496
|
+
then leaves the address. [Notification and address links](#notification-and-address-links-bey-8667-e4).)
|
|
1497
|
+
|
|
1498
|
+
**Remembering.** `refresh()` writes the current tab's name when it changes, and nothing while a restore is on its way.
|
|
1499
|
+
The tab the page started on is the first current tab it sees after it asked: at the attach's own `refresh()`, or at
|
|
1500
|
+
the first later update that has a current tab. An update with no current tab (the client's empty state has
|
|
1501
|
+
`active_pane: null`) neither sets it nor ends the wait. The wait ends at the first update whose current tab is not
|
|
1502
|
+
that one (the restored tab, or any other: a lane chosen on the picker with a hardware keyboard, say), or at the
|
|
1503
|
+
person's first press anywhere on the page. So the first picker is never written over the tab being restored, and a
|
|
1504
|
+
reload before the switch lands still goes back. No count of ticks ends the wait: the interval stops itself once
|
|
1505
|
+
nothing waits (`tick()`), so a count could stall. If the `FocusPane` never lands and nobody presses anything, the page
|
|
1506
|
+
stays where it is and the memory keeps the old tab for the next load.
|
|
1507
|
+
|
|
1508
|
+
**On the owner's defaults.** Q1 (BEY-8668): a name no tab carries (its workspace removed, hidden or renamed) does
|
|
1509
|
+
nothing. The page opens where Zellij puts it, works there, and from then on remembers the tab it shows. Q2
|
|
1510
|
+
(BEY-8669): no page follows another. Two pages of one view, such as two Safari tabs, share the key; each reads it only
|
|
1511
|
+
at its own attach, and the last write wins. Whether Safari and a Home Screen app share it is INFERRED and not checked:
|
|
1512
|
+
iOS may keep a Home Screen app's storage apart, so each would keep its own memory.
|
|
1513
|
+
|
|
1514
|
+
**The address.** The key is read at each read and write, not once at load. The pinned client changes a page's address
|
|
1515
|
+
in two ways (read in `app.js`, not run). Its own **Switch session** sheet (the shell's **Switch session** opens it)
|
|
1516
|
+
and its new-session form load `/<session>` as a new page (`navigateToSession`, 3010-3021; the session card at
|
|
1517
|
+
2881-2882, the form at 2361), and that page reads and keeps its own key. A switch made inside Zellij (its session
|
|
1518
|
+
manager, `Ctrl-Alt-s` in Lanes' Zellij config) reaches the client as `SwitchedSession` (INFERRED: the client handles
|
|
1519
|
+
that message; the server's side is not in the repository), and the client changes the address with
|
|
1520
|
+
`history.pushState` to `/<new session>`, with no reload (3313-3320); the shell then writes the new session's tabs under
|
|
1521
|
+
the new path, and does not go back at that switch. A write happens when the tab's name or the key differs from the
|
|
1522
|
+
last write (`lastTab`, `lastKey`; since E5a `mem.tab` in `lastTab`'s place), so a tab of the new session that has the
|
|
1523
|
+
name last written under the old path is written under the new path too. (Changed in E5a, BEY-8667: the page's map goes
|
|
1524
|
+
on whole under the new path, so the old session's entries are written under the new key at its next write; ruling
|
|
1525
|
+
E5-R4 accepted it.) So the path names the Zellij session the page shows, a view such as
|
|
1526
|
+
`<device>-phone`, and the key means "the tab of this view that this browser showed last". Choosing a lane, a workspace
|
|
1527
|
+
or a tab inside the view keeps the path; which lane a tab shows is the server's. Not known: whether the server sends
|
|
1528
|
+
`SwitchedSession` before the new session's first `MobileState` (no server source is in the repository). If the state
|
|
1529
|
+
comes first, one write of the new session's tab lands under the old path.
|
|
1530
|
+
|
|
1531
|
+
**Room for E5.** The value is an object so that E5 can add a member to it, for example `ws: {<workspace>: <last
|
|
1532
|
+
tab>}`, in the same value. A reader takes `tab` and ignores members it does not know. A shell of this slice rewrites
|
|
1533
|
+
the whole value at its next write and drops them; it is a memory, never authority. (Changed in E5a, BEY-8667: E5a
|
|
1534
|
+
took the room with `ws`. Its reader keeps `tab` and `ws` only, `mem = {tab: kept.tab, ws: {...kept.ws}}`, so its next
|
|
1535
|
+
write drops any other member, as a shell of this slice drops `ws`.)
|
|
1536
|
+
|
|
1537
|
+
Limits, INFERRED from the code and not seen on a device:
|
|
1538
|
+
|
|
1539
|
+
- Where Zellij puts a new client is not read from any code here; the first tab is INFERRED.
|
|
1540
|
+
- A `FocusPane` sent while the control socket is not open is dropped by the client (`app.js` 3163-3171). At the attach
|
|
1541
|
+
it has just delivered a state, so it is very likely open.
|
|
1542
|
+
- The tab brings back the lane the server keeps for that workspace of this view now, which another device or a
|
|
1543
|
+
command (`lanes here`) may have changed meanwhile.
|
|
1544
|
+
- Clearing the browser's website data forgets the memory. With storage blocked the page works and opens where Zellij
|
|
1545
|
+
puts it.
|
|
1546
|
+
- A Home Screen app goes back to its own view only with E1c-1's manifest (a separate change), which lets the icon open
|
|
1547
|
+
the address it was added from. Before it, the icon opens `/phone`, whose key is another.
|
|
1548
|
+
|
|
1549
|
+
Not yet checked on a device (the runbook's E1c-2 steps 83 to 89; NOT YET DONE, in a Safari tab and in the Home Screen
|
|
1550
|
+
app): a reload lands on the last tab; a reconnect; a relaunch from the Home Screen; a gone workspace; storage blocked;
|
|
1551
|
+
two pages; a switch made inside Zellij.
|
|
1552
|
+
|
|
1553
|
+
Tests: `tests/web/phone.test.mjs` has nine tests of this slice, at its end (the ninth, an update with no current tab,
|
|
1554
|
+
from the slice's review). Its realm takes two new options. `location` is none, as before, or
|
|
1555
|
+
`page.location = {pathname: '/', search: '', hash: '', ...location}`, plain fields a test may change. `local` is the
|
|
1556
|
+
page's `localStorage`: a fresh one as before, or one store shared by several realms, which, as a browser does, fires a
|
|
1557
|
+
`storage` event at every other page that shares it when one page writes a new value; or `'blocked'`, an object whose
|
|
1558
|
+
every property read throws a `SecurityError`. It is an object, not a throwing getter on the page, because node's vm
|
|
1559
|
+
hides a getter's throw from `globalThis.localStorage` and `typeof localStorage` (MEASURED with node v22.23.2).
|
|
1560
|
+
A tenth, from the same review, pins one write per tab and address, and one try only at a storage that refuses it.
|
|
1561
|
+
`PhoneKeys.FILE_TESTS` is 126 (137 since E3, below) and `NAMES` lists the ten. Bytes: Bundle budget, above.
|
|
1562
|
+
|
|
1563
|
+
### Coming back to a dead page (BEY-8667 E3)
|
|
1564
|
+
|
|
1565
|
+
The owner's review of 17 November 2026 asks, in its section 2C, that the page stay usable when its connection drops
|
|
1566
|
+
and come back by itself, and its slice 3 that the repair be a qualified update of the pinned client. The lane's start
|
|
1567
|
+
brief of 19 November 2026 (`docs/superpowers/specs/2026-11-19-lanes-mobile-ergonomics-brief.md`, slice E3) names five
|
|
1568
|
+
findings: `no-resume-after-pagehide`, `return-after-pagehide-no-reconnect`, `disconnected-no-way-back`,
|
|
1569
|
+
`no-reconnect-control` and `stale-open-socket-on-return`. The lane lead hypervibe.lanes ruled E3-R0 to E3-R7 the same
|
|
1570
|
+
day; each is named where it applies. Everything here is read from the code and shown against the node suite's fake
|
|
1571
|
+
page and fake client. Nothing was checked in Safari, in the Home Screen app or on an iPhone: the runbook's steps 101 to
|
|
1572
|
+
110 (NOT YET DONE).
|
|
1573
|
+
|
|
1574
|
+
**An interim departure (E3-R0).** The pinned client is never edited: `app.js`, its SRI pin in `index.html` and the
|
|
1575
|
+
other upstream assets stay as they were. After a `pagehide` that client stops its own reconnection for the life of the
|
|
1576
|
+
document (`isPageUnloading`, never cleared; above), so `mobile.js` alone brings such a page back, by reloading it once
|
|
1577
|
+
the server answers. A reload is not the review's repair. It drops what the page held (an open sheet, the filter bar's
|
|
1578
|
+
text, the words), costs a fresh load, and leaves the client's own notice to run on its own terms. BEY-8676 tracks the
|
|
1579
|
+
qualified client update that is to replace it. That update, if it reconnects without a reload, must also undo what E3
|
|
1580
|
+
leaves on the page: the dim, **Reconnect** in **Paste**'s place, `gone`, `bye`, the standing close word (the note for
|
|
1581
|
+
the later resume slice, above), and `hid`, which nothing clears: with it set, every later close on a shown page starts
|
|
1582
|
+
the shell's own check and reload while the client's own reconnection runs. `rl` and `doubt` are page state it meets
|
|
1583
|
+
as well.
|
|
1584
|
+
|
|
1585
|
+
**The check** (`reconnect()`, E3-R4). One request, `fetch('/info/version', {cache: 'no-store', signal:
|
|
1586
|
+
AbortSignal.timeout?.(5e3)})`: the path the pinned client's own connection check asks (the brief cites `app.js` 106),
|
|
1587
|
+
which Caddy hands to Zellij with the other `/info/*` paths (`Caddyfile`, the `@backend` matcher). A 2xx answer reloads
|
|
1588
|
+
the page (`location.reload()`). A non-2xx answer, a rejection (no network) or the 5 s deadline reloads nothing: the
|
|
1589
|
+
shell says `No connection to Lanes`, and a later trigger or tap may check again. One check runs at a time (`rl`): a
|
|
1590
|
+
trigger or a tap while one is on its way adds nothing. A check first says `Reconnecting…` for 25 ticks, once the shell
|
|
1591
|
+
is built. A Safari without `AbortSignal.timeout` (14 and 15; the static came in Safari 16, INFERRED from its release
|
|
1592
|
+
notes) gets no signal from the `?.`, so its check has no deadline; while such a check hangs, every later trigger and
|
|
1593
|
+
tap adds nothing (INFERRED: how long a request can hang is the browser's).
|
|
1594
|
+
|
|
1595
|
+
**When the page checks by itself.** Every automatic check but the stale one needs two things: a `pagehide` in this
|
|
1596
|
+
document (`hid`, set by the `pagehide` listener and never cleared) and an observed terminal socket that is no longer
|
|
1597
|
+
OPEN (`sock?.readyState > 1`: CLOSING or CLOSED). With both, each of these checks, through `back()`: the close itself
|
|
1598
|
+
on a page that is shown (`away` clear); a `pageshow`, from the back/forward cache or not; a `visibilitychange` to
|
|
1599
|
+
visible; and `online`. Without a `pagehide` the client's own reconnection is still on (its notice, its countdown, its
|
|
1600
|
+
reload), so a close there starts no check of the shell's and does not race it (the stale path, below, is the one check
|
|
1601
|
+
without a `pagehide`, and a close ends it). A reload makes a new document with no `pagehide` in it, so neither the
|
|
1602
|
+
load nor its own `pageshow` checks (E3-R4: never at load). That keeps a server that answers the check and refuses the
|
|
1603
|
+
socket from reloading the page in a loop. After a failed check nothing polls: after a `pagehide`, with the socket no
|
|
1604
|
+
longer OPEN, the next return or `online` checks once more, and **Reconnect** stays (E3-R7; after a failed stale check,
|
|
1605
|
+
see below). Close code 4001 (the client's own `Disconnected` notice, closed with Acknowledge; the suite reads it as
|
|
1606
|
+
the server ending this client) sets `bye`; after it nothing checks or reloads by itself, not at the close, not on a
|
|
1607
|
+
return, not on `online` and not at the end of a stale path's doubt (the close ends the doubt, below).
|
|
1608
|
+
|
|
1609
|
+
**The stale socket** (E3-R3, E3-R5). A socket whose network went can still read OPEN after a return (INFERRED for
|
|
1610
|
+
iOS). So a `visibilitychange` to visible after a hide longer than 30 s, with the shell built and the socket OPEN, puts
|
|
1611
|
+
the page in doubt: `doubt = 25`, and `Reconnecting…` for 25 ticks. The hide is timed from the events (`hiddenAt`,
|
|
1612
|
+
written when the document is hidden), because a hidden iOS page runs no tick (INFERRED). The existing tick counts the
|
|
1613
|
+
doubt down; no timer is added, and `tick()` keeps the one interval running while in doubt (E3-R3). A terminal frame
|
|
1614
|
+
(the socket's `message` listener) or a `MobileState` (`api.setData`) ends the doubt and its word, and the page stays.
|
|
1615
|
+
The socket's close ends them too (from the review of E3's commit B), and the close then takes the path of any close
|
|
1616
|
+
above: the client's own loop with no `pagehide`, one check at once after one, nothing after 4001. With none of the
|
|
1617
|
+
three, the 25th tick (5 s of the 200 ms interval, read, not measured) checks once. A lane that is healthy but quiet
|
|
1618
|
+
sends neither a frame nor a `MobileState`, so it is reloaded too (E3-R5). This is the one automatic path that can
|
|
1619
|
+
reload a page whose socket reads OPEN. A healthy lane can also be reloaded after a `pagehide` when the socket's close
|
|
1620
|
+
comes only after the page is shown again (the order of a return is the browser's): the close on a shown page then
|
|
1621
|
+
checks, as any close after a `pagehide` does. While in doubt `send()` answers 3, so **Paste** says `Paste
|
|
1622
|
+
unconfirmed`; the paste and any key are still handed to the open socket, which may be alive. A failed stale check
|
|
1623
|
+
leaves the socket as it was: no **Reconnect** (nothing closed), and `No connection to Lanes` stands until the next
|
|
1624
|
+
input that reaches `send()` with frames. Nothing checks again soon either: `online` and a short return check nothing
|
|
1625
|
+
while the socket reads OPEN, so the next check waits for the socket's close (at once only after a `pagehide`; with
|
|
1626
|
+
none, the client's own loop runs) or for another hide longer than 30 s. E3-R7's one more check on the next return or
|
|
1627
|
+
`online` holds for a failed check after a `pagehide`, not for a failed stale check (Limits, below).
|
|
1628
|
+
|
|
1629
|
+
**Reconnect and the dim** (E3-R1, E3-R2). `refresh()` makes **Reconnect** once, at its first run with `gone` set: a
|
|
1630
|
+
text button (`lanes-button`, its word as its name) put before **Paste**, which is hidden while `gone`
|
|
1631
|
+
(`pasteKey.hidden = !!picker || !!gone`). So it stands right after **Copy**, with the names before it, on a phone and
|
|
1632
|
+
on a tablet (there before the dock), on a lane tab and on a picker. A tap calls `reconnect()`: one check, after 4001
|
|
1633
|
+
too, because a tap is a person's act, not the page's by itself. Nothing hides or removes it: the pinned client reloads
|
|
1634
|
+
rather than reconnects (read in `app.js`), so the page leaves only by a reload. Its width is its word's (48 px at
|
|
1635
|
+
least), which the node suite's model does not measure, so the room the names keep beside it at 320 px is a device
|
|
1636
|
+
question (step 102). It does not cancel `mousedown`, unlike **Copy** and **Paste**, so a tap may take the focus and
|
|
1637
|
+
close an open keyboard (INFERRED, not checked). The close listener dims `#terminal` with an inline style,
|
|
1638
|
+
`id('terminal').style.opacity = '.5'`, a string, whatever the close code (E3-R2: no CSS rule, so no CSS byte and no
|
|
1639
|
+
CSS cap moves). A page in the stale path's doubt is not dimmed: its socket is open.
|
|
1640
|
+
|
|
1641
|
+
**The reload note** (E3-R6). The close listener writes `lanes:unsure` only on a page that is not being put away
|
|
1642
|
+
(`away`), so that a person's own reload does not read a false `Check last input`. A page that then reloads itself
|
|
1643
|
+
would lose the note, so `reconnect()` writes it just before its own reload when the close was uncertain (`gone > 1`)
|
|
1644
|
+
or a write is unanswered (`unacked`; a Paste in the stale path's doubt, with no close at all). A certain close carries
|
|
1645
|
+
nothing, as before. Nothing is ever replayed (DM-LANES-PHONE-UNSURE).
|
|
1646
|
+
|
|
1647
|
+
**What a person sees** (INFERRED from the code and the fake page; nothing seen on a device):
|
|
1648
|
+
|
|
1649
|
+
- After any close: `Disconnected` or `Check last input` on the status line as before, the terminal dimmed, and
|
|
1650
|
+
**Reconnect** in **Paste**'s place beside the names. Without a `pagehide`, for any code but 4001, the client's
|
|
1651
|
+
reconnect notice comes over all of this and reloads by itself once its own check passes; the shell adds nothing.
|
|
1652
|
+
- After a `pagehide` (a page put away, or kept in the back/forward cache): if the socket closed meanwhile, the return
|
|
1653
|
+
says `Reconnecting…` and the page reloads once the server answers; a close that comes after the return (its
|
|
1654
|
+
`pageshow`) does the same at once. The reload lands on the last tab (E1c-2) and says `Check last input` when input
|
|
1655
|
+
was uncertain.
|
|
1656
|
+
- After **Cancel** on the client's notice (which comes only without a `pagehide`): the close word, the dim and
|
|
1657
|
+
**Reconnect**. Nothing reloads by itself until a `pagehide` comes and the page is shown again, or a person taps
|
|
1658
|
+
**Reconnect**.
|
|
1659
|
+
- After close code 4001: the client's own `Disconnected` notice; after Acknowledge, the close word, the dim and
|
|
1660
|
+
**Reconnect**. Nothing checks or reloads by itself. A tap on **Reconnect** checks once and reloads.
|
|
1661
|
+
- A network change: a socket that closes is one of the cases above. With no network the check fails: `No connection
|
|
1662
|
+
to Lanes` for 8 ticks, then the close word again; after a `pagehide`, the `online` that follows checks once more. A
|
|
1663
|
+
socket that stays OPEN on a dead network is not seen until it closes, or until a return after a hide longer than
|
|
1664
|
+
30 s (the stale socket); `online` with the socket OPEN checks nothing.
|
|
1665
|
+
- Back after more than 30 s with the socket OPEN: `Reconnecting…`; anything from Zellij within 25 ticks ends it, and
|
|
1666
|
+
so does a close (then one of the cases above); otherwise one check and, when the server answers, a reload. If the
|
|
1667
|
+
check fails, `No connection to Lanes` stands, with **Paste** and no **Reconnect**, until the socket closes or the
|
|
1668
|
+
page is hidden again for more than 30 s.
|
|
1669
|
+
|
|
1670
|
+
**Limits**, INFERRED from the code and not seen on a device:
|
|
1671
|
+
|
|
1672
|
+
- Whether iOS fires `pagehide` when Safari or the Home Screen app goes to the background, is locked or is switched
|
|
1673
|
+
away from, and whether it keeps a page in the back/forward cache at all (a `pageshow` with `persisted`), is not
|
|
1674
|
+
known. Without a `pagehide` no close starts a check (the stale path aside); the client's own loop is what reloads
|
|
1675
|
+
(steps 103 to 105). A `pagehide` with no `pageshow` on the return leaves `away` set: the close listener then neither
|
|
1676
|
+
runs `back()` nor writes the note, so a close after such a return checks nothing at once (a close after a `pageshow`
|
|
1677
|
+
does); the next `visibilitychange` to visible, `online` or tap on **Reconnect** checks, and `reconnect()` still
|
|
1678
|
+
writes the note before its reload. Steps 101 and 102 log whether a `pageshow` follows a lock or an app switch.
|
|
1679
|
+
- A close during the stale path's doubt ends it, so the doubt's 25th tick checks nothing after a close (T8). When the
|
|
1680
|
+
socket closes while the stale check is on its way (after the 25th tick) on a page with no `pagehide`, the client's
|
|
1681
|
+
own loop and that check both run, and both may reload. The fake client cannot reload (its socket's `onclose` only
|
|
1682
|
+
draws the notice), so the suite counts only `mobile.js`'s reloads; step 101 counts them on a device.
|
|
1683
|
+
- Any word written during the doubt takes the status line from `Reconnecting…`, and the count goes on under it.
|
|
1684
|
+
`Reconnecting…` does not come back by itself: once a timed word's ticks run out the line shows what stands under it
|
|
1685
|
+
(usually nothing), and a standing word stays until the next input; either holds until the 25th tick's check says
|
|
1686
|
+
`Reconnecting…` again.
|
|
1687
|
+
- A failed stale check leaves `No connection to Lanes` standing over a socket that reads OPEN. If the socket was alive
|
|
1688
|
+
after all, its next frame does not end that word; the next input with frames does.
|
|
1689
|
+
- After a failed stale check `online` and a short return check nothing, and there is no **Reconnect**: the socket
|
|
1690
|
+
still reads OPEN, and every trigger but the stale one needs it no longer OPEN. So E3-R7's one more check on the next
|
|
1691
|
+
return or `online` is met after a `pagehide` with the socket closed, not after a failed stale check; the next check
|
|
1692
|
+
waits for the socket's close or for another hide longer than 30 s. The lane lead's rulings E3-R7 and the trigger
|
|
1693
|
+
gate disagree here; the code follows the gate (open, for the lead).
|
|
1694
|
+
- A picker filter typed before a reload stays applied in the sidebar on the server, while the reloaded page's filter
|
|
1695
|
+
bar is empty: the query lives in the sidebar, and the new page starts with an empty `laneFilterPrev` and owes no
|
|
1696
|
+
`Esc`.
|
|
1697
|
+
Typing a letter in the bar and clearing it sends the `Esc`s that end it (step 109).
|
|
1698
|
+
- While the client's notice is up, the close word, the dim and **Reconnect** lie under it, as the close word did
|
|
1699
|
+
before (above).
|
|
1700
|
+
|
|
1701
|
+
Tests: `tests/web/phone.test.mjs` has eleven tests of this slice at its end. Nine are commit A's (eight of them red
|
|
1702
|
+
first on the equivalent-code commit before E3): T1, the checks after a `pagehide`; T2, close code 4001; T3, the
|
|
1703
|
+
triggers' gates, the latch and no poll; T4, the reload note before the shell's own reload; T5, **Reconnect** and the
|
|
1704
|
+
dim, on a phone and a tablet; T6, the stale socket; T7, Paste in doubt; G1, nothing at load and a healthy page
|
|
1705
|
+
unchanged (green before E3 and after it); and a Safari without `AbortSignal.timeout`. Two came with the review of
|
|
1706
|
+
commit B: T8, a close during the stale path's doubt ends it (red on commit B's first form, whose 25th tick still
|
|
1707
|
+
checked), and T9, a close while the page is put away checks nothing until its return (green before the review too; it
|
|
1708
|
+
binds the close listener's `away` guard). Its realm gains, each defaulting to the page before E3: `info` (how `GET
|
|
1709
|
+
/info/version` answers: `ok`, `down` for a 502, `offline` for a rejection, `timeout`; unset never answers),
|
|
1710
|
+
`r.fetched` (every request), an `AbortSignal` whose `timeout(ms)` gives a record a test can read (`abortTimeout:
|
|
1711
|
+
false` gives none), `location.reload()` counting (`r.reloads()`), a document with a settable `hidden` and
|
|
1712
|
+
`visibilitychange` (`r.visibility(hidden)`), `r.online()`, and a `pageshow` with `persisted`. Every E3 test passes
|
|
1713
|
+
`location: {}`, so a test that expects no reload cannot pass for want of one. `PhoneKeys.FILE_TESTS` is 137 (143 since
|
|
1714
|
+
E4, below) and `NAMES` lists the eleven. Bytes: Bundle budget, above (`JS_RESUME_PAGE`).
|
|
1715
|
+
|
|
1716
|
+
### Notification and address links (BEY-8667 E4)
|
|
1717
|
+
|
|
1718
|
+
The lane's start brief of 19 November 2026 (`docs/superpowers/specs/2026-11-19-lanes-mobile-ergonomics-brief.md`,
|
|
1719
|
+
slice E4) names three findings: `push-open-lane-has-no-destination`, `no-deep-link-to-workspace-or-lane` and
|
|
1720
|
+
`push-tap-does-not-reach-the-lane`. Until E4 a push's **Open lane** opened whatever `action_url` named, and the
|
|
1721
|
+
example in `notify.py`'s docstring, `https://lanes.example/?lane={lane}`, carried a query the page at `/` does not
|
|
1722
|
+
read; the push's text named a command, `lanes-launch lane <id>`, that a phone does not run; and no address opened a
|
|
1723
|
+
workspace. The lane lead hypervibe.lanes ruled E4-R1 to E4-R10 the same day; each is named where it applies.
|
|
1724
|
+
Everything here is read from the code and covered by the node suite's fake page and `notify.py`'s unit tests. Nothing
|
|
1725
|
+
was checked against an ntfy server, in Safari, in the Home Screen app or on an iPhone: the runbook's steps 117 to 126
|
|
1726
|
+
(NOT YET DONE).
|
|
1727
|
+
|
|
1728
|
+
**The address** (E4-R5, E4-R6, E4-R7, E4-R10). `https://<server>:8443/<device>-phone?ws=<workspace title>`, the title
|
|
1729
|
+
percent-encoded (`?ws=BW%20Tools`). At the attach, `connect()` reads `ws` from the query once, with the URL standard's
|
|
1730
|
+
`URLSearchParams` (E4-R7), which decodes `%20`, `+` and UTF-8 letters and keeps a stray `%` as it is without throwing
|
|
1731
|
+
(MEASURED in node v22.23.2; Safari's decoding INFERRED, from the same standard). The name picks that workspace's lane
|
|
1732
|
+
list, the tab `<title> ☰`, through E1c-2's restore: when that tab is not the current one, the shell marks a restore as
|
|
1733
|
+
waiting and sends one `FocusPane` to it, as a tap on the workspace's row did until E5a (since E5a a row opens the tab
|
|
1734
|
+
last shown in its workspace, and the query still opens the lane list, ruling E5-R5). Nothing is typed, nothing is
|
|
1735
|
+
written on
|
|
1736
|
+
the server, and the memory is written only once the switch lands, as after any restore (Reopen the last tab, above).
|
|
1737
|
+
The query wins over the memory. A name no tab carries (a hidden board, which gets no tab; a workspace renamed or
|
|
1738
|
+
removed since the push; part of a title) is ignored (E4-R6 B, in line with Q1's default above; BEY-8668 is still
|
|
1739
|
+
open): the page loads as it would without the query, so the remembered tab, if any, comes back and stays remembered.
|
|
1740
|
+
Then `history.replaceState` takes the query out of the address and keeps its path and hash, so a reload has the view's
|
|
1741
|
+
plain address again. An empty `?ws=` reads as none: the memory's restore runs and the empty query stays in the address
|
|
1742
|
+
(E4-R10). A tablet reads the query as a phone does (E4-R5); on a view laid out for a desktop it finds no `☰` tab, so
|
|
1743
|
+
the name is ignored there (INFERRED from `bin/lanes`, which gives only a phone layout picker tabs). A desktop page
|
|
1744
|
+
runs no shell, reads nothing and leaves the address as it is.
|
|
1745
|
+
|
|
1746
|
+
**What Open lane opens** (E4-R2). The workspace's lane list, not the lane: the page cannot pick a lane of the view
|
|
1747
|
+
without writing the view's target on the server, and no route does that. This is the default, A, of the owner's
|
|
1748
|
+
question Q4 (BEY-8670), which is still open for the owner to override; option B, a server route that writes the view's
|
|
1749
|
+
target, would be a slice of its own with a security review.
|
|
1750
|
+
|
|
1751
|
+
**The push** (E4-R3, E4-R4). `notify.conf` gains `lane_url`, optional and with no default, so no push changes on a
|
|
1752
|
+
host until the operator sets it, apart from an `action_url` that already holds `{ws}` (below). It is the needs-you
|
|
1753
|
+
push's tap target and its **Open lane** button, a template over `{lane}` and the new `{ws}`. `{ws}` is the title of
|
|
1754
|
+
the lane's workspace, from the registry the service already reads for lane names (`notify.lane_workspaces`),
|
|
1755
|
+
percent-quoted with nothing kept safe (`quote(title, safe='')`: a space is `%20`, `+` is `%2B`). It is empty for a
|
|
1756
|
+
lane in no workspace of the registry (an unregistered lane), and for a title that is not a string or holds a lone
|
|
1757
|
+
surrogate, which UTF-8 cannot encode: such a board is skipped, so one bad title never stops the service's tick. The
|
|
1758
|
+
operator writes the view's path once:
|
|
1759
|
+
`lane_url=https://<server>:8443/<device>-phone?ws={ws}`. The path must name the view: at `/` the pinned client shows
|
|
1760
|
+
its session chooser and, on its way to a session, drops the query (`app.js` 3493 and 3501-3503, read, not run). With
|
|
1761
|
+
`lane_url` set, the push's text is its first line alone, `<lane name>: <agent task> — <status>`, without
|
|
1762
|
+
`lanes-launch lane <id>`, and the label stays **Open lane**. One topic serves every subscriber and names no person, so
|
|
1763
|
+
a desk's ntfy client gets the same text and tap (in a desktop browser the page then moves nothing), and no `{view}`
|
|
1764
|
+
placeholder is built: nothing says whose phone view to name. Without `lane_url` a push is as before: both lines, and
|
|
1765
|
+
`action_url` as its tap target (`https://<server>:8443{doc}` with an empty `{doc}`, so the server's root, for a
|
|
1766
|
+
needs-you push). `action_url` keeps its role: a `published` push still opens its document through `{doc}`
|
|
1767
|
+
(`https://<server>:8443{doc}`). `action_url` fills `{ws}` too, as the lead confirmed the same day, and a `published`
|
|
1768
|
+
push's `{ws}` is empty; an `action_url` that already held `{ws}`, which was sent as written before E4, now carries the
|
|
1769
|
+
title, or nothing. With `{ws}` in a template, workspace titles go to the ntfy server in the tap address; the
|
|
1770
|
+
runbook's operator gate lists it.
|
|
1771
|
+
|
|
1772
|
+
**The Rust twin.** `crates/lanes-runtime/src/notify/`, built and unwired (it sends nothing), reads neither `lane_url`
|
|
1773
|
+
nor `{ws}`. Its golden, `ntfy-bodies.golden.json`, is recorded from `notify.py` with `action_url` configs only
|
|
1774
|
+
(`generate_ntfy_golden.py`), so E4 leaves the recorded bodies as they were, and parity now holds only for a config
|
|
1775
|
+
without `lane_url` and without `{ws}`. E4 mends the twin's doc comments that said otherwise to say so, and changes
|
|
1776
|
+
no Rust code (ruling E4-R8; the lead added the three `ntfy.rs` docs the review found, by the rule that a text which
|
|
1777
|
+
stops being true is mended in the change that makes it untrue): `notify/mod.rs`'s "byte for byte", and in
|
|
1778
|
+
`notify/ntfy.rs` the module doc ("byte for byte what `notify.py` `send` POSTs"), `LANDED_KEYS`, the `NtfyConfig` doc
|
|
1779
|
+
("as read by `notify.py` `read_config`") and `click_of`'s (`notify.py` `action_url`, over `{lane}` and `{doc}`
|
|
1780
|
+
only). The parity gap is BEY-8695. Until it is closed, one more text states parity without that condition: the E20
|
|
1781
|
+
row's notes in `docs/contracts/lanes2/manifests/parity.json` ("notify.py's exact body"). The conformance detectors
|
|
1782
|
+
read that file, so its change belongs to BEY-8695's parity work, not to E4.
|
|
1783
|
+
|
|
1784
|
+
**Limits**, INFERRED from the code and not seen on a device:
|
|
1785
|
+
|
|
1786
|
+
- A push opens Safari, probably not the Home Screen app (no source here says which; BEY-8670 says "probably"). That
|
|
1787
|
+
page is another Zellij client of the same view. It asks for the login token when that Safari has not logged in to
|
|
1788
|
+
this server, and it may open a new tab per tap (steps 118, 120, 122 and 126). Whether the ntfy app opens the address
|
|
1789
|
+
in a view of its own, with storage of its own, is step 118.
|
|
1790
|
+
- That a `FocusPane` from one client leaves another client's tab where it was (the Home Screen app open on the same
|
|
1791
|
+
view while a push opens Safari) is step 121.
|
|
1792
|
+
- The page reads the query from the address the browser shows. Caddy's view route rewrites to `index.html` inside
|
|
1793
|
+
Caddy, with no redirect (`Caddyfile`), so the query stays; a redirect on the way (Tailscale Serve, the ntfy app)
|
|
1794
|
+
could drop it, and none is known.
|
|
1795
|
+
- The token login is a modal and a request that change no address (read in `modals.js` and `app.js`), so the query
|
|
1796
|
+
waits through the login.
|
|
1797
|
+
- If the server answers another session for the path, the pinned client rewrites the address to that session before
|
|
1798
|
+
the attach and the query is lost (the server's answer for a missing session was not read).
|
|
1799
|
+
- A reload before the switch lands follows the old memory: the query is gone and nothing was written yet. The
|
|
1800
|
+
`FocusPane` is sent at the attach, so this is rare.
|
|
1801
|
+
- Two boards with one title: the first lane list of that name wins; nothing checks that board titles are unique. A
|
|
1802
|
+
board renamed after the push, or a tab renamed in Zellij, is a name no tab carries.
|
|
1803
|
+
- A registry read that fails (a torn write) empties the service's lane names and titles until the registry changes
|
|
1804
|
+
again, as it emptied the names before E4; such a push has an empty `{ws}`, and the page does a plain load.
|
|
1805
|
+
|
|
1806
|
+
Tests: `tests/web/phone.test.mjs` has six tests of this slice at its end, commit A's, P1 to P5 written red first and
|
|
1807
|
+
G1 a guard, green before E4 and meant to stay green after it: P1, `?ws=Build` sends one `FocusPane` to Build's picker,
|
|
1808
|
+
types nothing, takes the query out with the hash kept and remembers the tab once the switch lands; P2, the query wins
|
|
1809
|
+
over the memory, and where it names the picker the client attached on, nothing moves; P3, a name no tab carries is
|
|
1810
|
+
ignored and the query still goes; P4, a percent-quoted title, `?ws=BW%20Tools%20%C3%A6`, is read whole; P5, a tablet
|
|
1811
|
+
reads the query and a desktop page reads nothing; G1, an address with no `ws`, or an empty one, keeps E1c-2's restore
|
|
1812
|
+
and is never rewritten. Its realm gains `URLSearchParams` and, with `location`, a `history` whose `replaceState`
|
|
1813
|
+
records each call in `r.replaced` (`tests/README.md`); `links.test.mjs` and `version.test.mjs` gain the same global,
|
|
1814
|
+
because the fix's `connect()` reads the query there too. `PhoneKeys.FILE_TESTS` is 143 (150 since E5a, below) and
|
|
1815
|
+
`NAMES` lists the six.
|
|
1816
|
+
`tests/unit/test_notify.py` has five more, N1 to N5: `{ws}` percent-quoted and empty when unknown, a surrogate title
|
|
1817
|
+
skipped; `lane_url` as the needs-you tap target, its push naming no command; a `published` push keeping
|
|
1818
|
+
`action_url`; `lane_url` read from `notify.conf`; the Watcher filling `{ws}` from the registry it reads. Bytes:
|
|
1819
|
+
Bundle budget, above (`JS_DEEP_LINK`).
|
|
1820
|
+
|
|
1821
|
+
### Reopen the last workspace and lane on a laptop (BEY-8667 Ed)
|
|
1822
|
+
|
|
1823
|
+
An owner's request relayed on 20 November 2026: "…starts on the last workspace i had open for both…". E1c-2 gave a
|
|
1824
|
+
phone and a tablet their last tab; Ed gives the laptop's browser view (`lanes-launch web laptop`, the desktop shell,
|
|
1825
|
+
`<html data-lanes-shell="desktop">`) its last workspace and lane. The lane lead ruled the slice the same day:
|
|
1826
|
+
desktop resume only. Nothing here was checked in a browser.
|
|
1827
|
+
|
|
1828
|
+
**The memory.** One `localStorage` key per address: `lanes:desktop:` and the page's path, for example
|
|
1829
|
+
`lanes:desktop:/anna-mbp-web`. Its value is JSON, `{"workspace": "<name>", "lane": "<label>"}`, the labels the
|
|
1830
|
+
desktop bar's two pickers show (`laneBarModel()`): the workspace's name without ` ☰`, and the lane's pane title
|
|
1831
|
+
(`Pane <id>` for a pane without one, `☰ Choose a lane` for the workspace's lane list). It holds no input and nothing
|
|
1832
|
+
else (`docs/master-datamodel.md`, DM-LANES-DESKTOP-LAST-LANE). `browser.js` keeps it only in desktop mode; a tablet
|
|
1833
|
+
keeps E1c-2's `lanes:tab:`, and a phone never loads `browser.js`.
|
|
1834
|
+
|
|
1835
|
+
**Going back.** The desktop `render()` runs at each state the client delivers (its `setData`). At the first state
|
|
1836
|
+
with a current pane it reads the record, once per page load. `laneDesktopPane(state, record)` picks one pane: the
|
|
1837
|
+
remembered lane in the remembered workspace; when that lane is gone, the workspace's first pane, unless that
|
|
1838
|
+
workspace is the current one (then nothing moves); when the workspace is gone (removed, hidden or renamed), nothing.
|
|
1839
|
+
When the pick is not the current pane, the page sends one `FocusPane` to it, as a pick in the bar does. Nothing is
|
|
1840
|
+
typed into any lane.
|
|
1841
|
+
|
|
1842
|
+
**Remembering.** `render()` writes the current workspace and lane when either, or the key, differs from the last
|
|
1843
|
+
write. The last write is set before the try, so a storage that refuses it is asked once per change. Nothing is
|
|
1844
|
+
written while the restore is on its way: the wait ends at the first state whose workspace or lane differs from the
|
|
1845
|
+
one the page started on (the restore landed, or a move made inside Zellij), or at a pick in the bar. A move made
|
|
1846
|
+
inside Zellij (its keys, or the Lanes sidebar) is remembered as a pick is, and is never answered with a `FocusPane`.
|
|
1847
|
+
|
|
1848
|
+
**No connection status.** The desktop page keeps the `WebSocket` it was given (BEY-8609 slice 2b;
|
|
1849
|
+
`tests/web/phone.test.mjs` pins it), so the bar cannot know whether the terminal socket is open, and it says nothing
|
|
1850
|
+
about the connection. The lane lead ruled so on 20 November 2026, when the legacy patch
|
|
1851
|
+
(`legacy-web-mobile-ux.patch`, sha256 `07adf20c…`) proposed a permanent `Live`: its word came from the state
|
|
1852
|
+
(`workspaces.length`) and would say Live with a dead socket. A desktop status, if wanted, is a later slice of its
|
|
1853
|
+
own.
|
|
1854
|
+
|
|
1855
|
+
Limits, INFERRED from the code and not seen in a browser:
|
|
1856
|
+
|
|
1857
|
+
- Where Zellij puts a new web client is not read from any code here (E1c-2 INFERRED the first tab).
|
|
1858
|
+
- A pane's title can change (a program that sets its terminal title). The remembered lane is then not found, and the
|
|
1859
|
+
page goes to the workspace's first pane, or stays when that workspace is current.
|
|
1860
|
+
- Two pages of one view share the key; each reads it only when it loads, and the last write wins. No page follows
|
|
1861
|
+
another.
|
|
1862
|
+
- With storage blocked, or the website data cleared, nothing is remembered and the page opens where Zellij puts it.
|
|
1863
|
+
- A `FocusPane` sent while the control socket is not open is dropped by the client (`app.js` 3163-3171), as in
|
|
1864
|
+
E1c-2.
|
|
1865
|
+
|
|
1866
|
+
Not yet checked in a browser: the runbook's Ed steps (111 to 116, NOT YET DONE). Tests:
|
|
1867
|
+
`tests/web/activation.test.mjs` has six tests of this slice at its end: the pane `laneDesktopPane()` picks for each
|
|
1868
|
+
case; one restore at the first state with a current pane and no write while it waits; the record per address across
|
|
1869
|
+
loads; a pick ending the wait; a gone workspace, a record that is not JSON and blocked storage; one write per
|
|
1870
|
+
workspace and lane, and one try at a refusing storage. Bytes: Bundle budget, above.
|
|
1871
|
+
|
|
1872
|
+
### Moving between workspaces (BEY-8667 E5a)
|
|
1873
|
+
|
|
1874
|
+
The lane's start brief of 19 November 2026 (`docs/superpowers/specs/2026-11-19-lanes-mobile-ergonomics-brief.md`,
|
|
1875
|
+
slice E5) names four findings. E5a takes three: `no-one-tap-way-back-to-a-lane`, `card-opens-picker-not-kept-lane`
|
|
1876
|
+
and, in part, `panes-button-lists-whole-session`. Until E5a **Lanes** on a lane list sent a `FocusPane` to that same
|
|
1877
|
+
lane list, so nothing visible changed (INFERRED); a workspace row always opened the tab it was built with (its lane
|
|
1878
|
+
list); and **Panes** showed on every lane tab, though a phone's lane tab has one terminal pane. The lane lead
|
|
1879
|
+
hypervibe.lanes ruled the rulings E5a rests on the same day (E5-R0 to E5-R5, E5-R8 to E5-R11 and E5-R13; E5-R6,
|
|
1880
|
+
E5-R7 and E5-R12 go with E5b), each named where it applies, and split the slice (E5-R13): the fourth finding,
|
|
1881
|
+
`needs-you-elsewhere-is-invisible`, a count on **Workspaces** of what needs you in the other workspaces, is E5b, later
|
|
1882
|
+
work whose words meet BEY-8630's badge items. Everything here is read from the code; the node suite's fake page and
|
|
1883
|
+
client pin what Tests, below, lists, and the rest (Tests names it) is read from the code only. Nothing was checked in
|
|
1884
|
+
Safari, in the Home Screen app or on an iPhone: the runbook's steps 127 to 134 (NOT YET DONE).
|
|
1885
|
+
|
|
1886
|
+
**Lanes toggles** (E5-R2). On a workspace's lane list (its tab `<title> ☰`) **Lanes** sends one `FocusPane` to that
|
|
1887
|
+
workspace's lane tab, the tab named exactly `<title>`; on the lane tab it sends one to the lane list, as before. On a
|
|
1888
|
+
tab with no lane list (an SSH workspace or a tool) it opens the Workspaces sheet, as before. Nothing is typed.
|
|
1889
|
+
`aria-pressed` is unchanged, pressed on the lane list, so it now says what a second tap undoes. `bin/lanes` gives
|
|
1890
|
+
every board both tabs, but a lane tab can be closed inside Zellij; on a lane list whose lane tab is gone **Lanes**
|
|
1891
|
+
sends nothing and, unlike before E5a, leaves an open sheet open (`focusTab()` finds no pane and returns before
|
|
1892
|
+
`closeSheet()`), until the next `lanes ensure` pass adds the tab back: `lanes-ensure.timer` runs it every minute,
|
|
1893
|
+
and while a client is attached it adds each missing tab (INFERRED from `bin/lanes` `ensure_views` →
|
|
1894
|
+
`cmd_upgrade_session` → `libexec/device_sync.py` `reconcile`; step 130). The sheet left open matters on a tablet,
|
|
1895
|
+
where the sheet is a side panel and **Lanes** is in the top bar (INFERRED reachable). The lead kept this default; the
|
|
1896
|
+
plan's +10 B alternative, a tap that focuses the lane list again, was not taken.
|
|
1897
|
+
|
|
1898
|
+
**A workspace row** (E5-R1, E5-R3; D11's click). A row opens the tab last shown in its workspace:
|
|
1899
|
+
`focusTab(tabNamed(mem.ws[name]), tab)`, the remembered tab name looked up in the state at the press. It falls back
|
|
1900
|
+
to the tab the row was built with (its lane list, or the one tab of a workspace with no lane list) when nothing is
|
|
1901
|
+
remembered for that workspace, when no tab has the remembered name (a tab closed or renamed since), and when that
|
|
1902
|
+
tab has no terminal pane: `focusTab(tab, or)` takes the first terminal pane of `tab`, else of `or` (E5-R1's
|
|
1903
|
+
alternative, which the lead took; under the plan's 0 B default such a row did nothing and left the sheet open). So
|
|
1904
|
+
after Build's lane tab was shown, Build's row opens it; after Build's lane list was shown last, the row opens the lane
|
|
1905
|
+
list. The row of the current workspace only closes the sheet and sends nothing (E5-R3's alternative,
|
|
1906
|
+
`name == bare() ? closeSheet() : …`, read at the press): on a lane tab with two terminal panes the focus stays on the
|
|
1907
|
+
pane that has it, and the current row of a workspace with no lane list moves nothing either. Every move that sends a
|
|
1908
|
+
`FocusPane` lands on a tab's first terminal pane (`paneAt()`), not on the pane that was active there: a row, the
|
|
1909
|
+
toggle, and, as before, E1c-2's restore and E4's `?ws=`. D11's rebuild and patch rules are unchanged (Header, words
|
|
1910
|
+
and workspace list, above); only the click's target changed. There is still no recent list and no back gesture (the
|
|
1911
|
+
brief's impact names both): each needs a design ruling.
|
|
1912
|
+
|
|
1913
|
+
**The memory** (E5-R4). One value per address under E1c-2's key, `lanes:tab:<path>`, now
|
|
1914
|
+
`{"tab": "<the last tab>", "ws": {"<workspace>": "<the tab last shown in it>"}}` (member order not fixed). A map key
|
|
1915
|
+
is the workspace's name as its row shows it (`bare()`, the current tab's name without ` ☰`), and its value the whole
|
|
1916
|
+
tab name (`Build` for Build's lane tab, `Build ☰` for its lane list). `refresh()` writes it at the same moments as
|
|
1917
|
+
before (the current tab's name or the key changed, and no restore waits): `mem.ws[name] = mem.tab = tab.name`, then
|
|
1918
|
+
`setItem` with the whole `mem`. `mem` is the page's copy, and rows read it at each press; the stored value is read
|
|
1919
|
+
once, at the attach, from the address's own key (`connect()`: `mem = {tab: kept.tab, ws: {...kept.ws}}`, inside
|
|
1920
|
+
`try`). There is no migration: an E1c-2 value, `{"tab": …}`, reads as an empty map, so each row opens the tab it was
|
|
1921
|
+
built with (its lane list) until its workspace's tab is shown at that address, and `tab` restores as before. A map
|
|
1922
|
+
that is not an object (`null`, a string, an array) is read as an object, keeping any index keys a string or an array
|
|
1923
|
+
spreads into it, and is written
|
|
1924
|
+
back as one; no value, a value that is not JSON and a storage that throws leave the page's map empty. With storage
|
|
1925
|
+
blocked the page keeps its map until it reloads. The lane list shown while a restore waits is not remembered, as
|
|
1926
|
+
before. Accepted by the lead at 0 B (E5-R4):
|
|
1927
|
+
|
|
1928
|
+
- After a session switch made inside Zellij (`history.pushState`) the page's map goes on whole under the new path, as
|
|
1929
|
+
`tab` does, and the old session's entries are written under the new key at its next write. Views are built from
|
|
1930
|
+
the same boards, so they share workspace titles: a row of the new view whose name the old view remembered opens the
|
|
1931
|
+
new view's tab of the remembered name, when there is one, else its lane list (INFERRED harmless: one `FocusPane`,
|
|
1932
|
+
nothing typed).
|
|
1933
|
+
- Two pages of one view: the last write wins for the whole map. Each page reads it only at its own attach, so no page
|
|
1934
|
+
follows another (the default of owner question Q2, BEY-8669, still open).
|
|
1935
|
+
- No entry is ever pruned: one short entry per workspace name shown at that address, kept until the key is deleted
|
|
1936
|
+
(`docs/master-datamodel.md`, DM-LANES-PHONE-LAST-TAB).
|
|
1937
|
+
- A workspace renamed: until the page shows it under the new name, its row opens its lane list, as nothing is
|
|
1938
|
+
remembered under that name (E5-R1, E5-R4); a row whose remembered tab is gone opens its lane list too (E5-R1). A
|
|
1939
|
+
removed or hidden workspace has no tab, so no row; a hidden one shown again gets its tabs back under the same
|
|
1940
|
+
names, so its row opens the remembered tab. At a reload a remembered name no tab carries restores nothing (the
|
|
1941
|
+
default of owner question Q1, BEY-8668, still open).
|
|
1942
|
+
|
|
1943
|
+
**`?ws=`** (E5-R5). Unchanged: the query opens the lane list, not the remembered tab (E4-R2, the default of owner
|
|
1944
|
+
question Q4, BEY-8670). After such a load the lane list is the tab last shown in that workspace, so its row opens the
|
|
1945
|
+
lane list until its lane tab is shown.
|
|
1946
|
+
|
|
1947
|
+
**Panes and Type here** (E5-R8 to E5-R11). **Panes** shows only on a tab with two terminal panes or more:
|
|
1948
|
+
`panesButton.hidden = picker || !panesAt(tab?.position)[1]`, where `panesAt(pos)` lists the tab's panes that are not
|
|
1949
|
+
plugins (`pos >= 0` first, as `paneAt()` had). It is hidden on a lane list, as before; on a phone's lane tab, which
|
|
1950
|
+
`bin/lanes` lays out as one command pane beside the default template's compact-bar plugin pane (that the client
|
|
1951
|
+
reports that pane with `is_plugin: true` is INFERRED); on a tool tab; and with no current tab. It shows on any tab
|
|
1952
|
+
with two terminal panes or more (an SSH workspace's with two, or a lane tab after the client's **More → Change Pane →
|
|
1953
|
+
+ New Pane**), where it still opens
|
|
1954
|
+
the client's session-wide pane list, so `panes-button-lists-whole-session` stays open there (E5-R8). The rule is the
|
|
1955
|
+
same on a phone and a tablet. On a tab where **Panes** is hidden and that is not a picker, **Type here** spans the
|
|
1956
|
+
freed cell: `refresh()` sets `typingField.style.gridColumn = 'span 2'`, an inline style, and `''` on a picker and
|
|
1957
|
+
where **Panes** shows (E5-R9), so the dock's four columns hold four cells on every tab, as DEF-1737 asks; on a lane
|
|
1958
|
+
list the filter bar and **Type here** take one cell each, as before. No CSS: CSS cannot see how many panes a tab has,
|
|
1959
|
+
and the CSS caps have 37 B and 5 B left; the inline style is the file's way, as E3's dim is. `if (typingField)`
|
|
1960
|
+
guards it: `buildTypingField()` gives `null` when the client's capture host is missing (`version.test.mjs`'s page has
|
|
1961
|
+
none). Calculated from `mobile.css` (INFERRED, no layout run; a border-box dock and no side safe-area insets assumed):
|
|
1962
|
+
at 375 px a cell is (375 − 16) / 4 = 89.75 px, **Type here** 85.75 px, and spanning two cells 175.5 px; at 320 px,
|
|
1963
|
+
72 px and 148 px. In landscape the dock is 48 px high and **Type here** 44 px, as before. On a tablet the dock is a
|
|
1964
|
+
flex row in the top bar (`browser.css`), so the span does nothing there (INFERRED) and **Type here** keeps its
|
|
1965
|
+
140 px. The client's own **More → Change Pane** still lists every pane, with **+ New Tab** and **+ New Pane**; the
|
|
1966
|
+
pinned client is not edited.
|
|
1967
|
+
|
|
1968
|
+
**Lost on purpose.**
|
|
1969
|
+
|
|
1970
|
+
- **Lanes** on a lane list no longer focuses that lane list again; it opens the lane tab.
|
|
1971
|
+
- **Lanes** on a lane list whose lane tab is gone no longer closes an open sheet (E5-R2).
|
|
1972
|
+
- **Panes** on a tab with one terminal pane. Its list showed that pane only; **+ New Tab** and **+ New Pane** stay
|
|
1973
|
+
under **More → Change Pane**.
|
|
1974
|
+
- A row of the current workspace no longer sends a `FocusPane` (E5-R3).
|
|
1975
|
+
|
|
1976
|
+
**Limits**, INFERRED from the code and not seen on a device:
|
|
1977
|
+
|
|
1978
|
+
- That the client reports the compact-bar pane as a plugin. If it does not, a phone's lane tab counts two terminal
|
|
1979
|
+
panes, and **Panes** stays with **Type here** in one cell (step 132).
|
|
1980
|
+
- The span's width, and that a tap anywhere on the wider **Type here** opens the keyboard (step 132).
|
|
1981
|
+
- Whether **Lanes** in a tablet's top bar can be reached while the Workspaces panel is open (step 127).
|
|
1982
|
+
- A row, the toggle and a restore land on a tab's first terminal pane, so on a lane tab with two terminal panes the
|
|
1983
|
+
focus leaves the second one (step 131).
|
|
1984
|
+
- Whether Safari and the Home Screen app share the memory, as for E1c-2 (Reopen the last tab, above).
|
|
1985
|
+
|
|
1986
|
+
Tests: `tests/web/phone.test.mjs` has seven tests of this slice at its end, commit A's: T1 to T4 and T7 written red
|
|
1987
|
+
first, and T5 and T8 guards, expected green before E5a (INFERRED until commit A's job runs) and meant to stay green
|
|
1988
|
+
after it (T6, the Workspaces count, is E5b's). T1, **Lanes** toggles a workspace's lane list and its lane tab, one
|
|
1989
|
+
`FocusPane` each way, opens the sheet on a tab with no lane list and does nothing on a lane list whose lane tab is
|
|
1990
|
+
gone; T2, a row opens the tab last shown in its workspace, or its lane list when that was last or when the remembered
|
|
1991
|
+
tab has no terminal pane, and the current workspace's row only closes the sheet, on a two-pane tab and for a workspace
|
|
1992
|
+
with no lane list; T3, the memory survives a reload, read at the attach from its own address's key, and with storage
|
|
1993
|
+
blocked lasts until the page reloads; T4, one stored value per address, `{"tab", "ws"}`, an E1c-2 value or a broken
|
|
1994
|
+
map still restores and is written back with an object map; T5, a gone remembered tab opens the lane list, and `?ws=`
|
|
1995
|
+
still opens the lane list; T7, **Panes** only with two terminal panes or more, and the span on a lane tab with one,
|
|
1996
|
+
read from the field's inline style because the suite's CSS model reads no `grid-column` (E5-R11); T8, the dock's shown
|
|
1997
|
+
cells fill its four columns on every tab, and a row pressed after the state is gone sends nothing and throws nothing.
|
|
1998
|
+
The realm takes no new option (`tests/README.md`). `PhoneKeys.FILE_TESTS` is 150 and `NAMES` lists the seven. Bytes:
|
|
1999
|
+
Bundle budget, above (`JS_WORKSPACE_MOVES`). Read from the code only, with no test: **Lanes** leaving an open sheet
|
|
2000
|
+
open on a lane list whose lane tab is gone (T1 taps it with the sheet closed); the map carried on after a session
|
|
2001
|
+
switch; two pages of one view; and **Panes** hidden with no current tab. `picker ||` in **Panes**'s rule is pinned by
|
|
2002
|
+
T7's last case, added in E5a's fix commit: a lane list with two terminal panes keeps **Panes** hidden (without it
|
|
2003
|
+
**Panes** would show beside the filter bar, five cells in four columns); a sabotage leg deletes `picker || `.
|
|
2004
|
+
|
|
2005
|
+
### Typed letters and the no-connection guard (BEY-8667 E7a)
|
|
2006
|
+
|
|
2007
|
+
The lane's start brief of 19 November 2026 names `typed-letters-bypass-send`: the software keyboard's letters, and its
|
|
2008
|
+
Return, Tab, Esc and arrows, reach the pinned client's own `__zjSoftKbdCapture.sendFn` (upstream `app.js` :785 and
|
|
2009
|
+
:837-864), which is `websockets.sendAnsiKey`, `wsTerminal.send(payload)`. They never passed through `send()`, so on a
|
|
2010
|
+
closed socket a browser discarded them with no word, while the socket connected the send threw out of the client's
|
|
2011
|
+
handler, and a letter typed just before a close never counted for the reload note: the close said `Disconnected`, not
|
|
2012
|
+
`Check last input`. The lane lead ruled the fix on 21 November 2026.
|
|
2013
|
+
|
|
2014
|
+
**The wrapper.** `connect()` keeps the client's function in `f` and sets
|
|
2015
|
+
`k.sendFn = b => sock?.readyState - 1 ? hint('Not sent: no connection') : (f(b), sentAt = now(), unacked = 1)`.
|
|
2016
|
+
While the observed terminal socket is CONNECTING, CLOSING or CLOSED a typed key is refused with the existing words,
|
|
2017
|
+
and the socket's opening turns them into `Not sent: try again`, as for every refused key (above). On an open socket
|
|
2018
|
+
the key is handed over as before and counts for the reload note, as `send()`'s keys do. With no socket observed (`sock`
|
|
2019
|
+
unset, so `sock?.readyState - 1` is `NaN`, which is false, as in `send()`) the key is handed over as before: the shell
|
|
2020
|
+
cannot tell, and refusing would block every key. `send()`
|
|
2021
|
+
reads the same property, so its frames pass the wrapper too on an open socket; the second write of `sentAt` and
|
|
2022
|
+
`unacked` is harmless. No new word.
|
|
2023
|
+
|
|
2024
|
+
**Wrapped once.** `connect()`'s body runs once per page: it returns at `if (api || …)`, and `api` is set once and
|
|
2025
|
+
never reset. The pinned client writes `sendFn` only at boot, `app.js` :604 (`__zjImeBypass`) and :672
|
|
2026
|
+
(`__zjSoftKbdCapture`), both from `setupInputHandlers` (:3518), before `connect()` can attach (it needs the capture
|
|
2027
|
+
element, made after `sendFn` in the same call), and every reconnect reloads the page (`connection.js`
|
|
2028
|
+
`handleReconnection`; the shell's `reconnect()` too). A later client that re-attached without a reload, or wrote
|
|
2029
|
+
`sendFn` after the attach, would lose or nest the wrapper: T5 pins the one wrap.
|
|
2030
|
+
|
|
2031
|
+
**Limits**, INFERRED from the code and not seen on a device:
|
|
2032
|
+
|
|
2033
|
+
- A refused typed key replaces a standing word through `hint()`, as a refused strip key does (BEY-8630 item 7's open
|
|
2034
|
+
question, unchanged in kind); a typed key handed over still clears no word (item 1 stays open).
|
|
2035
|
+
- The client's IME bypass (`__zjImeBypass.sendFn`, on xterm's own textarea) and xterm's custom key handler (a hardware
|
|
2036
|
+
keyboard while xterm's textarea has the focus) still call the client's own function. On a phone the capture has the
|
|
2037
|
+
focus; on a tablet with a hardware keyboard the capture is INFERRED to have it too (a RUNBOOK E7a device step).
|
|
2038
|
+
- An armed CTRL or ALT is not used up by a refused letter (the merge runs inside `sendAnsiKey`), BEY-8623's area.
|
|
2039
|
+
- A letter typed while the client is between a close and its own reload is refused; the reload then decides what the
|
|
2040
|
+
page says.
|
|
2041
|
+
|
|
2042
|
+
Tests: `tests/web/phone.test.mjs` has five tests of this slice at its end, commit A's: T1 a letter or Return into a
|
|
2043
|
+
closing or closed socket, refused with the words and offered nothing; T3 a connecting socket, refused without a throw,
|
|
2044
|
+
then `Not sent: try again` at the opening; T2 a letter on an open socket, then a close, `Check last input`; T4 an
|
|
2045
|
+
unobserved socket, letters still sent (green before and after); T5 the same wrapper after 50 ticks and the opening,
|
|
2046
|
+
one letter offered once (green before and after; a wrap above the `api` guard turns it red). `PhoneKeys.FILE_TESTS` is
|
|
2047
|
+
155. Bytes: Bundle budget, above (`JS_TYPED_GUARD`).
|
|
2048
|
+
|
|
2049
|
+
### A pinch kept, and page zoom (BEY-8667 E9)
|
|
2050
|
+
|
|
2051
|
+
The lane's start brief names `pinch-text-size-not-kept` and `page-zoom-resizes-lane`. The client's pinch sets
|
|
2052
|
+
`term.options.fontSize` itself, clamped to its own 6..96 px (upstream `app.js` :1157-1164), and dispatches
|
|
2053
|
+
`zellij:rendering-resize`; until E9 the shell's `fontSize` (14..24 px, stored as `lanes:font-size`) never heard it, so
|
|
2054
|
+
**Text size** showed the old size, A+ stepped from it and a reload undid the pinch. And a pinch on the bars zoomed the
|
|
2055
|
+
page, which shrank the lane's columns through `viewport()`. The lane lead ruled the fix on 21 November 2026; the boot
|
|
2056
|
+
geometry, the brief's third finding here, is a later slice after a device measurement.
|
|
2057
|
+
|
|
2058
|
+
**The pinch.** A listener on `zellij:rendering-resize`, registered in `connect()` right after its first `applyFont()`
|
|
2059
|
+
(registered at load, it read the client's boot size, 24 px on a phone, while the shell was being built, and stored it;
|
|
2060
|
+
T5 pins this), calls `setFont(term.options.fontSize)` when the terminal's size
|
|
2061
|
+
differs from the shell's; `setFont(n)` rounds and clamps to 14..24 and calls `applyFont()`, which sets the terminal,
|
|
2062
|
+
writes the store only when its value differs (the lead's condition: a pinch's many events write once), shows the size
|
|
2063
|
+
in the row and dispatches its own resize, which then finds the sizes equal and stops (the loop-breaker). The A−/A+
|
|
2064
|
+
buttons call the same `setFont()`.
|
|
2065
|
+
|
|
2066
|
+
**Page zoom.** `viewport()` returns at once while `visualViewport.scale` is over 1.01, so the lane keeps its box while
|
|
2067
|
+
the page is zoomed; at scale 1 it follows the viewport as before.
|
|
2068
|
+
|
|
2069
|
+
**Limits**, INFERRED from the code and not seen on a device:
|
|
2070
|
+
|
|
2071
|
+
- A pinch past 24 or under 14 snaps to the bound at each step: the client sets its size, the shell sets it back. Whether
|
|
2072
|
+
that janks is a RUNBOOK E9 device step; the range stays the shell's (the lead's ruling).
|
|
2073
|
+
- The client's own pinch overlay and its `fitAddon` run as before; only the size they settle on is taken.
|
|
2074
|
+
- While the page is zoomed, the keyboard test in `viewport()` does not run either; it runs again at scale 1.
|
|
2075
|
+
|
|
2076
|
+
Tests: `tests/web/phone.test.mjs` has four tests of this slice at its end, commit A's: T1 a pinch kept, shown and
|
|
2077
|
+
stepped on from; T2 the clamp at 14 and 24; T3 five steps to one clamped size, one write, one resize event of the
|
|
2078
|
+
shell's own per step; T4 page zoom and scale 1; T5 the client's boot size not taken as a pinch at the attach.
|
|
2079
|
+
`PhoneKeys.FILE_TESTS` is 160. Bytes: Bundle budget, above
|
|
2080
|
+
(`JS_TEXT_SIZE`).
|
|
2081
|
+
|
|
288
2082
|
## Lane directory (Lanes 2.0, fan-out F3)
|
|
289
2083
|
|
|
290
2084
|
`directory.js` and `directory.css` are the browser's view of the one lane directory every Lanes client shows
|
|
@@ -504,23 +2298,39 @@ S3 inbox and S5 builds documents reach no client before gates I1/I3), so on ever
|
|
|
504
2298
|
|
|
505
2299
|
The docs cockpit's pages (Markdown, Mermaid, files; served by `lanes-docsd` behind `/lanes-docs/*`, plan W3) are their
|
|
506
2300
|
own HTML documents with their own assets, outside the phone budget above: `docs.css` (cap 2 560 B, MEASURED 2 351 B)
|
|
507
|
-
and `docs.js` (cap
|
|
508
|
-
`/lanes-assets/docs.css` and loads `<script src="/lanes-assets/docs.js" defer></script>`, and
|
|
509
|
-
fence as `<pre class="mermaid">` holding the escaped source (`libexec/mdlite.py`, plan
|
|
2301
|
+
and `docs.js` (cap 2 627 B, MEASURED 2 627 B: exact, `JS_DOCS_COPY`), both from `/lanes-assets/` with `no-cache` like
|
|
2302
|
+
the shell's. A page links `/lanes-assets/docs.css` and loads `<script src="/lanes-assets/docs.js" defer></script>`, and
|
|
2303
|
+
renders a ```` ```mermaid ```` fence as `<pre class="mermaid">` holding the escaped source (`libexec/mdlite.py`, plan
|
|
2304
|
+
W2).
|
|
510
2305
|
|
|
511
2306
|
- `docs.css` is phone first: a 16 px gutter (safe-area aware), a 46 rem measure, tables and code blocks that scroll
|
|
512
2307
|
sideways instead of the page, `pre.mermaid` centred, system fonts only (the docs CSP allows no font source). Its
|
|
513
2308
|
colours are the block between the `BEGIN`/`END lanes tokens` markers, generated by `libexec/tokens.py --docs-css`:
|
|
514
2309
|
the six roles it paints (`DOCS_ROLES`) on `:root`, dark by default and light under `prefers-color-scheme` — not the
|
|
515
2310
|
phone's `html.lanes-mobile` / `data-zj-theme` block. `tokens.py --check` covers it; no colour lies outside it.
|
|
516
|
-
- `docs.js` is a classic script
|
|
517
|
-
`<script>` for `/lanes-assets/vendor/mermaid-<version>.min.js` with `integrity="sha256-…"` (base64 of
|
|
518
|
-
sha256 of the pinned member, `holders.lock`) and `crossorigin="anonymous"`; on load it calls
|
|
2311
|
+
- `docs.js` is a classic script. On a page without `pre.mermaid` it adds only the **Copy** buttons below. With one, it
|
|
2312
|
+
also appends one `<script>` for `/lanes-assets/vendor/mermaid-<version>.min.js` with `integrity="sha256-…"` (base64 of
|
|
2313
|
+
the raw sha256 of the pinned member, `holders.lock`) and `crossorigin="anonymous"`; on load it calls
|
|
519
2314
|
`mermaid.initialize({startOnLoad: false, securityLevel: 'strict', suppressErrorRendering: true, theme})` (`dark`
|
|
520
2315
|
when the system scheme is dark, else `default`) and `mermaid.run({querySelector: 'pre.mermaid'})`. Mermaid empties a
|
|
521
2316
|
fence before it draws, so each fence left without an `<svg>` gets its source text back (`textContent`, never markup;
|
|
522
2317
|
DEF-1873). A missing file (`install/enable-docs.sh` not run yet: 404) or an integrity mismatch fires no load, and every
|
|
523
2318
|
fence stays a `<pre>` with its source. It never evaluates strings, writes markup or names the unversioned link.
|
|
2319
|
+
- **Copy** on a code block (BEY-8667 E10c, the lane lead's ruling of 21 November 2026). Each `<pre><code>` block, that
|
|
2320
|
+
is every fence except a Mermaid one, gets a default `<button type="button">` reading **Copy** and an
|
|
2321
|
+
`<output aria-live="polite">`, both just before its `<pre>`. There is no CSS: the default button stands under the
|
|
2322
|
+
design stop, and placing it is a slice of its own. A tap writes the block's text with
|
|
2323
|
+
`navigator.clipboard.writeText`, inside the tap, without its last newline (mdlite ends every block with one, which
|
|
2324
|
+
would run a command pasted into a lane). It says what the phone shell's **Copy** says, with the same life cycle
|
|
2325
|
+
(`mobile.js`: `hint('Copied', 8)` stays eight 200 ms ticks, then the status line comes back; `hint('Clipboard
|
|
2326
|
+
blocked')` stays): **Copied** in the block's output, cleared after 1 600 ms; **Clipboard blocked** when the write is
|
|
2327
|
+
refused or the page has no clipboard, kept until the next tap. The http case: a page over plain http is not a secure
|
|
2328
|
+
context, so `navigator.clipboard` is undefined and the tap says **Clipboard blocked** without throwing. The shell
|
|
2329
|
+
speaks through its `aria-live="polite"` status output; each block's output does the same, and the button's own word
|
|
2330
|
+
never changes. Every button reads **Copy**, so each names its block with `aria-describedby` pointing at the `<pre>`'s
|
|
2331
|
+
id (`docs-code-<n>` when it has none; an id it has is kept): a screen reader gives the code as the button's
|
|
2332
|
+
description, with no new word. The cap moved for it by `JS_DOCS_COPY` = 1 097 B: `docs.js` went from 1 530 to
|
|
2333
|
+
2 627 B, MEASURED with `wc -c`, and the cap sits exactly there (from 1 536 B, whose 6 B of slack it spends).
|
|
524
2334
|
- The vendor route: `handle_path /lanes-assets/vendor/*` serves `$LANES_SHARE/vendor` (`install/services.py` puts
|
|
525
2335
|
`LANES_SHARE` in `lanes-mobile.service`, as it does `LANES_REPO`) with `Cache-Control: public, max-age=31536000,
|
|
526
2336
|
immutable` and no listing. Immutable is safe only because a page names the VERSIONED file: under the stable
|
|
@@ -534,19 +2344,32 @@ fence as `<pre class="mermaid">` holding the escaped source (`libexec/mdlite.py`
|
|
|
534
2344
|
and reported) — but the SVG Mermaid draws carries inline `<style>` and `style` attributes, so `style-src` needs
|
|
535
2345
|
`'unsafe-inline'` (without it: 88 violations, unstyled diagrams). The docs page's CSP (plan W3) has both.
|
|
536
2346
|
- Tests: `tests/unit/test_docs_assets.py` (the pin, the enable script against a fake curl, the route model, the unit's
|
|
537
|
-
environment, both files' caps, tokens and SRI) and `tests/web/docs.test.mjs` (docs.js in a vm against a fake page
|
|
538
|
-
a fake Mermaid that empties fences as the real one does
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
2347
|
+
environment, both files' caps, tokens and SRI) and `tests/web/docs.test.mjs` (docs.js in a vm against a fake page,
|
|
2348
|
+
a fake Mermaid that empties fences as the real one does, and a fake clipboard that takes or refuses each write).
|
|
2349
|
+
How to bump the pin: [runbook](../docs/RUNBOOK.md#mermaid-pin).
|
|
2350
|
+
- The drop area (plan W10 W5, LNS-106; upload outcomes BEY-8609 slice 3a): the index's upload form is a plain form
|
|
2351
|
+
that works without a script — a `label.docs-drop` wrapping a multi-file input, so a tap opens the picker and a drop
|
|
2352
|
+
onto the input takes the files. Its destination is docsd's, not the script's (BEY-8609 slice 3b): the `Upload to` select
|
|
2353
|
+
(`#docs-lane`, its label bound by `for`) names each lane `<workspace title> › <lane>` (the workspace id added when
|
|
2354
|
+
two titles repeat) and preselects only the lane a `?lane=` page names; every other page starts on the empty
|
|
2355
|
+
`Choose a lane`, which `required` keeps from being sent (`400 no-lane` behind it). `upload.js` reads only the
|
|
2356
|
+
select's value, so it and its cap are unchanged. The words are design-systems.hypervibe's ruling of 20 November 2026. `upload.js` (cap 4 822 B, MEASURED 4 822 B, exact; 2 892 B before slice 3a, moved
|
|
2357
|
+
by the path owner's ruling of 18 November 2026) and `upload.css` (cap 1 033 B, MEASURED 1 033 B, exact; slice 3a
|
|
2358
|
+
leaves it as it was) make it better: a drop anywhere on the area (`input.files` = the dropped files), a check of the
|
|
2359
|
+
file count (at most 63) and of the size against the form's `data-max` before anything is sent, an `XMLHttpRequest`
|
|
2360
|
+
`POST up` asking for JSON with a `<progress>` and a time bound, then one row per chosen file in `ol.docs-sent`:
|
|
2361
|
+
`<name> · uploaded · <bytes> B · sha256 <hex> · <landed>` (the name a link to `d/<id>`, set with `textContent`),
|
|
2362
|
+
`<name> · <size> B · refused: <word>`, `… · not tried` or `… · not confirmed`, and a summary row when not all are
|
|
2363
|
+
uploaded. Files without a valid receipt stay chosen and **Upload** sends only those; a full success clears the
|
|
2364
|
+
control. Words carry the state, not colour. Why each part is as it is: Code notes, `upload.js`, below. They are
|
|
2365
|
+
their own files because `docs.js` had 6 B of its cap left and `docs.css` 209 B; docsd serves them like
|
|
2366
|
+
`docs.css`/`docs.js`, and only the index (the page with the form) loads them. The page CSP has `connect-src 'self'`
|
|
2367
|
+
for that request, the only one the script makes. The styles use `docs.css`'s token roles only (no colour of their
|
|
2368
|
+
own), 44 px touch targets, phone first. Tests: `test_docs_assets.UploadAssets` (caps, classic script, no markup,
|
|
2369
|
+
roles), `test_docsd.UploadAssets` (the script's bound, file limit and word pattern against docsd's own figures),
|
|
2370
|
+
`test_docsd.Upload` (what the rows rest on: receipts in form order, the loop stopping at the first failure, the same
|
|
2371
|
+
file stored twice when sent twice) and `tests/web/upload.test.mjs` (upload.js in a vm against a fake page, XHR and
|
|
2372
|
+
`FormData`, with a `DataTransfer` only where a test asks for one).
|
|
550
2373
|
|
|
551
2374
|
## Code notes
|
|
552
2375
|
|
|
@@ -566,62 +2389,382 @@ order.
|
|
|
566
2389
|
- `if (mode === 'tablet')`: iPad Safari's user agent is a desktop one, so the shell asks for the client's mobile UI
|
|
567
2390
|
(`zellij:mobile-ui` set to `on`); a stored `off` stays.
|
|
568
2391
|
- The `HTMLElement.prototype.focus` guard: only a native tap on an input may open the keyboard; it is installed before
|
|
569
|
-
upstream's first terminal or modal.
|
|
2392
|
+
upstream's first terminal or modal. The text input types are one anchored regular expression (`^(…)$`, so `textarea`
|
|
2393
|
+
or `datetime-local` never match a part of it; BEY-8609's savings).
|
|
2394
|
+
- `W` and `on(t, …)` share one `const` line after the focus guard, so a desktop page and the bare pages of the node
|
|
2395
|
+
suites stop before both, as they did (`HTMLElement` is undefined there; the inbox and directory pages also have no
|
|
2396
|
+
`window`, so neither could sit above the loader).
|
|
2397
|
+
- `W` (E1c-2, BEY-8667, equivalent code as E1a's `D`): `window`, written once for 16 references, 68 B MEASURED. The
|
|
2398
|
+
client's cursor-style hook keeps `window.` on its assignment in `connect()`, because `test_web` pins
|
|
2399
|
+
`window.__zjSyncInactiveCursorStyle = () =>`; the read before it is `W.`.
|
|
2400
|
+
- `on(t, …)` (BEY-8667, the commit before E1c-2; equivalent code as E1a's `q` and `D`): `t.addEventListener(…)` for 27
|
|
2401
|
+
calls, 299 B MEASURED; since the commit before E3 also `on(W, …)` for the four bare window listeners (44 B). Calls
|
|
2402
|
+
through `globalThis` or an optional chain (`t?.`, `visualViewport?.`) are left as they are.
|
|
2403
|
+
- `classes` (the commit before E3): `root.classList`, live, for its eight uses (30 B MEASURED); no code writes the
|
|
2404
|
+
root's `className`. `now()` (the same commit): `Date.now()`, 1 B. `viewport()` names its keyboard test `kb` and `openKeys()` takes `to`, so no local `on` shadows it.
|
|
2405
|
+
- `==` and `!=` (the commit before E4): 17 comparisons where both sides are of one type by construction (17 B
|
|
2406
|
+
MEASURED); since the commit before E5 six more by the same rule (6 B MEASURED): the two `typeof` tests (both sides
|
|
2407
|
+
are strings), `t != seen`, `v != view`, `restoring?.name != tab.name` and `tabKey() != lastKey`. `===` and `!==`
|
|
2408
|
+
stay where a side may be `null`, a number or of another type (tab positions and pane ids, `queue[0] !== null`, `text
|
|
2409
|
+
!== undefined`, `act() === controls.at(…)`, `quick !== quickOn`, the remembered tab, `tab.name !== lastTab`) and on
|
|
2410
|
+
the pinned `if (mode === 'desktop') return;`. Since E5a (BEY-8667) the remembered tab's two comparisons are
|
|
2411
|
+
`tab.name !== mem.tab` and `tabNamed()`'s `===`, which `pickerTab()` now goes through, so one of the 17,
|
|
2412
|
+
`pickerTab()`'s, is strict again; E5a's own two are loose, `picker == currentTab()` (tabs, or `undefined`) and
|
|
2413
|
+
`name == bare()` (strings).
|
|
2414
|
+
- The `W.WebSocket &&= new Proxy(…)` observer (BEY-8609 slice 1): directly after `__zjSoftKbdEnabled`, so only
|
|
2415
|
+
the phone and the tablet get it and the bare-page suites still stop at the focus guard above. `construct` builds the
|
|
2416
|
+
socket with `Reflect.construct` (statics, `instanceof` and `new.target` unchanged) and returns it whatever the
|
|
2417
|
+
observation does (`try`, empty `catch`; a guard, pinned by the test whose socket's `addEventListener` throws). Only a
|
|
2418
|
+
URL containing `/ws/terminal` is observed: `sock`, a `message`
|
|
2419
|
+
listener that clears `unacked`, an `open` listener that replaces a standing `Not sent: no connection` with `Not sent: try again`, writing the line
|
|
2420
|
+
unless a timed word is up
|
|
2421
|
+
(BEY-8609 slice 2b, the path owner's rule; `/no c/` matches that word alone among the words the shell says), and a
|
|
2422
|
+
`close` listener that sets `gone` (2 when `unacked` or a hand-over within 5 s,
|
|
2423
|
+
else 1), stores `lanes:unsure` in `sessionStorage` when `gone` is 2 and the page is not unloading (`away`), and
|
|
2424
|
+
calls `refresh()`. Since E3 (BEY-8667) the `message` listener also ends the stale path's doubt (`if (doubt) doubt =
|
|
2425
|
+
hintN = 0, refresh();`: `Reconnecting…` goes at once, and so does any other timed word up then). The `close`
|
|
2426
|
+
listener takes the event: `bye` records whether its code is 4001; the reload note goes through `unsure()` (the same
|
|
2427
|
+
write, shared with `reconnect()`); `#terminal` gets the inline `style.opacity = '.5'` (a string; the lane lead's
|
|
2428
|
+
ruling E3-R2: no CSS rule); a close in the stale path's doubt ends it and its word before `refresh()` (`if (doubt)
|
|
2429
|
+
doubt = hintN = 0;`, as the `message` listener does; from the review of E3's commit B), so `refresh()` writes the
|
|
2430
|
+
close word and the 25th tick never checks a socket that closed; and after `refresh()` a page that is not being put
|
|
2431
|
+
away runs `back()` (`away || back()`), so a close on a page shown again after a `pagehide` checks at once. `/no c/`
|
|
2432
|
+
still matches `Not sent: no connection` alone: E3's `No connection to Lanes` has a capital N, and the test is
|
|
2433
|
+
case-sensitive.
|
|
570
2434
|
- `make()`: one element; a button is always `type="button"` (F3 paid for the directory loader with this and
|
|
571
2435
|
`finder()`).
|
|
572
|
-
- `kbd()` / `aria()`: `
|
|
2436
|
+
- `kbd()` / `aria()`: `W.__zjSoftKbdCapture` and an `aria-label` setter, shared to keep the phone budget.
|
|
2437
|
+
- The three `let` lines: `status` (the header's status line), `note` (the word standing there, or undefined) and
|
|
2438
|
+
`empty` (the sheet's one empty line) since BEY-8609 slice 2b, whose savings also moved `queue = []` and
|
|
2439
|
+
`fontSize = 16` into the third line (14 B). Since E1a (BEY-8667) the third line also holds `shot` (the captured
|
|
2440
|
+
screen's dialog), `pre` (its `<pre class="lanes-shot">`) and `said` (its head `<output>`). Since E1c-2 (BEY-8667)
|
|
2441
|
+
it ends with `lastTab` (the tab name this page last read from or wrote to its memory), `lastKey` (the key of its
|
|
2442
|
+
last write) and `restoring` (while the restore waits: an object whose `name`, once set, is the tab the page started
|
|
2443
|
+
on; else 0 or undefined). See Reopen the last tab. Since E5a (BEY-8667) `mem` replaces `lastTab` and now ends the
|
|
2444
|
+
line, after `restoring`: the page's copy of the memory, `{ws: {}}` at load and `{tab, ws}` once read or written
|
|
2445
|
+
(see Moving between workspaces). Since E3 (BEY-8667) the second line ends with `rl` (the check on
|
|
2446
|
+
its way, a promise; 0 after a failed one), `hid` (a `pagehide` came in this document; never cleared), `bye` (the
|
|
2447
|
+
last close's code was 4001), `retry` (**Reconnect**, made once), `hiddenAt` (`now()` when the document was last
|
|
2448
|
+
hidden) and `doubt` (the stale path's ticks left; 0 or undefined out of doubt). See Coming back to a dead page.
|
|
2449
|
+
- `paneAt(pos)`: the pane at a tab position, never a plugin. `pos >= 0 &&` (slice 2b, the second review's F7): it
|
|
2450
|
+
answers only a position, so `pickerTitle()` of a workspace with no picker tab finds no pane, even one that lacks
|
|
2451
|
+
`tab_position` (the pinned client gives every pane one). Since E5a (BEY-8667) it is `panesAt(pos)[0]`, `undefined`
|
|
2452
|
+
where it was `false`: `panesAt(pos)` lists the tab's terminal panes, `pos >= 0 && data()?.panes.filter(…) || []`, so
|
|
2453
|
+
no position or no state gives `[]` and no caller throws (a row pressed after the state is gone reads `[][0]`).
|
|
2454
|
+
`refresh()` asks it for a second pane (**Panes**); `focusTab()` and `pickerTitle()` use `paneAt()` as before.
|
|
2455
|
+
- `id()`, `set()`, `act()` (BEY-8609 slice 2a's savings): `document.getElementById`, `setAttribute` and
|
|
2456
|
+
`document.activeElement`, each written once. `unfocus()`: the two blur lines `openSheet()` had inline (the capture
|
|
2457
|
+
input's `blur()`, then the focused element's), shared with **Done** (slice 2a). `q()`, beside `id()` (E1a's saving,
|
|
2458
|
+
83 B): `document.querySelector`, written once for its five calls, `nativeClick()` among them. `applyLaneFilter()`
|
|
2459
|
+
has a local `q` of its own (the query's characters), which never queries the document.
|
|
2460
|
+
- `unsure()` (E3, BEY-8667): the reload note's one write, `sessionStorage.setItem('lanes:unsure', 1)` inside `try`,
|
|
2461
|
+
shared by the close listener and `reconnect()` (E3-R6).
|
|
2462
|
+
- `reconnect()` (E3): the check (Coming back to a dead page). `rl ||= (…)` keeps one check at a time: while `rl`
|
|
2463
|
+
holds the check's promise, a call returns it and asks nothing. In the parentheses `api && hint('Reconnecting…', 25)`
|
|
2464
|
+
runs first (no word before the shell is built), then the `fetch`, whose promise the comma passes on.
|
|
2465
|
+
`.then(r => r.ok, () => 0)` turns a non-2xx answer, a rejection and the deadline's abort into one falsy result. On a
|
|
2466
|
+
truthy one it writes the note when `gone > 1 || unacked` and calls `W.location?.reload()` (`?.`: most node realms
|
|
2467
|
+
have no `location`); `rl` stays set, so nothing checks again while the page unloads. On a falsy one `rl = 0`, and
|
|
2468
|
+
`No connection to Lanes` goes through `hint()` with no tick count: 8 ticks while `gone`, standing otherwise (the
|
|
2469
|
+
stale path). `AbortSignal.timeout?.(5e3)` asks whether the static exists (Safari 14 and 15 lack it; the check then
|
|
2470
|
+
has no deadline, as the suite pins). The **Reconnect** button calls it as its click listener, which passes the event
|
|
2471
|
+
as an argument it ignores.
|
|
2472
|
+
- `back()` (E3): the gate of every automatic trigger but the stale one, then `reconnect()`: a `pagehide` in this
|
|
2473
|
+
document (`hid`), no close code 4001 (`!bye`), and the observed socket CLOSING or CLOSED (`sock?.readyState > 1`;
|
|
2474
|
+
with no socket observed, `undefined > 1` is false). The close listener, `pageshow`, `visibilitychange` and `online`
|
|
2475
|
+
call it.
|
|
573
2476
|
- `finder()`: a search field (no autocomplete or spellcheck) with its label — the workspace search and the lane filter.
|
|
574
|
-
- `viewport()`: browser toolbars alone must not mean keyboard mode (
|
|
2477
|
+
- `viewport()`: browser toolbars alone must not mean keyboard mode (it needs more than 120 px hidden, and a focused
|
|
2478
|
+
input; one expression since the path owner's rule on slice 2b, which this paid for). Zellij's
|
|
575
2479
|
input is in a closed shadow root, so `document.activeElement` is its host; `__zjSoftKbdCapture.isFocused` is read
|
|
576
|
-
first.
|
|
577
|
-
|
|
578
|
-
|
|
2480
|
+
first. It toggles `lanes-keyboard` and calls `resize()` only when that changes, and it is the one place **Type here**
|
|
2481
|
+
gets `is-typing`, driven by upstream's own focus/blur listeners (they set `isFocused` and fire
|
|
2482
|
+
`zellij:soft-keyboard-visibility`); the field's own focus/blur listeners were redundant. Until BEY-8609 slice 2a the
|
|
2483
|
+
class toggle sat in a `setKeyboard()` of its own, which slice 2a inlined here, its one caller (50 B).
|
|
579
2484
|
- `buildTypingField()`: upstream's capture input stays in its closed shadow root and becomes the real, tappable field:
|
|
580
2485
|
a text input (DEF-1734); `beforeinput` sends a multi-character `insertText` or any `insertReplacementText` whole,
|
|
581
2486
|
after one DEL per character of `getTargetRanges()[0]` or else the selection (DEF-1753); `paste` sends one bracketed
|
|
582
2487
|
paste (DEF-1735). See Input, keys and clipboard above.
|
|
2488
|
+
- `focusTab(tab, or)`: one `FocusPane` to the first terminal pane of `tab`, then `closeSheet()`; with no pane it
|
|
2489
|
+
returns before closing anything. Since E5a (BEY-8667) `or` is a second tab whose first terminal pane is taken when
|
|
2490
|
+
`tab` has none (`paneAt(tab?.position) || paneAt(or?.position)`): a row passes its own tab there (E5-R1). The other
|
|
2491
|
+
callers pass one tab, as before.
|
|
2492
|
+
- `at()`: the live target as one string, `JSON.stringify` of the current tab's name and the active pane's `is_plugin`
|
|
2493
|
+
and `pane_id` (optional chaining throughout: `data()` may be undefined early). Not named `key`, which three locals
|
|
2494
|
+
already are. `bare()`, beside it: the current tab's name without the picker's ` ☰` (slice 2a's saving, three readers).
|
|
2495
|
+
- `tabKey()` (E1c-2, BEY-8667): the memory's `localStorage` key, `lanes:tab:` and the address's path, read at each
|
|
2496
|
+
read and write (not once at load): the pinned client rewrites the path after a session switch made inside Zellij
|
|
2497
|
+
(`history.pushState`), and a bare `/` becomes `/<session>` before the shell attaches (`history.replaceState`).
|
|
2498
|
+
`W.location?.` because most node realms have no `location` (their pages then use `lanes:tab:undefined`, which no
|
|
2499
|
+
test reads); a browser page always has one, so the key has no fallback for an empty path.
|
|
583
2500
|
- `GLYPHS` / `parseCounts()`: counts from the picker sidebar's OSC 2 pane title (spec §6.4).
|
|
584
|
-
- `
|
|
585
|
-
|
|
2501
|
+
- `WORDS` / `countParts()` (slice 2b, D11): each count as `[glyph, n, tone, words]`, the words `need approval`, `need
|
|
2502
|
+
you`, `working` and `done` (`lanes/docs/DESIGN.md`'s); the header's chips use the glyph and the number, a row all
|
|
2503
|
+
four.
|
|
2504
|
+
- `pickerTitle(name)`: one arrow since slice 2b's savings (56 B): the picker tab's pane title, or `''`.
|
|
2505
|
+
- `tabNamed(name)` / `pickerTab(name)` (E5a, BEY-8667): the tab with exactly that name (`===`, as the remembered tab
|
|
2506
|
+
needs), and a workspace's lane list, `tabNamed(name + ' ☰')`. Before E5a `pickerTab()` had its own `find` with
|
|
2507
|
+
`==` and a template string, the same answer for the string it builds; `connect()` had the remembered tab's `find`.
|
|
2508
|
+
- `workspaces()`: two statements since slice 2b's savings (107 B): the picker tabs (`picker: 1`), then each tab that is
|
|
2509
|
+
neither a picker tab nor named like a picker's workspace, in tab order. A lane tab carries no `picker` field.
|
|
2510
|
+
- `openSheet()` / `closeSheet()`: the sheet opens with `unfocus()` (the keyboard goes) and marks the terminal `inert`;
|
|
2511
|
+
closing gives the focus back only to the button that opened it. `openSheet()` empties the query and no longer clears
|
|
2512
|
+
`previousCards` (slice 2b's savings, 24 B), so an unchanged list is reused. Since E1a (BEY-8667)
|
|
2513
|
+
`openSheet(_, s = sheet)` opens either dialog: the workspace sheet when called as a click listener (the event is the
|
|
2514
|
+
ignored first argument), the captured screen when **Copy** passes `shot`. `sheetOpen` holds the open dialog (it was
|
|
2515
|
+
`true`), and `closeSheet()` hides that one. `aria-modal` is set once, by `dialog()`, no longer at each opening.
|
|
2516
|
+
Opening the captured screen also empties the workspace query and calls `renderCards()`, which returns at once.
|
|
2517
|
+
- `renderCards()` (slice 2b, D11): returns at once while the workspace sheet is hidden (`sheet.hidden`; it read
|
|
2518
|
+
`!sheetOpen` until E1a, when `sheetOpen` came to hold whichever dialog is open). `names`, the JSON of every workspace's
|
|
2519
|
+
`[tab.name, tab.position]`, decides a rebuild (`previousCards` keeps the last one): each row is a button made with
|
|
2520
|
+
its monogram, its name, an empty `small` and an arrow slot, whose click (since E5a, BEY-8667) closes the sheet when
|
|
2521
|
+
the row's workspace is the current one (`name == bare()`, read at the press) and otherwise calls
|
|
2522
|
+
`focusTab(tabNamed(mem.ws[name]), tab)`: the tab last shown in that workspace, else the row's own tab (until E5a
|
|
2523
|
+
`focusTab(tab)`; see Moving between workspaces),
|
|
2524
|
+
and `empty` is appended after the rows. Then every row is patched: `hidden` by the query (`shown` counts the rest),
|
|
2525
|
+
and, only when its signature `card.s` (current or not, and its count words) changed, `is-current`, its
|
|
2526
|
+
`aria-label` (the name, the counts in words, `current workspace`), `aria-current`, its count line and its icon.
|
|
2527
|
+
The empty line shows while nothing is shown; the count line says `N workspace(s)`, or `M of N` with a query.
|
|
2528
|
+
- `dialog(name, head, ...body)` (E1a, BEY-8667): one builder for the workspace sheet and the captured screen; until E1a
|
|
2529
|
+
`build()` made the sheet inline. A hidden `div.lanes-sheet` with `role="dialog"`, `aria-label` `name` and
|
|
2530
|
+
`aria-modal="true"`; a `section.lanes-sheet-panel` holding the head (`div.lanes-sheet-head`: an `h2` with `name` and
|
|
2531
|
+
`head` below it, then **Close**, named `Close`, which runs `closeSheet()`) and then `body`. A click whose target is
|
|
2532
|
+
the dialog itself (the scrim) closes it; a click on anything inside it does not. Escape closes it, and the Tab trap
|
|
2533
|
+
runs over its own buttons and inputs. `build()` makes the workspace sheet as
|
|
2534
|
+
`dialog('Workspaces', count = make('output'), searchWrap, list, sessionButton)` and the captured screen as
|
|
2535
|
+
`dialog('Captured screen', said = make('output'), pre = make('pre', 'lanes-shot'))`, appended after the sheet in the
|
|
2536
|
+
shell (`shell.append(header, quickRow, dock, sheet, shot)`), so the first `.lanes-sheet` is still the workspace
|
|
2537
|
+
sheet. The sheet's name moved from `aria-labelledby` (the `h2`'s id `lanes-sheet-title`, gone) to `aria-label`, and
|
|
2538
|
+
its **Close** from `Close workspaces` to `Close` (the lead's ruling S2).
|
|
2539
|
+
- `build()`, the header (BEY-8609 slice 2b, D7): no brand image; `context` is the button with `heading` (the
|
|
2540
|
+
workspace), a space and `subtitle` (the lane line), with `aria-haspopup="dialog"` and no `aria-label`; `status` is
|
|
2541
|
+
an `<output class="lanes-status" aria-live="polite">`, built empty and appended last, outside the button.
|
|
2542
|
+
`header.append(context, copyKey, pasteKey, done, more, status)`. The window capture-phase `pointerdown` listener
|
|
2543
|
+
records `menuWas` before upstream's dismiss
|
|
2544
|
+
hook runs, so **More** closes an open menu instead of reopening it (DEF-1738), and since E1c-2 (BEY-8667) ends a
|
|
2545
|
+
waiting restore (`restoring = 0`: the person's first press); **Copy** and **Paste** (DEF-1736).
|
|
2546
|
+
**Paste** passes `at()` at the tap to `clip()`, before the clipboard read. **Copy** (E1a, BEY-8667):
|
|
2547
|
+
`clip(c => c.writeText(pre.textContent), () => hint('Copied', 8), openSheet(pre.textContent = screen(), shot))`.
|
|
2548
|
+
JavaScript evaluates the third argument before `clip()` runs, so in the tap `screen()` fills the captured screen's
|
|
2549
|
+
`<pre>` and `openSheet()` opens it (its `undefined` result is `clip()`'s `v`); then `clip()` writes that same
|
|
2550
|
+
`pre.textContent` to the clipboard synchronously. The dialog is open before the clipboard is touched, so a missing or
|
|
2551
|
+
refusing clipboard still leaves it open. One loop classes the three header buttons
|
|
2552
|
+
and cancels `mousedown` on all but **More** (`b != more`), whose click must still reach upstream's dismiss hook.
|
|
2553
|
+
**Done** (BEY-8609 slice 2a): `lanes-button lanes-done`, its word as its name, a `mousedown` cancel and `unfocus()` on
|
|
2554
|
+
click; `mobile.css` draws it only under `lanes-keyboard` and hides **More** then. It is appended before **More**.
|
|
2555
|
+
Since E1a (BEY-8667) a phone's header reads context, **Copy**, **Paste**, **Done**, **More**, status, as built; from
|
|
2556
|
+
slice 2a until E1a a phone's **Paste** left the header for the strip (`buildQuickRow()`), so it read context,
|
|
2557
|
+
**Copy**, **Done**, **More**, status (brand first until slice 2b). On a tablet `done.before(dock)` (after the shell
|
|
2558
|
+
is appended) puts the dock before **Done**: context, **Copy**, **Paste**, the dock, **Done**, **More**, status, so
|
|
2559
|
+
**Done** takes **More**'s
|
|
2560
|
+
place and the dock stays where it was (the completeness review's C3; until then `more.before(dock)` put **Done**
|
|
2561
|
+
before the dock).
|
|
2562
|
+
- `build()`, the dock's **Lanes** (E5a, BEY-8667): `picker` is the current workspace's lane list,
|
|
2563
|
+
`pickerTab(bare())`; with none the click opens the sheet, as before. On that lane list (`picker == currentTab()`) it
|
|
2564
|
+
calls `focusTab(tabNamed(bare()))`, the workspace's lane tab, and elsewhere `focusTab(picker)`, as before E5a did
|
|
2565
|
+
everywhere. A lane tab that is gone gives `focusTab(undefined)`, which sends nothing and leaves an open sheet open
|
|
2566
|
+
(E5-R2). `refresh()` still sets its `aria-pressed` to whether the current tab is a lane list.
|
|
2567
|
+
- `build()`, the workspace sheet's Tab trap (in `dialog()` since E1a, BEY-8667, for both dialogs; the captured screen
|
|
2568
|
+
has one control, **Close**, so Tab and Shift+Tab keep the focus there): `act() === controls.at(ev.shiftKey - 1)` is the last control for Tab
|
|
2569
|
+
(`at(-1)`) and the first for Shift+Tab (`at(0)`); the focus then goes to `controls.at(-ev.shiftKey)`, the other end.
|
|
2570
|
+
One test where there were two (slice 2a's saving, 130 B; the node suite's Tab-trap test pins it).
|
|
586
2571
|
- `build()`, the `.zj-mobile-modbar` keys: cancel `mousedown`, not `pointerdown` (upstream's `pointerdown` cancel kills
|
|
587
|
-
Safari's touch click on the extra keys).
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
the
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
2572
|
+
Safari's touch click on the extra keys). The loop runs over the bar's children (`bar?.children`) once, and only then
|
|
2573
|
+
are the strip's last two keys moved in: `bar?.append(quickRow.lastChild)` puts `n` at the end, and
|
|
2574
|
+
`bar?.prepend(quickRow.lastChild)` puts `y` at the start (slice 2a, D4). So `y` and `n` never get the loop's
|
|
2575
|
+
capture-phase `pointerdown` that stops a key's own listeners. They go inside upstream's bar only because the pinned
|
|
2576
|
+
client has no handler on the bar itself. Read in the pinned `app.js` (lines 2272-2283; the same code is
|
|
2577
|
+
`mobile-ui.js` 645-656 in the extracted modules), `buildModifierBar` gives each of its own cells its own listeners
|
|
2578
|
+
at creation and appends it:
|
|
2579
|
+
`btn.dataset.cell = cell.id; … btn.addEventListener("pointerdown", (ev) => { ev.preventDefault(); });
|
|
2580
|
+
btn.addEventListener("click", () => handleModCell(cell)); modbar.appendChild(btn);`. No listener is ever added to
|
|
2581
|
+
the bar element. The only later access is `renderModifierBar()` (`app.js` 2720-2730, `mobile-ui.js` 1093-1103),
|
|
2582
|
+
which looks up each known cell by `` els.modbar.querySelector(`[data-cell="${cell.id}"]`) `` to toggle `zj-armed`. A
|
|
2583
|
+
click whose target carries no `data-cell` is therefore ignored by the client by construction, and our buttons are
|
|
2584
|
+
never queried. The client's document-level listeners (the menu dismiss hook, `ensureCaptureFocused`) act on every
|
|
2585
|
+
tap anywhere, these included, and neither sends. The fake page's twin of the bar in `tests/web/phone.test.mjs` is
|
|
2586
|
+
written by us, so no test can show this: the runbook's device step 30 carries it ("y and n in the panel each send
|
|
2587
|
+
once; TAB, CTRL, ALT and the arrows still act").
|
|
2588
|
+
- `send(...frames)`: the terminal socket through `sendFn` (DEF-1733), returning 0 (not handed over), 1 (handed over
|
|
2589
|
+
on an OPEN observed socket), 2 (waiting behind a pause) or 3 (handed over, no socket observed). First, a target
|
|
2590
|
+
(`at()`) other than the one the previous call recorded (`seen`) empties the old queue, and when that dropped frames
|
|
2591
|
+
while a query is held, `clearLaneFilter()` runs. A refusal — `sendFn` absent, the observed `sock` not OPEN
|
|
2592
|
+
(`readyState - 1` is truthy), or a throw — empties the whole queue and, for a call with frames, hints `Not sent: no
|
|
2593
|
+
connection` (after a throw, the frames before it are already handed over); a
|
|
2594
|
+
zero-frame flush is silent. A call with frames first ends a standing word, and empties the status line only when
|
|
2595
|
+
no timed word is up (`note &&= !hintN && text(status, '')`: under a timed word `note` becomes `false` and the line
|
|
2596
|
+
keeps that word; otherwise `text()` empties the line and returns nothing, so `note` is cleared too; slice 2b, and
|
|
2597
|
+
`!hintN && ` since its completeness review, C12). Every hand-over sets
|
|
2598
|
+
`sentAt` and `unacked`. A `null` in the queue is a pause: what
|
|
2599
|
+
follows waits until 60 ms after the last frame sent (`sentAt`), and `send()` re-arms the one interval to come back
|
|
2600
|
+
(DEF-1751). Nothing is queued for later (BEY-8609: the queue for an absent `sendFn` is withdrawn). Since E3
|
|
2601
|
+
(BEY-8667) it answers 3 also while the stale path is in doubt (`return sock && !doubt ? 1 : 3;`): the frames are
|
|
2602
|
+
handed to the open socket, which may be alive, and **Paste** says `Paste unconfirmed` (E3's T7).
|
|
2603
|
+
- `paste(t, v = at())`: the bracketed paste through `send()`, its end markers neutralised (DEF-1755), and its one word:
|
|
2604
|
+
`Not sent: view changed` when `v` is not the current `at()`, `No text to paste`, `Open a lane to paste` on a picker
|
|
2605
|
+
tab, where the sidebar reads a paste as a file drop (DEF-1754), else `send()`'s result read through
|
|
2606
|
+
`['', 'Paste sent', , 'Paste unconfirmed']` (0 and 2 add nothing). `Paste sent` is timed (8 ticks); every other
|
|
2607
|
+
word stands (slice 2b, `hint(s, s == 'Paste sent' && 8)`). The field's `paste` handler calls it with `v`
|
|
2608
|
+
defaulted, so only the Paste button can see a view change.
|
|
2609
|
+
- `applyLaneFilter()`: the `input` listener itself (it reads the field). It flushes first (`send()` with no frames, so
|
|
2610
|
+
a moved view drops a waiting tail and the held query before the deltas are worked out), then sends the filter's
|
|
2611
|
+
UTF-8 query as deltas against `laneFilterPrev` — a lone Esc, a pause, `/` and the text for a new query, paying the
|
|
2612
|
+
current picker's owed Esc with that leading Esc (`owed.delete`); DELs and the added text for an edit; a lone Esc and
|
|
2613
|
+
a pause to clear (DEF-1751). A refused start or delta (result 0) runs `clearLaneFilter()`, so the next letter starts
|
|
2614
|
+
a new filter; at worst the picker gets one extra Esc.
|
|
2615
|
+
- `clip(f, ok, v)`: calls the clipboard API synchronously inside the tap (Safari's user-gesture rule) and passes the
|
|
2616
|
+
result, and `v`, to `ok`; a missing API or a refusal says `Clipboard blocked`, which stands (slice 2b). **Copy**'s
|
|
2617
|
+
`ok` says `Copied` for 8 ticks. Since E1a (BEY-8667) **Copy**'s `f` writes `pre.textContent`, the text the captured
|
|
2618
|
+
screen already shows (`build()` above).
|
|
596
2619
|
- `screen()`: xterm's selection, else the visible rows of `term.buffer.active` (the WebGL renderer leaves no DOM text).
|
|
597
|
-
|
|
598
|
-
- `
|
|
599
|
-
|
|
2620
|
+
Since E1a its text fills the captured screen's `<pre>` as well as the clipboard.
|
|
2621
|
+
- `hint(s, n)`: writes `s` to the status line (slice 2b; it held the subtitle until then, as `hint(s, n = 8)`) and
|
|
2622
|
+
clears `armed`, so any word disarms an armed `^C` (the arming code sets `armed` after its own word; `n` armed too
|
|
2623
|
+
until slice 2a). `(hintN = n || gone && 8) || (note = s)`: a timed word (`n` given) holds the line for `n` ticks of
|
|
2624
|
+
the one interval (DEF-1739) and leaves `note` as it was, so a standing word comes back after it; with no `n` and the
|
|
2625
|
+
socket gone, the word is shown for 8 ticks and the close word comes back (the review's F1); with no `n` otherwise,
|
|
2626
|
+
`hintN` stays 0 and the word stands as `note`, with no timer. It re-arms the interval in every case; with `hintN` 0
|
|
2627
|
+
the interval stops at its next tick. Since E1a (BEY-8667) it also writes `s` to `said`, the captured screen's head
|
|
2628
|
+
`<output>` (`text(said, s)`, 15 B), so the dialog's head shows the latest word while the status line lies under its
|
|
2629
|
+
scrim. Nothing empties `said`: it keeps the last word, whatever the status line's timer does.
|
|
2630
|
+
- `buildQuickRow()` (spec §6.5): since BEY-8609 slice 2a one list makes the strip and the panel's two keys: `⏎`, a
|
|
2631
|
+
prompt's `y` ("Send y"), `↑`, `↓`, `Esc` (named Escape), `^C` (the one hold key), **Keys** (whose `key` is
|
|
2632
|
+
`openKeys`), then the panel's `y` and `n` ("Send y", "Send n"), which `build()` moves into the modifier bar. A row
|
|
2633
|
+
entry's `key` is the bytes to send, `0` for the label itself, or a function to call (`go()`: `key.call ? key() :
|
|
2634
|
+
send(key || label)`). `keysKey` is the seventh child, **Keys**. From slice 2a until E1a it was read before a phone's
|
|
2635
|
+
**Paste** was prepended (`if (mode == 'phone') row.prepend(pasteKey)`; a tablet kept Paste in the header). E1a
|
|
2636
|
+
(BEY-8667, the lane lead's ruling R2) removed that line (48 B): **Paste** stays in the header on every device, and the
|
|
2637
|
+
row is built with its seven keys and the panel's two. `^C` sends after a 400 ms hold,
|
|
2638
|
+
measured from event timestamps with no timer;
|
|
2639
|
+
a cancelled or left key is disarmed and a release needs the key's own press (DEF-1739); nothing takes focus. `go()`
|
|
2640
|
+
sends the key; `disarm()` clears `armed` and the hint and refreshes, only when something is armed. `pointerdown`
|
|
2641
|
+
disarms; `pointerup` records `up = Date.now()` (the handler's clock; `up` starts undefined, so `Date.now() - up` is
|
|
2642
|
+
NaN and the page's first ordinary activation is not swallowed). `click` returns when a pointer made it (`ev.detail`
|
|
2643
|
+
of 1 or more, so the late click of a tap cannot send twice) or within 500 ms of `up` (the second guard, for a
|
|
2644
|
+
`detail` 0 click after a pointer release); else a plain
|
|
2645
|
+
key sends, an armed hold key (`armed === b` with its hint up) disarms and sends, and an unarmed one says `Press again
|
|
2646
|
+
to send` for 20 ticks and arms. A short tap on `^C` says `Hold to send` for 8 ticks. `keydown` cancels a repeat of
|
|
2647
|
+
Space or Return only (BEY-8609 slice 1).
|
|
2648
|
+
- `openKeys(on)` (slice 2a, D5): toggles `lanes-keys-open` on `<html>` (no argument: a toggle, as **Keys** calls it;
|
|
2649
|
+
`false`: closed, as `refresh()` calls it). When the result is closed it clicks every `.zj-armed` cell, so upstream
|
|
2650
|
+
releases an armed CTRL or ALT the person can no longer see. It sets `aria-expanded` on **Keys** and calls `resize()`.
|
|
2651
|
+
It never calls `focus()`.
|
|
600
2652
|
- `clearLaneFilter()`: forgets the query and owes its picker (`filterTab`) the lone `Esc` that leaves the sidebar's
|
|
601
2653
|
filter mode (`owed`, a set of picker tab names). `updateLaneFilterBar(tab, isPicker)`, on every refresh: once the
|
|
602
|
-
current tab is not the one the query was typed on,
|
|
603
|
-
|
|
2654
|
+
current tab is not the one the query was typed on, the query is cleared, sending nothing (the lane may have the
|
|
2655
|
+
focus now, DEF-1752); a filter tail still waiting is dropped by `send()`'s own target check, which no longer needs a
|
|
2656
|
+
cut of its own here (BEY-8609); the lone `Esc` and its pause are sent only when
|
|
604
2657
|
the current tab is an owed picker; then `filterTab` becomes the current tab if it is a picker. Escape in the bar and
|
|
605
2658
|
an emptied field clear and call `refresh()`, so the `Esc` goes out at once while that picker is still current.
|
|
606
2659
|
- `lanesTheme()`: the shell's own terminal palette for both variants (spec §6.3, DEF-1413).
|
|
607
|
-
- `
|
|
608
|
-
|
|
2660
|
+
- `applyFont()`: `Object.assign(term.options, {fontSize, lineHeight: 1.1})`, the stored size through `setItem`'s own
|
|
2661
|
+
string conversion.
|
|
2662
|
+
- `refresh()`: writes the workspace to `heading` and the lane line to `subtitle` (the pane title; on a picker its
|
|
2663
|
+
chips or `Choose a lane to continue`; else `Your workspace`) and nothing else there. Right after `picker` (E1c-2,
|
|
2664
|
+
BEY-8667) three lines keep the memory, each only when there is a current tab. The first takes the tab a waiting
|
|
2665
|
+
restore started from, once (`restoring.name ??= tab.name`), so an update with no current tab sets nothing. The
|
|
2666
|
+
second ends the wait once the current tab is another (`restoring?.name != tab.name`: the restored tab, or any
|
|
2667
|
+
other; with no restore waiting it only sets 0 again). The third, with no restore waiting, writes the current tab's
|
|
2668
|
+
name when the name or the key differs from the last write (`lastTab`, `lastKey`), inside `try`. `lastTab` and
|
|
2669
|
+
`lastKey` are set while `setItem`'s arguments are worked out, before the call, so a storage that refuses a write (a
|
|
2670
|
+
full quota) is not asked again for that tab and key. A storage whose every access throws (blocked) throws before
|
|
2671
|
+
that, so it is touched once per refresh, at no other cost. Since E5a (BEY-8667) the third line compares with
|
|
2672
|
+
`mem.tab` and writes the whole memory: `mem.ws[name] = mem.tab = tab.name; localStorage.setItem(lastKey = tabKey(),
|
|
2673
|
+
JSON.stringify(mem));`, `name` being the workspace the heading shows (`bare() || 'Lanes'`). The map and `mem.tab`
|
|
2674
|
+
are set before `setItem` is called, so with storage blocked the page's copy stays current until a reload; `lastKey`
|
|
2675
|
+
is still set in the call's arguments, so a refusing storage is asked once per tab and key, and a blocked one once
|
|
2676
|
+
per refresh, as before. While no timed word is up
|
|
2677
|
+
(`!hintN`) it writes the status line: `[note, 'Disconnected', 'Check last input'][gone | 0] || ''`, so the close
|
|
2678
|
+
word outranks a standing word once `gone` is set (slice 2b; until then the close word replaced the lane title in
|
|
2679
|
+
the subtitle). It hides **Panes** (and **Paste**, DEF-1754) on a picker tab so the
|
|
2680
|
+
dock's four columns hold its four items (DEF-1737), and since E5a **Panes** on any tab with fewer than two terminal
|
|
2681
|
+
panes, where **Type here** spans the freed cell; it flushes the `send()` queue after `updateLaneFilterBar()`, so a
|
|
609
2682
|
filter tail is dropped before it could reach a lane; `quick` is `true` on a view tab (every key), `2` on the picker
|
|
610
|
-
while its title ends ` · › <verb>` (only `⏎ y Esc`), else none.
|
|
2683
|
+
while its title ends ` · › <verb>` (only `⏎ y Esc`), else none. Since BEY-8609 slice 2a the strip block runs when
|
|
2684
|
+
`quick` or `at()` changes (`view` keeps the last `at()`): it shows `⏎ y Esc` at a prompt, and on a lane tab every key
|
|
2685
|
+
but `y` and `n` (`'yn'.includes(key.textContent)`, so a bar the client renamed leaves both hidden), and it calls
|
|
2686
|
+
`openKeys(false)` in place of its `resize()`, so the panel closes at any change of mode or view (the path owner's P1).
|
|
2687
|
+
**Panes** and **Paste** are hidden after that block, on every refresh (until E3 in one statement,
|
|
2688
|
+
`panesButton.hidden = pasteKey.hidden = !!picker`; below). From slice 2a until E1a the order mattered, because a
|
|
2689
|
+
phone's **Paste** was a child of the strip, which
|
|
2690
|
+
the block also sets; since E1a (BEY-8667) **Paste** is in the header on every device. Last, `getState().armed` is copied into `aria-pressed` on the `ctrl` and `alt`
|
|
2691
|
+
cells, read as `state()?.armed?.[c]` (`armed?.` the completeness review's C9 in slice 2a, 2 B; `state()?.` the path
|
|
2692
|
+
owner's ask in slice 2b, 1 B): a client state without `armed`, or no state at all, reads not pressed and no longer
|
|
2693
|
+
throws before `document.title` and the cards are written. Upstream's `zj-armed` class change wakes `refresh()`
|
|
2694
|
+
through the observer of `#zj-mobile-root`. Since E3 (BEY-8667) the first refresh with `gone` set makes **Reconnect**
|
|
2695
|
+
once, just before that hide: `retry`, a `make('button', 'lanes-button', 'Reconnect')` put before **Paste**
|
|
2696
|
+
(`pasteKey.before(…)`), whose click runs `reconnect()`. The hide is two statements, `panesButton.hidden = !!picker;
|
|
2697
|
+
pasteKey.hidden = !!picker || !!gone;`, so **Paste** is hidden while the terminal socket is gone and **Reconnect**
|
|
2698
|
+
stands in its place (E3-R1). Nothing hides or removes **Reconnect** afterwards. Since E5a (BEY-8667) the first
|
|
2699
|
+
statement is `panesButton.hidden = picker || !panesAt(tab?.position)[1];` (hidden on a picker and on a tab with
|
|
2700
|
+
fewer than two terminal panes, or with no current tab; E5-R8), and a line after them gives **Type here** the freed
|
|
2701
|
+
cell: `if (typingField) typingField.style.gridColumn = panesButton.hidden && !picker ? 'span 2' : '';` (E5-R9).
|
|
2702
|
+
The span is reset to `''` on a picker, so a lane list keeps the filter bar and **Type here** in one cell each, and
|
|
2703
|
+
the guard keeps the file's own reading of `typingField`, which is `null` on a page without the client's capture
|
|
2704
|
+
host.
|
|
611
2705
|
- `menuRow()` / `installFontControls()`: a row of the client's **More** menu, prepended (Text size, then **Docs** above
|
|
612
|
-
it, then the release at the top once `/enrol/site` answers). The one `fetch` is there because `build()`
|
|
613
|
-
page load
|
|
2706
|
+
it, then the release at the top once `/enrol/site` answers). The page load's one `fetch` is there because `build()`
|
|
2707
|
+
runs once per page load (since E3 the only other is `reconnect()`'s check, after an event, never at load).
|
|
2708
|
+
`menuRow(label, tag, more)`: the **Docs** row is an `<a>` (plan W10 W7) to `/lanes-docs/` with
|
|
614
2709
|
`target="_blank"` — a new tab, so the terminal and its socket stay where they are, and a Home Screen app, which has
|
|
615
2710
|
no back button, is never navigated away — carrying `lanes-session-link` as well, the existing rule that gives it a
|
|
616
2711
|
48 px touch target with no CSS of its own.
|
|
617
|
-
- `connect()`: waits for server state, because an earlier resize throws `InvalidStateError` in 0.45.1
|
|
618
|
-
|
|
619
|
-
|
|
2712
|
+
- `connect()`: waits for server state, because an earlier resize throws `InvalidStateError` in 0.45.1 (one guard,
|
|
2713
|
+
`?.` on `__zjMobileUi`). `build(hintN = gone && 2)`: a close before the attach gets its word two ticks later, not in
|
|
2714
|
+
the run that builds the status line (slice 2b, the review's F4). Right after `build()` a stored `lanes:unsure` is
|
|
2715
|
+
removed (inside `try`: a page whose `sessionStorage` throws loses only that note) and becomes the standing note
|
|
2716
|
+
`Check last input`, also written two ticks later (`note = …, hintN = 2`); until slice 2b it was a hint for 40
|
|
2717
|
+
ticks. Then (E1c-2, BEY-8667) it reads the memory, before the first `refresh()`: `lastTab` is the stored value's
|
|
2718
|
+
`tab` (`JSON.parse(…)?.tab` inside `try`: no value, a value that is not JSON, or a storage that throws leaves it
|
|
2719
|
+
undefined). `saved` is the tab with exactly that name; when there is one and it is not the current tab, the shell
|
|
2720
|
+
marks a restore as waiting (`restoring = {}`) and calls `focusTab(saved)`, the only FocusPane the attach sends.
|
|
2721
|
+
Since E5a (BEY-8667) the read is `const kept = JSON.parse(localStorage.getItem(tabKey())); mem = {tab: kept.tab,
|
|
2722
|
+
ws: {...kept.ws}};`, inside `try`: with no value `JSON.parse(null)` is `null` and `kept.tab` throws, so no value, a
|
|
2723
|
+
value that is not JSON and a storage that throws all leave `mem` as it was built, `{ws: {}}`; `{...kept.ws}` makes a
|
|
2724
|
+
plain object of any `ws` (none, `null`, a string, an array), and a member other than `tab` and `ws` is dropped at
|
|
2725
|
+
the next write. `saved`'s second half is `tabNamed(mem.tab)` (it was `data().tabs.find(t => t.name === lastTab)`).
|
|
2726
|
+
The map is read here only, from this address's key; rows read the page's `mem` at each press.
|
|
2727
|
+
The tab it started on is not recorded here: the attach's own `refresh()`, a few lines on and with the same state,
|
|
2728
|
+
takes it (or the first later update that has a current tab, when the attach had none). No later refresh reads the
|
|
2729
|
+
memory again, and `connect()` runs once per page, so it is the one restore. Since E4 (BEY-8667) the query comes
|
|
2730
|
+
first: `ws` is `new URLSearchParams(W.location?.search).get('ws')`, the decoded value, or `null` with no `ws` (and
|
|
2731
|
+
on a page without `location`, whose `undefined` makes an empty query; MEASURED with node v22.23.2). `saved` is
|
|
2732
|
+
`ws && pickerTab(ws) ||` the memory's tab: `pickerTab` is the existing `<name> ☰` finder, so the query's lane list
|
|
2733
|
+
when a tab carries that name, else the memory's tab; a name no tab carries is ignored and an empty one reads as none
|
|
2734
|
+
(E4-R6 B, E4-R10). The memory is still read in every case, and only `refresh()` writes it, once the switch lands.
|
|
2735
|
+
The query leaves the address on the line before the last,
|
|
2736
|
+
`ws && history.replaceState(null, '', location.pathname + location.hash);` (path and hash kept, the state `null`),
|
|
2737
|
+
after the observers and the `setData` hook. A throw there would skip only that last line, with the hooks already in
|
|
2738
|
+
place, and no `try` is added: INFERRED unlikely, because the URL is the page's own path and hash, which could name
|
|
2739
|
+
another origin only as a path starting `//`, and Caddy serves the page only for `/` and one-segment paths. It is not
|
|
2740
|
+
the last statement because `test_web_view` pins `connect()`'s last line. `history` and `location` are the bare
|
|
2741
|
+
globals there, reached only with `ws` set, so on a page that has a query. `applyTheme` is re-applied after
|
|
2742
|
+
every `SetConfig` (the client calls the chained `__zjSyncInactiveCursorStyle` hook) and on the theme toggle. The
|
|
2743
|
+
native root is observed directly (`nativeRoot` inlined). Its last statement, `js('/lanes-assets/links.js')` (E1b-1,
|
|
2744
|
+
BEY-8667), loads the links module once per page, after the header exists (connect()'s `api` guard; see Links in a
|
|
2745
|
+
lane). Since E3 (BEY-8667) the `api.setData` wrapper also ends the stale path's doubt (`if (doubt) doubt = hintN =
|
|
2746
|
+
0;`) before its `refresh()`: a `MobileState` is a sign of life, as a terminal frame is (E3-R3).
|
|
2747
|
+
- The `resize` listeners: `window` and `visualViewport` in one loop (`t?.`, a page without `visualViewport` has one).
|
|
2748
|
+
- `pagehide` / `pageshow`: set and clear `away`, so a close the page's own unloading causes leaves no reload note.
|
|
2749
|
+
Since E3 (BEY-8667) `pagehide` also sets `hid`, which nothing clears (the pinned client's `isPageUnloading` is never
|
|
2750
|
+
cleared either), and `pageshow`, from the back/forward cache or not, runs `back()` after clearing `away`.
|
|
2751
|
+
- The `visibilitychange` listener (E3, on the document): hidden, it records `hiddenAt = now()` and returns, so a page
|
|
2752
|
+
being hidden never checks. Shown, a built shell (`api`) whose observed socket is OPEN and that was hidden for more
|
|
2753
|
+
than 30 s (`now() - hiddenAt > 3e4`; with no hide in this document `hiddenAt` is undefined, the difference NaN and
|
|
2754
|
+
the test false) enters the stale path's doubt: `doubt = 25` and `hint('Reconnecting…', 25)`, which re-arms the one
|
|
2755
|
+
interval. Then `back()` runs in every case.
|
|
2756
|
+
- The `online` listener (E3): `back()`, nothing else.
|
|
620
2757
|
- The `zellij:soft-keyboard-visibility` listener: rotation also shrinks the viewport, so the shell sends
|
|
621
2758
|
`SoftKeyboardVisibilityChanged` itself to correct upstream's height-only keyboard heuristic.
|
|
622
2759
|
- `tick()` / `arm()` (the one `setInterval`, 200 ms): polls `connect()` until attached, because upstream installs its
|
|
623
2760
|
window hooks just after appending its mobile root; `hint()` and a paused `send()` re-arm it; each tick flushes the
|
|
624
|
-
queue
|
|
2761
|
+
queue with a zero-frame `send()` (which only sends what waits behind a pause and never hints), counts a timed word
|
|
2762
|
+
down and calls `refresh()` when it ends, and it clears itself once attached, with no timed word up and no pause
|
|
2763
|
+
waiting. A standing word leaves `hintN` at 0, so it never keeps the interval running (slice 2b). Since E3
|
|
2764
|
+
(BEY-8667) each tick also counts the stale path's doubt down after the word (`if (doubt && !--doubt) reconnect();`,
|
|
2765
|
+
so the 25th tick checks), and the interval clears only with no doubt either (`!doubt`): a shorter word that ends
|
|
2766
|
+
first (`Hold to send`, 8 ticks) or a standing one (`Paste unconfirmed`) cannot stop the count (E3-R3, no new timer).
|
|
2767
|
+
The close listener ends the doubt, so the count never reaches a socket that closed during it.
|
|
625
2768
|
|
|
626
2769
|
`browser.js` (laptop/tablet extras) carries none either, since cockpit v3 S5:
|
|
627
2770
|
|
|
@@ -630,7 +2773,12 @@ order.
|
|
|
630
2773
|
|
|
631
2774
|
- `laneFullRender()`: the client starts a tablet in single pane on every load; once, it sends the client's own
|
|
632
2775
|
switch-to-desktop preference.
|
|
633
|
-
- `
|
|
2776
|
+
- `laneDesktopPane()` (Ed, BEY-8667): the pane a desktop record goes back to, or 0; pure, so the node suite calls
|
|
2777
|
+
it.
|
|
2778
|
+
- `desktop()`: the chip toggles an overlay bar (no refit); a pick sends the phone picker's `FocusPane` (`go()`) and
|
|
2779
|
+
ends a restore's wait. `render()` reads `lanes:desktop:<path>` once at the first state with a current pane, sends
|
|
2780
|
+
at most one `FocusPane`, and writes the workspace and lane when they change (Reopen the last workspace and lane on
|
|
2781
|
+
a laptop). The chip
|
|
634
2782
|
cancels `mousedown`, so the terminal keeps the keys. The bar ends in a **Docs** link to `/lanes-docs/` in a new tab
|
|
635
2783
|
(plan W10 W7); Escape in the bar gives the terminal its keys back (`onkeydown`, one handler, as the listener was).
|
|
636
2784
|
- `ui()`: `window.__zjMobileUi` is set synchronously after the client appends its mobile root, which the
|
|
@@ -640,5 +2788,172 @@ Validate on Safari/WebKit at 440 × 763 (iPhone 17 Pro Max with browser chrome),
|
|
|
640
2788
|
838 × 390 (landscape Safari), and smaller phone widths. Check login, workspace search and switching,
|
|
641
2789
|
lane selection, pane navigation, font controls and the release row in **More**, rotation and the visible viewport
|
|
642
2790
|
while the keyboard opens, and the input checklist in the [runbook](../docs/RUNBOOK.md) (text keyboard, quick keys,
|
|
643
|
-
paste, Copy and Paste, the picker's filter and prompt row
|
|
2791
|
+
paste, Copy and Paste, the picker's filter and prompt row, and BEY-8609 slice 1's checks: the header's words when the
|
|
2792
|
+
network goes, the reload note, Paste's words, one send per tap, quick keys by keyboard and VoiceOver, each word read
|
|
2793
|
+
whole at the narrowest phone; and slice 2a's checks: one row of keys on the keyboard, every strip and panel key with
|
|
2794
|
+
the keyboard up, **Done**, QuickType and a multi-line Paste from the strip (from the header since E1a, BEY-8667),
|
|
2795
|
+
CTRL and its release when **Keys** closes,
|
|
2796
|
+
`y` and `n` in the panel with TAB, CTRL, ALT and the arrows still acting, the panel closing on a change of view,
|
|
2797
|
+
320 px, landscape, a hardware keyboard, enlarged text and VoiceOver's pressed and expanded states, and after the
|
|
2798
|
+
completeness review a prompt with the lane filter focused, the iPad's header and panel with the keyboard up, a second
|
|
2799
|
+
quick tap on **Type here**, an input method that composes, and a long-press Paste on the field under the new layout;
|
|
2800
|
+
and slice 2b's checks: the header's two rows with no brand and a word coming and going without a jump, the workspace
|
|
2801
|
+
and lane names at 320 px with a standing word, a word that stands until the next key while a timed word passes over
|
|
2802
|
+
it, VoiceOver reading the header's names on a lane and on a picker and counting how often each word is spoken, a
|
|
2803
|
+
busy workspace list with no jump, its count spoken and each row's count line read at the narrowest phone, the
|
|
2804
|
+
workspace, lane and `Disconnected` readable after Cancel, the reload note standing, landscape's one-row header, and
|
|
2805
|
+
the iPad's one-row header in full width, in Split View and with a hardware keyboard; and E1a's checks (BEY-8667, the
|
|
2806
|
+
runbook's steps from 62, each in a Safari tab and in the Home Screen app): **Paste** in a phone's header with the
|
|
2807
|
+
keyboard down, up and with a hardware keyboard, one paste per tap after iOS's own Paste confirmation, `⏎` on the strip
|
|
2808
|
+
while typing and no **Paste** on a picker tab; `Copied` and the captured screen in the same tap, its head's word, a
|
|
2809
|
+
long press and the selection handles taking one line and iOS's own Copy copying only that part, a wide row scrolling
|
|
2810
|
+
sideways, **Close**, Escape and a tap on the scrim closing it, and the keyboard going down when it opens; whether a
|
|
2811
|
+
person finds **Copy** and **Paste** as icons; the names at 320 px beside **Copy**, **Paste** and **More**; and E1b-1's
|
|
2812
|
+
checks (the runbook's steps from 74): a tap on a wrapped docs address, on an address an agent lane printed and on a
|
|
2813
|
+
same-origin `/lanes-docs/` path, the **Open** control, whether its label and the new tab hold the whole address, a
|
|
2814
|
+
hold and a swipe opening nothing, whether a person finds the control in the names' place, and the lane still getting
|
|
2815
|
+
the tap; and E3's checks (the runbook's steps 101 to 110): counting reloads, **Reconnect** and the dim beside the names
|
|
2816
|
+
at 320 px, whether the back/forward cache happens at all, a lock longer than 30 s on a quiet lane and on a busy one,
|
|
2817
|
+
Airplane Mode and `online`, **Cancel** on the client's notice, a 4001, the Home Screen app, a filter typed before a
|
|
2818
|
+
reload, and a Safari without `AbortSignal.timeout`; and E4's checks (the runbook's steps 117 to 126; the push steps
|
|
2819
|
+
wait for the operator's `notify.conf` and `lanes-notify`): a typed `?ws=` address, a push's tap and its **Open lane**
|
|
2820
|
+
button and which app opens them, a Safari that never logged in, the Home Screen app open while Safari opens the view,
|
|
2821
|
+
three pushes in a row, a hidden board's lane and a lane in no workspace, a `published` push, an iPad and a desktop
|
|
2822
|
+
browser, and a push tapped while the page is open; none of them run on a device yet).
|
|
644
2823
|
Use disposable view sessions and revoke any temporary test token afterward.
|
|
2824
|
+
|
|
2825
|
+
`links.js` (links in a lane, BEY-8667 E1b-1; [Links in a lane](#links-in-a-lane-bey-8667-e1b-1)) carries no
|
|
2826
|
+
explanations in the file either: the lane lead's rule for shipped web JS, as for `mobile.js` and `upload.js`. Its notes,
|
|
2827
|
+
in file order:
|
|
2828
|
+
|
|
2829
|
+
- The file: a tap on a web address a lane printed shows an `Open …` link in the header, in the place of the workspace
|
|
2830
|
+
and lane names, for about 8 s. `mobile.js`'s `connect()` loads it once, on a phone and a tablet. Under node it only
|
|
2831
|
+
exports `laneLinkAt`.
|
|
2832
|
+
- `ADDRESS`: `http://` or `https://` (or in capitals), or a same-origin path that starts with `/lanes-docs/`. An address
|
|
2833
|
+
ends at a space, a quote, one of `<`, `>`, `\`, `^`, a backtick, `{`, `|` or `}`, a box-drawing character (a pane's
|
|
2834
|
+
frame), `…` (where an agent cut a long address) or a Unicode format character (`\p{Cf}`), such as a zero-width or
|
|
2835
|
+
bidi control, which could reorder the label.
|
|
2836
|
+
- `TRAILING`: punctuation that ends a sentence, or wraps Markdown emphasis, is not part of the address before it.
|
|
2837
|
+
- `HOST_AND_NO_USER`: a web address names a host (not only a port) and no user part; in
|
|
2838
|
+
`https://a.example.com@b.example.com/` the host is `b.example.com`, so such an address is refused.
|
|
2839
|
+
- `trimmed()`: the address less its trailing punctuation and any `)` or `]` it does not open: `(see https://a.example/x).`
|
|
2840
|
+
gives `https://a.example/x`, and `https://a.example/wiki/Foo_(bar)` keeps its `)`. One count and one pass: linear.
|
|
2841
|
+
- `laneLinkAt(rows, cols, col, row)`: pure; the address under the cell at `col`, `row` (0-based) of the visible
|
|
2842
|
+
screen, or `null`. `rows` are the screen's rows as text and `cols` its width. The tapped row's segment runs from
|
|
2843
|
+
`left`, after the `│` left of the cell, to `right`, the next `│` or the last column. A row whose segment ends in a
|
|
2844
|
+
non-blank character goes on in the next row (`goesOn`), so the search first walks up to the address's first row
|
|
2845
|
+
(`top`), then joins rows down into `joined`, dropping each continuation row's indent, until a row that does not fill
|
|
2846
|
+
its segment; `tappedAt` is the tapped cell's place in `joined`. `ADDRESS` then finds the matches, and the one that
|
|
2847
|
+
holds the tapped place is returned when it passes its check (`HOST_AND_NO_USER`, or the same-origin path's guards: a
|
|
2848
|
+
`/lanes-docs/` path counts only when it does not continue a longer path such as `/home/x/lanes-docs/`, and when the
|
|
2849
|
+
URL parser, against the constant base `http://h`, resolves it to a path that still starts with `/lanes-docs/`; the
|
|
2850
|
+
resolved path, query and fragment are returned).
|
|
2851
|
+
- `linkLabel()`: the words under **Open**: a same-origin address as it is (already resolved), else
|
|
2852
|
+
`new URL(address).host`, or the host as written when the parser throws. Nothing cut: `show()` puts it in a `<bdi>`
|
|
2853
|
+
(`dir="ltr"`) inside the `<span>` (`dir="rtl"`), so CSS's ellipsis cuts its start.
|
|
2854
|
+
- The page part returns at once when there is no `#terminal` or no `window.term` (a test page, or node).
|
|
2855
|
+
- `LISTEN`: passive listeners in the capture phase run before upstream's own touch handlers on `#terminal` and cannot
|
|
2856
|
+
cancel anything, so the lane still gets its tap (INFERRED end to end; device step). `TAP_MOVE_PX` and
|
|
2857
|
+
`TAP_HOLD_MS` are upstream's tap rule (app.js 1341-1342 and 1503-1510): one finger, no move past 16 px, lifted
|
|
2858
|
+
before 500 ms. `SHOWN_MS` is the control's 8 s.
|
|
2859
|
+
- `touch`: the touch under way: where and when it began, and the cell, rows and width it found then. `control`: the
|
|
2860
|
+
**Open** link. `names`: the context button (the workspace and lane names) it stands in for. `expiry`: the control's
|
|
2861
|
+
one timer (ruling B1: the module owns it; `mobile.js` keeps its one interval and no timeout).
|
|
2862
|
+
- `hide()`: hides the control (it stays in the page until the next one replaces it) and shows the names again.
|
|
2863
|
+
`show()` builds the control with `textContent` only, never markup; its own tap hides it but leaves it in the page,
|
|
2864
|
+
so that tap still opens the link.
|
|
2865
|
+
- `touchstart`: the cell under the finger, found as upstream's reportCoords finds it (app.js 1346-1357): xterm's mouse
|
|
2866
|
+
service, with the pan offset added while the view is panned; the rows and the width are read now, so a redraw or a
|
|
2867
|
+
re-fit before the finger lifts changes nothing. `touchmove`: a second finger, or a move past 16 px from the start,
|
|
2868
|
+
and it is no tap, even if the finger comes back.
|
|
2869
|
+
- `keydown` (document, capture phase): any key typed takes the control away and brings the names back (ruling B2).
|
|
2870
|
+
`pointerdown` (window, capture phase): so does a press anywhere else; a press on the control stops its timer
|
|
2871
|
+
instead, so that it cannot go from under the finger, and the tap that follows hides it.
|
|
2872
|
+
|
|
2873
|
+
`upload.js` (the Docs page's drop area, see Docs page) carries no explanations in the file either, since BEY-8609
|
|
2874
|
+
slice 3a; its two header lines (231 B) moved here:
|
|
2875
|
+
|
|
2876
|
+
- The file: the drop area of the Docs page's index (plan W10 W5, LNS-106). The form works without it; with it a drop
|
|
2877
|
+
lands anywhere on the area, the count and size are checked before sending, progress shows, and each chosen file
|
|
2878
|
+
ends in a row of words. It stays ES5 (`var`, `function`; no arrow, `const`, `let` or template string), because the
|
|
2879
|
+
page serves it to whatever browser opens it.
|
|
2880
|
+
- `kept`, `doubt`: the `File` objects of the last try that got no valid receipt, and one mark for all of them: the
|
|
2881
|
+
lane id of a try that ended not confirmed, or `''`. Every kept file always carries the same mark, so one value
|
|
2882
|
+
holds it (83 B less than a mark per file).
|
|
2883
|
+
- `count()`: the area's `data-count` reads `N not uploaded yet` while files are kept, else `N chosen`.
|
|
2884
|
+
- `chosen()`: a new choice (`change`) or a drop replaces the kept files and drops the mark (decision D5). The rows
|
|
2885
|
+
already in the list stay.
|
|
2886
|
+
- `good(t, f)`: a receipt counts only when `id` matches `^[a-z0-9]{10,20}$` (the store's id rule), `sha256` is 64
|
|
2887
|
+
lowercase hex digits, `name` and `landed` are strings, and `bytes` equals the `size` of the file at the same
|
|
2888
|
+
position (D3). Receipts are matched by position, never by name: the store renames (`-1`, cleaned names). `bytes`
|
|
2889
|
+
is the plaintext's size also when the store encrypts (`docs_store.intake`).
|
|
2890
|
+
- The submit handler. `files` is the kept list when there is one, else a copy of the control's `files`; `was` is the
|
|
2891
|
+
last try's mark; `lane` is the select's value at the tap. `lane` is read before `preventDefault()`: on a page
|
|
2892
|
+
without the select the handler throws first and the browser posts the form itself, the path without a script.
|
|
2893
|
+
Nothing is sent while a request is on its way (`button.disabled`, D10) or for more than 63 files, which adds the
|
|
2894
|
+
row `Too many files: <N>; an upload may hold 63.`: `parse_form` refuses more than `MAX_PARTS` (64) parts as
|
|
2895
|
+
`bad-request`, and the form has one other field, `lane` (`test_docsd.UploadAssets` reads both figures). The size
|
|
2896
|
+
check adds 1 024 B per file for the part's headers, as before.
|
|
2897
|
+
- The body: `new FormData(form)`, its `file` entries deleted, the chosen `File` objects appended (D4), so a retry
|
|
2898
|
+
sends only the kept files. It is built before the request, the progress row and `button.disabled`: where it cannot
|
|
2899
|
+
be built (a `FormData` without `delete`), the handler throws before anything is sent and **Upload** is not held.
|
|
2900
|
+
The page then says nothing (not ruled; INFERRED: no browser docsd accepts lacks `delete`, because the gate needs
|
|
2901
|
+
`Sec-Fetch-Site` on every POST).
|
|
2902
|
+
- `done(got, word, said)`: `n` counts the valid receipts, each at its own position. When fewer than all receipts
|
|
2903
|
+
check, the answer is not trusted as a refusal and `word` is dropped. Each chosen file gets one row: a valid receipt
|
|
2904
|
+
reads `uploaded`; otherwise, with docsd's word, the file at position `n` reads `refused: <word>` and the files after
|
|
2905
|
+
it `not tried` — but with no valid receipt every file reads `refused: <word>`, because docsd refused the whole
|
|
2906
|
+
request before its loop over files (the path owner's R-Q6) —; without a word, `not confirmed`. While the mark is
|
|
2907
|
+
set, a `refused` or `not tried` row adds `; an earlier try was not confirmed`. `m = word ? was : lane`: a refusal
|
|
2908
|
+
keeps the earlier mark, through any number of refusals in a row, and an unconfirmed end sets this try's lane.
|
|
2909
|
+
- The summary row, only when a file is left: `<n> of <N> uploaded.`, then:
|
|
2910
|
+
- no word: the sentence `said` (`The connection ended before we could confirm the upload.`), else `The answer did
|
|
2911
|
+
not confirm the upload.`;
|
|
2912
|
+
- a refusal with status 408, 429, 500 or 503: `Upload sends the rest again.` A 500 here is docsd's
|
|
2913
|
+
`encrypt-failed`: `docs_store` raises it when `age` is missing, exits non-zero or runs past `AGE_S`, and nothing
|
|
2914
|
+
in the file's bytes decides it, so the code does not show that it repeats for the same file (R-Q6b);
|
|
2915
|
+
- any other refusal: `This would be refused again.`, and, when a receipt came before the refused file, `Choose the
|
|
2916
|
+
files again without the refused one.`;
|
|
2917
|
+
- while the mark is set: `The files may still be arriving. Look for them in this lane before you send again:
|
|
2918
|
+
Upload sends them a second time.`, and a row `Open this lane's files`, a link to `./?lane=<mark>` with
|
|
2919
|
+
`target="_blank"`: the lane of the try that was not confirmed, not the select's value now; after two such tries
|
|
2920
|
+
in a row, the lane of the later one.
|
|
2921
|
+
- The write-back (D4; the path owner's R-Q5, 177 B, one block that can be cut): in a `try`, a `new DataTransfer()`
|
|
2922
|
+
holding the kept files is assigned to `input.files`, so the control's own text names what is left. Where the
|
|
2923
|
+
constructor or the assignment throws, the control keeps what the person chose and `kept` still holds the rest:
|
|
2924
|
+
**Upload** sends the right files while the control's text names more. Setting `files` fires no `change`, so
|
|
2925
|
+
`kept` survives it.
|
|
2926
|
+
- A full success (no file left) clears the control, as before slice 3a, and the mark.
|
|
2927
|
+
- `x.onload`: the body is parsed as JSON in a `try`; `receipts` must be an array, else there are none. `error` is
|
|
2928
|
+
docsd's word only on a status other than 200, as a string matching `^[a-z-]{1,40}$` (every word in docsd's
|
|
2929
|
+
`SENTENCES` does: `test_docsd.UploadAssets`), and never `server-error`: that is `_route`'s catch-all and can come
|
|
2930
|
+
after files were stored. A proxy's 502 page, any answer that is not JSON and `server-error` all end `not
|
|
2931
|
+
confirmed`.
|
|
2932
|
+
- `x.onerror`, `x.onabort`, `x.ontimeout`: one handler, `not confirmed` with the connection sentence (D1). The page
|
|
2933
|
+
does not tell "not sent" from "not answered": that would rest on Safari's order of events, which nobody observed,
|
|
2934
|
+
and a wrong "not sent" is the defect the owner's review named.
|
|
2935
|
+
- The bound (D6; the path owner's R-Q4, 70 B, one block that can be cut): `x.timeout = 150000 + total / 65.536` ms,
|
|
2936
|
+
`total` being the set's bytes plus 1 024 B a file, as in the size check. 150 s is docsd's `BODY_GRACE_S` (30 s)
|
|
2937
|
+
plus `docs_store.AGE_S` (120 s, what `age` may take for one document); 65.536 bytes per ms is docsd's
|
|
2938
|
+
`BODY_MIN_RATE` (64 KiB/s). docsd ends a slow body at `BODY_GRACE_S + length / BODY_MIN_RATE` seconds with 408, so
|
|
2939
|
+
the page never ends a body docsd would still take (`test_docsd.UploadAssets` reads all three constants). INFERRED,
|
|
2940
|
+
not exact: docsd's clock starts when it starts reading, the page's at `send()`, and a hop that holds the body back
|
|
2941
|
+
moves the two apart; the end is `not confirmed` either way.
|
|
2942
|
+
|
|
2943
|
+
Lost on purpose in slice 3a: sending a `not confirmed` file again can store a second copy (`test_docsd.Upload` pins
|
|
2944
|
+
that it does; slice 3e-retry is to remove it, and whether that comes sooner is the owner's question BEY-8634), so the
|
|
2945
|
+
words say to look first. With the `age` switch on, several files that each take long to encrypt can pass the bound:
|
|
2946
|
+
the page then says `not confirmed` while docsd finishes. An `uploads-unavailable` refusal can leave a document in the
|
|
2947
|
+
store without a landed file (`test_docsd.Upload`; tracked as BEY-8639); its row says `refused`. Nothing survives a reload of the page,
|
|
2948
|
+
`Retry-After` is not read, the reason is docsd's word rather than a sentence, and the page docsd serves without the
|
|
2949
|
+
script keeps its own words.
|
|
2950
|
+
|
|
2951
|
+
Limits, each INFERRED (read, not observed; nothing of slice 3a has been seen in Safari or on a device; RUNBOOK, Web /
|
|
2952
|
+
phone, steps 53 to 61): that Safari fires `timeout` at the bound; that iOS Safari has a `DataTransfer` constructor
|
|
2953
|
+
whose `files` a script may assign to a file control; that a photo's `File.size` equals the bytes stored, and a kept
|
|
2954
|
+
`File` can still be read minutes after a failed try; what a Home Screen app does with a `target="_blank"` link; that
|
|
2955
|
+
VoiceOver reads the new rows from the list's `aria-live="polite"`. Known limits of the code, not ruled in slice 3a: a
|
|
2956
|
+
choice or drop made while a request is on its way is overwritten when the request ends (by the kept files, or cleared
|
|
2957
|
+
after a full success); a drop with no files empties the kept files; one file answered with two receipts reads
|
|
2958
|
+
`uploaded`; the page says nothing when the body cannot be built; after two unconfirmed tries sent to two lanes, the
|
|
2959
|
+
link names only the later lane, though files of the first may be arriving in the first.
|