@abhishek944/pi-tasks 0.11.0 → 0.11.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/ui/panel.js CHANGED
@@ -279,6 +279,12 @@ class TasksPanel {
279
279
  this.tui.requestRender();
280
280
  }
281
281
  renderHeader(width, leftPadWidth, suffix = "") {
282
+ const counts = { active: 0, blocked: 0, completed: 0, cancelled: 0 };
283
+ for (const todo of this.state.listTodos())
284
+ counts[todo.status]++;
285
+ const statuses = ["blocked", "active", "completed", "cancelled"];
286
+ const summary = statuses.filter((status) => counts[status] > 0)
287
+ .map((status) => `${counts[status]}${todoIcon(status, this.theme)}`).join(" ");
282
288
  const copyAction = this.copying
283
289
  ? this.theme.fg("dim", "[Copying…]")
284
290
  : this.theme.fg("accent", this.theme.bold("[Copy]"));
@@ -286,11 +292,11 @@ class TasksPanel {
286
292
  const openAction = this.theme.fg(this.opening ? "dim" : "accent", this.theme.underline(this.theme.bold("[Open]")));
287
293
  const fixedWidth = visibleWidth(copyAction) + visibleWidth(sessionAction) + visibleWidth(openAction) + 3;
288
294
  const fullToggle = this.minimized ? "[Maximize]" : "[Minimize]";
289
- const toggleLabel = fixedWidth + visibleWidth(fullToggle) <= width ? fullToggle : this.minimized ? "[+]" : "[-]";
295
+ const toggleLabel = fixedWidth + visibleWidth(fullToggle) + visibleWidth(summary) + (summary ? 1 : 0) <= width ? fullToggle : this.minimized ? "[+]" : "[-]";
290
296
  const toggleAction = this.theme.fg("accent", this.theme.bold(toggleLabel));
291
297
  const actionsWidth = fixedWidth + visibleWidth(toggleAction);
292
298
  const titleWidth = Math.max(0, width - actionsWidth - 1);
293
- const context = truncateToWidth(this.theme.fg("dim", suffix.replace(/^\s*·\s*/, "")), titleWidth, "…");
299
+ const context = truncateToWidth(`${summary}${this.theme.fg("dim", summary ? suffix : suffix.replace(/^\s*·\s*/, ""))}`, titleWidth, "…");
294
300
  const gap = " ".repeat(Math.max(0, width - visibleWidth(context) - actionsWidth));
295
301
  const copyStart = leftPadWidth + 1 + visibleWidth(context) + gap.length;
296
302
  this.copyHitRegion = { start: copyStart, end: copyStart + visibleWidth(copyAction) };
@@ -171,7 +171,7 @@ Inside Herdr (`HERDR_ENV=1`), a linked `[delegate]` is underlined. In fullscreen
171
171
 
172
172
  Navigation directly focuses the linked paneId through Herdr. Closed panes, missing Herdr CLI and command errors are reported. No subprocess runs during rendering. Agent tools coordinate Herdr resources; pi-loop-monitor remains the sole monitoring runtime. Outside Herdr, badges remain informational.
173
173
 
174
- The compact panel no longer displays the session ID. Its underlined `[Open session]` action sits immediately after Copy in floating, widget and minimized layouts. It opens this agent's existing artifact directory under repository `var/` in Cursor, including a nested delegated session folder. If no folder exists, it creates `var/<full-sessionId>/`; multiple matching folders report an ambiguity rather than guessing. Session identity comes from Pi's context, not a pane name. Folder resolution and Cursor launch happen only on activation, never during rendering. `/works-panel open-session` is the keyboard-command alternative. The existing Open action still opens the repository. Narrow compact headers use `[-]`/`[+]` for Minimize/Maximize so all actions fit. The `/works` dashboard retains its existing title and controls.
174
+ The compact panel no longer displays the session ID. Before Copy, its header shows nonzero task-state counts across all Works: `3!` blocked, `2▶` active, `5✓` completed, and `1×` cancelled, using the same icon colors as task rows. Counts update in floating, widget and minimized layouts; narrow headers shorten the toggle and truncate the summary when needed. Its underlined `[Open session]` action sits immediately after Copy in floating, widget and minimized layouts. It opens this agent's existing artifact directory under repository `var/` in Cursor, including a nested delegated session folder. If no folder exists, it creates `var/<full-sessionId>/`; multiple matching folders report an ambiguity rather than guessing. Session identity comes from Pi's context, not a pane name. Folder resolution and Cursor launch happen only on activation, never during rendering. `/works-panel open-session` is the keyboard-command alternative. The existing Open action still opens the repository. Narrow compact headers use `[-]`/`[+]` for Minimize/Maximize so all actions fit. The `/works` dashboard retains its existing title and controls.
175
175
 
176
176
  The panel defaults to a floating top-right layout and does not take keyboard focus. A slim, separated right-hand column keeps work and task percentages aligned and visible even when names are long; the left side retains names, task status icons and Work task-counts. Work rows have no status icons. It hides on small terminals. The top border centers repository-wide Git status: `git main · S2 U3 ?1` means two staged files, three unstaged files, and one untracked file; a file with both staged and unstaged edits counts in both. A clean repository shows `git main · clean`. Long branches shorten before counts. Detached HEAD shows `@` plus the short commit. Git remains visible while minimized and adds no content row.
177
177
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abhishek944/pi-tasks",
3
- "version": "0.11.0",
3
+ "version": "0.11.1",
4
4
  "description": "Session-scoped work and todo tracking for Pi.",
5
5
  "license": "MIT",
6
6
  "type": "module",