Commit Graph

4 Commits

Author SHA1 Message Date
AetherNo2332
d82a4cb3a8 fix(web): 诊断 - 在没有 window.location 的环境不再抛错 (#559)
Original-Commit: cdb07ca9cbdd74e63d8e80659f3bdbd6d49b3dff
fix(web): 诊断 - 在没有 window.location 的环境不再抛错

recordDiagnosticEvent / normalizeRoute 用 `typeof window !== "undefined"` 判断"在浏览器里",
但 bun 的测试环境里 window 存在、window.location 不存在,于是每次记录诊断事件都抛
`TypeError: undefined is not an object (evaluating 'window.location.pathname')`,
director-diagnostics-recorder 的 9 条基线用例因此全红。

改成 browserLocation():window 与 window.location 都探测,取不到就当没有地址(路由回落 "/")。
浏览器内的行为完全不变。
2026-09-21 09:37:19 +08:00
ddCat
4b0e9d8965 chore: commit workspace updates 2026-09-14 01:11:56 +08:00
ddCat
b5f3413ded refactor(*): 稳定期治理 - 收敛核心架构、错误语义并修复跨项目数据竞态 2026-09-09 22:02:10 +08:00
QAyong
cf6c78d540 feat: 完善创作工作台与用户诊断支持 (#295)
* feat(canvas): 参考素材 - 增加移除按钮并删除对应连线

* feat(canvas): 完善节点面板交互与拖拽反馈

* fix(canvas): 画布交互与小地图 - 统一浮层层级并完善节点识别

* feat(prompt-optimizer): 增加 AI 提示词优化器及宿主接入

* feat(canvas): 画布 - 增加自动整理节点按钮并补充文档

* chore(web): 前端 - 修正提示词优化器格式

* chore(backend): 后端 - 修正 Go 格式检查

* feat(workspace): 完善诊断导出与本地排障支持

* chore(web): 格式化诊断导出文件

* fix(web-test): 兼容 Bun 测试运行时

* fix(web-test): 对齐模型目录协议断言
2026-08-25 13:49:15 +08:00