Show one chip per session, right of the clock

The panel showed a single aggregate: the most urgent session, plus a "+N"
for the others. That answers "what is the worst thing happening", which
is not the question with five projects open -- "what is each of them
doing" needs each of them on screen.

Each session now gets a chip: state glyph plus a three-character project
label, in the centre box just right of the clock. Time in state stays on
the first chip only; five counters side by side are a row of numbers,
not an answer.

Labels are initials for multi-segment names, first letters otherwise.
Initials rather than a prefix, because a prefix collapses dev-skills and
dev-conventions onto the same "dev" -- exactly the pair that has to stay
apart. Collisions, including two sessions in one project where the cwd
is identical, take a digit: ds, ds2, ds3.

Two rules keep a label still, and the feature is worthless without them.
Assignment runs oldest-session-first, so a session starting now takes
the suffix instead of displacing one already on screen; and a label
belongs to its session until it ends, even after whatever forced the
digit has closed. A label that moves under your hand is worse than one
carrying a digit that no longer looks necessary.

The zellij tab name was considered as the label source and dropped. It
arrives asynchronously from dump-layout, so a sticky label would freeze
whatever the project name produced first and never adopt it. Digits
already separate same-project sessions, so the tab name buys nothing
here and stays where it is useful, in the menu.

Menu rows now lead with the same label, so the mapping from "ds" to
dev-skills is read rather than guessed.
This commit is contained in:
av
2026-08-09 18:45:44 +03:00
parent 58409106c3
commit a4e5d653de
8 changed files with 381 additions and 116 deletions
+31 -9
View File
@@ -1,29 +1,51 @@
/* The dot is drawn with the widget's foreground colour, so state colours are
set here as plain `color` and the drawing code stays theme-agnostic. */
/* State glyphs are drawn in the widget's inherited foreground colour, so state
colours are set here as plain `color` and the drawing code stays
theme-agnostic. The colour is set on the chip, so the dot and its label read
as one object. */
.ccs-panel-box {
spacing: 10px;
/* Small gap so the chips read as a separate group from the clock rather
than as part of it. */
margin-left: 12px;
}
.ccs-chip {
spacing: 4px;
}
.ccs-panel-label {
.ccs-chip-label {
font-size: 0.9em;
font-weight: bold;
/* Tabular figures keep a chip that gains a digit ("ds" -> "ds2") from
nudging every chip after it sideways. */
font-feature-settings: "tnum";
}
.ccs-dot.ccs-blocked,
.ccs-row-title.ccs-blocked {
.ccs-chip-age {
font-size: 0.85em;
opacity: 0.7;
font-feature-settings: "tnum";
}
.ccs-blocked {
color: #e01b24;
}
.ccs-dot.ccs-waiting,
.ccs-row-title.ccs-waiting {
.ccs-waiting {
color: #e5a50a;
}
.ccs-dot.ccs-busy,
.ccs-row-title.ccs-busy {
.ccs-busy {
color: #33d17a;
}
/* Idle keeps the panel's own colour and just recedes: a session nobody is
waiting on should not compete with the ones that need an answer. */
.ccs-idle {
opacity: 0.55;
}
.ccs-summary {
font-weight: bold;
}