Skip to content

feat: React WebUI replacing embedded HTML templates#14

Open
AprShine wants to merge 13 commits into
AI45Lab:mainfrom
AprShine:feat/react-webui
Open

feat: React WebUI replacing embedded HTML templates#14
AprShine wants to merge 13 commits into
AI45Lab:mainfrom
AprShine:feat/react-webui

Conversation

@AprShine
Copy link
Copy Markdown

Summary

  • Replace the embedded Jinja HTML templates with a modern React webui (React 19 + TypeScript + Vite + Tailwind CSS)
  • Public page: quick/custom send modes, source selection, real-time WebSocket progress, result panel
  • Admin page: dashboard with run controls, config management (LLM/Email/Sources/Schedule), history records
  • Add backend connectivity banner that warns when the server is unreachable
  • Add PyWebView + PyInstaller desktop packaging support (desktop.py)

Backend Changes (web_server.py)

All changes are backward-compatible — when webui/dist does not exist, the old Jinja templates are served as before:

  • Register MIME types for .js/.css/.svg to fix Windows text/plain issue
  • Auto-serve webui/dist build artifacts when available (/, /admin, /assets/*, /icons/*)
  • Add SPA fallback route for client-side routing
  • Add /health endpoint

Test plan

  • python web_server.py still works with old templates (no webui/dist)
  • cd webui && npm run build && cd .. && python web_server.py serves React UI
  • python desktop.py launches native desktop window via PyWebView
  • PyInstaller packaging produces working iDeer.exe

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.

1 participant