@nguyenquangthai/pi-todo 0.2.4 → 0.2.6

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/CHANGELOG.md CHANGED
@@ -1,5 +1,16 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.2.6 (2026-07-15)
4
+
5
+ - Restore Unicode block chars (`█`/`░`) for progress bar — looks cleaner.
6
+ - Fix alignment: halve bar width (double-width chars) + pad percentage to 3 chars so heading never shifts when % changes.
7
+ - README: update progress bar example to match.
8
+
9
+ ## 0.2.5 (2026-07-15)
10
+
11
+ - Fix progress bar: use single-width ASCII (`#`/`·`) instead of double-width Unicode (`█`/`░`) to avoid alignment issues in terminal.
12
+ - README: update progress bar example to match ASCII chars.
13
+
3
14
  ## 0.2.4 (2026-07-15)
4
15
 
5
16
  - README: add npm/CI/license badges.
package/README.md CHANGED
@@ -58,11 +58,11 @@ Shown above the editor while any **open** todo remains (`pending` / `in_progress
58
58
 
59
59
  Hidden when the list is empty or every item is `completed` / `cancelled`.
60
60
 
61
- Heading shows open + running counts + progress bar, e.g. `# Todos (2 open, 1 running) ████░░░░ 60%`:
61
+ Heading shows open + running counts + progress bar, e.g. `# Todos (3 open, 1 running) ██░░ 25%`:
62
62
 
63
63
  - **open** = `pending` + `in_progress`
64
64
  - **running** = `in_progress` only (0 or 1 after a valid write)
65
- - **progress bar** = completed / total (adaptive width)
65
+ - **progress bar** = Unicode block chars, width adapted to terminal
66
66
 
67
67
  Items within each status group are sorted by priority (high → medium → low).
68
68
  When space is tight, completed/cancelled items collapse into `+N done`.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nguyenquangthai/pi-todo",
3
- "version": "0.2.4",
3
+ "version": "0.2.6",
4
4
  "description": "OpenCode-like session todo checklist for the pi coding agent — todowrite/todoread with a live TUI overlay",
5
5
  "type": "module",
6
6
  "author": "QuangThai",
package/src/format.ts CHANGED
@@ -156,15 +156,16 @@ export function renderOverlayLines(
156
156
  const total = todos.length;
157
157
  const done = total - open;
158
158
  const pct = total > 0 ? Math.round((done / total) * 100) : 0;
159
- const barWidth = Math.max(4, Math.min(12, Math.floor(width / 8)));
159
+ const barWidth = Math.max(2, Math.min(6, Math.floor(width / 16)));
160
160
  const filled = Math.round((barWidth * done) / total);
161
161
  const bar =
162
162
  "█".repeat(filled) + "░".repeat(Math.max(0, barWidth - filled));
163
+ const pctPad = pct.toString().padStart(3);
163
164
 
164
165
  const heading = truncate(
165
166
  theme.fg("accent", theme.bold(`# Todos`)) +
166
167
  theme.fg("dim", ` (${open} open, ${running} running)`) +
167
- theme.fg("muted", ` ${bar} ${pct}%`),
168
+ theme.fg("muted", ` ${bar} ${pctPad}%`),
168
169
  );
169
170
 
170
171
  // Small gap between heading and first row — budget -1 to account for the blank line