Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
Simulate sending feedback in dev
Joseph T. Lyons7ba7b925ff77
diff --git a/Cargo.lock b/Cargo.lockindex ba868ebbae5..52fadb73e19 100644--- a/Cargo.lock+++ b/Cargo.lock@@ -3265,6 +3265,7 @@ dependencies = ["serde_derive","settings2","smallvec",+ "smol","sysinfo","theme2","tree-sitter-markdown",diff --git a/crates/feedback2/Cargo.toml b/crates/feedback2/Cargo.tomlindex 560c5a307f9..0e34ee410b5 100644--- a/crates/feedback2/Cargo.toml+++ b/crates/feedback2/Cargo.toml@@ -26,16 +26,17 @@ ui = { package = "ui2", path = "../ui2" }util = { path = "../util" }workspace = { package = "workspace2", path = "../workspace2"}-log.workspace = true-futures.workspace = trueanyhow.workspace = true-smallvec.workspace = true+futures.workspace = truehuman_bytes = "0.4.1"isahc.workspace = truelazy_static.workspace = true+log.workspace = truepostage.workspace = trueserde.workspace = trueserde_derive.workspace = true+smallvec.workspace = true+smol.workspace = truesysinfo.workspace = truetree-sitter-markdown = { git = "https://github.com/MDeiml/tree-sitter-markdown", rev = "330ecab87a3e3a7211ac69bbadc19eabecdb1cca" }urlencoding = "2.1.2"diff --git a/crates/feedback2/src/feedback_modal.rs b/crates/feedback2/src/feedback_modal.rsindex e5c1ccdc9d1..d1c6572f3e1 100644--- a/crates/feedback2/src/feedback_modal.rs+++ b/crates/feedback2/src/feedback_modal.rs@@ -22,6 +22,7 @@ use crate::{system_specs::SystemSpecs, GiveFeedback, OpenZedCommunityRepo};// For UI testing purposesconst SEND_SUCCESS_IN_DEV_MODE: bool = true;+const SEND_TIME_IN_DEV_MODE: Duration = Duration::from_secs(2);// Temporary, until tests are in place#[cfg(debug_assertions)]@@ -273,6 +274,8 @@ impl FeedbackModal {system_specs: SystemSpecs,) -> anyhow::Result<()> {if DEV_MODE {+ smol::Timer::after(SEND_TIME_IN_DEV_MODE).await;+if SEND_SUCCESS_IN_DEV_MODE {return Ok(());} else {