fix: remove tea.Println causing misaligned status messages

This commit is contained in:
2025-11-05 13:38:34 +00:00
parent 0c626fd047
commit 07b3c746d4
13 changed files with 4 additions and 15 deletions

View File

@ -4,8 +4,8 @@ This directory contains pre-compiled binaries for the DB Backup Tool across mult
## Build Information
- **Version**: 1.1.0
- **Build Time**: 2025-11-05_13:33:17_UTC
- **Git Commit**: b44ee26
- **Build Time**: 2025-11-05_13:37:59_UTC
- **Git Commit**: 0c626fd
## Recent Updates (v1.1.0)
- ✅ 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

@ -12,7 +12,6 @@ import (
"dbbackup/internal/config"
"dbbackup/internal/database"
"dbbackup/internal/logger"
"dbbackup/internal/progress"
)
// BackupExecutionModel handles backup execution with progress
@ -48,18 +47,8 @@ func NewBackupExecution(cfg *config.Config, log logger.Logger, parent tea.Model,
func (m BackupExecutionModel) Init() tea.Cmd {
reporter := NewTUIProgressReporter()
reporter.AddCallback(func(ops []progress.OperationStatus) {
if len(ops) == 0 {
return
}
latest := ops[len(ops)-1]
tea.Println(backupProgressMsg{
status: latest.Message,
progress: latest.Progress,
detail: latest.Status,
})
})
// 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(
executeBackupWithTUIProgress(m.config, m.logger, m.backupType, m.databaseName, m.ratio, reporter),