Skip to content
Open
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
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,8 @@ public struct AntigravityStatusProbe: Sendable {
let modelConfigs = userStatus.cascadeModelConfigData?.clientModelConfigs ?? []
let models = modelConfigs.compactMap(Self.quotaFromConfig(_:))
let email = userStatus.email
let planName = userStatus.planStatus?.planInfo?.preferredName
// Prefer userTier.name (actual subscription tier) over planInfo (shows "Pro" for Ultra users)
let planName = userStatus.userTier?.name ?? userStatus.planStatus?.planInfo?.preferredName
Comment on lines +231 to +232

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Fall back when userTier.name is empty

The new userTier?.name ?? planInfo?.preferredName only falls back when name is nil, not when it is an empty/whitespace string. If the API includes a userTier object but its name is blank (e.g., for an unassigned tier), the UI will now hide the plan entirely because loginMethod becomes "" and downstream views treat empty strings as “no plan”. Consider trimming/validating userTier.name before deciding it beats planInfo.preferredName so a real plan still shows up in that case.

Useful? React with 👍 / 👎.


return AntigravityStatusSnapshot(
modelQuotas: models,
Expand Down Expand Up @@ -586,6 +587,13 @@ private struct UserStatus: Decodable {
let email: String?
let planStatus: PlanStatus?
let cascadeModelConfigData: ModelConfigData?
let userTier: UserTier?
}

private struct UserTier: Decodable {
let id: String?
let name: String?
let description: String?
}

private struct PlanStatus: Decodable {
Expand Down