Skip to content

fix(web): lazy-load scalar-fastapi docs UI#992

Open
szj2ys wants to merge 2 commits intoMoonshotAI:mainfrom
szj2ys:fix/web-ui-hangs
Open

fix(web): lazy-load scalar-fastapi docs UI#992
szj2ys wants to merge 2 commits intoMoonshotAI:mainfrom
szj2ys:fix/web-ui-hangs

Conversation

@szj2ys
Copy link

@szj2ys szj2ys commented Feb 6, 2026

Summary

  • Make the Web UI resilient to optional docs UI dependency failures by lazily importing scalar-fastapi.

Changes

  • src/kimi_cli/web/app.py: move scalar_fastapi import behind a best-effort helper; return 503 for /docs when unavailable.
  • tests/test_web_app_import.py: add a smoke test that imports and constructs create_app().

Test Plan

  • Unit tests: uv run --python 3.13 pytest -q tests/test_web_app_import.py

Related Issues


Open with Devin

iszj added 2 commits February 6, 2026 09:47
Avoid importing scalar-fastapi at module import time so the Web UI can still start when the docs UI dependency is unavailable.

Add a smoke test asserting create_app() can be imported and constructed.
Copy link
Contributor

@devin-ai-integration devin-ai-integration bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 2 additional findings.

Open in Devin Review

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Web UI hangs

2 participants