diff options
| author | user <user@clank> | 2026-08-13 13:06:44 +0200 |
|---|---|---|
| committer | user <user@clank> | 2026-08-13 13:06:44 +0200 |
| commit | 6d9e46274c0d7613441338e10fea6972e4d335dd (patch) | |
| tree | 02a22eeb155f1a9e3182eb9a21caf034a0bb8d40 /cli/src/core/errors.ts | |
| parent | cli: create sessions by attaching, to dodge the phantom-client bug (diff) | |
| download | sl0ppi-6d9e46274c0d7613441338e10fea6972e4d335dd.tar.gz sl0ppi-6d9e46274c0d7613441338e10fea6972e4d335dd.tar.xz sl0ppi-6d9e46274c0d7613441338e10fea6972e4d335dd.zip | |
cli: keep the status bar, so other projects are visible
Reported: only one tab for proj_a, where was proj_b? Both tabs existed --
list-tabs showed proj_b at position 1 the whole time -- but there was nothing on
screen to say so, because a generated session had NO tab bar and NO status bar.
sl0ppi passes its own `--layout` when creating a session, which replaces the
user's default layout, and the shipped config gets its chrome from
`layouts/default.kdl`'s `default_tab_template` (the zjstatus pane, which is what
draws the tab names). So a root with five projects looked exactly like a root
with one.
The obvious fix is to emit that `default_tab_template` into the generated
layout. It does not work: a templated tab comes back with `purpose=None`,
because the fork hangs a tab's purpose on the tab's root layout and templating
replaces it. Identity is load-bearing here -- with no purposes `sl0ppi ls` sees
no project tabs and `up` would happily create a second set of them. Caught by
checking list-tabs after the change rather than trusting the tab bar appearing.
So the template is INLINED instead: its body is taken, the project's panes are
substituted for its `children` node, and the result becomes the tab's contents.
The `tab` node keeps its own name/purpose/cwd, and the status bar comes along.
A template with no `children` node is skipped rather than mangled.
The extractor brace-matches by hand but respects strings and comments: a real
zjstatus template is full of `{index}` and `{name}` inside quoted format
strings, and counting those would truncate the block and emit a layout that does
not parse. It reads the live config, so a user's own default.kdl is honoured.
Verified on the test box: tab bar reads "1 proj_a 2 proj_b", tab purposes are
project:proj_a / project:proj_b, `sl0ppi ls` sees both, `up` still says "up to
date", and no phantom-client marker.
Diffstat (limited to 'cli/src/core/errors.ts')
0 files changed, 0 insertions, 0 deletions
