@vibelord/lanes 1.7.5 → 1.7.7
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 +2 -2
- package/payload/lanes/VERSION +1 -1
- package/payload/lanes/bin-rs/BINARIES.json +1 -1
- package/payload/lanes/docs/ARCHITECTURE.md +15 -6
- package/payload/lanes/docs/RUNBOOK.md +2 -1
- package/payload/lanes/docs/USERGUIDE.md +40 -9
- package/payload/lanes/libexec/sidebar.py +212 -36
- package/payload/manifest.json +3 -3
package/package.json
CHANGED
package/payload/lanes/README.md
CHANGED
|
@@ -144,8 +144,8 @@ The installer starts an empty catalog safely; it does not assume anyone's contai
|
|
|
144
144
|
| See which agents need you | The sidebar sorts **Needs you** (◆ approval, ✗ error, ◇ waiting for a prompt), **Working** (▸) and **Done** (✓, until you open the lane) above the rest; the header counts them in the same glyphs (`◆1 ◇2 ▸6 ✓1`, zeros left out; `N lanes` when no lane runs an agent). The queue holds still: each section keeps the order its lanes entered it, a lane moves up a section at once but down only after the new state has held 8 s (leaving Needs you) or 5 s (leaving Working or Done), so an agent that asks again within seconds of an answer does not jump; the Needs you and Working headers stay drawn, `(0)` included, and the cursor stays on its lane ([how](docs/ARCHITECTURE.md#attention-queue)) |
|
|
145
145
|
| Read a sidebar row | `▌` cursor · agent glyph · `›` the lane this pane shows (`²`/`³`: shown in pane 2/3; `▲` pinned) · the name (`·` per other viewer, `…` when clipped) · an **age column** on every row (agent turn, else last output: `45s`, ` 3m`, ` 2h`, ` 4d`; amber in **Needs you**) · stream glyph · one tail cell by priority (`?` not observed right now > `⚠` starving: producing output but no request for over 10 min, or a 429 > `↓` downgraded > `$` mostly paid — the economy cells need the opt-in economy poller; a dim `⚠`/`↓` is a frozen last-known figure, not a live alarm) · `×` close. `⋮ N more` ends a list that continues below |
|
|
146
146
|
| End an unregistered session and its jobs | **×** beside the session, or select it and press `x`: ` › close ‘name’ — y⏎ confirm · Esc cancel`; `y` arms (` — ⏎ confirm`), Enter closes; any other key cancels (typed text closes nothing unless it is `x`, `y`, Enter in a row) |
|
|
147
|
-
| Every sidebar key | `?` replaces the list with the key sheet until the next key (that key only closes it): the short form of the [user guide's table](docs/USERGUIDE.md#the-sidebar), first `lanes <installed> · view <running>`, then companion keys on one line (`J K`, `Tab S-Tab`, `+ U d`, `u z`, `
|
|
148
|
-
| Pin, hide | `p` pins the cursor lane (it leads its section, `▲`, and never falls below `⋮ N more`), `h` hides it, `o` shows the hidden lanes again (faint)
|
|
147
|
+
| Every sidebar key | `?` replaces the list with the key sheet until the next key (that key only closes it): the short form of the [user guide's table](docs/USERGUIDE.md#the-sidebar), first `lanes <installed> · view <running>`, then companion keys on one line (`J K`, `Tab S-Tab`, `+ U d`, `u z`, `R m`, `p o`, `h H`, `r i ?`; `d` shows the cursor lane's docs link, `i` folds the fleet block), ending with Ctrl–Alt–L, the chord that brings the keyboard to the sidebar from a lane. The footer legend says ` ⏎ open · / find · x close · ? keys`; one prompt at a time, in one shape on the desktop and the phone (` › close ‘name’ — y⏎ confirm · Esc cancel`, ` › rename ‘name’? ⏎ confirms · Esc` then ` › Rename: …█`, ` › Register as: …█` then ` › register ‘name’ — y⏎ confirm`) and a filter counts its matches (` /abc · 3 matches`). What an action says in the footer (` Closed sh`, ` Cancelled`, why it failed) stays 3 s or until your next action, not just until the next key. After an action — a close, rename, register, cancel, `Esc`, `r`, closing `?`, a click that opens no lane — the keyboard goes back to the lane, so what you type next reaches the lane, not the sidebar; a prompt, the filter and the armed upload strip keep it. A sentence typed into the sidebar is no command (1.7.7): three printable keys inside 0.3 s start a typing state that swallows the rest of the burst (` Typing? ⏎ opens the lane · Esc`), and a question a letter opened takes no Enter for 0.3 s ([guide](docs/USERGUIDE.md#the-sidebar)) |
|
|
148
|
+
| Pin, hide | `p` pins the cursor lane (it leads its section, `▲`, and never falls below `⋮ N more`), `h` then `Enter` hides it (` › hide ‘name’? ⏎ confirms · Esc`; any other key cancels), `o` shows the hidden lanes again (faint) — while they are hidden the list ends with `── hidden (n) · o shows them` —, `H` then `Enter` hides the whole workspace — its tab closes, its lanes keep running. They are yours, not the device's: every device you own follows your profile on its next tick; a session under **Unregistered** is never hidden ([guide](docs/USERGUIDE.md#the-sidebar)) |
|
|
149
149
|
| Jump to the next lane that needs you | `Tab` / `Shift-Tab` in the sidebar (cycles **Needs you** from the lane the pane shows; the pane title carries the counts and a lane that starts needing you raises one OSC 9 desktop notification on desktop layouts — `lanes-launch <device> --notify 0` (or `lanes attach <device> --notify 0` on the server) silences it for that device, live; `LANES_NOTIFY=0` in the shell that creates a view session does the same for it, see the [user guide](docs/USERGUIDE.md#9-appearance)) |
|
|
150
150
|
| Other workspaces that need you | The row above the footer rule: ` ◆1 Worlds · ◇2 Code` (blank and absent when none; panes of 18 rows or more) |
|
|
151
151
|
| What the fleet spends | With the opt-in economy poller ([RUNBOOK](docs/RUNBOOK.md#economy-projection-opt-in)) the same row is the fleet economy strip instead: ` $8.5k/16k 53% · F2 S1 · spill 76% · free 3/19` — overflow spend against the daily cap (amber at the alert level), new upstream 429s, this workspace's lanes by model tier (`F` fable, `O` opus, `S` sonnet, `H` haiku, `G` gpt), the pool's spill fraction, free accounts and the next 5 h reset, whole parts dropped from the end to fit; a leading `?` means the figures are frozen — the poller could not reach the daemon, or it stopped (no rewrite for over 3 min) |
|
package/payload/lanes/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
1.7.
|
|
1
|
+
1.7.7
|
|
@@ -454,7 +454,12 @@ start but cannot mark the approval itself (DEF-1571, open; RUNBOOK "Installing a
|
|
|
454
454
|
**Keyboard.** The sidebar and the lane share one keyboard (the focused Zellij pane gets what is typed). Every sidebar
|
|
455
455
|
action that ends hands it back with one focus move (`Sidebar.release_focus` → `hand_off` → `focus_lane`; never on a
|
|
456
456
|
phone, whose picker is a whole tab) and drops the rest of the read it came in; a prompt, the filter and the armed
|
|
457
|
-
upload strip keep it (cockpit v3 S3).
|
|
457
|
+
upload strip keep it (cockpit v3 S3). A sentence typed while the sidebar has the keyboard is no command (BEY-7248,
|
|
458
|
+
1.7.7; the constants `BURST_*` and `INTENT_VERBS` in `sidebar.py`): `handle_keys` reads one key clock per read
|
|
459
|
+
(`Sidebar.key_clock`, the tests' seam) and `typed_burst` swallows every key once three printable keys (not `j k Space
|
|
460
|
+
/`) land inside 0.3 s, until 0.5 s of silence, Enter or Esc; `h`, `H` and `R` ask first and only Enter confirms; and a
|
|
461
|
+
stage a printable key opened takes no Enter — a field no letter — within 0.3 s of that key (`considered`), the close
|
|
462
|
+
included. `test_sidebar.TypedSentence` and `test_sidebar_burst_sabotage` hold it. No Zellij bind types into a
|
|
458
463
|
pane: `Ctrl-Alt-/` and `Ctrl-Alt-u` reach the sidebar through `lanes sidebar-key filter|upload --focused`, which
|
|
459
464
|
writes `views/<device>/<ws>.sidebar.cmd` for the tab's sidebar to act on, and `Ctrl-Alt-l` only moves the focus there
|
|
460
465
|
(cockpit v3 S4). The sidebar asks for focus reports (`?1004h`) and says in its footer when the keyboard is on it. The
|
|
@@ -1643,7 +1648,9 @@ owner` fold the devices they name; `lanes user list|show` read the store. The si
|
|
|
1643
1648
|
(cockpit v3 R3) resolves that owner exactly as `lanes attach` does (`users.login_for`, at start and whenever the device
|
|
1644
1649
|
file changes — a claim, a hand-over) and adds the profile's `(st_ino, st_mtime_ns, st_size)` to its reload stamp, the
|
|
1645
1650
|
one extra stat per tick an owned device pays (`users.update` replaces the file by rename, so every write has a new
|
|
1646
|
-
inode and two writes inside one timestamp tick are both seen, DEF-1972
|
|
1651
|
+
inode and two writes inside one timestamp tick are both seen, DEF-1972; the device file's own field is the same
|
|
1652
|
+
`(st_ino, st_mtime_ns, st_size)`, since `lanes attach` also replaces it by rename): on a change it re-reads the
|
|
1653
|
+
profile, merges its opened-lane marks into its own (the later per lane)
|
|
1647
1654
|
and paints its look over the device file's (`layered_look`: `--device-only` keys → profile → unmarked device keys →
|
|
1648
1655
|
environment → defaults).
|
|
1649
1656
|
Opening a lane there (`open_lane`, or `lanes next|prev`) writes the device's own `clients/<device>.seen.json` as before
|
|
@@ -1659,10 +1666,12 @@ the tabs the device has, not the ones it should show: a board added while no cli
|
|
|
1659
1666
|
close waits, says so, and lands on a later reconcile — DEF-1832); the phone's owner board (the sidebar that watches
|
|
1660
1667
|
the web client) is the first board shown.
|
|
1661
1668
|
Pins and hidden lanes (cockpit v3 R5) are the profile's `lanes{pins, hidden}`, read with the rest of it on every
|
|
1662
|
-
profile change and written by the sidebar keys `p`, `h` and `H` (this workspace into
|
|
1663
|
-
Enter
|
|
1664
|
-
|
|
1665
|
-
fleet strip until `o` shows the hidden lanes (per sidebar,
|
|
1669
|
+
profile change and written by the sidebar keys `p`, `h` (after its Enter since 1.7.7) and `H` (this workspace into
|
|
1670
|
+
`workspaces.hidden`, after its Enter — `y` and Enter until 1.7.7 —, then a detached `lanes upgrade-session`) under the
|
|
1671
|
+
same 0.2 s lock wait. Only registry lanes hide — never a divider, a zmx lane or a session under Unregistered — and a
|
|
1672
|
+
hidden one leaves the list, the header counts, OSC 9 and the fleet strip until `o` shows the hidden lanes (per sidebar,
|
|
1673
|
+
faint); meanwhile the list ends with one header-shaped row, `── hidden (n) · o shows them` (`Sidebar._visible`; the
|
|
1674
|
+
Rust sidebar's `Entry::Hidden`, BEY-7248), so a hidden lane is never invisible. A pinned lane leads its section in registry order
|
|
1666
1675
|
with the `pinned` mark, and `Sidebar.place_body` reserves rows above `⋮ N more` for every pin the window would hide
|
|
1667
1676
|
below, so a click maps through the body as drawn (`body_map`).
|
|
1668
1677
|
The arranging verbs (cockpit v3 R6) write the rest of the profile through the same `users.update`: `lanes workspaces
|
|
@@ -527,7 +527,8 @@ lanes studio-host re-key --yes after the owner revoked the Host: a new mac
|
|
|
527
527
|
a key: a cursor move, typing in a field, `Esc`, a focus report, the theme's OSC 11 answer, a wheel tick or a mouse
|
|
528
528
|
release leaves it (DEF-1822; DEF-1815 before it kept it from the focus report only). `?` shows
|
|
529
529
|
the key sheet (` lanes <current> · view <tree>` first — cockpit v3 V2 — then `sidebar.KEY_SHEET`, 18 lines since R5's
|
|
530
|
-
`p h` / `H o`
|
|
530
|
+
`p h` / `H o` (regrouped `p o` / `h H` in 1.7.7, BEY-7248: `⏎` after an action that asks first) and V2's `u z`: the
|
|
531
|
+
user guide's "Sidebar keys" table in short — companion keys on one line,
|
|
531
532
|
PageUp/PageDown left to the table — ending with `Ctrl-Alt-l`) in place of the list until the next key; the body of a
|
|
532
533
|
pane under 24 rows is shorter than the sheet and cuts its last lines. Every key on it and in the guide's table acts in `handle()`, and no other
|
|
533
534
|
key a keyboard sends does (`test_sidebar.DocumentedKeys`, cockpit v3 S10). A filter with no hits says ` no lane matches ‘abc’ · Esc`; a
|
|
@@ -733,8 +733,9 @@ browser view). `lanes user show <login>` prints it.
|
|
|
733
733
|
the last visible board is refused); `lanes workspaces order <id…>` puts those boards first, in that order, the rest
|
|
734
734
|
in catalog order. `lanes lane pin <lane-id>` lists a lane first in its section; `lanes lane hide <lane-id>` leaves a
|
|
735
735
|
registered lane out of your lists (a running unregistered session is always listed); `unpin` and `show` undo them.
|
|
736
|
-
The sidebar keys do the same where you are looking: `p` pins or unpins the cursor lane, `h` hides it
|
|
737
|
-
this board (
|
|
736
|
+
The sidebar keys do the same where you are looking: `p` pins or unpins the cursor lane, `h` hides it and `H` hides
|
|
737
|
+
this board (each asks first; Enter confirms, since 1.7.7) and `o` shows what you hid, faint, until you press it
|
|
738
|
+
again; while lanes are hidden the list ends with `── hidden (n) · o shows them`. Every sidebar of yours
|
|
738
739
|
follows within a tick (pinned lanes first, hidden ones out); the tabs take the board order and close a hidden
|
|
739
740
|
board's tab at the next `lanes upgrade-session` — `H` starts one at once, and every `lanes sync` (2-minute timer) and
|
|
740
741
|
`lanes ensure` (1-minute timer) runs one.
|
|
@@ -886,8 +887,9 @@ Marks and their ASCII twins: `▌` `|` cursor · `›` `=` viewing · `²` `2` /
|
|
|
886
887
|
**Footer**, highest priority first: the open prompt — the sidebar asks one thing at a time, in one of two shapes. A
|
|
887
888
|
name field: ` › Rename: …█`, or ` › Register as: …█` for promote (a name longer than the field shows its end, `…` first,
|
|
888
889
|
so what you type stays in view). A confirmation: ` › close ‘name’ — y⏎ confirm · Esc cancel` or
|
|
889
|
-
` › register ‘name’ — y⏎ confirm · Esc cancel` (promote), `⏎ confirm` once `y` armed it;
|
|
890
|
-
|
|
890
|
+
` › register ‘name’ — y⏎ confirm · Esc cancel` (promote), `⏎ confirm` once `y` armed it; for `h`, `H` and `R`
|
|
891
|
+
(since 1.7.7) ` › hide ‘name’? ⏎ confirms · Esc` / ` › rename ‘name’? ⏎ confirms · Esc`, where `Enter` alone answers
|
|
892
|
+
yes; at 36 columns ` cancel` gives way first, then ` · Esc`, then the name is clipped, so the keys always show. Then the Add to workspace prompt
|
|
891
893
|
` Choose a workspace · Esc cancels` · the filter ` /abc · 3 matches` · the health banner
|
|
892
894
|
(` ⚠ host under memory pressure · status 3 m old`, or ` ⚠ lane sockets deleted · lanes run; on the server: lanes
|
|
893
895
|
sockets repair`) · the version note ` server 1.2.0 · view 1.1.0 — press ?` while this sidebar runs another tree than
|
|
@@ -897,7 +899,7 @@ draws the same footer (its picker says ` Choose a workspace · Tap Cancel`, and
|
|
|
897
899
|
idle). An empty workspace shows `no lanes declared · + New shell` on its New shell row.
|
|
898
900
|
|
|
899
901
|
**Sidebar keys** (`?` shows the short form of this table in place of the list until the next key; that key only closes
|
|
900
|
-
the sheet). Its first row says which lanes: `lanes <installed version> · view <the version this sidebar runs>`. The sheet puts companion keys on one line (`J K`, `Tab S-Tab`, `/ @`, `+ U d`, `u z`, `R m`, `p
|
|
902
|
+
the sheet). Its first row says which lanes: `lanes <installed version> · view <the version this sidebar runs>`. The sheet puts companion keys on one line (`J K`, `Tab S-Tab`, `/ @`, `+ U d`, `u z`, `R m`, `p o`, `h H`, `r i ?`; a `⏎` after an action — `rename ⏎`, `hide lane / tab ⏎` — means it asks first and `Enter` confirms), leaves `PageUp` / `PageDown`
|
|
901
903
|
to this table and ends with `Ctrl-Alt-l` — not a sidebar key but the chord that brings the keyboard here from a lane
|
|
902
904
|
(section [Keybindings](#keybindings)). Every key below does something in the sidebar, and no other key does
|
|
903
905
|
(`tests/unit/test_sidebar.py` `DocumentedKeys` presses each one and every other key a keyboard sends):
|
|
@@ -919,13 +921,13 @@ to this table and ends with `Ctrl-Alt-l` — not a sidebar key but the chord tha
|
|
|
919
921
|
| `x` | Close the cursor session: `y` arms, `Enter` closes, any other key cancels (on a registered lane: ` registered: u to unregister first`) |
|
|
920
922
|
| `u` | Unregister the cursor session added with `a`: it moves back to **Unregistered**, still running, and the cursor goes with it; on a lane a repository's `terminals.json` declares, take its terminal out of that file |
|
|
921
923
|
| `z` | Undo that unregister (within 10 s) |
|
|
922
|
-
| `R` | Rename the cursor lane |
|
|
924
|
+
| `R` | Rename the cursor lane: it asks first (` › rename ‘name’? ⏎ confirms · Esc`), `Enter` opens the name field (` › Rename: …█`), any other key cancels; `Enter` in the field renames |
|
|
923
925
|
| `m` | Message the cursor lane: one line in the footer (` › Message: █`), `Enter` sends it — typed into the lane at once when it is idle at its prompt, else left in its inbox and typed when it is next idle (` message … typed`, ` … queued`); `Esc` or an empty line sends nothing (see **Addresses, handles and messages**) |
|
|
924
926
|
| `P` | Promote (register) the cursor session in the repository's `terminals.json`: the name first (`Enter` accepts), then `y` and `Enter` |
|
|
925
927
|
| `p` | Pin / unpin the cursor lane: on every device you own it leads its section, marked `▲` (`^` in ASCII), and never falls below `⋮ N more` |
|
|
926
|
-
| `h` | Hide the cursor lane on every device you own (` Hid ‘name’ · o shows it`); on a hidden lane `o` shows, show it again |
|
|
927
|
-
| `H` | Hide this workspace on every device you own:
|
|
928
|
-
| `o` | Show / hide again the lanes you hid (shown faint) |
|
|
928
|
+
| `h` | Hide the cursor lane on every device you own: it asks first (` › hide ‘name’? ⏎ confirms · Esc`), `Enter` hides it (` Hid ‘name’ · o shows it`), any other key — `y` too — cancels; on a hidden lane `o` shows, show it again at once |
|
|
929
|
+
| `H` | Hide this workspace on every device you own: it asks first, `Enter` hides — its tab closes, its lanes keep running (the last workspace shown stays); any other key cancels |
|
|
930
|
+
| `o` | Show / hide again the lanes you hid (shown faint); while they are hidden the list ends with `── hidden (n) · o shows them` |
|
|
929
931
|
| `i` | Fold the fleet block to one line, or unfold it, on every device you own (` fleet folded · i unfolds`); then the keyboard goes back to the lane |
|
|
930
932
|
| `U` | Arm the upload strip |
|
|
931
933
|
| `d` | Show the cursor lane's docs link in the footer for 3 s: `https://<server>:8443/lanes-docs/?ws=<workspace>&lane=<lane id>`, as much as the row holds, the whole line one link to all of it (⌘/Ctrl-click, or your terminal's Copy Link); then the keyboard goes back to the lane. ` no docs in ‘name’` on a lane without documents |
|
|
@@ -966,6 +968,13 @@ ones. The filter keeps its match order; pins lead their section everywhere else.
|
|
|
966
968
|
every view of yours (`lanes upgrade-session`, which `H` starts); `lanes workspaces show <id>` (cockpit v3 R6) brings it
|
|
967
969
|
back. On a device nobody owns there is no profile: `p`, `h` and `H` say ` no owner: lanes device claim`.
|
|
968
970
|
|
|
971
|
+
**Where did my lane go?** A hidden lane is never invisible (1.7.7): while you hide lanes of a workspace its list ends
|
|
972
|
+
with one row, `── hidden (n) · o shows them` (a count, no names). If a lane vanished from every board of yours, it is
|
|
973
|
+
probably hidden: press `o` in the sidebar, put the cursor on it and press `h` (it shows again at once), or, on the
|
|
974
|
+
server, run `lanes lane show <lane-id> --login <login>` (`lanes user show <login>` lists your hidden lanes). Before
|
|
975
|
+
1.7.7 a sentence typed into the sidebar could hide the cursor lane with its first `h`; since then `h` asks first (see
|
|
976
|
+
**A sentence typed into the sidebar is no command** below).
|
|
977
|
+
|
|
969
978
|
Mouse: a click opens a lane; the wheel moves the cursor three rows; a click on `×` asks to close, on `+` starts Add to
|
|
970
979
|
workspace, on the upload strip arms it. Under an open prompt the wheel does nothing and a click ends the prompt first
|
|
971
980
|
(` Cancelled`), then does what it does (a click on a row opens that lane); a click on the upload strip beside a Rename
|
|
@@ -983,6 +992,28 @@ type next lands in the
|
|
|
983
992
|
sidebar, not in an agent's approval prompt. The wheel and a mouse release never move the focus. On the phone the
|
|
984
993
|
picker tab keeps it; only opening a lane leaves it.
|
|
985
994
|
|
|
995
|
+
**A sentence typed into the sidebar is no command** (1.7.7). The sidebar pane is one click away, and a prompt typed
|
|
996
|
+
while it has the keyboard used to reach it as keys: its first `h` hid the lane under the cursor on every device you
|
|
997
|
+
own, and the rest kept acting (`o`, `p`, `m`, `R`). Now:
|
|
998
|
+
|
|
999
|
+
- Keys faster than a person navigates are typing: once three printable keys land inside 0.3 s, the rest of that burst
|
|
1000
|
+
— until 0.5 s of silence, `Enter` or `Esc` — is swallowed, never acted on, and the footer says
|
|
1001
|
+
` Typing? ⏎ opens the lane · Esc`: `Enter` (after the burst) opens the cursor lane and gives it the keyboard, `Esc`
|
|
1002
|
+
gives the keyboard back to the lane on view. The burst's own `Enter` opens nothing. `j` `k` `Space` and `/` are
|
|
1003
|
+
never counted, so holding `j` or `k`, the arrows, `Enter`, `Space`, `Esc` and a fast `/abc` filter work as always,
|
|
1004
|
+
and a name field or the filter takes its text as always.
|
|
1005
|
+
- `h` (hide the lane), `H` (hide the workspace) and `R` (rename) ask first, and only `Enter` answers yes — any other
|
|
1006
|
+
key, `y` included, cancels (a typed "hey" or "hybrid" has an `h` followed by a `y`). `p` (pin) stays immediate, and
|
|
1007
|
+
so does `h` on a hidden lane `o` shows: the way back asks nothing.
|
|
1008
|
+
- A question a letter opened takes no `Enter` within 0.3 s of that letter: `h⏎`, `R⏎` or `xy⏎` typed at speed act on
|
|
1009
|
+
nothing — that `Enter` cancels, so a second one opens the lane. A field a letter opened (`m`'s message line, `P`'s
|
|
1010
|
+
name) takes no letter in that time: `make it so⏎` sends nothing. `Esc` cancels at any time. `x` still asks for `y`,
|
|
1011
|
+
then `Enter`.
|
|
1012
|
+
|
|
1013
|
+
The rule lives in `lanes/libexec/sidebar.py` (`BURST_WINDOW_S`, `BURST_KEYS`, `BURST_QUIET_S`, `BURST_FREE`,
|
|
1014
|
+
`INTENT_VERBS`); `tests/unit/test_sidebar.py` `TypedSentence` types the sentences at those speeds and
|
|
1015
|
+
`test_sidebar_burst_sabotage.py` proves each detector fails without its mechanism.
|
|
1016
|
+
|
|
986
1017
|
**The footer says when the keyboard is on the sidebar.** While it is, the legend line reads
|
|
987
1018
|
` ▌ keys go to sidebar · Esc → lane` in the accent colour (` | keys go to sidebar - Esc -> lane` in ASCII) instead of
|
|
988
1019
|
` ⏎ open · / find · x close · ? keys` — no extra row; a prompt, the filter, a banner or a message still take the line
|
|
@@ -20,9 +20,10 @@ Zellij's focus reports (`?1004h`), else for 3 s after a key. Ctrl-Alt-/ and Ctrl
|
|
|
20
20
|
type nothing: they move the focus here and `lanes sidebar-key` leaves views/<device>/<ws>.sidebar.cmd, which starts
|
|
21
21
|
the filter / arms the upload strip (reload()'s stamp, and before the next read of keys). Ctrl-Alt-l only focuses.
|
|
22
22
|
One prompt at a time (cockpit v3 S6): `self.prompt = {verb, entry, stage, value, armed}` — a name field (` › Rename:
|
|
23
|
-
value█`) or a confirmation (` › close ‘sh’ — y⏎ confirm · Esc cancel`
|
|
24
|
-
|
|
25
|
-
|
|
23
|
+
value█`) or a confirmation (` › close ‘sh’ — y⏎ confirm · Esc cancel`; for `h`, `H` and `R`, since 1.7.7,
|
|
24
|
+
` › hide ‘sh’? ⏎ confirms · Esc`) — and ONE footer_text() for the desktop and the phone. No prompt outlives the
|
|
25
|
+
keyboard (S6 fix cycle 1): a click on the list ends it before it acts, a name field types nothing for an arrow / Tab /
|
|
26
|
+
Shift-Tab / PageUp / PageDown, and hand_off() closes one still open.
|
|
26
27
|
What an action says in the footer lasts 3 s, or until the next action begins; never just until a key.
|
|
27
28
|
Attention first: lanes whose agent needs you, is working, or finished unseen sort into sections above the rest, each in
|
|
28
29
|
the order its lanes entered it (statusd's `stable_since`); the agent glyph sits in column 2, and every row carries an
|
|
@@ -37,8 +38,14 @@ profile paints only where the profile sets none. A device nobody owns never touc
|
|
|
37
38
|
Pins and hidden lanes (cockpit v3 R5): the profile's `lanes{pins, hidden}`. A hidden registry lane leaves the list, the
|
|
38
39
|
header counts and the notifications (never a divider, never a session listed under Unregistered: nothing alive is
|
|
39
40
|
ever hidden), until `o` shows the hidden ones again, faint; a pinned lane leads its section with the ▲ mark and the body
|
|
40
|
-
never lets it fall below `⋮ N more`. `p` pins / unpins, `h` hides (
|
|
41
|
-
Enter: `lanes upgrade-session` closes its tab on every
|
|
41
|
+
never lets it fall below `⋮ N more`. `p` pins / unpins, `h` hides (Enter confirms; on a hidden lane `o` shows, `h`
|
|
42
|
+
shows it again at once), `H` hides this workspace (Enter confirms: `lanes upgrade-session` closes its tab on every
|
|
43
|
+
device of the person), `o` toggles the hidden lanes. While the owner hides lanes of this workspace the list ends with
|
|
44
|
+
one row, `── hidden (n) · o shows them` (counts only, no names), so a hidden lane is never invisible (BEY-7248).
|
|
45
|
+
A typed sentence is no command (BEY-7248, 1.7.7): printable keys faster than a person navigates — BURST_KEYS inside
|
|
46
|
+
BURST_WINDOW_S — put the sidebar in a `typing` state that swallows the rest of the burst (until BURST_QUIET_S of
|
|
47
|
+
silence, Enter or Esc) and says ` Typing? ⏎ opens the lane · Esc`; `h`, `H` and `R` ask first and only Enter answers
|
|
48
|
+
yes, and no stage a letter opened takes its Enter (or, for a field, its letters) within BURST_WINDOW_S of that letter.
|
|
42
49
|
Which lanes (cockpit v3 V2): the `?` sheet's first row is ` lanes <installed> · view <this tree>`; while an update has
|
|
43
50
|
flipped `current` to another tree than the one this sidebar runs, the footer's rung below the health banner says
|
|
44
51
|
` server 1.2.0 · view 1.1.0 — press ?`. `current/VERSION` is read at start and every 30 s inside reload(), never per tick.
|
|
@@ -193,7 +200,29 @@ STATE_FRESH_S = 60.0 # a .sidebar.state older than this (by its own `
|
|
|
193
200
|
# (` › Rename: value█`); a `confirm` stage is ` › <word> ‘name’ — y⏎ confirm · Esc cancel`. The verb is what the phone
|
|
194
201
|
# title announces (DM-LANES-SIDEBAR-TITLE); the word is what the footer says it does — `P` registers the session.
|
|
195
202
|
PROMPT_FIELDS = {'rename': 'Rename', 'promote': 'Register as', 'message': 'Message'}
|
|
196
|
-
PROMPT_WORDS = {'close': 'close', 'promote': 'register', 'hide': 'hide'}
|
|
203
|
+
PROMPT_WORDS = {'close': 'close', 'promote': 'register', 'hide': 'hide', 'rename': 'rename'}
|
|
204
|
+
# A typed sentence is no command (BEY-7248, Lanes 1.7.7). A prompt typed while the sidebar pane had the focus — one
|
|
205
|
+
# click away on a web terminal — reached handle_keys() as commands: its first `h` hid the cursor lane on every device of
|
|
206
|
+
# the owner (2026-11-04 the Worlds lanes, 2026-11-05 bw-tools--lanes-workspace) and the rest kept acting (`o` toggled
|
|
207
|
+
# the hidden view, `p` pinned, `m` opened the message line, `R` a rename). The rules, here and nowhere else:
|
|
208
|
+
# * The burst (typed_burst): BURST_KEYS printable keys inside BURST_WINDOW_S are typing, not navigation. From the
|
|
209
|
+
# last of them the sidebar is `typing` until BURST_QUIET_S of silence, Enter or Esc: every key of the burst is
|
|
210
|
+
# swallowed (its Enter too: it ended the sentence and opens nothing) and the footer says typing_text(); Esc does
|
|
211
|
+
# what Esc does. BURST_FREE (j k Space /) are never counted, so key repeat on j / k, Space and a fast `/abc` keep
|
|
212
|
+
# working; an escape sequence (an arrow, PageUp / PageDown, Shift-Tab, a mouse report) is never swallowed; the
|
|
213
|
+
# filter and a name field take their text as always.
|
|
214
|
+
# * Intent (INTENT_VERBS): `h` (hide the cursor lane), `H` (hide this workspace) and `R` (rename) ask first, and only
|
|
215
|
+
# Enter answers yes — a non-printable key: any other key, `y` included, cancels ("hey" and "hybrid" carry an `h`
|
|
216
|
+
# followed by a `y`). `x`'s close keeps `y`, then Enter.
|
|
217
|
+
# * The open-time rule (considered): a stage a PRINTABLE key opened takes no Enter for BURST_WINDOW_S after that
|
|
218
|
+
# key — the Enter cancels, so a second Enter opens the lane instead of confirming — and a field a letter opened
|
|
219
|
+
# (`m`, `P`) takes no letter in that time either: `h⏎`, `xy⏎` or `make it so⏎` typed at speed act on nothing.
|
|
220
|
+
# Esc cancels at any time.
|
|
221
|
+
BURST_WINDOW_S = 0.3
|
|
222
|
+
BURST_KEYS = 3
|
|
223
|
+
BURST_QUIET_S = 0.5
|
|
224
|
+
BURST_FREE = 'jk /'
|
|
225
|
+
INTENT_VERBS = ('hide', 'rename')
|
|
197
226
|
# The owner's profile (cockpit v3 R3, LNS-76): users/<login>.json (libexec/users.py) of the person this device belongs
|
|
198
227
|
# to. Opening a lane writes its mark there through users.update, which holds the profile's lock; the CLI waits up to
|
|
199
228
|
# users.LOCK_S (1 s) for it, a sidebar only PROFILE_LOCK_S — every writer holds it for milliseconds (read, merge, one
|
|
@@ -785,7 +814,10 @@ BOX_ROWS = 1 # the upload strip (spec §4.6(d)); it was a four-row box
|
|
|
785
814
|
# of a 24-row pane with the strip row; R5's `p h` / `H o` (LNS-78) took the two rows S10 left, and V2's row the line
|
|
786
815
|
# `u z` now share. Plan W10 W7's `d` (the cursor lane's docs link) joins the strip's own keys, `+ U d`, for the same reason,
|
|
787
816
|
# W11's `i` (fold the fleet block) the reload and the sheet, `r i ?`, W15 L2's `@` (the addresses) the find, `/ @`, and
|
|
788
|
-
# W15 L4's `m` (a message to the cursor lane) the rename, `R m`.
|
|
817
|
+
# W15 L4's `m` (a message to the cursor lane) the rename, `R m`. BEY-7248 (1.7.7) regrouped R5's two lines by what
|
|
818
|
+
# the keys do — `p o` (pin, show the hidden lanes: immediate) and `h H` (hide the lane / the tab: they ask first) — and
|
|
819
|
+
# marks the verbs that ask first with the `enter` mark after their action (`rename ⏎`, `hide lane / tab ⏎`: ⏎
|
|
820
|
+
# confirms). A row's optional fourth field is its action under ASCII glyphs (`Enter` is five cells, `⏎` one).
|
|
789
821
|
# test_sidebar.DocumentedKeys holds the sheet, the table and handle() to the same keys.
|
|
790
822
|
KEY_SHEET = (('↑ ↓ j k', 'Up Dn j k', 'move'), ('⏎ → Space', 'Enter Spc', 'open the cursor lane'),
|
|
791
823
|
('J K', 'J K', 'open next / prev lane'), ('Tab S-Tab', 'Tab S-Tab', 'next / prev needing you'),
|
|
@@ -793,8 +825,9 @@ KEY_SHEET = (('↑ ↓ j k', 'Up Dn j k', 'move'), ('⏎ → Space', 'Enter Spc'
|
|
|
793
825
|
('Esc', 'Esc', 'cancel, back to lane'), ('g G', 'g G', 'first / last'),
|
|
794
826
|
('+ U d', '+ U d', 'shell / upload / docs'), ('a', 'a', 'add to a workspace'),
|
|
795
827
|
('x', 'x', 'close (y, then Enter)'), ('u z', 'u z', 'unregister / undo 10 s'),
|
|
796
|
-
('R m', 'R m', 'rename / message'
|
|
797
|
-
('
|
|
828
|
+
('R m', 'R m', 'rename ⏎ / message', 'rename Enter / message'), ('P', 'P', 'register a session'),
|
|
829
|
+
('p o', 'p o', 'pin / show hidden lanes'), ('h H', 'h H', 'hide lane / tab ⏎', 'hide lane / tab Enter'),
|
|
830
|
+
('r i ?', 'r i ?', 'reload / fleet / keys'),
|
|
798
831
|
('Ctrl-Alt-l', 'Ctrl-Alt-l', 'focus the sidebar'))
|
|
799
832
|
PASTE_START, PASTE_END = '\033[200~', '\033[201~'
|
|
800
833
|
# A paste typed into a footer field (Sidebar.pasted): a run of line breaks / tabs is one space, never an Enter.
|
|
@@ -996,6 +1029,15 @@ class Sidebar:
|
|
|
996
1029
|
paste_buffer, paste_dropped, key_carry, carry_due = None, False, '', 0.0
|
|
997
1030
|
esc_taken, on_tty, utf8 = False, False, None
|
|
998
1031
|
last_visible = () # the list visible() last returned: the one `self.cursor` indexes
|
|
1032
|
+
# The key rules of BEY-7248 (BURST_* above; read-only defaults, handle_keys assigns): `key_clock` is their clock —
|
|
1033
|
+
# time.monotonic, the seam a test replaces with any function of no arguments (an instance attribute); `key_now` its
|
|
1034
|
+
# reading for the keys being handled, `key_typed` whether the key being dispatched is a printable one;
|
|
1035
|
+
# `stage_typed_at` the `key_now` of the printable key that opened the prompt's current stage (None: Enter, a click
|
|
1036
|
+
# or no key at all opened it); `burst` the stamps of the counted keys inside BURST_WINDOW_S; `typing` the typing
|
|
1037
|
+
# state and `typing_at` the stamp of its last key.
|
|
1038
|
+
key_clock = staticmethod(time.monotonic)
|
|
1039
|
+
key_now, key_typed, stage_typed_at = 0.0, False, None
|
|
1040
|
+
burst, typing, typing_at = (), False, 0.0
|
|
999
1041
|
economy = {} # read-only default; reload() assigns the loaded economy.json (load_economy)
|
|
1000
1042
|
economy_tiers = '' # this workspace's tier mix from economy.json, `F2 S1` (reload)
|
|
1001
1043
|
more_row = 0 # the 1-based screen row of `⋮ N more` (render), 0 = the list fits
|
|
@@ -1234,9 +1276,12 @@ class Sidebar:
|
|
|
1234
1276
|
self.recheck_version()
|
|
1235
1277
|
if not force and self.swap_due(): # run()'s tick only: a forced reload is an action's, never cut short
|
|
1236
1278
|
self.self_swap()
|
|
1279
|
+
# The device file's field is file_stamp, like the profile's: `lanes attach` replaces it by rename, and two
|
|
1280
|
+
# writes inside one timestamp tick (a --device-only key, then the same flag without it) differ only by inode
|
|
1281
|
+
# and size; an mtime alone kept the first look (DEF-1972's mechanism on the device file).
|
|
1237
1282
|
stamp = (mtime(self.registry_path), mtime(self.status_path),
|
|
1238
1283
|
sum(mtime(self.slot_file(slot, 'target')) for slot in SLOTS[:self.viewports]),
|
|
1239
|
-
|
|
1284
|
+
file_stamp(self.look_path), mtime(self.economy_path), mtime(self.command_path), self.profile_stamp(),
|
|
1240
1285
|
self.canonical_stamp())
|
|
1241
1286
|
if stamp == self.stamp and not force:
|
|
1242
1287
|
return
|
|
@@ -2745,6 +2790,13 @@ class Sidebar:
|
|
|
2745
2790
|
# lead a section, never the matches).
|
|
2746
2791
|
lanes = self.shown_lanes()
|
|
2747
2792
|
entries = list(lanes) if self.filter else self.sectioned(lanes)
|
|
2793
|
+
hidden = 0 if self.filter or self.show_hidden else self.hidden_count()
|
|
2794
|
+
if hidden:
|
|
2795
|
+
# BEY-7248: a hidden lane is never invisible — one row at the bottom of the lanes says how many (no names)
|
|
2796
|
+
# and how to see them; a divider: no cursor mark, a click on it opens nothing (Rust: Entry::Hidden).
|
|
2797
|
+
sep = f' {self.glyphs["marks"]["sep"]} '
|
|
2798
|
+
entries.append({'id': '', 'divider': True, 'hidden_row': True,
|
|
2799
|
+
'name': f'hidden ({hidden}){sep}o shows {"it" if hidden == 1 else "them"}'})
|
|
2748
2800
|
if self.zmx:
|
|
2749
2801
|
entries.append({'id': '', 'divider': True, 'name': f'zmx lanes ({len(self.zmx)})'})
|
|
2750
2802
|
entries += self.zmx
|
|
@@ -2964,8 +3016,21 @@ class Sidebar:
|
|
|
2964
3016
|
handle_keys() (`name`: typed, ⏎ accepts; `confirm`: `y` arms, ⏎ acts, any other key cancels) and drawn by
|
|
2965
3017
|
footer_text() on the desktop and the phone alike."""
|
|
2966
3018
|
self.prompt = {'verb': verb, 'entry': entry, 'stage': stage, 'value': value, 'armed': False}
|
|
3019
|
+
self.stage_opened()
|
|
2967
3020
|
self.dirty = True
|
|
2968
3021
|
|
|
3022
|
+
def stage_opened(self):
|
|
3023
|
+
"""A prompt stage opened by the key being dispatched (BEY-7248): its `key_now` when that key is a printable one
|
|
3024
|
+
— the stage then takes no Enter (nor, a field, a letter) for BURST_WINDOW_S (considered) — else None."""
|
|
3025
|
+
self.stage_typed_at = self.key_now if self.key_typed else None
|
|
3026
|
+
|
|
3027
|
+
def considered(self):
|
|
3028
|
+
"""Whether the open stage has been on screen long enough for its answer to be a person's (BEY-7248): a stage
|
|
3029
|
+
that Enter, a click or no key opened (`stage_typed_at` None) at once; one a printable key opened once
|
|
3030
|
+
BURST_WINDOW_S has passed since that key. `h⏎`, `R⏎` and `xy⏎` typed at speed — one read, or reads
|
|
3031
|
+
milliseconds apart — answer nothing: the Enter cancels instead (answer_prompt)."""
|
|
3032
|
+
return self.stage_typed_at is None or self.key_now - self.stage_typed_at >= BURST_WINDOW_S
|
|
3033
|
+
|
|
2969
3034
|
def close_prompt(self):
|
|
2970
3035
|
"""End the prompt -> the one that was open ({} when none was): its caller acts on it, or says why not."""
|
|
2971
3036
|
prompt, self.prompt, self.dirty = self.prompt or {}, None, True
|
|
@@ -3067,8 +3132,19 @@ class Sidebar:
|
|
|
3067
3132
|
except OSError:
|
|
3068
3133
|
pass
|
|
3069
3134
|
|
|
3135
|
+
def request_rename(self, entry):
|
|
3136
|
+
"""`R` (BEY-7248, 1.7.7): ask first — ` › rename ‘name’? ⏎ confirms · Esc`, the one prompt — and open the name
|
|
3137
|
+
field (start_rename) on its Enter (commit_intent). Until 1.7.7 `R` opened the field at once, so the sentence
|
|
3138
|
+
typed after an `R` became the lane's name at that sentence's Enter. A row no rename applies to asks nothing,
|
|
3139
|
+
as start_rename refuses it."""
|
|
3140
|
+
self.begin_action()
|
|
3141
|
+
if entry.get('divider') or entry.get('action') or self.still_pending(entry):
|
|
3142
|
+
return
|
|
3143
|
+
self.open_prompt('rename', entry, 'confirm', entry.get('name', ''))
|
|
3144
|
+
|
|
3070
3145
|
def start_rename(self, entry):
|
|
3071
|
-
"""Begin inline rename of the lane under the cursor: the `rename` prompt's name field, prefilled
|
|
3146
|
+
"""Begin inline rename of the lane under the cursor: the `rename` prompt's name field, prefilled (`R`'s Enter;
|
|
3147
|
+
the conformance kit calls it directly)."""
|
|
3072
3148
|
self.begin_action()
|
|
3073
3149
|
if entry.get('divider') or entry.get('action') or self.still_pending(entry):
|
|
3074
3150
|
return
|
|
@@ -3182,6 +3258,7 @@ class Sidebar:
|
|
|
3182
3258
|
self.release_focus()
|
|
3183
3259
|
return
|
|
3184
3260
|
self.prompt.update(stage='confirm', value=name, armed=False)
|
|
3261
|
+
self.stage_opened() # Enter opened it: no open-time rule (BEY-7248)
|
|
3185
3262
|
self.dirty = True
|
|
3186
3263
|
|
|
3187
3264
|
def commit_promote(self):
|
|
@@ -3294,27 +3371,42 @@ class Sidebar:
|
|
|
3294
3371
|
return True
|
|
3295
3372
|
|
|
3296
3373
|
def answer_prompt(self, ch):
|
|
3297
|
-
"""One typed key at a `confirm` stage
|
|
3298
|
-
|
|
3374
|
+
"""One typed key at a `confirm` stage (cockpit v3 S6). `close` and `promote`: `y` arms; Enter, once armed, acts.
|
|
3375
|
+
The INTENT_VERBS (`h`, `H`, `R`; BEY-7248): Enter alone acts — `y` is any other key. Either way an Enter the
|
|
3376
|
+
stage cannot have been read for (considered: within BURST_WINDOW_S of the letter that opened it) is no answer,
|
|
3377
|
+
and anything else cancels, is consumed and hands the keyboard back. An escape sequence never gets here:
|
|
3299
3378
|
prompt_sequence() answers those, at either stage, before any (until S6 the register confirmation was read
|
|
3300
3379
|
after the escape sequences, so an arrow or a click under it moved the cursor or opened a lane and left it
|
|
3301
3380
|
open, DEF-1823)."""
|
|
3302
3381
|
prompt = self.prompt
|
|
3303
3382
|
self.dirty = True
|
|
3304
|
-
if
|
|
3383
|
+
if prompt['verb'] in INTENT_VERBS:
|
|
3384
|
+
if ch in '\r\n' and self.considered():
|
|
3385
|
+
self.commit_intent()
|
|
3386
|
+
return
|
|
3387
|
+
elif ch in 'yY' and not prompt['armed']:
|
|
3305
3388
|
prompt['armed'] = True
|
|
3306
3389
|
return
|
|
3307
|
-
|
|
3390
|
+
elif ch in '\r\n' and prompt['armed'] and self.considered():
|
|
3308
3391
|
if prompt['verb'] == 'close':
|
|
3309
3392
|
self.close_lane(self.close_prompt()['entry']) # hands the keyboard back when it is done
|
|
3310
|
-
elif prompt['verb'] == 'hide':
|
|
3311
|
-
self.commit_hide_workspace()
|
|
3312
3393
|
else:
|
|
3313
3394
|
self.commit_promote()
|
|
3314
3395
|
return
|
|
3315
3396
|
self.cancel_prompt()
|
|
3316
3397
|
self.release_focus()
|
|
3317
3398
|
|
|
3399
|
+
def commit_intent(self):
|
|
3400
|
+
"""Enter at an INTENT_VERBS confirmation (BEY-7248): `R` opens the name field (start_rename, which replaces the
|
|
3401
|
+
prompt), `H` hides this workspace (commit_hide_workspace), `h` hides the cursor lane (hide_lane)."""
|
|
3402
|
+
prompt = self.prompt
|
|
3403
|
+
if prompt['verb'] == 'rename':
|
|
3404
|
+
self.start_rename(prompt['entry'])
|
|
3405
|
+
elif prompt['entry'].get('board'):
|
|
3406
|
+
self.commit_hide_workspace()
|
|
3407
|
+
else:
|
|
3408
|
+
self.hide_lane(self.close_prompt()['entry'])
|
|
3409
|
+
|
|
3318
3410
|
def prompt_sequence(self, key):
|
|
3319
3411
|
"""ONE escape sequence (as key_length() cuts it) while the prompt is open, at either stage (cockpit v3 S6 fix
|
|
3320
3412
|
cycle 1, DEF-1824: S6 gave a rule to the confirmation only, and under a name field → or a click on a row opened
|
|
@@ -3510,10 +3602,26 @@ class Sidebar:
|
|
|
3510
3602
|
self.resolve_cursor(self.visible(), lane_id)
|
|
3511
3603
|
self.release_focus()
|
|
3512
3604
|
|
|
3605
|
+
def request_hide_lane(self, entry):
|
|
3606
|
+
"""`h` (BEY-7248, 1.7.7): ask before hiding the cursor lane — ` › hide ‘name’? ⏎ confirms · Esc`, the one
|
|
3607
|
+
prompt; its Enter hides it (commit_intent → hide_lane), any other key cancels. Hiding is shared by every device
|
|
3608
|
+
of the owner and was ONE key: a sentence typed while the sidebar had the focus hid the cursor lane with its
|
|
3609
|
+
first `h`. While `o` shows the hidden lanes, `h` on a hidden one shows it again at once: the recovery asks
|
|
3610
|
+
nothing. A refusal (not a registry lane, no owner) says why and keeps the keyboard, as before."""
|
|
3611
|
+
self.begin_action()
|
|
3612
|
+
self.dirty = True
|
|
3613
|
+
if not self.arrangeable(entry, 'hides'):
|
|
3614
|
+
return
|
|
3615
|
+
if entry['id'] in self.lane_hidden:
|
|
3616
|
+
self.hide_lane(entry)
|
|
3617
|
+
return
|
|
3618
|
+
self.open_prompt('hide', entry, 'confirm', entry.get('name', entry['id']))
|
|
3619
|
+
|
|
3513
3620
|
def hide_lane(self, entry):
|
|
3514
|
-
"""`h
|
|
3515
|
-
the cursor stays on its row (the next lane) — or, while `o`
|
|
3516
|
-
|
|
3621
|
+
"""`h`'s Enter (request_hide_lane, commit_intent): hide the cursor lane on every device of the owner — it leaves
|
|
3622
|
+
the list, the counts and the notifications, the cursor stays on its row (the next lane) — or, `h` while `o`
|
|
3623
|
+
shows the hidden lanes, show a hidden one again (at once). A session listed under Unregistered is never hidden
|
|
3624
|
+
(nothing alive is), a divider neither."""
|
|
3517
3625
|
self.begin_action()
|
|
3518
3626
|
self.dirty = True
|
|
3519
3627
|
if not self.arrangeable(entry, 'hides'):
|
|
@@ -3639,7 +3747,7 @@ class Sidebar:
|
|
|
3639
3747
|
The footer says how many; then the keyboard goes back to the lane."""
|
|
3640
3748
|
self.begin_action()
|
|
3641
3749
|
self.show_hidden, self.dirty = not self.show_hidden, True
|
|
3642
|
-
count =
|
|
3750
|
+
count = self.hidden_count()
|
|
3643
3751
|
g = self.glyphs['marks']
|
|
3644
3752
|
if not count:
|
|
3645
3753
|
self.message = 'no hidden lanes'
|
|
@@ -3649,10 +3757,15 @@ class Sidebar:
|
|
|
3649
3757
|
self.message = f'{count} hidden {g["sep"]} o shows {"it" if count == 1 else "them"}'
|
|
3650
3758
|
self.release_focus()
|
|
3651
3759
|
|
|
3760
|
+
def hidden_count(self):
|
|
3761
|
+
"""How many of this workspace's registry lanes the owner hid (the profile may hide other boards' lanes too)."""
|
|
3762
|
+
return sum(1 for entry in self.entries if entry.get('id') in self.lane_hidden)
|
|
3763
|
+
|
|
3652
3764
|
def request_hide_workspace(self):
|
|
3653
|
-
"""`H`: ask to hide this workspace for the owner (` › hide ‘title
|
|
3654
|
-
|
|
3655
|
-
|
|
3765
|
+
"""`H`: ask to hide this workspace for the owner (` › hide ‘title’? ⏎ confirms · Esc`, the one prompt; the entry
|
|
3766
|
+
is the board, `board: True`); Enter hides it (commit_intent → commit_hide_workspace; `y` then Enter until
|
|
3767
|
+
1.7.7, BEY-7248). Refused, keeping the keyboard, on a device nobody owns and for the last workspace the person
|
|
3768
|
+
still sees (users.arrange never leaves a view without one)."""
|
|
3656
3769
|
self.begin_action()
|
|
3657
3770
|
self.dirty = True
|
|
3658
3771
|
if not self.profile_path:
|
|
@@ -3662,10 +3775,10 @@ class Sidebar:
|
|
|
3662
3775
|
if shown == [self.workspace] or not shown:
|
|
3663
3776
|
self.message = 'the last workspace shown stays'
|
|
3664
3777
|
return
|
|
3665
|
-
self.open_prompt('hide', {'id': self.workspace, 'name': self.title}, 'confirm', self.title)
|
|
3778
|
+
self.open_prompt('hide', {'id': self.workspace, 'name': self.title, 'board': True}, 'confirm', self.title)
|
|
3666
3779
|
|
|
3667
3780
|
def commit_hide_workspace(self):
|
|
3668
|
-
"""
|
|
3781
|
+
"""`H`'s Enter: add this workspace to the profile's `workspaces.hidden` (refused when no other board
|
|
3669
3782
|
would be left — the profile may have changed since `H`), then start `lanes upgrade-session` in its own session:
|
|
3670
3783
|
it closes this workspace's tab on every live view of the owner (device_sync.reconcile, R4) — this pane's tab
|
|
3671
3784
|
included, which is why the child must not die with it. The lanes keep running in their containers."""
|
|
@@ -4066,7 +4179,8 @@ class Sidebar:
|
|
|
4066
4179
|
a `name` stage is the field ` › Rename: value█` / ` › Register as: value█` (ink; a value longer than the field
|
|
4067
4180
|
shows its END after the `truncation` mark, so what is typed and the caret stay in view); a `confirm` stage is
|
|
4068
4181
|
` › <word> ‘name’ — y⏎ confirm · Esc cancel` (close tone-urgent, register tone-attention), `⏎ confirm` once `y`
|
|
4069
|
-
armed it — so typed text whose `y` is followed by a letter closes or registers nothing (S3)
|
|
4182
|
+
armed it — so typed text whose `y` is followed by a letter closes or registers nothing (S3); an INTENT_VERBS
|
|
4183
|
+
confirmation (`h`, `H`, `R`; BEY-7248) is ` › <word> ‘name’? ⏎ confirms · Esc` (tone-attention). The instruction
|
|
4070
4184
|
always survives: ` cancel` gives way first, then ` · Esc`, then the name is clipped with the `truncation` mark.
|
|
4071
4185
|
Under ASCII glyphs `⏎` is the word `Enter`, so `y` and it are joined by `+`."""
|
|
4072
4186
|
prompt, tone, g = self.prompt, self.tone, self.glyphs['marks']
|
|
@@ -4083,12 +4197,18 @@ class Sidebar:
|
|
|
4083
4197
|
value = g['truncation'] + ''.join(reversed(tail))
|
|
4084
4198
|
return clip(head + value, max(1, cols - 2))[0], tone['ink'], True
|
|
4085
4199
|
enter = g['enter']
|
|
4086
|
-
keys = enter if prompt['armed'] else f'y{enter}' if cell_width(enter) == 1 else f'y+{enter}'
|
|
4087
4200
|
head = f' {g["lead"]} {PROMPT_WORDS[prompt["verb"]]} {g["quote-open"]}'
|
|
4088
|
-
act = f'{g["quote-close"]} {g["dash"]} {keys} confirm'
|
|
4089
4201
|
name = prompt['value']
|
|
4090
4202
|
style = tone['tone-urgent'] if prompt['verb'] == 'close' else tone['tone-attention']
|
|
4091
|
-
|
|
4203
|
+
if prompt['verb'] in INTENT_VERBS:
|
|
4204
|
+
# BEY-7248: ` › hide ‘sh’? ⏎ confirms · Esc` — Enter alone answers yes (`h`, `H`, `R`)
|
|
4205
|
+
act = f'{g["quote-close"]}? {enter} confirms'
|
|
4206
|
+
tails = (f'{act} {g["sep"]} Esc', act)
|
|
4207
|
+
else:
|
|
4208
|
+
keys = enter if prompt['armed'] else f'y{enter}' if cell_width(enter) == 1 else f'y+{enter}'
|
|
4209
|
+
act = f'{g["quote-close"]} {g["dash"]} {keys} confirm'
|
|
4210
|
+
tails = (f'{act} {g["sep"]} Esc cancel', f'{act} {g["sep"]} Esc', act)
|
|
4211
|
+
for tail in tails:
|
|
4092
4212
|
room = cols - 1 - cell_width(head) - cell_width(tail)
|
|
4093
4213
|
if cell_width(name) <= room:
|
|
4094
4214
|
return head + name + tail, style, False
|
|
@@ -4156,7 +4276,7 @@ class Sidebar:
|
|
|
4156
4276
|
lines = [f'{style}{version}{reset}']
|
|
4157
4277
|
for row in KEY_SHEET:
|
|
4158
4278
|
key = f'{row[index]:<9} '
|
|
4159
|
-
action, _ = clip(row[2], max(0, cols - 3 - cell_width(key)))
|
|
4279
|
+
action, _ = clip(row[3] if index and len(row) > 3 else row[2], max(0, cols - 3 - cell_width(key)))
|
|
4160
4280
|
lines.append(f'{dim} {key}{reset}{action}')
|
|
4161
4281
|
return (lines + [''] * body)[:body]
|
|
4162
4282
|
|
|
@@ -4629,6 +4749,7 @@ class Sidebar:
|
|
|
4629
4749
|
"""The keys and mouse reports of one read, or of the part of it before / after a paste (handle())."""
|
|
4630
4750
|
if not data:
|
|
4631
4751
|
return
|
|
4752
|
+
self.key_now, self.key_typed = self.key_clock(), False # BEY-7248: one reading for the keys of this read
|
|
4632
4753
|
entries = self.follow()
|
|
4633
4754
|
i = 0
|
|
4634
4755
|
while i < len(data):
|
|
@@ -4652,6 +4773,10 @@ class Sidebar:
|
|
|
4652
4773
|
continue
|
|
4653
4774
|
entries = self.follow() # per key: an action may have changed the list (spec §4.5)
|
|
4654
4775
|
ch = data[i]
|
|
4776
|
+
self.key_typed = ch.isprintable()
|
|
4777
|
+
if self.typed_burst(ch): # BEY-7248: a key of a typed sentence is no command
|
|
4778
|
+
i += 1
|
|
4779
|
+
continue
|
|
4655
4780
|
if self.prompt and ch == '\033':
|
|
4656
4781
|
# ONE escape sequence under the prompt, a name field or a confirmation (cockpit v3 S6 fix cycle 1,
|
|
4657
4782
|
# DEF-1824): consumed while the prompt stays, or handled as usual below — with the prompt cancelled
|
|
@@ -4748,6 +4873,7 @@ class Sidebar:
|
|
|
4748
4873
|
if self.registration:
|
|
4749
4874
|
self.cancel_registration()
|
|
4750
4875
|
self.armed = False
|
|
4876
|
+
self.typing, self.burst = False, [] # BEY-7248: Esc ends a typed burst, does what Esc does
|
|
4751
4877
|
self.filter, self.filtering = '', False
|
|
4752
4878
|
self.release_focus()
|
|
4753
4879
|
i += 1
|
|
@@ -4817,15 +4943,14 @@ class Sidebar:
|
|
|
4817
4943
|
self.unregister_lane(entries[min(self.cursor, len(entries) - 1)])
|
|
4818
4944
|
elif ch == 'z':
|
|
4819
4945
|
self.undo_unregister()
|
|
4820
|
-
elif ch == 'R' and entries:
|
|
4821
|
-
|
|
4822
|
-
self.start_rename(entry)
|
|
4946
|
+
elif ch == 'R' and entries: # BEY-7248: asks first, Enter opens the field
|
|
4947
|
+
self.request_rename(entries[min(self.cursor, len(entries) - 1)])
|
|
4823
4948
|
elif ch == 'm': # W15 L4: one line to the cursor lane, as a message
|
|
4824
4949
|
self.start_message(entries[min(self.cursor, len(entries) - 1)] if entries else None)
|
|
4825
4950
|
elif ch == 'p' and entries: # cockpit v3 R5: pins and hidden lanes, the owner's profile
|
|
4826
4951
|
self.pin_lane(entries[min(self.cursor, len(entries) - 1)])
|
|
4827
|
-
elif ch == 'h' and entries:
|
|
4828
|
-
self.
|
|
4952
|
+
elif ch == 'h' and entries: # BEY-7248: asks first (a hidden lane `o` shows: shown again at once)
|
|
4953
|
+
self.request_hide_lane(entries[min(self.cursor, len(entries) - 1)])
|
|
4829
4954
|
elif ch == 'H':
|
|
4830
4955
|
self.request_hide_workspace()
|
|
4831
4956
|
elif ch == 'o':
|
|
@@ -4851,6 +4976,57 @@ class Sidebar:
|
|
|
4851
4976
|
self.sheet, self.showing_keys = 'keys', True
|
|
4852
4977
|
self.dirty = True
|
|
4853
4978
|
i += 1
|
|
4979
|
+
self.key_typed = False
|
|
4980
|
+
|
|
4981
|
+
def typed_burst(self, ch):
|
|
4982
|
+
"""BEY-7248's typed-burst rule for ONE key of a read (`ch`, its first character), at `key_now` -> True when the
|
|
4983
|
+
key is swallowed: part of a sentence typed into the sidebar, never a command. See BURST_* for the rule.
|
|
4984
|
+
* Silence: a typing state whose last key is BURST_QUIET_S old has ended; this key is a key again.
|
|
4985
|
+
* Never typing: an escape sequence (Esc, an arrow, a mouse report — handle_keys reads it, and a bare Esc ends
|
|
4986
|
+
the state), the filter's text, a name field's text — save a letter within BURST_WINDOW_S of the letter that
|
|
4987
|
+
opened that field (`m`, `P`: the sentence went on into it).
|
|
4988
|
+
* While typing: every key is swallowed and keeps the state alive (and is still counted, so a sentence typed
|
|
4989
|
+
right after the Enter is typing from its first letter); Enter ends it (the sentence's own Enter opens
|
|
4990
|
+
nothing).
|
|
4991
|
+
* Otherwise a printable key outside BURST_FREE is counted; the BURST_KEYS-th inside BURST_WINDOW_S starts the
|
|
4992
|
+
state. An open prompt ends first, as any other key would end it there: cancelled, the keyboard handed back
|
|
4993
|
+
to the lane (cockpit v3 S3) — no question survives a typed burst.
|
|
4994
|
+
The footer says typing_text() for MESSAGE_S after the burst's last key."""
|
|
4995
|
+
now, prompt = self.key_now, self.prompt
|
|
4996
|
+
if self.typing and now - self.typing_at >= BURST_QUIET_S:
|
|
4997
|
+
self.typing = False
|
|
4998
|
+
if ch == '\033' or self.filtering:
|
|
4999
|
+
return False
|
|
5000
|
+
if prompt and prompt['stage'] == 'name':
|
|
5001
|
+
if not ch.isprintable() or self.considered():
|
|
5002
|
+
return False
|
|
5003
|
+
elif self.typing:
|
|
5004
|
+
self.typing_at, self.dirty = now, True
|
|
5005
|
+
if ch in '\r\n':
|
|
5006
|
+
self.typing = False
|
|
5007
|
+
elif ch.isprintable() and ch not in BURST_FREE: # still counted: a next sentence at once is typing too
|
|
5008
|
+
self.burst = [at for at in self.burst if now - at < BURST_WINDOW_S] + [now]
|
|
5009
|
+
self.message = self.typing_text()
|
|
5010
|
+
return True
|
|
5011
|
+
elif not ch.isprintable() or ch in BURST_FREE:
|
|
5012
|
+
return False
|
|
5013
|
+
else:
|
|
5014
|
+
self.burst = [at for at in self.burst if now - at < BURST_WINDOW_S] + [now]
|
|
5015
|
+
if len(self.burst) < BURST_KEYS:
|
|
5016
|
+
return False
|
|
5017
|
+
if prompt:
|
|
5018
|
+
self.cancel_prompt()
|
|
5019
|
+
self.release_focus()
|
|
5020
|
+
self.typing, self.typing_at, self.dirty = True, now, True
|
|
5021
|
+
self.message = self.typing_text()
|
|
5022
|
+
return True
|
|
5023
|
+
|
|
5024
|
+
def typing_text(self):
|
|
5025
|
+
"""The typed-burst notice (BEY-7248): ` Typing? ⏎ opens the lane · Esc` — the keys went to the sidebar, not the
|
|
5026
|
+
lane; Enter (once the burst is over) opens the cursor lane and gives it the keyboard, Esc gives the keyboard
|
|
5027
|
+
back to the lane on view. 31 cells, 35 under ASCII glyphs (`Enter`): the 36-cell pane's whole footer row."""
|
|
5028
|
+
g = self.glyphs['marks']
|
|
5029
|
+
return f'Typing? {g["enter"]} opens the lane {g["sep"]} Esc'
|
|
4854
5030
|
|
|
4855
5031
|
def start_bytes(self):
|
|
4856
5032
|
"""What run() writes once at start: alternate screen, mouse, bracketed paste, focus reports (`?1004h`, cockpit
|
package/payload/manifest.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vibelord/lanes",
|
|
3
|
-
"version": "1.7.
|
|
4
|
-
"commit": "
|
|
5
|
-
"digest": "sha256:
|
|
3
|
+
"version": "1.7.7",
|
|
4
|
+
"commit": "e23c4f56e5795f39bac8d51ef086a08f738cf838",
|
|
5
|
+
"digest": "sha256:aafbc708493ec7318fbf0b9a256abe3486e5beeda3c87cd3db56f153246007c0",
|
|
6
6
|
"executables": [
|
|
7
7
|
"bin/lanes",
|
|
8
8
|
"bin/lanes-site-serve",
|