huskies: merge 1212 story Sled chat messages show "workspace" instead of the real project name

This commit is contained in:
Huskies Agent
2026-07-18 10:45:40 +00:00
parent 36ec6d0f93
commit b0f19eb0c5
4 changed files with 123 additions and 14 deletions
+6 -8
View File
@@ -411,16 +411,14 @@ pub(crate) fn spawn_gateway_relay(startup_root: &Option<PathBuf>, status: Arc<St
.unwrap_or_default();
if !relay_gateway_url.is_empty() {
// Same precedence chain (and same shared helper) as the notification
// listener uses (story 1212), so the relay's project name and chat
// notifications never drift apart.
let relay_project_name = startup_root
.as_ref()
.and_then(|r| config::ProjectConfig::load(r).ok())
.and_then(|c| c.gateway_project)
.or_else(|| std::env::var("HUSKIES_GATEWAY_PROJECT").ok())
.or_else(|| {
startup_root
.as_ref()
.and_then(|r| r.file_name())
.map(|n| n.to_string_lossy().into_owned())
.map(|r| {
let cfg = config::ProjectConfig::load(r).unwrap_or_default();
service::notifications::resolve_project_display_name(&cfg, r)
})
.unwrap_or_else(|| "project".to_string());