gabriel / musehub public
fix BREAKING fix/clone-url-and-fetch-timeout #1 / 1
AI Agent gabriel · 170 days ago · Apr 10, 2026 · Diff

fix: clone URL shows muse clone https:// and nginx fetch timeout 504

Bug 1: Repo home page sidebar showed 'muse remote add local musehub://owner/slug' - Wrong command (should be 'muse clone') - Wrong scheme (muse CLI does not understand musehub://, only http/https) - Hardcoded host (always showed musehub.ai even on staging)

Fix: ui_repo.py now passes clone_url built from request.base_url so it adapts to any host automatically. Service layer and MCP executor use settings.public_url (overridable via PUBLIC_URL env var). Template shows 'muse clone <url>'. Dead initCloneTabs/initCopyClone TS code removed.

Bug 2: 'muse clone' on large repos returned HTTP 504 — nginx gave only 60s to /fetch and /fetch/objects endpoints (location / default), but streaming all object bytes for a large repo easily exceeds that.

Fix: Added dedicated location block for fetch endpoints with 300s timeout, matching the existing push block.

Also adds settings.public_url field, deploy/ to Dockerfile and override bind-mount, and regression tests covering both bugs.

sha256:70fd807bda25cfacab9b301bc7be6ab01b27844b080454ac0eba25ea3657c7eb sha
+13 ~6 −3 symbols
sha256:92b919ead5b986bcc4656fad013f402f291144a2ea660299851f70ee6ad14d19 snapshot
+13
symbols added
~6
symbols modified
−3
symbols removed
0
dead code introduced
Semantic Changes 22 symbols
+ _make_repo function async_function _make_repo L30–45
+ AsyncClient import import AsyncClient L19–19
+ AsyncSession import import AsyncSession L20–20
+ MusehubRepo import import MusehubRepo L22–22
+ annotations import import annotations L14–14
+ json import import json L16–16
+ pytest import import pytest L18–18
+ test_nginx_config_fetch_endpoints_have_long_timeout function function test_nginx_config_fetch_endpoints_have_long_timeout L149–186
+ test_repo_home_clone_url_has_no_musehub_scheme function async_function test_repo_home_clone_url_has_no_musehub_scheme L69–84
+ test_repo_home_clone_url_uses_muse_clone_not_remote_add function async_function test_repo_home_clone_url_uses_muse_clone_not_remote_add L54–65
+ test_repo_home_clone_url_uses_request_host function async_function test_repo_home_clone_url_uses_request_host L88–107
+ test_repo_home_page_json_clone_url_is_valid_https function async_function test_repo_home_page_json_clone_url_is_valid_https L111–141
~ musehub/config.py .py 1 symbol modified
~ musehub/templates/musehub/static/js/pages/repo-page.ts .ts 2 symbols removed, 2 symbols modified
− initCloneTabs function function initCloneTabs L46–55
− initCopyClone function function initCopyClone L57–69
~ tests/test_musehub_repos.py .py 1 symbol added, 1 symbol removed
− test_create_repo_wizard_clone_url_uses_musehub_scheme function async_function test_create_repo_wizard_clone_url_uses_musehub_scheme L1640–1653
+ test_create_repo_wizard_clone_url_uses_https_scheme function async_function test_create_repo_wizard_clone_url_uses_https_scheme L1640–1658
← Older Oldest on fix/clone-url-and-fetch-timeout
All commits
Newer → Latest on fix/clone-url-and-fetch-timeout

0 comments

No comments yet. Be the first to start the discussion.

To add a comment, use the Muse CLI: muse hub commit comment sha256:70fd807bda25cfacab9b301bc7be6ab01b27844b080454ac0eba25ea3657c7eb --body "your comment"