Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(server): usage-limit auto-resume retries a continuation refused right after the reset #33737

Openjuliusmarmingewants to merge 7 commits intomain fromfix/issue-33708opened View on GitHub

Showing 14 changed files with 62 additions and 26 deletions (loading 11).

x
0 of 14 viewed, 14 left
17 additions and 6 deletionsapps/mobile/src/features/threads/ThreadDetailScreen.tsxModified
View file
@@ -63,6 +63,7 @@
type BackgroundWorkStopRequest,
isBackgroundWorkStopPending,
limitRecoveryOwnsSnooze,
+ usageLimitNoticeResetAt,
presentPendingBackgroundWork,
presentProviderGoal,
} from "@t3tools/client-runtime/state/thread-execution";
@@ -660,15 +661,25 @@
// oxlint-disable-next-line react/exhaustive-effect-dependencies -- Re-arm if timer clamping fires before the wake time.
}, [snoozed, snoozedUntil, lifecycleNow]);
// The usage-limit recovery card shows this snooze and its Wake now.
+ const limitRunId =
+ props.selectedThread.runtime?.status === "failed" &&
+ props.selectedThread.runtime.lastErrorClass === "usage_limit"
+ ? props.selectedThread.latestRun?.runId
+ : null;
const lifecycleSnoozed =
snoozed &&
!limitRecoveryOwnsSnooze({
- runId:
- props.selectedThread.runtime?.status === "failed" &&
- props.selectedThread.runtime.lastErrorClass === "usage_limit"
- ? props.selectedThread.latestRun?.runId
- : null,
- resetAt: props.selectedThread.runtime?.usageLimitResetAt,
+ runId: limitRunId,
+ resetAt: usageLimitNoticeResetAt({
+ runId: limitRunId,