fix: installer web UI 404 and PowerShell banner garbling - #114
Conversation
Windows and Linux native installers froze the app without building the gitignored web/vis frontend bundles, so `pythinker web` opened a browser onto `GET /?token=… → 404 Not Found`. Both installer workflows now build the bundles before PyInstaller (matching the PyPI release flow). Every PyInstaller spec aborts loudly when bundles are missing, and the apps serve an explanatory 503 page on `/` as a last-resort fallback instead of a bare 404. The startup banner raw-printed Unicode block art, which garbled on legacy Windows code pages (e.g. cp1252) and raised UnicodeEncodeError on redirected stdout. The banner now honors the existing ASCII-glyph detection with width-preserving fallbacks and degrades per line instead of crashing. Also fixes a latent TypeError in `print_banner` when all lines are `<hr>`.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (14)
📝 WalkthroughWalkthroughPyInstaller frozen builds now enforce UI bundle presence at build time and handle missing assets gracefully at runtime. Installer workflows build web/vis bundles before freezing; PyInstaller specs validate they exist and abort if missing. If assets are missing at runtime, apps serve informative 503 fallback pages. Startup banners are hardened against Windows console Unicode failures with ASCII degradation. ChangesUI Bundle Validation and Fallback
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Suggested labels
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
Summary
/. Both installer CI workflows (windows-installer.yml,linux-installer.yml) now build the gitignored web/vis frontend bundles before running PyInstaller, matching the PyPI release flow. Every PyInstaller spec (root + both installer packages) aborts loudly when bundles are missing. As a last-resort fallback, the web and vis apps serve an explanatory 503 page on/instead of a bare 404 when assets are absent at runtime.print_banner()now honors the existingascii_glyphs_enabled()detection with width-preserving ASCII fallbacks, and degrades per line (instead of crashing) when the output stream rejects Unicode (e.g. cp1252 in PowerShell with redirected output).TypeErrorinprint_bannerwhen all lines are<hr>(max(60, *[])on empty sequence).Test plan
tests/utils/test_server.py— 6 newTestPrintBannertests cover: alignment, ASCII opt-in, cp1252 stdout, per-line UnicodeEncodeError fallback, hr-only bannertests/utils/test_pyinstaller_utils.py— 2 new tests coverrequire_ui_assetsaccepting a built tree and rejecting an unbuilt onetests/web/test_web_ui_assets.py— new file covers web and vis apps serving 503 + explanatory HTML whenindex.htmlis absentSummary by CodeRabbit
Release Notes
New Features
Bug Fixes
Tests