Problem:
In model_issues.go and model_prs.go, when a fetch fails m.err is set and the error box is displayed. When the user presses r to refresh, m.loading = true and m.loaded = false are set, but m.err is not cleared. If the user switches tabs and comes back before the refresh completes, silentFetchCmd fires (because m.loaded == true) but the stale error box persists until the new data arrives.
Solution:
Add m.err = nil alongside m.loading = true in the refresh key handler in both model_issues.go and model_prs.go.
Acceptance Criteria:
Problem:
In
model_issues.goandmodel_prs.go, when a fetch failsm.erris set and the error box is displayed. When the user pressesrto refresh,m.loading = trueandm.loaded = falseare set, butm.erris not cleared. If the user switches tabs and comes back before the refresh completes,silentFetchCmdfires (becausem.loaded == true) but the stale error box persists until the new data arrives.Solution:
Add
m.err = nilalongsidem.loading = truein the refresh key handler in bothmodel_issues.goandmodel_prs.go.Acceptance Criteria:
m.erris set tonilwhenever a manual refresh (r) is triggeredIssuesModelandPRsModel