From d1e8eb79ca471cca899b3fb5db396b7fbc070b1c Mon Sep 17 00:00:00 2001 From: Jeff Hwang Date: Mon, 18 Aug 2025 09:49:27 -0400 Subject: [PATCH] make complete for finished backfills --- .../app/cash/backfila/ui/pages/BackfillShowAction.kt | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/service/src/main/kotlin/app/cash/backfila/ui/pages/BackfillShowAction.kt b/service/src/main/kotlin/app/cash/backfila/ui/pages/BackfillShowAction.kt index 11f0acd73..072f6477c 100644 --- a/service/src/main/kotlin/app/cash/backfila/ui/pages/BackfillShowAction.kt +++ b/service/src/main/kotlin/app/cash/backfila/ui/pages/BackfillShowAction.kt @@ -206,10 +206,14 @@ class BackfillShowAction @Inject constructor( span("font-medium") { +"""Overall Progress""" } span("font-semibold text-gray-900") { if (allPrecomputingDone && totalItemsToRun > 0) { - val percentage = (totalBackfilledItems.toDouble() / totalItemsToRun * 100).let { - if (it.isNaN()) 0.0 else it - } + val percentage = + (totalBackfilledItems.toDouble() / totalItemsToRun * 100).let { + if (it.isNaN()) 0.0 else it + } +"""${String.format("%.1f", percentage)}%""" + } else + if (backfill.state == BackfillState.COMPLETE) { + +"""Complete""" } else { +"""Computing...""" }