Skip to content

Improve mobile responsiveness#396

Open
conradsheeran wants to merge 4 commits intoHKUDS:devfrom
conradsheeran:dev
Open

Improve mobile responsiveness#396
conradsheeran wants to merge 4 commits intoHKUDS:devfrom
conradsheeran:dev

Conversation

@conradsheeran
Copy link
Copy Markdown

@conradsheeran conradsheeran commented Apr 26, 2026

Description

Improves DeepTutor’s mobile responsiveness and quality checks across the web app and supporting backend paths.

Key changes:

  • Improved mobile layouts across workspace and utility pages, including chat, agents, book reader, co-writer, playground, settings, notebook, memory, and sidebar navigation.
  • Fixed the Knowledge page mobile tab layout so tabs stay within the viewport and avoid horizontal overflow.
  • Added Playwright UX/compliance coverage for mobile navigation, horizontal overflow, and Knowledge page tabs.
  • Refined document attachment classification, file icon handling, and related tests.
  • Added/adjusted backend quality fixes around LLM provider adapters, document extraction, API routers, storage, version parsing, and scripts.

Related Issues

Module(s) Affected

  • api
  • knowledge
  • services
  • tools
  • utils
  • web (Frontend)
  • scripts
  • tests
  • Other: tutorbot, llm providers

Checklist

  • I have read and followed the contribution guidelines.
  • My code follows the project's coding standards.
  • I have run pre-commit run --all-files and fixed any issues.
  • I have added relevant tests for my changes.
  • I have updated the documentation (if necessary).
  • My changes do not introduce any new security vulnerabilities.

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 端的移动端响应式体验,并同步收敛了相关后端路径与质量检查。

主要变更:

  • 优化 workspace 与 utility 页面在移动端的布局表现,包括 chat、agents、book reader、co-writer、playground、settings、notebook、memory 和侧边栏导航
  • 修复 Knowledge 页面移动端标签页布局,避免标签超出视口或产生横向滚动
  • 新增 Playwright UX/compliance 测试,覆盖移动端导航、横向溢出和 Knowledge 页面标签页布局
  • 优化文档附件类型识别、文件图标展示及相关测试
  • 调整 LLM provider adapter、文档提取、API routers、存储、版本解析和脚本中的代码质量问题

Copilot AI review requested due to automatic review settings April 26, 2026 07:05
@conradsheeran conradsheeran changed the title Dev Improve mobile responsiveness Apr 26, 2026
@conradsheeran conradsheeran marked this pull request as draft April 26, 2026 07:16
@conradsheeran conradsheeran marked this pull request as ready for review April 26, 2026 07:16
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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.

Comment thread pyproject.toml
# 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"]
Copy link

Copilot AI Apr 27, 2026

Choose a reason for hiding this comment

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

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).

Copilot uses AI. Check for mistakes.
Comment on lines +128 to +132
expect(
box.x + box.width,
`${label} tab should not extend past the mobile viewport`,
).toBeLessThanOrEqual(390);
expect(
Copy link

Copilot AI Apr 27, 2026

Choose a reason for hiding this comment

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

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).

Copilot uses AI. Check for mistakes.
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