From 4b1e50a6b0faae3962acb483fdb032e546d1f236 Mon Sep 17 00:00:00 2001 From: Helen Kwok <107752876+helenkwok@users.noreply.github.com> Date: Sat, 7 Nov 2026 10:28:04 +0800 Subject: [PATCH] deckcraft-web: put each Cargo.toml comment above its own dependency, and say a call the app already took still finishes after a timeout --- apps/deckcraft-web/Cargo.toml | 2 +- apps/deckcraft-web/src/api.rs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/deckcraft-web/Cargo.toml b/apps/deckcraft-web/Cargo.toml index fc3c4f2af..da9dc7d8e 100644 --- a/apps/deckcraft-web/Cargo.toml +++ b/apps/deckcraft-web/Cargo.toml @@ -16,9 +16,9 @@ path = "src/main.rs" [dependencies] deckcraft-engine = { workspace = true } deckcraft-ui-egui = { workspace = true } -# The host messages (storytold/craft-libs): one contract and one bridge for the web builds. # The page command API (storytold/craft-libs#413): window.deckcraft over the control channel. craft-web-api = { git = "https://github.com/storytold/craft-libs", rev = "fd5e2feff6ea25bed371a99cc732b3968d621505", version = "0.1.0" } +# The host messages (storytold/craft-libs): one contract and one bridge for the web builds. craft-web-host = { git = "https://github.com/storytold/craft-libs", rev = "fd5e2feff6ea25bed371a99cc732b3968d621505", version = "0.1.0" } egui = { workspace = true } log = { workspace = true } diff --git a/apps/deckcraft-web/src/api.rs b/apps/deckcraft-web/src/api.rs index a343636a6..5a74db92d 100644 --- a/apps/deckcraft-web/src/api.rs +++ b/apps/deckcraft-web/src/api.rs @@ -4,7 +4,7 @@ //! The crate owns the JavaScript side (`request`, `execute`, `commands`, `docInspect`, `uiInspect`, //! `screenshot`, as promises with a timeout). This module is DeckCraft's part: a [`Request`] that //! queues a [`ControlRequest`] for the app, which answers it on its next frame, and waits for the -//! reply. A call the page gave up on is released ([`Pending`]), so the app drops it unrun instead of +//! reply. A call the page gave up on is released ([`Pending`]), so the app skips it if it has not started it, instead of //! applying a command the page was told had failed. use std::sync::Arc; @@ -19,7 +19,7 @@ use serde_json::{Value, json}; const POLL_MS: i32 = 16; /// A queued control request whose reply has not arrived. Dropping it before the reply (the page's -/// timeout fired, or the call was abandoned) releases the request: the app skips it unrun. +/// timeout fired, or the call was abandoned) releases the request: the app skips it if it has not started it (one it has taken still finishes). struct Pending { reply: Receiver, state: Arc,