Skip to content

fix: surface sync errors in UI and fix nil resp dereference - #32

Open
thetnaingtn wants to merge 1 commit into
mainfrom
claude/issue-30-20260517-0437
Open

fix: surface sync errors in UI and fix nil resp dereference#32
thetnaingtn wants to merge 1 commit into
mainfrom
claude/issue-30-20260517-0437

Conversation

@thetnaingtn

Copy link
Copy Markdown
Owner

Fixes two bugs that caused forks to appear un-synced with no feedback:

  • SyncBranchWithUpstreamRepo accessed resp.StatusCode before checking err, panicking when resp is nil on network failures.
  • item.errMsg was set on sync failure but never used in Title() or Description(), so failed syncs showed ● instead of ⨯ and the error reason was invisible.

Fixes #30

Generated with Claude Code

SyncBranchWithUpstreamRepo previously accessed resp.StatusCode before
checking err, causing a nil pointer panic on transport-level failures.
Fix by checking err first, then resp.StatusCode within the error branch.

item.errMsg was populated on sync failure but never used in Title() or
Description(), so failed syncs silently showed as selected (●) instead
of error (⨯) while the title still said "Synchronization Done". Now
both Title() and Description() check errMsg so users see the error icon
and the reason the sync failed.

Fixes #30

Co-authored-by: Thet Naing Tun <thetnaingtn@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Synrk can't sync some forks even though the TUI display "Synchronization Done"

1 participant