Skip to content

Clear m.err when starting a list refresh #96

@joshuacrass

Description

@joshuacrass

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:

  • m.err is set to nil whenever a manual refresh (r) is triggered
  • The error box disappears immediately when refresh is triggered, replaced by the loading spinner
  • Fix applied to both IssuesModel and PRsModel

Metadata

Metadata

Assignees

No one assigned

    Labels

    effort:1Very small effort (< 1 hour)priority:mediumMedium priority - fix when possibletype:bugBug fix

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions