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 /cli/src/core/errors.ts | |
| 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 'cli/src/core/errors.ts')
0 files changed, 0 insertions, 0 deletions
