xonecas.io
6615
Yc

yoctoselect / commit aa7ffa4

chore: update TODO

xonecas2026-03-21 aa7ffa4178db32baee9d9c049e57e51600c0078a parent 0a70766

1 file changed

TODO.md+3−56
@@ -1,58 +1,5 @@
1-# yoctoselect — Implementation Plan
1+# yoctoselect
22
3-## Step 1: Project scaffolding
3+All implementation tasks complete. Library is published to GitHub.
44
5-- [ ] Create package.json (name: yoctoselect, deps: yoctocolors, devDeps: biome, prettier, lefthook, knip, jscpd, @types/bun, typescript)
6-- [ ] Create tsconfig.json, biome.json, knip.json, .prettierrc, .gitignore, lefthook.yml
7-- [ ] `bun install`
8-- [ ] `lefthook install`
9-- [ ] Verify: `bun run check` passes (format, lint, typecheck, knip, jscpd)
10-- [ ] Initial commit
11-
12-## Step 2: Core filter logic + tests
13-
14-- [ ] Create `src/filter.ts` — `prefixFilter(items, query)` returns matched items, case-insensitive
15- - Normalizes SelectItem to `{label, value, filterText}` internally
16- - filterText defaults to label for plain strings / {label,value} items
17- - Matches filterText with `startsWith` against lowercased query
18-- [ ] Create `src/filter.test.ts` — tests:
19- - string items: prefix match, case insensitive, empty query returns all, no match returns empty
20- - {label, value} items: matches against label
21- - {label, value, filterText} items: matches against filterText, not label
22-- [ ] Verify: `bun test` passes
23-- [ ] Commit
24-
25-## Step 3: ANSI helpers
26-
27-- [ ] Create `src/ansi.ts` — cursor movement + line clearing helpers
28- - `cursorUp(n)` — move cursor up n lines
29- - `clearDown()` — clear from cursor to end of screen
30- - `hideCursor()` / `showCursor()`
31- - `write(s)` — write to stdout
32-- [ ] Commit
33-
34-## Step 4: select() implementation
35-
36-- [ ] Create `src/select.ts` — the main `select()` function
37- - Takes `{items, placeholder?, maxVisible?}`
38- - Sets stdin to raw mode, handles keystrokes
39- - Render loop: search line + filtered items + overflow indicator
40- - Keyboard: typing filters, ↑/↓ navigate, Enter selects, ESC cancels
41- - On exit: clear rendered lines, restore stdin, return value or null
42- - Home/End jump to first/last
43- - Wrapping navigation (↑ from first → last, ↓ from last → first)
44-- [ ] Create `src/index.ts` — re-export `select` and `SelectItem` type
45-- [ ] Commit
46-
47-## Step 5: Manual testing + polish
48-
49-- [ ] Create `examples/demo.ts` for manual testing
50-- [ ] Test in terminal: filtering, navigation, selection, cancel, overflow, no matches
51-- [ ] Verify: `bun run check` passes
52-- [ ] Commit
53-
54-## Step 6: README + initial push
55-
56-- [ ] Write README.md with install, usage, API docs
57-- [ ] Final `bun run check` + `bun test`
58-- [ ] Push to origin
5+Next: integrate into mini-coder's `/model`, `/session`, and `/mcp` commands.