@@ -101,9 +101,9 @@ struct CodexBarTests {
101101 let windows = IconRemainingResolver . resolvedWindows ( snapshot: snapshot, style: . antigravity)
102102
103103 #expect( windows. primary? . windowMinutes == 300 )
104- #expect( windows. primary? . remainingPercent == 3 )
104+ #expect( windows. primary? . remainingPercent == 2 )
105105 #expect( windows. secondary? . windowMinutes == 10080 )
106- #expect( windows. secondary? . remainingPercent == 16 )
106+ #expect( windows. secondary? . remainingPercent == 1 )
107107 }
108108
109109 @Test
@@ -139,7 +139,7 @@ struct CodexBarTests {
139139 }
140140
141141 @Test
142- func `antigravity quota summary icon prefers gemini ids over display titles `() {
142+ func `antigravity quota summary icon uses most constrained quota summary lanes `() {
143143 let snapshot = UsageSnapshot (
144144 primary: nil ,
145145 secondary: nil ,
@@ -166,12 +166,12 @@ struct CodexBarTests {
166166
167167 let windows = IconRemainingResolver . resolvedWindows ( snapshot: snapshot, style: . antigravity)
168168
169- #expect( windows. primary? . remainingPercent == 60 )
170- #expect( windows. secondary? . remainingPercent == 70 )
169+ #expect( windows. primary? . remainingPercent == 2 )
170+ #expect( windows. secondary? . remainingPercent == 1 )
171171 }
172172
173173 @Test
174- func `antigravity quota summary icon do es not borrow missing gemini weekly from claude gpt`() {
174+ func `antigravity quota summary icon can pair gemini session with claude gpt weekly `() {
175175 let snapshot = UsageSnapshot (
176176 primary: nil ,
177177 secondary: nil ,
@@ -191,11 +191,11 @@ struct CodexBarTests {
191191 let windows = IconRemainingResolver . resolvedWindows ( snapshot: snapshot, style: . antigravity)
192192
193193 #expect( windows. primary? . remainingPercent == 60 )
194- #expect( windows. secondary == nil )
194+ #expect( windows. secondary? . remainingPercent == 1 )
195195 }
196196
197197 @Test
198- func `antigravity quota summary icon treats unknown gemini rows as present `() {
198+ func `antigravity quota summary icon ignores unknown rows while ranking known lanes `() {
199199 let snapshot = UsageSnapshot (
200200 primary: nil ,
201201 secondary: nil ,
@@ -216,7 +216,42 @@ struct CodexBarTests {
216216 let windows = IconRemainingResolver . resolvedWindows ( snapshot: snapshot, style: . antigravity)
217217
218218 #expect( windows. primary == nil )
219- #expect( windows. secondary == nil )
219+ #expect( windows. secondary? . remainingPercent == 1 )
220+ }
221+
222+ @Test
223+ func `antigravity used icon percent matches constrained claude gpt lane`() {
224+ let snapshot = UsageSnapshot (
225+ primary: nil ,
226+ secondary: nil ,
227+ tertiary: nil ,
228+ extraRateWindows: [
229+ NamedRateWindow (
230+ id: " antigravity-quota-summary-gemini-5h " ,
231+ title: " Gemini Session " ,
232+ window: RateWindow ( usedPercent: 20 , windowMinutes: 300 , resetsAt: nil , resetDescription: nil ) ) ,
233+ NamedRateWindow (
234+ id: " antigravity-quota-summary-gemini-weekly " ,
235+ title: " Gemini Weekly " ,
236+ window: RateWindow ( usedPercent: 30 , windowMinutes: 10080 , resetsAt: nil , resetDescription: nil ) ) ,
237+ NamedRateWindow (
238+ id: " antigravity-quota-summary-3p-5h " ,
239+ title: " Claude + GPT Session " ,
240+ window: RateWindow ( usedPercent: 95 , windowMinutes: 300 , resetsAt: nil , resetDescription: nil ) ) ,
241+ NamedRateWindow (
242+ id: " antigravity-quota-summary-3p-weekly " ,
243+ title: " Claude + GPT Weekly " ,
244+ window: RateWindow ( usedPercent: 40 , windowMinutes: 10080 , resetsAt: nil , resetDescription: nil ) ) ,
245+ ] ,
246+ updatedAt: Date ( ) )
247+
248+ let percents = IconRemainingResolver . resolvedPercents (
249+ snapshot: snapshot,
250+ style: . antigravity,
251+ showUsed: true )
252+
253+ #expect( percents. primary == 95 )
254+ #expect( percents. secondary == 40 )
220255 }
221256
222257 @Test
0 commit comments