commit 8ab16dd800c53dcaf827d455ed96517be7470e4b
parent dee57a4231a89b7fcfa3408b5e05085cb23b70e0
Author: Florian Dold <florian@dold.me>
Date: Thu, 16 Jul 2026 15:02:51 +0200
wallet-core: send 'done' progress phase when request with progressToken is done
Diffstat:
2 files changed, 13 insertions(+), 1 deletion(-)
diff --git a/packages/taler-util/src/notifications.ts b/packages/taler-util/src/notifications.ts
@@ -237,7 +237,13 @@ export interface RequestProgressPhaseNotification {
type: NotificationType.RequestProgressPhase;
progressToken: string;
operation: string;
- phase: "delayed" | "stalled" | "retryable";
+ /**
+ * delayed: request is taking longer than expected (usually after 5s)
+ * stalled: request is taking *very* long (usually after 10s)
+ * retryable: user is now allow to retry (usually after 3s)
+ * done: no further progress notifications will be sent
+ */
+ phase: "delayed" | "stalled" | "retryable" | "done";
}
export enum ObservabilityEventType {
diff --git a/packages/taler-wallet-core/src/progress.ts b/packages/taler-wallet-core/src/progress.ts
@@ -94,6 +94,12 @@ export async function withMaybeProgressContext<T>(
} finally {
// Clean up progress token registration,
// but only if it is *our* context
+ wex.ws.notify({
+ type: NotificationType.RequestProgressPhase,
+ operation: pc.operation,
+ progressToken: pc.progressToken,
+ phase: "done",
+ });
const currentPc = wex.ws.progressMap.get(key);
if (currentPc && currentPc.progressContextId == pc.progressContextId) {
wex.ws.progressMap.delete(key);