diff options
| author | user <user@clank> | 2026-08-13 21:19:22 +0200 |
|---|---|---|
| committer | user <user@clank> | 2026-08-13 21:19:22 +0200 |
| commit | 94a1fd85e524bbe079b6ce3c8bb17295b706834c (patch) | |
| tree | cea7cd815ebb15ebac204155b4873a02bd350a52 /docs | |
| parent | sl0p(bar): draw the bar as a framed box, and a single line when collapsed (diff) | |
| download | sl0ppi-94a1fd85e524bbe079b6ce3c8bb17295b706834c.tar.gz sl0ppi-94a1fd85e524bbe079b6ce3c8bb17295b706834c.tar.xz sl0ppi-94a1fd85e524bbe079b6ce3c8bb17295b706834c.zip | |
cli: carry pane templates into the generated layout
`sl0ppi up` died on every session:
× Failed to parse Zellij configuration
43 │ sl0pbar size=3
· ╰── Invalid tab property: sl0pbar
The CLI writes its own layout file and inlines the tab template into each tab
-- a default_tab_template would destroy the tab purposes that are the CLI's
notion of identity -- so the generated file is standalone. The moment the
status bar became a pane_template, the inlined body referred to a name only
layouts/default.kdl knew about.
extractPaneTemplates pulls those definitions out with the same brace scanner
that already had to respect strings and comments, and both generated layouts
emit them once at the top. The result is smaller than before, too: one copy of
the bar's configuration per session instead of one per tab.
packaging/checks/sl0ppi-up-live.py runs the real thing -- CLI, binary, session,
attached client -- because the CLI's own tests are string assertions and were
all green while this was broken. It fails with exactly the user's error on the
parent commit.
Not done, deliberately, and the check says why in a comment: copying the user's
default.swap.kdl next to the generated layout to make the bar collapse on a
narrow terminal. It appears to work, and then auto_layout swaps the tab to one
of the other swap layouts, whose bare `tab` nodes expect a default_tab_template
that a generated layout does not have -- and the bar disappears entirely.
Measured on screen both ways, and the check now pins "the bar survives a
rearrangement" so nobody re-derives it from JSON.
Which is the other lesson: `action list-panes` stops reporting the borderless
plugin pane once a client is attached. It had me chasing a bar that was on
screen the whole time. dump-layout and the screen agree; list-panes does not.
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/HANDOVER.md | 8 | ||||
| -rw-r--r-- | docs/roadmap.md | 30 |
2 files changed, 38 insertions, 0 deletions
diff --git a/docs/HANDOVER.md b/docs/HANDOVER.md index b1dc84e..641ac12 100644 --- a/docs/HANDOVER.md +++ b/docs/HANDOVER.md @@ -172,6 +172,14 @@ bar. See `docs/roadmap.md` for each with its measurements. template into each tab instead of emitting `default_tab_template`. - **The tab test harness does no rendering**, so `panes_to_hide` is always empty and stack-related bugs cannot be reproduced in it. Use a scripted pty. +- **`action list-panes` hides borderless plugin panes once a client attaches.** + The status bar vanishes from its output while being drawn on screen the whole + time. `dump-layout` and the screen are the truth; an hour went into a bug that + only existed in that JSON. +- **The generated layout is a file of its own.** Anything `layouts/default.kdl` + refers to -- pane templates especially -- has to be copied into it, and its + swap layouts must NOT be (see roadmap: the bar disappears when auto_layout + swaps a tab that has no `default_tab_template`). - **A hit-test that never consults the renderer is not evidence of anything.** The split button "worked" for two releases while being invisible. If an affordance is drawn, the check has to *find the glyph* and click where it diff --git a/docs/roadmap.md b/docs/roadmap.md index 4f7cfb6..068129f 100644 --- a/docs/roadmap.md +++ b/docs/roadmap.md @@ -355,6 +355,36 @@ render half a box. That one function also returns where the content line starts, and click routing reads it — which is why a click on the new box's border hits nothing instead of the widget underneath. +### `sl0ppi up` and the generated layout + +Making the bar a `pane_template` broke `sl0ppi up` outright: + +``` +× Failed to parse Zellij configuration + 43 │ sl0pbar size=3 + · ╰── Invalid tab property: sl0pbar +``` + +The CLI writes its own layout file and inlines the tab template into each tab +(a `default_tab_template` would destroy the tab purposes that are its identity), +so a name the template body refers to has to travel with it. `extractPaneTemplates` +does that now, and the generated layout is smaller than before as a bonus: one +copy of the bar's configuration instead of one per tab. + +**Do not "fix" the collapsed bar in generated sessions by copying the user's +`default.swap.kdl` next to the generated layout.** It looks right — at 70 +columns the bar becomes one line — and then `auto_layout` swaps the tab to one +of the other swap layouts, whose bare `tab` nodes expect a +`default_tab_template` that a generated layout does not have, and the bar +disappears completely. Measured on screen, both ways. So in a generated session +the bar stays framed on a narrow terminal; the panes still collapse, via the +synthesized stack layout. + +That measurement is also a warning about `action list-panes`: once a client is +attached it stops reporting the borderless plugin pane, which had me believing +the bar was gone in cases where it was on screen the whole time. `dump-layout` +and the screen agree; `list-panes` does not. + ### Still open on the bar Content and further click targets: a close-`x` per tab, session name → session |
