Skip to content
Source
Docs
Explore
Skills
MCP servers
For agents
Search or jump to…
Sign in
Sign up
pingdotgg
/
t3code
Pull requests
pingdotgg
t3code
Public
Synced with GitHub
Popular #1
Fork
0
0
0
0
1
2
3
4
5
6
7
8
9
Code
Architecture
Issues
Pull requests
Community
Assets
CI
Agents
Settings
fix(server): Claude usage meter follows live rate-limit updates below the warning threshold
#28869
Send to my agent
Open
juliusmarminge
wants to merge 5 commits into
main
from
refs/pull/28869/head
·
opened
4 weeks ago
View on GitHub
Conversation
7
Commits
5
Files changed
2
Impact
Showing
2 changed files
with
116 additions
and
11 deletions
.
x
0 of 2 viewed, 2 left
Files
Hide whitespace
Unified
Split
75 additions and 0 deletions
+75
-0
apps/server/src/provider/claudeUsageLimits.test.ts
Modified
Diff
Before/After
Viewed
apps/server/src/provider/claudeUsageLimits.test.ts
View file
Expand up
Show all 267 lines
@@ -268,4 +268,79 @@
268
268
],
269
269
});
270
270
});
271
+
272
+
it
(
"maps every window in the unifiedWindows the CLI streams below the warning threshold"
, () => {
273
+
expect
(
274
+
claudeRateLimitEventToUpdate
(
275
+
{
276
+
status
:
"allowed"
,
277
+
resetsAt
:
1_793_576_803
,
278
+
rateLimitType
:
"five_hour"
,
279
+
isUsingOverage
:
false
,
280
+
...({
281
+
unifiedWindows
: {
282
+
five_hour
: {
utilization
:
0.15
,
resetsAt
:
1_793_576_803
},
283
+
seven_day
: {
utilization
:
0.31
,
resetsAt
:
1_793_994_403
},
284
+
},
285
+
}
as
object
),
286
+
},
287
+
noNames,
288
+
),
289
+
).
toEqual
({
290
+
windows
: [
291
+
{
292
+
id
:
"five_hour"
,
293
+
kind
:
"session"
,
294
+
label
:
"Session"
,
295
+
usedPercent
:
15
,
296
+
windowDurationMins
:
300
,
Home
Search
Explore
Menu