Skip to content

GitHub repo preview lacks structured metadata (unlike HF models) #32

@SahilKumar75

Description

@SahilKumar75

Problem

When a GitHub repository URL is pasted, the workspace only shows minimal info:

  • Generic "GitHub repository" badge
  • Repo name
  • Hardcoded description: "GitHub repository ready for import and training setup."
  • Empty Model Details card

This is in stark contrast to HF model links which fetch rich structured data (architecture, parameters, pipeline, license, tags, README, benchmark results).

Expected Behaviour

GitHub repos should fetch and display structured metadata from the GitHub API, including:

  • Description — repo description from GitHub API
  • Stats — stars, forks, open issues, watchers
  • Language — primary programming language
  • Topics/Tags — repo topics as tag pills
  • License — license type
  • Last updated / Created — timestamps
  • README — rendered markdown from README.md
  • Model Details — auto-detect if it's an ML repo (presence of requirements.txt, model files, config files like config.json, tokenizer.json) and surface relevant fields

Current Behaviour

All GitHub repos show the same hardcoded placeholder data regardless of what the repo actually contains.

Root Cause

_fetch_github_preview() in app/state/app_state.py makes a GitHub API call but does not populate the structured preview fields (preview_architecture, preview_params, preview_tags, preview_readme, etc.) that the workspace UI expects.

Steps to Reproduce

  1. Paste any GitHub URL (e.g. https://github.com/ggerganov/llama.cpp)
  2. Confirm the preview
  3. Observe the workspace shows empty Model Details and no README/tags

Suggested Fix

Extend _fetch_github_preview() to:

  1. Call GET /repos/{owner}/{repo} for description, stars, forks, language, license, topics
  2. Call GET /repos/{owner}/{repo}/readme for README content
  3. Map the response fields to the same preview_* state vars used by HF previews

Environment

  • TuneOS app/state/app_state.py_fetch_github_preview method
  • Reflex frontend workspace view — app/pages/landing.py

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions