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

Method clearInProgress

internal/tui/app.go:2176–2189  ·  view source on GitHub ↗

clearInProgress clears all in-progress flags by setting each in-progress story's status to "todo" in the markdown file, then reloads.

()

Source from the content-addressed store, hash-verified

2174// clearInProgress clears all in-progress flags by setting each in-progress
2175// story's status to "todo" in the markdown file, then reloads.
2176func (a *App) clearInProgress() {
2177 dirty := false
2178 for _, story := range a.prd.UserStories {
2179 if story.InProgress {
2180 _ = prd.SetStoryStatus(a.prdPath, story.ID, "todo")
2181 dirty = true
2182 }
2183 }
2184 if dirty {
2185 if p, err := prd.LoadPRD(a.prdPath); err == nil {
2186 a.prd = p
2187 }
2188 }
2189}
2190
2191// selectStoryByID sets the selected index to the story with the given ID.
2192func (a *App) selectStoryByID(storyID string) {

Callers 1

handleLoopEventMethod · 0.95

Calls 2

SetStoryStatusFunction · 0.92
LoadPRDFunction · 0.92

Tested by

no test coverage detected