@@ -274,4 +274,62 @@ describe("providerUsage", () => {
274274
275275 expect ( snapshot ) . toBeNull ( ) ;
276276 } ) ;
277+
278+ it ( "returns null for cursor provider even when Claude/Codex events are present" , ( ) => {
279+ const snapshot = deriveLatestProviderUsageSnapshot (
280+ [
281+ makeActivity ( "activity-1" , {
282+ type : "rate_limit_event" ,
283+ rate_limit_info : {
284+ status : "allowed_warning" ,
285+ resetsAt : 1776582000 ,
286+ rateLimitType : "five_hour" ,
287+ utilization : 0.83 ,
288+ } ,
289+ } ) ,
290+ makeActivity ( "activity-2" , {
291+ rateLimits : {
292+ limitId : "codex" ,
293+ primary : {
294+ usedPercent : 12 ,
295+ windowDurationMins : 300 ,
296+ resetsAt : 1776587601 ,
297+ } ,
298+ } ,
299+ } ) ,
300+ ] ,
301+ { provider : "cursor" } ,
302+ ) ;
303+
304+ expect ( snapshot ) . toBeNull ( ) ;
305+ } ) ;
306+
307+ it ( "returns null for opencode provider even when Claude/Codex events are present" , ( ) => {
308+ const snapshot = deriveLatestProviderUsageSnapshot (
309+ [
310+ makeActivity ( "activity-1" , {
311+ type : "rate_limit_event" ,
312+ rate_limit_info : {
313+ status : "allowed_warning" ,
314+ resetsAt : 1776582000 ,
315+ rateLimitType : "five_hour" ,
316+ utilization : 0.83 ,
317+ } ,
318+ } ) ,
319+ makeActivity ( "activity-2" , {
320+ rateLimits : {
321+ limitId : "codex" ,
322+ primary : {
323+ usedPercent : 12 ,
324+ windowDurationMins : 300 ,
325+ resetsAt : 1776587601 ,
326+ } ,
327+ } ,
328+ } ) ,
329+ ] ,
330+ { provider : "opencode" } ,
331+ ) ;
332+
333+ expect ( snapshot ) . toBeNull ( ) ;
334+ } ) ;
277335} ) ;
0 commit comments