feat: Add streaming pipe support for async loading in.
This commit is contained in:
@@ -170,7 +170,7 @@ through hooks and structured I/O. A handler hook can
|
||||
receive hover events and emit commands to modify menu
|
||||
state.
|
||||
|
||||
## Phase 4: Multi-Select
|
||||
## Phase 4: Multi-Select ✓
|
||||
|
||||
Selection with undo/redo. No marks or registers: filtering
|
||||
already handles navigation, and selections surviving filter
|
||||
@@ -275,21 +275,30 @@ pikl instance over the socket, push items, read state, and
|
||||
subscribe to events. A named session remembers filter
|
||||
history across invocations.
|
||||
|
||||
## Phase 7: Streaming & Watched Sources
|
||||
## Phase 7: Streaming Stdin ✓
|
||||
|
||||
Live, dynamic menus.
|
||||
Auto-detected streaming when stdin is a pipe (not action-fd,
|
||||
not CSV/TSV). The menu opens immediately with zero items and
|
||||
streams them in as they arrive.
|
||||
|
||||
`--watch` was dropped from this phase. External tools like
|
||||
`inotifywait -m ~/walls | pikl` compose naturally with
|
||||
streaming stdin. No built-in file watcher needed.
|
||||
|
||||
**Deliverables:**
|
||||
- Async/streaming stdin (items arrive over time, list
|
||||
updates progressively)
|
||||
- Streaming output (on-hover events emitted to stdout)
|
||||
- `--watch path` for file/directory watching
|
||||
- `--watch-extensions` filter
|
||||
- notify crate integration (inotify on Linux, FSEvents
|
||||
on macOS)
|
||||
- Auto-detected streaming stdin (items arrive over time,
|
||||
list updates progressively)
|
||||
- `StreamingDone` action signals end of input
|
||||
- `streaming` flag on ViewState for frontend indicators
|
||||
- TUI shows `...` suffix on the count while streaming
|
||||
- Background reader with batched `AddItems` (up to 100
|
||||
items per batch, flushes immediately for slow sources)
|
||||
- `streaming-done` action-fd command for test scripts
|
||||
- No new CLI flags: streaming is auto-detected
|
||||
|
||||
**Done when:** `find / -name '*.log' | pikl` populates
|
||||
progressively. A watched directory updates the list live.
|
||||
**Done when:** `seq 1 10000 | pikl` opens immediately and
|
||||
items stream in. Slow sources show items appearing one at
|
||||
a time with a `...` indicator.
|
||||
|
||||
## Phase 8: GUI Frontend (Wayland + X11)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user