diff options
| author | Fuwn <[email protected]> | 2026-01-26 09:49:21 +0000 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2026-01-26 09:49:21 +0000 |
| commit | f73812a26386b4b83ff694dcc7626bd93b50e102 (patch) | |
| tree | c977b011234e07ca683a268eb258f08331e5eca3 /internal/ui/ui.go | |
| parent | feat: Add linear mode for sequential operations (diff) | |
| download | mugi-f73812a26386b4b83ff694dcc7626bd93b50e102.tar.xz mugi-f73812a26386b4b83ff694dcc7626bd93b50e102.zip | |
style: Fix formatting inconsistencies
Diffstat (limited to 'internal/ui/ui.go')
| -rw-r--r-- | internal/ui/ui.go | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/internal/ui/ui.go b/internal/ui/ui.go index 45e0992..4e94ee2 100644 --- a/internal/ui/ui.go +++ b/internal/ui/ui.go @@ -109,11 +109,13 @@ func (m Model) Update(msg tea.Msg) (tea.Model, tea.Cmd) { case taskResult: key := taskKey(msg.task) + if msg.result.Error != nil { m.states[key] = taskFailed } else { m.states[key] = taskSuccess } + m.results[key] = msg.result m.currentTask++ @@ -177,11 +179,14 @@ func (m Model) View() string { if m.done { b.WriteString("\n") + success, failed := m.summary() + if failed > 0 { b.WriteString(failStyle.Render(fmt.Sprintf("%d failed", failed))) b.WriteString(", ") } + b.WriteString(successStyle.Render(fmt.Sprintf("%d succeeded", success))) b.WriteString("\n") } @@ -433,10 +438,12 @@ func (m InitModel) Update(msg tea.Msg) (tea.Model, tea.Cmd) { } else { m.states[msg.init.Path] = taskFailed } + m.results[msg.init.Path] = msg.result if m.allDone() { m.done = true + return m, tea.Quit } } |