Problem
The repo detail page shows a red 'Clone failed' badge when clone_status = 'error' in the DB. This is confusing because:
- The error state persists indefinitely from a previous failed attempt, even if the root cause is now fixed (e.g. deploy key was regenerated)
- Clicking 'Sync Repository' silently retriggers the clone and clears the error if it succeeds — but there's no success feedback, so the user doesn't know it worked
- The badge shows no details about why the clone failed (expired key? wrong URL? network issue?)
Observed behaviour
User sees 'Clone failed' → clicks 'Sync Repository' → badge disappears → no confirmation it succeeded
Desired behaviour
- Show error details — when
clone_status = 'error' store and display the error message (already available in the Rust logs as the git stderr output)
- Retry button on the error badge — instead of requiring the user to find the Sync button, show a 'Retry' action inline with the badge
- Success toast or status update after a successful re-clone so the user knows it worked
- Auto-clear stale errors — if the repo was successfully cloned at some point (
clone_path is set) but clone_status = 'error' from a later failed fetch, show a softer warning rather than 'Clone failed'
Implementation notes
crates/tracevault-server/src/repo_manager.rs already writes the clone error string to logs — store it in a clone_error column on repos
- The sync endpoint could return the error message in its response so the UI can surface it
- The polling loop in
handleSync already detects clone_status = 'ready' — extend it to also detect 'error' and show the message
Problem
The repo detail page shows a red 'Clone failed' badge when
clone_status = 'error'in the DB. This is confusing because:Observed behaviour
User sees 'Clone failed' → clicks 'Sync Repository' → badge disappears → no confirmation it succeeded
Desired behaviour
clone_status = 'error'store and display the error message (already available in the Rust logs as the git stderr output)clone_pathis set) butclone_status = 'error'from a later failed fetch, show a softer warning rather than 'Clone failed'Implementation notes
crates/tracevault-server/src/repo_manager.rsalready writes the clone error string to logs — store it in aclone_errorcolumn onreposhandleSyncalready detectsclone_status = 'ready'— extend it to also detect'error'and show the message