From 5f921838436b5ca2d41783df4186a2a2de4445a9 Mon Sep 17 00:00:00 2001 From: Steve Yegge Date: Thu, 18 Dec 2025 21:55:49 -0800 Subject: [PATCH] fix(mail): add crew worker detection in detectSender() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit detectSender() only detected polecats, not crew workers. Crew workers like Emma at /Users/stevey/gt/beads/crew/emma were incorrectly defaulting to mayor/ instead of getting their proper address. Added /crew/ directory pattern matching parallel to the existing /polecats/ detection, extracting rig/crewName address format. Fixes: gt-70b3 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 --- internal/cmd/mail.go | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/internal/cmd/mail.go b/internal/cmd/mail.go index 77d72b8b..ac2d13b4 100644 --- a/internal/cmd/mail.go +++ b/internal/cmd/mail.go @@ -468,6 +468,17 @@ func detectSender() string { } } + // If in a rig's crew directory, extract address + if strings.Contains(cwd, "/crew/") { + parts := strings.Split(cwd, "/crew/") + if len(parts) >= 2 { + rigPath := parts[0] + crewName := strings.Split(parts[1], "/")[0] + rigName := filepath.Base(rigPath) + return fmt.Sprintf("%s/%s", rigName, crewName) + } + } + // Default to mayor return "mayor/" }