Skip to content
This repository was archived by the owner on Aug 6, 2026. It is now read-only.

Commit de9badb

Browse files
committed
fix(ui): recognize Pi rate-limit variants
1 parent 45cf233 commit de9badb

2 files changed

Lines changed: 10 additions & 1 deletion

File tree

packages/ui/src/features/sessions/components/session-update/StatusNotificationView.test.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,15 @@ describe("formatRetryStatus", () => {
3131
},
3232
expected: "Rate limit reached. Retrying now (attempt 1 of 3)",
3333
},
34+
{
35+
input: {
36+
attempt: 2,
37+
maxAttempts: 3,
38+
message: "Rate limited",
39+
remainingMs: 2_000,
40+
},
41+
expected: "Rate limit reached. Retrying in 2s (attempt 2 of 3)",
42+
},
3443
{
3544
input: {
3645
attempt: 2,

packages/ui/src/features/sessions/components/session-update/StatusNotificationView.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ export function formatRetryStatus({
4646
message?: string;
4747
remainingMs: number;
4848
}): string {
49-
const rateLimited = /\b(429|rate limit|too many requests)\b/i.test(
49+
const rateLimited = /\b429\b|rate[ _]limit(?:ed)?|too many requests/i.test(
5050
message ?? "",
5151
);
5252
const retryAt =

0 commit comments

Comments
 (0)