Fix TUI corruption on git clone/sync failures and display error details#11
Fix TUI corruption on git clone/sync failures and display error details#11
Conversation
… in non-verbose mode Co-authored-by: Dids <[email protected]>
Co-authored-by: Dids <[email protected]>
|
@copilot Blindly suppressing errors is a no go. The user needs to be aware of errors, so they should be shown somewhere, either during sync, after the sync or as dialogs of some sort. You decide the best approach here, but think about the UI and UX for the TUI approach. |
Co-authored-by: Dids <[email protected]>
Co-authored-by: Dids <[email protected]>
You're absolutely right. I've updated the implementation to display error messages to users while still preventing TUI corruption. The errors now appear in a dedicated "Failed repositories" section in the completion summary, showing:
This approach keeps the TUI layout clean during sync (no stdout interference) while ensuring users see exactly what went wrong after sync completes. Changes in commits: |
When git operations fail in TUI mode, error messages were printed directly to stdout, breaking the terminal layout and corrupting progress displays. This PR fixes the corruption issue while ensuring users are informed about failures.
Changes
internal/sync/sync.go: Guard all
fmt.Printfcalls withs.opts.VerbosecheckssyncSingleRepo(2 locations)syncWorkerandsyncSingleRepo(4 locations)internal/tui/screens/sync_progress.go: Add error tracking and display
failedReposmap to capture error messages during syncIn TUI mode, the syncer runs with
Verbose: falseand Git in quiet mode, so all progress is communicated via callbacks (s.reportProgress). The unguarded print statements bypassed that mechanism, breaking the layout. Errors are now captured and displayed in a dedicated section after sync completes.Example
Code changes:
UI changes:
Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.