commit 5b15accf1f5e550bb872e5e045c9e6d9dae98ab5
parent b2a7f80efeaa092a6152f06f28cbd8d3800a2aa2
Author: Florian Dold <florian@dold.me>
Date: Thu, 16 Jul 2026 18:34:45 +0200
wallet-core: tweak progress notification design
Diffstat:
2 files changed, 3 insertions(+), 24 deletions(-)
diff --git a/packages/taler-util/src/notifications.ts b/packages/taler-util/src/notifications.ts
@@ -239,11 +239,10 @@ export interface RequestProgressPhaseNotification {
operation: string;
/**
* 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)
+ * stalled: request is taking *very* long, user can retry (usually after 10s)
* done: no further progress notifications will be sent
*/
- phase: "delayed" | "stalled" | "retryable" | "done";
+ phase: "delayed" | "stalled" | "done";
}
export enum ObservabilityEventType {
diff --git a/packages/taler-wallet-core/src/progress.ts b/packages/taler-wallet-core/src/progress.ts
@@ -146,26 +146,6 @@ async function emitProgressPhaseNotifications(
});
}
-async function emitProgressPhaseRetryNotification(
- wex: WalletExecutionContext,
- pc: ProgressContext,
-): Promise<void> {
- await wex.ws.timerGroup.resolveAfter(
- Duration.fromSpec({
- seconds: 3,
- }),
- );
- if (wex.cancellationToken.isCancelled || pc.finished) {
- return;
- }
- wex.ws.notify({
- type: NotificationType.RequestProgressPhase,
- operation: pc.operation,
- progressToken: pc.progressToken,
- phase: "retryable",
- });
-}
-
export async function handleCancelProgressToken(
wex: WalletExecutionContext,
req: CancelProgressTokenRequest,
@@ -201,7 +181,7 @@ export async function handleRetryProgressTokenNow(
return {};
}
await pc.onRetryNow();
- emitProgressPhaseRetryNotification(wex, pc).catch((e) => {
+ emitProgressPhaseNotifications(wex, pc).catch((e) => {
logger.warn(safeStringifyException(e));
});
return {};