@@ -32,13 +32,13 @@ const formatRenewalDate = (dateStr: string | null): string => {
3232 const isToday = resetDate . toDateString ( ) === today . toDateString ( )
3333 return isToday
3434 ? resetDate . toLocaleString ( 'en-US' , {
35- hour : 'numeric' ,
36- minute : '2-digit' ,
37- } )
35+ hour : 'numeric' ,
36+ minute : '2-digit' ,
37+ } )
3838 : resetDate . toLocaleDateString ( 'en-US' , {
39- month : 'short' ,
40- day : 'numeric' ,
41- } )
39+ month : 'short' ,
40+ day : 'numeric' ,
41+ } )
4242}
4343
4444export const UsageBanner = ( { showTime } : { showTime : number } ) => {
@@ -120,7 +120,7 @@ export const UsageBanner = ({ showTime }: { showTime: number }) => {
120120 < box style = { { flexDirection : 'column' , marginBottom : 1 } } >
121121 < box style = { { flexDirection : 'row' , gap : 1 } } >
122122 < text style = { { fg : theme . foreground } } >
123- { subscriptionData . displayName ?? 'Strong' } subscription
123+ 💪 { subscriptionData . displayName ?? 'Strong' } subscription
124124 </ text >
125125 { subscriptionInfo ?. tier && (
126126 < text style = { { fg : theme . muted } } > ${ subscriptionInfo . tier } /mo</ text >
@@ -130,37 +130,38 @@ export const UsageBanner = ({ showTime }: { showTime: number }) => {
130130 < text style = { { fg : theme . muted } } > Loading subscription data...</ text >
131131 ) : rateLimit ? (
132132 < box style = { { flexDirection : 'column' , gap : 0 } } >
133- { /* Block progress - show if there's an active block */ }
134- { rateLimit . blockLimit != null && rateLimit . blockUsed != null && (
135- < box style = { { flexDirection : 'row' , alignItems : 'center' , gap : 1 } } >
136- < text style = { { fg : theme . muted } } > 5h limit: </ text >
137- < ProgressBar
138- value = { Math . max ( 0 , 100 - Math . round ( ( rateLimit . blockUsed / rateLimit . blockLimit ) * 100 ) ) }
139- width = { 12 }
140- showPercentage = { false }
141- />
142- < text style = { { fg : theme . muted } } >
143- { Math . max ( 0 , 100 - Math . round ( ( rateLimit . blockUsed / rateLimit . blockLimit ) * 100 ) ) } % remaining
144- </ text >
145- { rateLimit . blockResetsAt && (
133+ { /* Block progress - always show for Strong subscription */ }
134+ { ( ( ) => {
135+ const blockPercent = rateLimit . blockLimit != null && rateLimit . blockUsed != null
136+ ? Math . max ( 0 , 100 - Math . round ( ( rateLimit . blockUsed / rateLimit . blockLimit ) * 100 ) )
137+ : 100
138+ return (
139+ < box style = { { flexDirection : 'row' , alignItems : 'center' , gap : 0 } } >
140+ < text style = { { fg : theme . muted } } > 5-hour limit </ text >
141+ < text style = { { fg : theme . muted } } > { `${ blockPercent } %` . padStart ( 4 ) } </ text >
142+ < ProgressBar value = { blockPercent } width = { 12 } showPercentage = { false } />
146143 < text style = { { fg : theme . muted } } >
147- · resets in { formatResetTime ( new Date ( rateLimit . blockResetsAt ) ) }
144+ { rateLimit . blockResetsAt
145+ ? ` resets in ${ formatResetTime ( new Date ( rateLimit . blockResetsAt ) ) } `
146+ : '' }
148147 </ text >
149- ) }
150- </ box >
151- ) }
148+ </ box >
149+ )
150+ } ) ( ) }
152151 { /* Weekly progress */ }
153- < box style = { { flexDirection : 'row' , alignItems : 'center' , gap : 1 } } >
154- < text style = { { fg : theme . muted } } > Weekly limit:</ text >
155- < ProgressBar
156- value = { 100 - rateLimit . weeklyPercentUsed }
157- width = { 12 }
158- showPercentage = { false }
159- />
160- < text style = { { fg : theme . muted } } >
161- { 100 - rateLimit . weeklyPercentUsed } % remaining · resets in { formatResetTimeLong ( rateLimit . weeklyResetsAt ) }
162- </ text >
163- </ box >
152+ { ( ( ) => {
153+ const weeklyPercent = 100 - rateLimit . weeklyPercentUsed
154+ return (
155+ < box style = { { flexDirection : 'row' , alignItems : 'center' , gap : 0 } } >
156+ < text style = { { fg : theme . muted } } > Weekly limit </ text >
157+ < text style = { { fg : theme . muted } } > { `${ weeklyPercent } %` . padStart ( 4 ) } </ text >
158+ < ProgressBar value = { weeklyPercent } width = { 12 } showPercentage = { false } />
159+ < text style = { { fg : theme . muted } } >
160+ { ' ' } resets in { formatResetTimeLong ( rateLimit . weeklyResetsAt ) }
161+ </ text >
162+ </ box >
163+ )
164+ } ) ( ) }
164165 </ box >
165166 ) : null }
166167 </ box >
0 commit comments