fix: prevent install buttons showing before first container scan
Added containers_scanned flag to StatusInfo in the data model. Starts false, set to true after the first Podman scan completes (~15s after boot). Marketplace now shows a shimmer "Checking..." indicator on app buttons until the scan finishes, preventing users from accidentally re-installing apps that are already present but not yet enumerated. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -66,6 +66,10 @@ pub struct StatusInfo {
|
||||
pub backup_progress: Option<f32>,
|
||||
#[serde(rename = "update-progress")]
|
||||
pub update_progress: Option<f32>,
|
||||
/// True after the first container scan completes. Frontend should
|
||||
/// not show install buttons until this is true.
|
||||
#[serde(rename = "containers-scanned", default)]
|
||||
pub containers_scanned: bool,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)]
|
||||
@@ -253,6 +257,7 @@ impl DataModel {
|
||||
updated: false,
|
||||
backup_progress: None,
|
||||
update_progress: None,
|
||||
containers_scanned: false,
|
||||
},
|
||||
lan_address: Some("http://localhost:8100".to_string()),
|
||||
tor_address: None,
|
||||
|
||||
Reference in New Issue
Block a user