MCPcopy Create free account
hub / github.com/MiniCodeMonkey/chief / handleCleanResult

Method handleCleanResult

internal/tui/app.go:1808–1825  ·  view source on GitHub ↗

handleCleanResult handles the result of an async clean operation.

(msg cleanResultMsg)

Source from the content-addressed store, hash-verified

1806
1807// handleCleanResult handles the result of an async clean operation.
1808func (a App) handleCleanResult(msg cleanResultMsg) (tea.Model, tea.Cmd) {
1809 a.picker.CancelCleanConfirmation()
1810 a.picker.SetCleanResult(&CleanResult{
1811 Success: msg.success,
1812 Message: msg.message,
1813 })
1814
1815 if msg.success {
1816 // Clear worktree info from manager
1817 if a.manager != nil {
1818 a.manager.ClearWorktreeInfo(msg.prdName, msg.clearBranch)
1819 }
1820 a.picker.Refresh()
1821 a.lastActivity = fmt.Sprintf("Cleaned worktree for %s", msg.prdName)
1822 }
1823
1824 return a, nil
1825}
1826
1827// renderHelpView renders the help overlay.
1828func (a *App) renderHelpView() string {

Callers 1

UpdateMethod · 0.95

Calls 4

SetCleanResultMethod · 0.80
ClearWorktreeInfoMethod · 0.80
RefreshMethod · 0.45

Tested by

no test coverage detected