@hacky.software/opencode-todo-supervisor 0.3.5 → 0.3.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/README.md +3 -2
- package/package.json +1 -1
- package/src/panel.test.ts +6 -6
- package/src/panel.ts +3 -3
package/README.md
CHANGED
|
@@ -23,7 +23,7 @@ Tested against OpenCode `2.0.24`.
|
|
|
23
23
|
## Install
|
|
24
24
|
|
|
25
25
|
```sh
|
|
26
|
-
opencode plugin add @hacky.software/opencode-todo-supervisor@0.3.
|
|
26
|
+
opencode plugin add @hacky.software/opencode-todo-supervisor@0.3.6
|
|
27
27
|
```
|
|
28
28
|
|
|
29
29
|
This also loads the bundled TUI entry. To pass options, use the object form:
|
|
@@ -178,7 +178,8 @@ effective set is `config.markdownFiles ∪ stored files − removed` per session
|
|
|
178
178
|
Its body and width scale with the terminal (up to 48 rows / a share of the
|
|
179
179
|
window), so the key legend stays visible on a short terminal and a tall one
|
|
180
180
|
shows more rows; the header shows `open/total` and the selected `row n/m`. `f`
|
|
181
|
-
cycles the dialog size
|
|
181
|
+
cycles the dialog size — medium (70%), large (90%), xlarge (98% of the
|
|
182
|
+
terminal width, capped at 200 cells) — and `esc` closes it.
|
|
182
183
|
- header: progress bar, `open/total`, and a supervision chip (`idle · quiet
|
|
183
184
|
12s · nudges 2`, `working: 1 tool · 1 shell · quiet 4s`, `paused
|
|
184
185
|
(no-progress)`, `not supervised`);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hacky.software/opencode-todo-supervisor",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.6",
|
|
4
4
|
"description": "OpenCode V2 plugin that gives every session a todo list (todo_write/todo_read), supervises idle sessions until the list is done, and can drive checklists in markdown files from a TUI panel.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
package/src/panel.test.ts
CHANGED
|
@@ -190,15 +190,15 @@ describe("panel cursor", () => {
|
|
|
190
190
|
})
|
|
191
191
|
|
|
192
192
|
test("popover width follows the dialog size and clamps", () => {
|
|
193
|
-
expect(dialogWidth("medium", 200)).toBe(
|
|
194
|
-
expect(dialogWidth("large", 200)).toBe(
|
|
195
|
-
expect(dialogWidth("xlarge", 200)).toBe(
|
|
196
|
-
expect(dialogWidth("medium", 80)).toBe(
|
|
197
|
-
expect(dialogWidth("large", 80)).toBe(
|
|
193
|
+
expect(dialogWidth("medium", 200)).toBe(140)
|
|
194
|
+
expect(dialogWidth("large", 200)).toBe(180)
|
|
195
|
+
expect(dialogWidth("xlarge", 200)).toBe(196)
|
|
196
|
+
expect(dialogWidth("medium", 80)).toBe(56)
|
|
197
|
+
expect(dialogWidth("large", 80)).toBe(72)
|
|
198
198
|
expect(dialogWidth("xlarge", 80)).toBe(76)
|
|
199
199
|
expect(dialogWidth("xlarge", 20)).toBe(36)
|
|
200
200
|
// xlarge tracks the window instead of a fixed cap.
|
|
201
|
-
expect(dialogWidth("xlarge", 120)).toBe(
|
|
201
|
+
expect(dialogWidth("xlarge", 120)).toBe(116)
|
|
202
202
|
})
|
|
203
203
|
|
|
204
204
|
test("id and priority tags and their column widths", () => {
|
package/src/panel.ts
CHANGED
|
@@ -306,15 +306,15 @@ export function popoverBodyHeight(viewportHeight: number, extraRows = 0): number
|
|
|
306
306
|
|
|
307
307
|
export type DialogSizeName = "medium" | "large" | "xlarge"
|
|
308
308
|
|
|
309
|
-
const DIALOG_FACTOR: Record<DialogSizeName, number> = { medium: 0.
|
|
309
|
+
const DIALOG_FACTOR: Record<DialogSizeName, number> = { medium: 0.7, large: 0.9, xlarge: 0.98 }
|
|
310
310
|
|
|
311
311
|
/**
|
|
312
312
|
* Content width for the popover dialog, as a fraction of the terminal width so
|
|
313
|
-
* it scales with the window (`medium`
|
|
313
|
+
* it scales with the window (`medium` 70%, `large` 90%, `xlarge` 98%), clamped
|
|
314
314
|
* for small terminals and capped so it never spans an ultrawide screen.
|
|
315
315
|
*/
|
|
316
316
|
export function dialogWidth(size: DialogSizeName, viewportWidth: number): number {
|
|
317
317
|
const total = Math.max(40, viewportWidth)
|
|
318
318
|
const target = Math.round(total * DIALOG_FACTOR[size])
|
|
319
|
-
return Math.max(36, Math.min(target, total - 4,
|
|
319
|
+
return Math.max(36, Math.min(target, total - 4, 200))
|
|
320
320
|
}
|