fix: remove tea.Println causing misaligned status messages
This commit is contained in:
@ -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:33:17_UTC
|
- **Build Time**: 2025-11-05_13:37:59_UTC
|
||||||
- **Git Commit**: b44ee26
|
- **Git Commit**: 0c626fd
|
||||||
|
|
||||||
## 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.
@ -12,7 +12,6 @@ import (
|
|||||||
"dbbackup/internal/config"
|
"dbbackup/internal/config"
|
||||||
"dbbackup/internal/database"
|
"dbbackup/internal/database"
|
||||||
"dbbackup/internal/logger"
|
"dbbackup/internal/logger"
|
||||||
"dbbackup/internal/progress"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
// BackupExecutionModel handles backup execution with 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 {
|
func (m BackupExecutionModel) Init() tea.Cmd {
|
||||||
reporter := NewTUIProgressReporter()
|
reporter := NewTUIProgressReporter()
|
||||||
reporter.AddCallback(func(ops []progress.OperationStatus) {
|
// Note: Progress updates are handled through the model's internal state
|
||||||
if len(ops) == 0 {
|
// No need for callbacks that print to screen - the View() handles all display
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
latest := ops[len(ops)-1]
|
|
||||||
tea.Println(backupProgressMsg{
|
|
||||||
status: latest.Message,
|
|
||||||
progress: latest.Progress,
|
|
||||||
detail: latest.Status,
|
|
||||||
})
|
|
||||||
})
|
|
||||||
|
|
||||||
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, reporter),
|
||||||
|
|||||||
Reference in New Issue
Block a user