From 510fe001b82e7b726835f0d064f07095afd813b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ahmet=20Kaan=20G=C3=BCm=C3=BC=C5=9F?= Date: Tue, 1 Dec 2026 02:17:04 +0300 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20fix:=20windows=20x86=5F64=20v1?= =?UTF-8?q?=20is=20cmpxchg16b+sse3=20(rust's=20windows=20baseline)=20so=20?= =?UTF-8?q?it=20gets=20its=20real=20target=20instead=20of=20custom;=20Powe?= =?UTF-8?q?rShell=20progress=20silenced.=20Published=20releases=20drop=20t?= =?UTF-8?q?he=20online=20count,=20the=20Clients=20card=20is=20the=20one=20?= =?UTF-8?q?place=20for=20who=20runs=20what?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- crates/client/build.rs | 4 +++- crates/client/src/gui/builder/releases.rs | 17 ++--------------- crates/client/src/release.rs | 1 + crates/common/src/model.rs | 1 - crates/server/src/call/release.rs | 11 +++-------- crates/server/src/hub.rs | 9 --------- 6 files changed, 9 insertions(+), 34 deletions(-) diff --git a/crates/client/build.rs b/crates/client/build.rs index a3d77d3..5a2a245 100644 --- a/crates/client/build.rs +++ b/crates/client/build.rs @@ -21,6 +21,7 @@ const COLORS: [&str; 10] = [ ]; const SCALES: [&str; 6] = ["space", "radius", "stroke", "text", "size", "leading"]; const V1: &[&str] = &["fxsr", "sse", "sse2"]; +const V1_WINDOWS: &[&str] = &["cmpxchg16b", "fxsr", "sse", "sse2", "sse3"]; const V3: &[&str] = &[ "avx", "avx2", @@ -379,7 +380,8 @@ fn target() { .collect(); features.sort_unstable(); let target = match (arch.as_str(), features.as_slice()) { - ("x86_64", V1) => format!("x86_64_v1-{os}"), + ("x86_64", V1) if os != "windows" => format!("x86_64_v1-{os}"), + ("x86_64", V1_WINDOWS) if os == "windows" => format!("x86_64_v1-{os}"), ("x86_64", V3) => format!("x86_64_v3-{os}"), ("x86_64", _) => "custom".to_string(), _ => format!("{arch}-{os}"), diff --git a/crates/client/src/gui/builder/releases.rs b/crates/client/src/gui/builder/releases.rs index ab2205a..51da8b8 100644 --- a/crates/client/src/gui/builder/releases.rs +++ b/crates/client/src/gui/builder/releases.rs @@ -4,7 +4,7 @@ use common::{ }; use gpui_kit::{ AnyElement, Context, Div, Entity, Hsla, IntoElement, ParentElement, PathPromptOptions, Styled, - Task, Window, assets::IconName, component::Icon, div, px, + Task, Window, div, px, }; use std::{path::PathBuf, time::Duration}; @@ -16,7 +16,7 @@ use crate::gui::{ entity_action, millis_time, notify_error, parts::{self, Fill, Press}, storage, - style::{size, space, text}, + style::{space, text}, text, }; use crate::lang::w; @@ -306,7 +306,6 @@ fn release_row( .map(|file| file.target.as_str()) .collect::>() .join(", "); - let online: u64 = release.files.iter().map(|file| file.online).sum(); let control = if pending && !required { parts::button( format!("confirm_release_{seq}"), @@ -355,18 +354,6 @@ fn release_row( millis_time(release.created_ms, w().common.date), palette.muted, )) - .child( - div() - .flex() - .items_center() - .gap(px(space::XS)) - .child( - Icon::new(IconName::Users) - .size(px(size::ICON)) - .text_color(palette.muted), - ) - .child(caption_text(online.to_string(), palette.muted)), - ) .child(control) } diff --git a/crates/client/src/release.rs b/crates/client/src/release.rs index 13a2fb4..8dd838f 100644 --- a/crates/client/src/release.rs +++ b/crates/client/src/release.rs @@ -328,6 +328,7 @@ fn scp(key: &Path) -> Command { } fn ps(key: &Path, script: &str) -> Command { + let script = format!("$ProgressPreference = 'SilentlyContinue'\n{script}"); let bytes: Vec = script.encode_utf16().flat_map(u16::to_le_bytes).collect(); let mut cmd = ssh(key); cmd.args([ diff --git a/crates/common/src/model.rs b/crates/common/src/model.rs index ac29792..ca9b661 100644 --- a/crates/common/src/model.rs +++ b/crates/common/src/model.rs @@ -444,7 +444,6 @@ pub struct ReleaseFile { pub target: String, pub size: u64, pub packed: u64, - pub online: u64, } #[derive(Debug, Clone, PartialEq, Eq, Encode, Decode)] diff --git a/crates/server/src/call/release.rs b/crates/server/src/call/release.rs index 7c0e7ba..0a5f2f8 100644 --- a/crates/server/src/call/release.rs +++ b/crates/server/src/call/release.rs @@ -12,7 +12,7 @@ use crate::{ publish::To, }; -fn info(entry: db::release::Entry, builds: &[Sha]) -> ReleaseInfo { +fn info(entry: db::release::Entry) -> ReleaseInfo { ReleaseInfo { seq: entry.seq, required: entry.required, @@ -21,7 +21,6 @@ fn info(entry: db::release::Entry, builds: &[Sha]) -> ReleaseInfo { .files .into_iter() .map(|file| ReleaseFile { - online: builds.iter().filter(|build| **build == file.file).count() as u64, target: file.target, size: file.size, packed: file.packed, @@ -32,13 +31,9 @@ fn info(entry: db::release::Entry, builds: &[Sha]) -> ReleaseInfo { impl Handle for ListReleases { async fn handle(self, _: Me, cx: &mut Cx<'_>) -> Result, ServerError> { - let builds = cx.sh.services.hub.builds(); let entries = db::release::entries(cx.db).await?; - Ok(entries - .into_iter() - .map(|entry| info(entry, &builds)) - .collect()) + Ok(entries.into_iter().map(info).collect()) } } @@ -88,7 +83,7 @@ impl Handle for PublishRelease { cx.sh.releases.discard(&stopped); cx.emit(To::Everyone, Event::Release); - Ok(info(entry, &cx.sh.services.hub.builds())) + Ok(info(entry)) } } diff --git a/crates/server/src/hub.rs b/crates/server/src/hub.rs index 26a2743..3b15eb4 100644 --- a/crates/server/src/hub.rs +++ b/crates/server/src/hub.rs @@ -170,15 +170,6 @@ impl Hub { total } - pub fn builds(&self) -> Vec { - self.0 - .lock() - .unwrap() - .values() - .filter_map(|client| client.build) - .collect() - } - pub fn installs(&self) -> Vec { self.0 .lock()