
Motivation
The minimap labels are sourced from each pane's title (pane.title, src/projection.rs:43) — usually the running command, or a user renamepane. When that title changes, the label should update in real time, without waiting for an unrelated event (a split, a focus change, a tab switch) to trigger the next repaint.
The plugin side already does the right thing unconditionally: the PaneUpdate handler stores the new manifest and returns true to force a repaint, with no dedup/throttle (src/lib.rs:158-160). So whether labels update live comes down to one question about zellij's event delivery: does a title-only change emit a PaneUpdate at all?
Investigation (do this first)
Verify, on a live session, whether each of these triggers a PaneUpdate (and therefore a label repaint) on its own:
- Manual
renamepane (enter rename mode, type a new name, commit).
- Program-driven title change — a process emitting an OSC 0 / OSC 2 title escape (e.g. a shell prompt that sets the terminal title,
printf '\033]2;newtitle\007', vim editing a file).
- Command change without rename — running a new foreground command so the pane's reported title flips (e.g.
nvim -> shell -> cargo).
Use the headless verification harness (eprintln oracle in update() + expect PTY) from .claude/rules/zellij-plugin-development.md to log when PaneUpdate arrives and what title it carries, then correlate with each trigger above.
Outcomes
- If
PaneUpdate already fires on title-only changes — labels are already live; close this after documenting the evidence (and add a regression note / test fixture so it stays that way).
- If it does NOT fire for some triggers (likely for OSC-driven title changes) — the manifest the plugin holds goes stale and the label lags. Then evaluate a workaround:
- A periodic refresh via
set_timeout to repaint on the latest known manifest (only helps if the manifest itself is refreshed — confirm whether a timer-driven render() sees updated titles, since pane data is push-only via PaneUpdate).
- Subscribe to any additional event that does carry the title change.
- If neither is possible from the plugin API, document it as a zellij-side limitation (link the upstream issue) rather than shipping a busy-loop.
Done when
Relevant code
src/projection.rs:43 — label source: pane.title.clone() into PaneRect.
src/lib.rs:158-160 — PaneUpdate handler: stores manifest, returns true (unconditional repaint, no dedup).
src/lib.rs:135 — subscription set (TabUpdate, PaneUpdate, ModeUpdate, Mouse, PermissionRequestResult).
.claude/rules/zellij-plugin-development.md — headless verification harness for confirming event delivery.
Motivation
The minimap labels are sourced from each pane's title (
pane.title,src/projection.rs:43) — usually the running command, or a userrenamepane. When that title changes, the label should update in real time, without waiting for an unrelated event (a split, a focus change, a tab switch) to trigger the next repaint.The plugin side already does the right thing unconditionally: the
PaneUpdatehandler stores the new manifest and returnstrueto force a repaint, with no dedup/throttle (src/lib.rs:158-160). So whether labels update live comes down to one question about zellij's event delivery: does a title-only change emit aPaneUpdateat all?Investigation (do this first)
Verify, on a live session, whether each of these triggers a
PaneUpdate(and therefore a label repaint) on its own:renamepane(enter rename mode, type a new name, commit).printf '\033]2;newtitle\007', vim editing a file).nvim-> shell ->cargo).Use the headless verification harness (eprintln oracle in
update()+ expect PTY) from.claude/rules/zellij-plugin-development.mdto log whenPaneUpdatearrives and whattitleit carries, then correlate with each trigger above.Outcomes
PaneUpdatealready fires on title-only changes — labels are already live; close this after documenting the evidence (and add a regression note / test fixture so it stays that way).set_timeoutto repaint on the latest known manifest (only helps if the manifest itself is refreshed — confirm whether a timer-drivenrender()sees updated titles, since pane data is push-only viaPaneUpdate).Done when
cargo clippy --target wasm32-wasip1 --libclean andcargo test --libpasses on the native host.Relevant code
src/projection.rs:43— label source:pane.title.clone()intoPaneRect.src/lib.rs:158-160—PaneUpdatehandler: stores manifest, returnstrue(unconditional repaint, no dedup).src/lib.rs:135— subscription set (TabUpdate,PaneUpdate,ModeUpdate,Mouse,PermissionRequestResult)..claude/rules/zellij-plugin-development.md— headless verification harness for confirming event delivery.