fix(statusline): ensure crew sessions have correct hook display
Root cause: tmux statusline showed wrong hook for all java crewmembers because GT_CREW env var wasn't set in tmux session environment. Changes: - statusline.go: Add early return in getHookedWork() when identity is empty to prevent returning ALL hooked beads regardless of assignee - crew_at.go: Call SetEnvironment in the restart path so sessions created before GT_CREW was being set get it on restart Fixes gt-zxnr. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -713,6 +713,12 @@ func getMailPreviewWithRoot(identity string, maxLen int, townRoot string) (int,
|
||||
// beadsDir should be the directory containing .beads (for rig-level) or
|
||||
// empty to use the town root (for town-level roles).
|
||||
func getHookedWork(identity string, maxLen int, beadsDir string) string {
|
||||
// Guard: identity must be non-empty to filter by assignee.
|
||||
// Without identity, the query would return ALL hooked beads regardless of assignee.
|
||||
if identity == "" {
|
||||
return ""
|
||||
}
|
||||
|
||||
// If no beadsDir specified, use town root
|
||||
if beadsDir == "" {
|
||||
var err error
|
||||
|
||||
Reference in New Issue
Block a user