Skip to content

Fix #9: low-priority polish collection (21 items) - #16

Open
xiaoyao-666-coder wants to merge 7 commits into
zhengdaodeguL:mainfrom
xiaoyao-666-coder:fix/issue-9-low-priority
Open

xiaoyao-666-coder wants to merge 7 commits into
zhengdaodeguL:mainfrom
xiaoyao-666-coder:fix/issue-9-low-priority

Conversation

@xiaoyao-666-coder

Copy link
Copy Markdown

Closes #9. 21 项低优先级打磨,逐项小改动:

前端:409 会话过期文案不再误报“被其他请求更新”;恢复路径三态错误处理(过期不删消息、不报网络错误);去掉死 streaming 状态,final 后 cancel reader;结构化结果 0 行显示“无匹配结果”并展示列名与 SQL;删除 preview 死分支;删除未使用的 ScenicAtmosphere 组件与 925KB 风景图;noscript 与首屏占位、错误 Toast 改 role=alert;fetch 超时(登录/建会话/退出 30s,聊天 120s);vite preview 加 /api 代理;工作流进度“跳过”状态;日期分隔线用首条用户消息时间;用户名不再截断。

后端:LangGraph 节点真实计时;结构化结果超 5 行注明总数;反馈 comment 不再丢失、commented 按消息计数(含 Redis Lua 同步);安全筛查纯提问与“好了/不疼了”等口语化缓解不再误判 high(复发仍判 high);local 模式 network_enabled:false;test 模式 /api/ready 报真实 embedding 模型名;意图平局按 department > disease > drug > exam > faq;科室白名单 5 → 14;CORS 含 * 时启动即报错。

验证:新增 backend/tests/test_low_priority.py(42 个测试);MEDGUIDE_MODE=test python -m pytest -q backend/tests 564 passed(基线 521 + 43 新);前端 npm test 12/12,npm run build 成功。

说明:第 17 项后 local 模式顶部状态会由“整理服务在线”变为“知识服务受限”(network_enabled=false 的既有映射),local 本就是受限的本地语料;第 16 项“胸痛严重吗,需要就医吗”按子句判 low,“我胸痛,很严重吗?”因已主张症状仍判 high;issue 里“未验证”的三项(Docker/nginx、手机抽屉、反馈/复制按钮)未动。

Frontend: expired-session 409 message, recovery-path error handling,
drop dead streaming state (cancel SSE reader on final), empty
structured-result state, drop dead preview branch and unused
ScenicAtmosphere assets, noscript placeholder + alert toast, fetch
timeouts incl. logout, /api proxy for vite preview, workflow-progress
states, date divider from first user message, username truncation.
Backend: LangGraph node timing, row-truncation totals, feedback
comment retention + commented counting, safety false positives for
pure questions and resolved symptoms, local network_enabled, test
embedding_model name, intent tie-break priority, department
whitelist 5 -> 14, CORS '*' fails fast at startup.
Add backend/tests/test_low_priority.py (42 tests) and 2 frontend
workflow-progress tests.

Closes zhengdaodeguL#9.
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.

[Bug][低] 低优先级打磨合集(前端 + 后端)

1 participant