Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions Sources/CodexBar/UsageStore+SpendDashboardPublication.swift
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,10 @@ extension UsageStore {
}

func synchronizeSharedSpendDashboardAfterTokenPublication(for provider: UsageProvider) {
// Provider-specific by design: regular Codex publication triggers the account-scoped spend producer.
guard provider == .codex, self.sharedSpendDashboardObservationStarted else { return }
guard self.sharedSpendDashboardObservationStarted else { return }
// Codex and independent spend-dashboard token publications both drive the shared dashboard.
let isIndependent = Self.usesSpendDashboardIndependentTokenSnapshot(provider)
guard provider == .codex || isIndependent else { return }
self.applySharedSpendDashboardConfiguration(
SpendDashboardSource.configuration(settings: self.settings, store: self))
}
Expand Down
1 change: 1 addition & 0 deletions Sources/CodexBar/UsageStore+SpendDashboardTokenCost.swift
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,7 @@ extension UsageStore {
publicationRevision: self.spendDashboardTokenSnapshotPublicationRevision(for: provider),
providerConfigRevision: self.settings.providerConfigRevision(for: provider),
scopeSignature: self.spendDashboardTokenSnapshotScopeSignature(for: provider))
self.synchronizeSharedSpendDashboardAfterTokenPublication(for: provider)
}

private func spendDashboardTokenRefreshPublicationIsCurrent(
Expand Down
Loading