esync

Directory watching and remote syncing
Log | Files | Refs | README | LICENSE

commit 4b87514e176e443f899cc3a33a04ee4877caed7e
parent 25994f6e2dc6fb07f8fd9bf982d114c871a00778
Author: Erik Loualiche <[email protected]>
Date:   Sun,  8 Mar 2026 18:49:50 -0400

fix: right-align file count, size, and duration columns in dashboard

Separate file count from Size field and render each as a fixed-width
right-aligned column so rows stay aligned regardless of content.

Co-Authored-By: Claude Opus 4.6 <[email protected]>

Diffstat:
Mcmd/sync.go | 3---
Minternal/tui/dashboard.go | 7++++++-
2 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/cmd/sync.go b/cmd/sync.go @@ -231,9 +231,6 @@ func runTUI(cfg *config.Config, s *syncer.Syncer) error { bytes = result.BytesTotal * int64(g.count) / int64(totalGroupFiles) } size := formatSize(bytes) - if g.count > 1 { - size = fmt.Sprintf("%d files %s", g.count, formatSize(bytes)) - } syncCh <- tui.SyncEvent{ File: file, Size: size, diff --git a/internal/tui/dashboard.go b/internal/tui/dashboard.go @@ -323,7 +323,12 @@ func (m DashboardModel) renderEvent(evt SyncEvent, focused bool, nameWidth int) } detail := "" if evt.Size != "" { - detail = dimStyle.Render(fmt.Sprintf(" %s %s", evt.Size, evt.Duration.Truncate(100*time.Millisecond))) + dur := fmt.Sprintf("%s", evt.Duration.Truncate(100*time.Millisecond)) + count := "" + if evt.FileCount > 1 { + count = fmt.Sprintf("%d files", evt.FileCount) + } + detail = dimStyle.Render(fmt.Sprintf("%8s %7s %5s", count, evt.Size, dur)) } icon := statusSynced.Render("✓") return marker + ts + " " + icon + " " + name + detail