fix: gt crew next returns success for non-crew sessions (gt-1s89v)

When run in a non-crew session (Mayor, Witness, Refinery, Deacon),
gt crew next/prev now returns success (exit 0) instead of an error.

These sessions don't have cycle groups, so pressing C-b n should
simply do nothing rather than fail with an error message.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Steve Yegge
2025-12-27 16:48:09 -08:00
parent 4934131272
commit 921e57309b

View File

@@ -37,7 +37,8 @@ func cycleCrewSession(direction int, sessionOverride string) error {
// Parse rig name from current session
rigName, _, ok := parseCrewSessionName(currentSession)
if !ok {
return fmt.Errorf("not in a crew session (expected gt-<rig>-crew-<name>)")
// Not a crew session (e.g., Mayor, Witness, Refinery) - no cycling, just stay put
return nil
}
// Find all crew sessions for this rig