Skip to content

Commit 784c7a8

Browse files
jedardenclaude
andcommitted
fix: attachment indicator disappearing with multiple tmux clients
The #{session_attached} tmux variable returns the count of attached clients, not a boolean. When connecting from a second computer (2 clients attached), the check `attached == 1` failed, causing the 📎 indicator to disappear. Changed to `attached > 0` to correctly detect when any client is attached. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 2f3725c commit 784c7a8

2 files changed

Lines changed: 10 additions & 2 deletions

File tree

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,14 @@ All notable changes to ccdash will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [0.7.18] - 2026-01-17
9+
10+
### Fixed
11+
- **Attached indicator (📎) disappearing with multiple clients**: Fixed bug where the attachment indicator would disappear when connecting to a tmux session from a second computer
12+
- Root cause: `#{session_attached}` returns the count of attached clients, not a boolean
13+
- The check `attached == 1` failed when 2+ clients were attached
14+
- Solution: Changed to `attached > 0` to correctly detect any attached clients
15+
816
## [0.7.17] - 2026-01-16
917

1018
### Added

internal/metrics/tmux.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -318,12 +318,12 @@ func (tc *TmuxCollector) parseSessionLine(line string) (TmuxSession, error) {
318318
}
319319
session.Windows = windows
320320

321-
// Parse attached status (1 = attached, 0 = detached)
321+
// Parse attached status (number of clients attached, 0 = detached)
322322
attached, err := strconv.Atoi(parts[2])
323323
if err != nil {
324324
return TmuxSession{}, fmt.Errorf("invalid attached status: %s", parts[2])
325325
}
326-
session.Attached = attached == 1
326+
session.Attached = attached > 0
327327

328328
// Parse created timestamp (Unix timestamp)
329329
createdUnix, err := strconv.ParseInt(parts[3], 10, 64)

0 commit comments

Comments
 (0)