Skip to content

feat(vue): pause command chrome while a dialog is open - #919

Merged
patroza merged 1 commit into
mainfrom
suspend-waiting
Oct 13, 2026
Merged

patroza merged 1 commit into
mainfrom
suspend-waiting

Conversation

@omegent-app

@omegent-app omegent-app Bot commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

A command that asks a question before the real work shows the spinner and the waiting toast while the person is still deciding. The button looks busy before anything has started.

Command.suspendWaiting(effect) pauses both for that effect. The button stays disabled, so a second click cannot start another run. When the effect finishes, the spinner returns and the waiting toast starts its one-second delay again for the rest of the command. An interrupt restores the depth and clears the toast.

Each command owns a WaitingGate. command.waiting is false while the depth is positive. command.blocked stays on for the whole run. WithToast dismisses the waiting toast above depth 0 and arms a fresh delay when the depth returns to 0. Outside a command the default gate is inactive, so suspendWaiting runs the effect unchanged.

const decision = yield* Command.suspendWaiting(ask(pickupDate))
yield* close(orderId)

Stream commands pause the spinner only. withDefaultToastStream is unchanged. confirmOrInterrupt is unchanged: native window.confirm blocks the thread, so that spinner does not paint.


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need.

Command.suspendWaiting parks on an effect without the spinner or the waiting toast. The button stays disabled until the effect finishes, then both come back for the rest of the command.
@omegent-app
omegent-app Bot marked this pull request as ready for review October 13, 2026 10:18
@pkg-pr-new

pkg-pr-new Bot commented Oct 13, 2026

Copy link
Copy Markdown

Open in StackBlitz

@effect-app/cli

npm i https://pkg.pr.new/@effect-app/cli@919

effect-app

npm i https://pkg.pr.new/effect-app@919

@effect-app/eslint-codegen-model

npm i https://pkg.pr.new/@effect-app/eslint-codegen-model@919

@effect-app/eslint-shared-config

npm i https://pkg.pr.new/@effect-app/eslint-shared-config@919

@effect-app/infra

npm i https://pkg.pr.new/@effect-app/infra@919

@effect-app/vue

npm i https://pkg.pr.new/@effect-app/vue@919

@effect-app/vue-components

npm i https://pkg.pr.new/@effect-app/vue-components@919

commit: 47b41cd

@patroza
patroza merged commit 76911ed into main Oct 13, 2026
5 checks passed
@patroza
patroza deleted the suspend-waiting branch October 13, 2026 13:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant