Improve mobile responsiveness#396
Conversation
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 82 out of 83 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| # B603=subprocess_without_shell_equals_true (controlled execution) | ||
| # B202=tarfile_unsafe_members (already using safe_members filter) | ||
| skips = ["B101", "B311", "B403", "B404", "B110", "B104", "B112", "B105", "B301", "B501", "B603", "B202"] | ||
| skips = ["B101", "B110", "B112", "B202", "B501", "B603"] |
There was a problem hiding this comment.
Bandit skip list was reduced, but the codebase still contains patterns that will trigger newly-unskipped rules in non-excluded paths (Bandit excludes only tests/ and scripts/). For example: import subprocess (B404) appears in deeptutor/tools/code_executor.py and deeptutor/agents/math_animator/renderer.py, and binding host="0.0.0.0" (B104) appears in deeptutor/api/run_server.py and deeptutor/tutorbot/config/schema.py. With B104/B404 no longer skipped, Bandit will start failing unless those call sites are annotated/refactored. Either restore the relevant skips (e.g., B104/B404) or add targeted # nosec suppressions / adjust defaults (e.g., bind to 127.0.0.1 by default and make 0.0.0.0 opt-in).
| expect( | ||
| box.x + box.width, | ||
| `${label} tab should not extend past the mobile viewport`, | ||
| ).toBeLessThanOrEqual(390); | ||
| expect( |
There was a problem hiding this comment.
This bounding-box assertion is likely to be flaky due to sub-pixel rounding / device scale factors (e.g., box.x + box.width can be slightly > 390 even when visually within the viewport). Consider comparing against window.innerWidth (read in-page) and/or allowing a small epsilon (e.g., <= innerWidth + 1).
Description
Improves DeepTutor’s mobile responsiveness and quality checks across the web app and supporting backend paths.
Key changes:
Related Issues
Module(s) Affected
apiknowledgeservicestoolsutilsweb(Frontend)scriptsteststutorbot,llm providersChecklist
pre-commit run --all-filesand fixed any issues.Additional Notes
This PR focuses on mobile UX polish, viewport safety, and quality/test coverage for the affected frontend and backend paths. Fixed residual code quality issues from the previous codebase.
中文描述
本 PR 改进了 DeepTutor Web 端的移动端响应式体验,并同步收敛了相关后端路径与质量检查。
主要变更: