Skip to content

[FR] Improve UX for empty repositories #821

@harrison-xrb

Description

@harrison-xrb

Feature Description

When a repository is empty, Sourcebot currently displays a generic error such as "Error loading tree preview". This can confuse users by making it seem like there is a problem with syncing or an internal error, when in reality the repository is simply empty.

Image

Image

Image

Proposed improvements:

  • Detect when a repository is empty (no commits or no files in the default branch).
  • Display a clear, user-friendly message in the main UI and file tree panel, like "This repository is empty".
  • Ensure no misleading error states or sync suggestions are shown when a repo is simply empty.
  • Optionally, provide a hint for users to initialize the repository if it is empty.

Benefits:

  • Prevents user confusion about repo sync issues or technical errors.
  • Communicates the actual repo state, improving clarity and onboarding.
  • Aligns Sourcebot UX with GitHub's behaviour for empty repositories.

User Story
As a user viewing a repository with Sourcebot, if the repo is empty, I want to see a clear message that the repository is empty, so I don't think there's an error or bug syncing the repo.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions