Skip to content

feat(web): migrate to FastAPI and add interactive API docs - #589

Merged
ReenigneArcher merged 3 commits into
masterfrom
migrate-from-flask
Oct 3, 2026
Merged

ReenigneArcher merged 3 commits into
masterfrom
migrate-from-flask

Conversation

@ReenigneArcher

Copy link
Copy Markdown
Member

Description

Replace Flask with FastAPI and Uvicorn while preserving browser routes, TLS settings, administrator sessions, CSRF protection, and audio streaming. Bundle authenticated Swagger UI with request bodies and session-bound tokens.

Read PO catalogs directly, use the root source for English, and reload the interface after language changes. Exclude bundled assets from extraction. Refresh legacy deployment metadata and revalidate hourly GitHub requests.

Update dependency locks, frozen-build imports, documentation, and regression coverage for the ASGI migration and follow-up fixes.

Screenshot

Issues Fixed or Closed

Roadmap Issues

Type of Change

  • feat: New feature (non-breaking change which adds functionality)
  • fix: Bug fix (non-breaking change which fixes an issue)
  • docs: Documentation only changes
  • style: Changes that do not affect the meaning of the code (white-space, formatting, missing semicolons, etc.)
  • refactor: Code change that neither fixes a bug nor adds a feature
  • perf: Code change that improves performance
  • test: Adding missing tests or correcting existing tests
  • build: Changes that affect the build system or external dependencies
  • ci: Changes to CI configuration files and scripts
  • chore: Other changes that don't modify src or test files
  • revert: Reverts a previous commit
  • BREAKING CHANGE: Introduces a breaking change (can be combined with any type above)

Checklist

  • Code follows the style guidelines of this project
  • Code has been self-reviewed
  • Code has been commented, particularly in hard-to-understand areas
  • Code docstring/documentation-blocks for new or existing methods/components have been added or updated
  • Unit tests have been added or updated for any new or modified functionality

AI Usage

See our AI usage policy.

  • None: No AI tools were used in creating this PR
  • Light: AI provided minor assistance (formatting, simple suggestions)
  • Moderate: AI helped with code generation or debugging specific parts
  • Heavy: AI generated most or all of the code changes

Replace Flask with FastAPI and Uvicorn while preserving browser routes,
TLS settings, administrator sessions, CSRF protection, and audio streaming.
Bundle authenticated Swagger UI with request bodies and session-bound tokens.

Read PO catalogs directly, use the root source for English, and reload the
interface after language changes. Exclude bundled assets from extraction.
Refresh legacy deployment metadata and revalidate hourly GitHub requests.

Update dependency locks, frozen-build imports, documentation, and regression
coverage for the ASGI migration and follow-up fixes.

Validation: 444 Python tests (89.43% coverage), 27 browser tests, flake8,
Dockle checks/build, and live locale switching and Swagger GET/POST requests.
Comment thread src/common/http.py Fixed
Comment thread src/common/http.py Fixed
Comment thread src/common/http.py Fixed
@codecov

codecov Bot commented Oct 3, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 96.65552% with 20 lines in your changes missing coverage. Please review.
✅ Project coverage is 87.47%. Comparing base (14ff8a2) to head (dd4e3a3).
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
src/common/webapp.py 94.76% 10 Missing and 1 partial ⚠️
src/common/http.py 95.23% 3 Missing and 2 partials ⚠️
src/common/admin.py 98.36% 1 Missing and 1 partial ⚠️
src/common/__init__.py 66.66% 0 Missing and 1 partial ⚠️
src/common/server_ui.py 97.50% 0 Missing and 1 partial ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #589      +/-   ##
==========================================
+ Coverage   86.06%   87.47%   +1.41%     
==========================================
  Files          30       32       +2     
  Lines        3301     3562     +261     
  Branches      480      521      +41     
==========================================
+ Hits         2841     3116     +275     
+ Misses        309      298      -11     
+ Partials      151      148       -3     
Flag Coverage Δ
Linux-aarch64 87.22% <96.65%> (+1.43%) ⬆️
Linux-x86_64 87.22% <96.65%> (+1.43%) ⬆️
Windows-AMD64 87.34% <96.80%> (+1.46%) ⬆️
Windows-ARM64 87.34% <96.80%> (+1.46%) ⬆️
macOS-arm64 87.22% <96.65%> (+1.43%) ⬆️
macOS-x86_64 87.22% <96.65%> (+1.43%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
src/common/api_docs.py 100.00% <100.00%> (ø)
src/common/config.py 72.72% <100.00%> (ø)
src/common/locales.py 89.55% <100.00%> (+16.82%) ⬆️
src/common/logger.py 71.69% <100.00%> (ø)
src/common/threads.py 100.00% <ø> (ø)
src/themerr/github_status.py 96.77% <100.00%> (+0.22%) ⬆️
src/themerr_plex.py 63.56% <100.00%> (ø)
src/common/__init__.py 87.09% <66.66%> (-1.04%) ⬇️
src/common/server_ui.py 96.47% <97.50%> (+0.12%) ⬆️
src/common/admin.py 97.18% <98.36%> (-0.54%) ⬇️
... and 2 more

Continue to review full report in Codecov by Harness.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 14ff8a2...dd4e3a3. Read the comment docs.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@sonarqubecloud

sonarqubecloud Bot commented Oct 3, 2026

Copy link
Copy Markdown

@ReenigneArcher
ReenigneArcher merged commit ae49c57 into master Oct 3, 2026
27 checks passed
@ReenigneArcher
ReenigneArcher deleted the migrate-from-flask branch October 3, 2026 21:13
@ReenigneArcher ReenigneArcher added this to the standalone milestone Oct 4, 2026
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.

2 participants