mirror of
https://github.com/obra/superpowers.git
synced 2026-04-23 01:49:04 +08:00
feat: add show-and-wait.sh helper, fix race condition
- New show-and-wait.sh combines write + wait into one command - Uses polling instead of tail -f (which hangs on macOS) - Docs updated: start watcher BEFORE writing screen to avoid race - Reduces terminal noise by consolidating operations
This commit is contained in:
@@ -112,9 +112,9 @@ When the user clicks Send in the browser, the watcher exits and TaskOutput retur
|
||||
|
||||
### The Loop
|
||||
|
||||
1. Write screen HTML to `screen_file`
|
||||
2. Start watcher (background bash)
|
||||
3. Call TaskOutput(task_id, block=true) to wait
|
||||
1. Start watcher (background bash) - must be FIRST to avoid race condition
|
||||
2. Write screen HTML to `screen_file`
|
||||
3. Call TaskOutput(task_id, block=true, timeout=600000) to wait
|
||||
4. TaskOutput returns with feedback
|
||||
5. Respond with new screen
|
||||
6. Repeat until done
|
||||
|
||||
Reference in New Issue
Block a user