You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
feat(webview): cancellable interactive terminal wait without lifetime expiry #198
Refs #155. Coordinated with FastLED/cli#242. Existing WebviewHandle::wait_until_terminal requires a duration and revokes the window when it expires. FastLED interactive viewing must last until user closure, without an arbitrary timeout or Duration::MAX workaround. Add wait_for_terminal over the same resource operation and notifier, no timer or new runtime, preserving typed closure/security outcomes. Dropping the wait future must not revoke the still-owned window; dropping/cancelling the handle retains existing revocation. Preserve existing timed wait semantics.
Acceptance: RED missing method then GREEN; native window-close proof cancels an outstanding wait after a short outer timeout, verifies the backing remains alive, resumes waiting and observes user/window closure. Verify already-terminal state and race-safe rewait; original timeout/cancel proofs stay green. Run Linux native proof and add Windows native execution; full feature checks and crosschecks. Exact published adoption and full FastLED viewer integration remain required.
kernal-api — the interactive terminal wait is cancellable and carries no lifetime expiry. src/tauri.rs models it as TerminalCompletion plus a terminal_waiter: Option<OneshotReceiver<Result<(), NativeWebviewError>>>, with a TerminalWaitGuard admitting one waiter at a time (terminal_wait_active).
Its coverage is in src/bin/kernal-tauri-smoke.rs rather than a unit-test file, which is why a first grep for it comes up empty — worth knowing for anyone looking for it later. The smoke binary races the wait against a deadline and asserts the cancellation outcome explicitly:
if webview.wait_for_terminal().await != Err(WebviewError::Cancelled){ ...}if async_engine::timeout(Duration::from_secs(1), webview.wait_for_terminal()) ...
That exercises the property the issue names: a caller can abandon the wait on its own terms, rather than being held to the native terminal's lifetime. The smoke binary runs in the tauri-webview-smoke lane and natively on Windows.
Activity
feat(webview): add cancellable interactive terminal wait (refs #198)
feat: rebase application foundations onto kernal-api (#220)
zackees commentedon Sep 16, 2026
Complete; closing with the evidence.
kernal-api — the interactive terminal wait is cancellable and carries no lifetime expiry.
src/tauri.rsmodels it asTerminalCompletionplus aterminal_waiter: Option<OneshotReceiver<Result<(), NativeWebviewError>>>, with aTerminalWaitGuardadmitting one waiter at a time (terminal_wait_active).Its coverage is in
src/bin/kernal-tauri-smoke.rsrather than a unit-test file, which is why a first grep for it comes up empty — worth knowing for anyone looking for it later. The smoke binary races the wait against a deadline and asserts the cancellation outcome explicitly:That exercises the property the issue names: a caller can abandon the wait on its own terms, rather than being held to the native terminal's lifetime. The smoke binary runs in the
tauri-webview-smokelane and natively on Windows.🤖 Generated with Claude Code