Fix explorer back and session usage selection

This commit is contained in:
iris committed 2026-09-09 13:01:27 -04:00
1 parent 8c88a7e991
commit 14dd520719
10 files changed
+222 -57

No files matched your search

@@ -884,6 +884,8 @@ data class UsageWindow(
val kind: String,
val label: String,
val percent: Double,
/** Length of this cycle, when the provider reported it. */
val durationMinutes: Long?,
val resetsAt: String?,
val active: Boolean,
)
@@ -931,6 +933,10 @@ fun fetchUsage(settings: ServerSettings): List<UsageSnapshot> =
kind = window.optString("kind").ifEmpty { "unknown" },
label = window.getString("label"),
percent = window.getDouble("percent"),
durationMinutes =
if (window.has("durationMinutes")) {
window.getLong("durationMinutes")
} else null,
resetsAt = window.optString("resetsAt").ifEmpty { null },
active = window.getBoolean("active"),
)