aboutsummaryrefslogtreecommitdiffstats
path: root/docs/roadmap.md
diff options
context:
space:
mode:
authoruser <user@clank>2026-08-13 21:19:22 +0200
committeruser <user@clank>2026-08-13 21:19:22 +0200
commit94a1fd85e524bbe079b6ce3c8bb17295b706834c (patch)
treecea7cd815ebb15ebac204155b4873a02bd350a52 /docs/roadmap.md
parentsl0p(bar): draw the bar as a framed box, and a single line when collapsed (diff)
downloadsl0ppi-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/roadmap.md')
-rw-r--r--docs/roadmap.md30
1 files changed, 30 insertions, 0 deletions
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