From e78ab6b64f9aeb0d9dfdff5784578417681e93a7 Mon Sep 17 00:00:00 2001 From: forthfate Date: Thu, 24 Sep 2026 23:33:08 +0900 Subject: [PATCH 1/2] fix: serve bundled frontend from wheel --- backend/app/main.py | 15 +++++++++++++-- backend/tests/test_api.py | 14 ++++++++++++++ 2 files changed, 27 insertions(+), 2 deletions(-) diff --git a/backend/app/main.py b/backend/app/main.py index c83c101..0dea59a 100644 --- a/backend/app/main.py +++ b/backend/app/main.py @@ -86,8 +86,19 @@ async def application_lifespan(_: FastAPI): # leftover local pipeline as interrupted when it starts. store = ConsoleStore(recover_interrupted_runs=True) assistant_ui_broker = AssistantUiBroker() -WEB_DIST = Path(__file__).resolve().parents[2] / "frontend" / "dist" -SDK_DOCS_DIST = Path(__file__).resolve().parents[2] / "site" + + +def bundled_directory(relative_path: Path, roots: tuple[Path, ...] | None = None) -> Path: + """Find bundled files in a wheel, with a source checkout as the fallback.""" + if roots is None: + module_path = Path(__file__).resolve() + roots = (module_path.parents[1], module_path.parents[2]) + candidates = tuple(root / relative_path for root in roots) + return next((candidate for candidate in candidates if candidate.exists()), candidates[-1]) + + +WEB_DIST = bundled_directory(Path("frontend") / "dist") +SDK_DOCS_DIST = bundled_directory(Path("site")) def safely(action): diff --git a/backend/tests/test_api.py b/backend/tests/test_api.py index 1399303..3cc126c 100644 --- a/backend/tests/test_api.py +++ b/backend/tests/test_api.py @@ -27,6 +27,20 @@ def test_health_is_available(): assert response.json() == {"status": "ok"} +def test_bundled_directory_prefers_wheel_files_over_source_checkout(tmp_path): + installed = tmp_path / "site-packages" + source = tmp_path / "source" + source_dist = source / "frontend" / "dist" + source_dist.mkdir(parents=True) + + assert main_module.bundled_directory(Path("frontend") / "dist", (installed, source)) == source_dist + + installed_dist = installed / "frontend" / "dist" + installed_dist.mkdir(parents=True) + + assert main_module.bundled_directory(Path("frontend") / "dist", (installed, source)) == installed_dist + + def test_visual_runner_catalog_is_served_from_sdk_registry(): response = TestClient(app).get("/api/visual-runners/catalog") From 0d43c149187260e19d0677288435b415181c7f1d Mon Sep 17 00:00:00 2001 From: forthfate Date: Fri, 25 Sep 2026 00:47:26 +0900 Subject: [PATCH 2/2] chore: prepare v0.12.2 release --- CHANGELOG.md | 6 ++++++ frontend/package.json | 2 +- package.json | 2 +- pyproject.toml | 2 +- uv.lock | 2 +- 5 files changed, 10 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9cd946f..e8622a7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,12 @@ All notable changes to OpenOrbit are documented in this file. The format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/) and this project uses [Semantic Versioning](https://semver.org/). +## [0.12.2] - 2026-09-25 + +### Fixed + +- Fixed packaged applications failing to find their bundled frontend and SDK documentation after a pip installation. + ## [0.12.1] - 2026-09-24 ### Fixed diff --git a/frontend/package.json b/frontend/package.json index 932b977..61e1a8e 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -1,7 +1,7 @@ { "name": "agent-improvement-console-ui", "private": true, - "version": "0.12.1", + "version": "0.12.2", "type": "module", "scripts": { "dev": "vite", diff --git a/package.json b/package.json index 781ce97..e2f75cf 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "openorbit", - "version": "0.12.1", + "version": "0.12.2", "description": "Open control plane for recurring AI automations", "license": "MIT", "type": "module", diff --git a/pyproject.toml b/pyproject.toml index 9978570..c42e105 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "hatchling.build" [project] name = "openorbit" -version = "0.12.1" +version = "0.12.2" description = "Open control plane for recurring AI automations" readme = "README.md" license = "MIT" diff --git a/uv.lock b/uv.lock index 045e12a..ac97859 100644 --- a/uv.lock +++ b/uv.lock @@ -950,7 +950,7 @@ wheels = [ [[package]] name = "openorbit" -version = "0.12.1" +version = "0.12.2" source = { editable = "." } dependencies = [ { name = "fastapi" },