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

Method GetCompletionPercentage

internal/tui/app.go:2232–2243  ·  view source on GitHub ↗

GetCompletionPercentage returns the percentage of completed stories.

()

Source from the content-addressed store, hash-verified

2230
2231// GetCompletionPercentage returns the percentage of completed stories.
2232func (a *App) GetCompletionPercentage() float64 {
2233 if len(a.prd.UserStories) == 0 {
2234 return 100.0
2235 }
2236 var completed int
2237 for _, s := range a.prd.UserStories {
2238 if s.Passes {
2239 completed++
2240 }
2241 }
2242 return float64(completed) / float64(len(a.prd.UserStories)) * 100.0
2243}
2244
2245// GetLastActivity returns the last activity message.
2246func (a *App) GetLastActivity() string {

Callers 1

renderProgressBarMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected