What should it do?
Deliver child_process.spawn stdout and stderr chunks to Raycast extensions while the child process is running, before exit/close. A command such as Ookla Speedtest's --progress should be able to update a Detail view during download and upload, rather than showing all samples only after the test finishes.
This is currently documented as unsupported in extension compatibility: “Live child_process.spawn output” arrives only once the command finishes. In 0.11.3, ExtensionAsyncProcess.Child.collect reads each pipe to EOF and proc.wait returns one result. BufferedChildProcess in Scripts/raycast-runtime/src/node-shims.js then calls stdout.end(...) and stderr.end(...) from that final result. A stdout.on("data", ...) listener therefore cannot observe intermediate progress.
A minimal repro is a view extension that spawns /bin/sh -c 'printf "first\n"; sleep 3; printf "second\n"', appends each stdout chunk to a Detail, and starts a timer. In Node, “first” appears immediately; in Tinycast both lines appear after the three-second sleep.
Suggested implementation direction: drain stdout and stderr concurrently from the native Pipes and bridge ordered chunks to the JS ChildProcess streams as they arrive. Keep exit/close after the streams drain, and preserve the current timeout, kill, detached-process, and error behavior. This would replace the current final-buffer-only path for spawn; exec/execFile could still collect their final result.
Why does it belong in Tinycast?
The Speedtest extension already asks its CLI for progress, but Tinycast does not deliver the process output until completion. This caused the apparent “blank/idle until the end” report in #743. The missing behavior is in Tinycast's Node compatibility layer, so updating Speedtest alone cannot make a normal spawn().stdout.on("data") listener receive live chunks.
I verified a local workaround by redirecting the CLI's output to a progress file and polling that file from the extension every 200 ms. It restores live speed updates without changing Tinycast, but it is extension-specific and bypasses ordinary spawn streaming. Once progress is visible, a separate Markdown SVG rendering issue can cause the circular gauge to flicker; that is tracked in #1084. The two changes solve different layers of the same user-facing experience.
Contribution
What should it do?
Deliver
child_process.spawnstdout and stderr chunks to Raycast extensions while the child process is running, beforeexit/close. A command such as Ookla Speedtest's--progressshould be able to update a Detail view during download and upload, rather than showing all samples only after the test finishes.This is currently documented as unsupported in extension compatibility: “Live
child_process.spawnoutput” arrives only once the command finishes. In 0.11.3,ExtensionAsyncProcess.Child.collectreads each pipe to EOF andproc.waitreturns one result.BufferedChildProcessinScripts/raycast-runtime/src/node-shims.jsthen callsstdout.end(...)andstderr.end(...)from that final result. Astdout.on("data", ...)listener therefore cannot observe intermediate progress.A minimal repro is a view extension that spawns
/bin/sh -c 'printf "first\n"; sleep 3; printf "second\n"', appends each stdout chunk to aDetail, and starts a timer. In Node, “first” appears immediately; in Tinycast both lines appear after the three-second sleep.Suggested implementation direction: drain stdout and stderr concurrently from the native
Pipes and bridge ordered chunks to the JSChildProcessstreams as they arrive. Keepexit/closeafter the streams drain, and preserve the current timeout, kill, detached-process, and error behavior. This would replace the current final-buffer-only path forspawn;exec/execFilecould still collect their final result.Why does it belong in Tinycast?
The Speedtest extension already asks its CLI for progress, but Tinycast does not deliver the process output until completion. This caused the apparent “blank/idle until the end” report in #743. The missing behavior is in Tinycast's Node compatibility layer, so updating Speedtest alone cannot make a normal
spawn().stdout.on("data")listener receive live chunks.I verified a local workaround by redirecting the CLI's output to a progress file and polling that file from the extension every 200 ms. It restores live speed updates without changing Tinycast, but it is extension-specific and bypasses ordinary
spawnstreaming. Once progress is visible, a separate Markdown SVG rendering issue can cause the circular gauge to flicker; that is tracked in #1084. The two changes solve different layers of the same user-facing experience.Contribution
approved.