fix: completely silent TUI - no stdout indicators

This commit is contained in:
2025-11-05 13:47:20 +00:00
parent 07b3c746d4
commit e2596c4207
13 changed files with 7 additions and 9 deletions

View File

@ -4,8 +4,8 @@ This directory contains pre-compiled binaries for the DB Backup Tool across mult
## Build Information ## Build Information
- **Version**: 1.1.0 - **Version**: 1.1.0
- **Build Time**: 2025-11-05_13:37:59_UTC - **Build Time**: 2025-11-05_13:46:28_UTC
- **Git Commit**: 0c626fd - **Git Commit**: 07b3c74
## Recent Updates (v1.1.0) ## Recent Updates (v1.1.0)
- ✅ Fixed TUI progress display with line-by-line output - ✅ Fixed TUI progress display with line-by-line output

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
dbbackup

Binary file not shown.

View File

@ -46,12 +46,9 @@ func NewBackupExecution(cfg *config.Config, log logger.Logger, parent tea.Model,
} }
func (m BackupExecutionModel) Init() tea.Cmd { func (m BackupExecutionModel) Init() tea.Cmd {
reporter := NewTUIProgressReporter() // TUI handles all display through View() - no progress callbacks needed
// Note: Progress updates are handled through the model's internal state
// No need for callbacks that print to screen - the View() handles all display
return tea.Batch( return tea.Batch(
executeBackupWithTUIProgress(m.config, m.logger, m.backupType, m.databaseName, m.ratio, reporter), executeBackupWithTUIProgress(m.config, m.logger, m.backupType, m.databaseName, m.ratio),
backupTickCmd(), backupTickCmd(),
) )
} }
@ -75,7 +72,7 @@ type backupCompleteMsg struct {
err error err error
} }
func executeBackupWithTUIProgress(cfg *config.Config, log logger.Logger, backupType, dbName string, ratio int, reporter *TUIProgressReporter) tea.Cmd { func executeBackupWithTUIProgress(cfg *config.Config, log logger.Logger, backupType, dbName string, ratio int) tea.Cmd {
return func() tea.Msg { return func() tea.Msg {
// Use configurable cluster timeout (minutes) from config; default set in config.New() // Use configurable cluster timeout (minutes) from config; default set in config.New()
clusterTimeout := time.Duration(cfg.ClusterTimeoutMinutes) * time.Minute clusterTimeout := time.Duration(cfg.ClusterTimeoutMinutes) * time.Minute
@ -100,7 +97,8 @@ func executeBackupWithTUIProgress(cfg *config.Config, log logger.Logger, backupT
} }
} }
engine := backup.NewSilent(cfg, log, dbClient, reporter) // Pass nil as indicator - TUI itself handles all display, no stdout printing
engine := backup.NewSilent(cfg, log, dbClient, nil)
var backupErr error var backupErr error
switch backupType { switch backupType {