mirror of
https://github.com/AgentSeal/codeburn.git
synced 2026-08-13 10:34:32 +00:00
Fix model badge ForEach ID collision and budget warning provider filter
- SessionDetailsList model badges used id: \.name which silently drops duplicate model entries. Switched to enumerated offset-based ID. - Hero budget warning compared against provider-filtered payload instead of todayPayload (all providers). Now matches the menubar flame tint.
This commit is contained in:
parent
c2683ca960
commit
146d074c04
2 changed files with 3 additions and 2 deletions
|
|
@ -1086,7 +1086,7 @@ private struct SessionDetailsList: View {
|
|||
.padding(.leading, 4)
|
||||
}
|
||||
HStack(spacing: 4) {
|
||||
ForEach(sess.models.prefix(3), id: \.name) { model in
|
||||
ForEach(Array(sess.models.prefix(3).enumerated()), id: \.offset) { _, model in
|
||||
Text(model.name)
|
||||
.font(.system(size: 8.5, weight: .medium))
|
||||
.foregroundStyle(.secondary)
|
||||
|
|
|
|||
|
|
@ -55,7 +55,8 @@ struct HeroSection: View {
|
|||
|
||||
if store.selectedPeriod == .today,
|
||||
store.dailyBudget > 0,
|
||||
store.payload.current.cost >= store.dailyBudget {
|
||||
let todayCost = store.todayPayload?.current.cost,
|
||||
todayCost >= store.dailyBudget {
|
||||
HStack(spacing: 4) {
|
||||
Image(systemName: "exclamationmark.triangle.fill")
|
||||
.font(.system(size: 10))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue