Skip to content

ux(repos): misleading 'Clone failed' status — improve clone error UX #178

@hashedone

Description

@hashedone

Problem

The repo detail page shows a red 'Clone failed' badge when clone_status = 'error' in the DB. This is confusing because:

  1. The error state persists indefinitely from a previous failed attempt, even if the root cause is now fixed (e.g. deploy key was regenerated)
  2. 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
  3. 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

  1. Show error details — when clone_status = 'error' store and display the error message (already available in the Rust logs as the git stderr output)
  2. Retry button on the error badge — instead of requiring the user to find the Sync button, show a 'Retry' action inline with the badge
  3. Success toast or status update after a successful re-clone so the user knows it worked
  4. 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    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