feat(install): phase-based progress bar replaces unparseable pull bytes

Podman emits zero parseable progress when stderr is piped (no TTY), so
the old byte-counter regex never matched in real installs. Users saw
0% for the whole pull, then a jump to 95%, then silence through
create-container, health-check, and post-install hooks.

Replace with 7 explicit lifecycle phases wired through install.rs and
update.rs: Preparing (5%), PullingImage (20%), CreatingContainer (70%),
StartingContainer (80%), WaitingHealthy (88%), PostInstall (95%),
Done (100%). Each maps to a fixed UI progress and status message.

Frontend PHASE_INFO mapper in stores/server.ts prioritizes phase when
present, falls back to byte-counter for legacy. A Math.max forward-only
guard ensures the bar never regresses. Deleted the duplicate watcher
in Discover.vue that was fighting the store's watcher with stale byte
logic. Added shimmer CSS on the fill (with prefers-reduced-motion
opt-out) so the bar looks alive during long phases.
This commit is contained in:
archipelago
2026-04-23 07:58:43 -04:00
parent 576ff1a6de
commit 7e62ea07f7
8 changed files with 224 additions and 29 deletions

View File

@@ -150,9 +150,22 @@ export const ServiceStatus = {
export type ServiceStatus = typeof ServiceStatus[keyof typeof ServiceStatus]
export type InstallPhase =
| 'preparing'
| 'pulling-image'
| 'creating-container'
| 'starting-container'
| 'waiting-healthy'
| 'post-install'
| 'done'
export interface InstallProgress {
size: number
downloaded: number
/** High-level pipeline phase. Preferred by the UI over the byte
* counters — podman pull doesn't emit parseable progress when
* stderr is piped, so byte counters are usually (0,0). */
phase?: InstallPhase
}
// RPC Request/Response types