aboutsummaryrefslogtreecommitdiffstats
path: root/cli/src
diff options
context:
space:
mode:
authoruser <user@clank>2026-08-12 22:05:44 +0200
committeruser <user@clank>2026-08-12 22:05:44 +0200
commit5873374a1d8cc75b9abccdb8617f0f964af50d4d (patch)
treef21d071b76010b66dacc6825757e3b4ea2f3c028 /cli/src
parentcli: the idempotency core (discovery, tab identity, plan diff) (diff)
downloadsl0ppi-5873374a1d8cc75b9abccdb8617f0f964af50d4d.tar.gz
sl0ppi-5873374a1d8cc75b9abccdb8617f0f964af50d4d.tar.xz
sl0ppi-5873374a1d8cc75b9abccdb8617f0f964af50d4d.zip
sl0p: carry pane and tab purposes over the wire
`new-tab --layout` / `--layout-string` created the tab and silently dropped every purpose the layout declared -- the tab's own (which rides the tab's root layout) and each pane's. Layouts applied at session creation kept theirs, so this only broke tabs added at runtime, which is exactly what an orchestrator does. Found by integration-testing the sl0ppi CLI against a real session rather than trusting that the documented feature worked on this path. Cause: TiledPaneLayout and FloatingPaneLayout had no protobuf `purpose` field, so anything travelling as an Action lost it. The original workspace-hints commit says as much in a comment -- "adding a proto field would force regenerating the committed assets" -- because generated prost output is checked in and protoc was not available. It is now (a user-local protoc 25.1, no sudo, no system package), so the deferral can be paid off properly instead of worked around. There are two protobuf schemas and the distinction matters: plugin_api/ is what plugins speak, client_server_contract/ is what the CLI speaks. The first attempt fixed only plugin_api and changed nothing observable; both now carry the field. plugin_api/action.proto TiledPaneLayout.purpose = 14 FloatingPaneLayout.purpose = 13 client_server_contract/common_types TiledPaneLayout.purpose = 16 FloatingPaneLayout.purpose = 15 Purposes are sanitised on ingest, so a value arriving over IPC obeys the same invariant as one parsed from a layout file (bounded token, <=64 chars) whoever constructed the message. Verified live: a tab declaring `rm -rf /; echo "x"` is stored as `rm-rf/echox`, and a 200-char pane purpose arrives capped at 64. Tests: two new wire round-trips (a NewTab layout carrying tab, pane and floating purposes; and the sanitiser). zellij-utils 473 passed, zellij-server 1499 passed. Live: `new-tab --layout-string` now reports purpose='project:added/nested' with panes 'agent:main' and 'logs:app'.
Diffstat (limited to 'cli/src')
0 files changed, 0 insertions, 0 deletions