You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Synrk can't sync some forks even though the TUI display "Synchronization Done" #30
Synchronization with upstream repository doesn't work for certain forks. The TUI display "Synchronization Done" but the fork are still behind the upstream repositories and there is no ✓ mark display.
Current Behavior
synrk can't synchronize forks which are fall behind their corresponding upstream repository.
Acceptance Criteria
synrk should synchronize forks which are fall behind their corresponding upstream repository.
Validation
Require to validate with synrk -t <github_token> and do navigate through forks select with space and then merge with m.
Bug 1 — nil pointer panic in SyncBranchWithUpstreamRepo (internal/synrk/synrk.go):
The code accessed resp.StatusCodebefore checking err. On transport-level failures (timeout, DNS error), resp is nil, causing a panic. Fixed by checking err != nil first, and only then checking resp.StatusCode within the error branch (guarded by resp != nil).
Bug 2 — sync errors silently hidden in the UI (internal/ui/item.go):
When a sync failed, item.errMsg was populated by mergeReposCmd but Title() and Description() only checked i.repo.Error (a fetch-phase error), never i.errMsg. So failed syncs showed the ● (selected) icon instead of ⨯ (error), while the title still said "✅ Synchronization Done" — giving no feedback to the user.
Fixed by updating Title() to check i.errMsg != "" alongside i.repo.Error, and adding an errMsg branch to Description() that shows the sync failure reason.
Activity
thetnaingtn commentedon May 17, 2026
@claude fix this issue
claude commentedon May 17, 2026
Claude finished @thetnaingtn's task in 14m 10s —— View job •
claude/issue-30-20260517-0437• Create PR ➔Fixing: Sync not working despite showing "Synchronization Done"
SyncBranchWithUpstreamReponil resp dereferenceerrMsgRoot cause analysis:
Two bugs were found and fixed:
Bug 1 — nil pointer panic in
SyncBranchWithUpstreamRepo(internal/synrk/synrk.go):The code accessed
resp.StatusCodebefore checkingerr. On transport-level failures (timeout, DNS error),respisnil, causing a panic. Fixed by checkingerr != nilfirst, and only then checkingresp.StatusCodewithin the error branch (guarded byresp != nil).Bug 2 — sync errors silently hidden in the UI (
internal/ui/item.go):When a sync failed,
item.errMsgwas populated bymergeReposCmdbutTitle()andDescription()only checkedi.repo.Error(a fetch-phase error), neveri.errMsg. So failed syncs showed the●(selected) icon instead of⨯(error), while the title still said "✅ Synchronization Done" — giving no feedback to the user.Fixed by updating
Title()to checki.errMsg != ""alongsidei.repo.Error, and adding anerrMsgbranch toDescription()that shows the sync failure reason.|