diff --git a/src/ui/app_card.rs b/src/ui/app_card.rs index 71fdced..99152e4 100644 --- a/src/ui/app_card.rs +++ b/src/ui/app_card.rs @@ -86,10 +86,8 @@ pub fn build_app_card(record: &AppImageRecord) -> gtk::FlowBoxChild { } } - // Single most important badge (priority: Update > FUSE issue > Wayland issue) - let badge = build_priority_badge(record); - let has_badge = badge.is_some(); - if let Some(badge) = badge { + // Single most important badge (priority: Update > FUSE issue) + if let Some(badge) = build_priority_badge(record) { let badge_box = gtk::Box::builder() .orientation(gtk::Orientation::Horizontal) .halign(gtk::Align::Center) @@ -99,13 +97,6 @@ pub fn build_app_card(record: &AppImageRecord) -> gtk::FlowBoxChild { card.append(&badge_box); } - // Status border: green for healthy, amber for attention needed - if record.integrated && !has_badge { - card.add_css_class("status-ok"); - } else if has_badge { - card.add_css_class("status-attention"); - } - let child = gtk::FlowBoxChild::builder() .child(&card) .build(); @@ -119,32 +110,28 @@ pub fn build_app_card(record: &AppImageRecord) -> gtk::FlowBoxChild { } /// Return the single most important badge for a record. -/// Priority: Analyzing > Update available > FUSE issue > Wayland issue. +/// Priority: Analyzing > Update available > FUSE issue > Portable. +/// Wayland details are left to the detail view. pub fn build_priority_badge(record: &AppImageRecord) -> Option { - // 0. Analysis in progress (highest priority) + // 0. Analysis in progress if record.app_name.is_none() && record.analysis_status.as_deref() != Some("complete") { return Some(widgets::status_badge("Analyzing...", "info")); } - // 1. Update available (highest priority) + // 1. Update available if let (Some(ref latest), Some(ref current)) = (&record.latest_version, &record.app_version) { if crate::core::updater::version_is_newer(latest, current) { return Some(widgets::status_badge("Update", "info")); } } - // 2. FUSE issue - // The database stores AppImageFuseStatus values (per-app), not FuseStatus (system). - // Check both: per-app statuses like "native_fuse"/"static_runtime" are fine, - // "extract_and_run" is slow but works, "cannot_launch" is a real problem. - // System statuses like "fully_functional" are also fine. + // 2. FUSE issue (cannot launch) if let Some(ref fs) = record.fuse_status { let is_ok = matches!( fs.as_str(), - "native_fuse" | "static_runtime" | "fully_functional" + "native_fuse" | "static_runtime" | "fully_functional" | "extract_and_run" ); - let is_slow = fs.as_str() == "extract_and_run"; - if !is_ok && !is_slow { + if !is_ok { return Some(widgets::status_badge("Needs setup", "warning")); } } @@ -154,14 +141,6 @@ pub fn build_priority_badge(record: &AppImageRecord) -> Option { return Some(widgets::status_badge("Portable", "info")); } - // 4. Wayland issue (not Native or Unknown) - if let Some(ref ws) = record.wayland_status { - let status = WaylandStatus::from_str(ws); - if status != WaylandStatus::Unknown && status != WaylandStatus::Native { - return Some(widgets::status_badge("May look blurry", "neutral")); - } - } - None }