mirror of
https://github.com/AgentSeal/codeburn.git
synced 2026-09-11 18:35:35 +00:00
fix(mac): scope Grok's omitted-percent-is-zero rule to unified billing; finish the fixture scrub
An omitted creditUsagePercent inside an open billing window was read as 0% for every Grok account. That contract only holds for unified-billing users; for anyone else it now stays unknown instead of showing a fabricated 0%. The wireframe mockup still carried the one device name #1250 replaced everywhere else.
This commit is contained in:
parent
c8f38a7b1c
commit
bc9460951a
2 changed files with 5 additions and 2 deletions
|
|
@ -659,7 +659,7 @@
|
|||
<div class="panel">
|
||||
<div class="phead"><b>Paired</b></div>
|
||||
<div class="pbody">
|
||||
<div class="li"><div class="lx"><b>toruk-mini</b><span>last pull 2h ago · 34 sessions · $41.20 this month</span></div><span class="btn btn-s">Pull now</span></div>
|
||||
<div class="li"><div class="lx"><b>studio-mini</b><span>last pull 2h ago · 34 sessions · $41.20 this month</span></div><span class="btn btn-s">Pull now</span></div>
|
||||
<div class="li"><div class="lx"><b>Combine usage from paired devices</b><span>scope captions gain “· 2 devices” when on</span></div><span class="tglon"></span></div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -278,10 +278,13 @@ enum GrokBuildSubscriptionService {
|
|||
let cap = config.monthlyLimit?.val,
|
||||
used.isFinite, cap.isFinite, used >= 0, cap > 0 {
|
||||
rawPercent = used / cap * 100
|
||||
} else if isActiveBillingPeriod(config.currentPeriod, now: now) {
|
||||
} else if config.isUnifiedBillingUser == true,
|
||||
isActiveBillingPeriod(config.currentPeriod, now: now) {
|
||||
// Grok's web client and proto3 both treat an omitted
|
||||
// creditUsagePercent as 0 during an active window. After a weekly
|
||||
// reset the field is simply absent — that is 0% used, not unknown.
|
||||
// Only unified-billing accounts carry that contract; for anyone
|
||||
// else an omitted field stays unknown rather than a fabricated 0%.
|
||||
rawPercent = 0
|
||||
} else {
|
||||
rawPercent = nil
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue