Skip to content

feat: 优化webui界面,并添加较全平台的客户端(除iOS)#48

Merged
69gg merged 12 commits intomainfrom
feature/better-webui-more-platform
Mar 9, 2026
Merged

feat: 优化webui界面,并添加较全平台的客户端(除iOS)#48
69gg merged 12 commits intomainfrom
feature/better-webui-more-platform

Conversation

@69gg
Copy link
Owner

@69gg 69gg commented Mar 8, 2026

基于 tauri Rust is Best! 实现了跨平台的管理应用,并支持了远程管理;新增 Management API 以便远程管理;添加 ci 流水线。

CI Release build workflow 应当被重点审查,笔者 (?) 不熟悉跨平台的 tauri 应用编译,且未进行本地测试。


Open with Devin

69gg and others added 9 commits March 8, 2026 11:23
Capture the caller's message count before prefetch inserts a system message so Responses follow-up tool results keep the correct start index. Add a regression test for AIClient.request_model to prevent the transport offset from drifting.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…ix windows shell

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
devin-ai-integration[bot]

This comment was marked as resolved.

chatgpt-codex-connector[bot]

This comment was marked as resolved.

@69gg
Copy link
Owner Author

69gg commented Mar 8, 2026

@codex 解决这里的所有提议

@chatgpt-codex-connector
Copy link

Summary

  • 已修复 Windows 下配置严格校验临时文件重开失败问题:/api/v1/management/config/validate 改为 NamedTemporaryFile(..., delete=False),在文件句柄关闭后再 Config.load,并在 finally 中清理临时文件。这样避免了 Windows 的 PermissionErrorsrc/Undefined/webui/routes/_config.pyL62-L97
  • 已修复登出时 refresh token 可能未被回收的问题:get_refresh_token 现在会优先从 refresh-token cookie(TOKEN_COOKIE)读取,再回退到 header/bearer,从而保证 WebUI 常见登出流程可回收 refresh token。 src/Undefined/webui/routes/_shared.pyL82-L94
  • 已同时收敛 WebUI 与 Runtime API 的 CORS 策略:新增 Origin 规范化与白名单(localhost / 127.0.0.1 / tauri://localhost / 配置中的 WebUI host:port),仅白名单命中时才下发 Access-Control-Allow-OriginAccess-Control-Allow-Credentials;不再反射任意请求头。 src/Undefined/webui/app.pyL86-L123 src/Undefined/api/app.pyL135-L171
  • 已补充回归测试,覆盖 WebUI/Runtime API 的 CORS 白名单行为,以及 refresh token 的 cookie 回退读取。 tests/test_webui_management_api.pyL198-L257
  • 变更已提交:fix(webui): resolve review suggestions for config, auth and CORS,并已按要求创建后续 PR(使用 make_pr 工具)。

Testing

  • ⚠️ python - <<'PY'\nimport urllib.request\nfor u in ['https://docs.python.org/3/library/tempfile.html#tempfile.NamedTemporaryFile','https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS']:\n with urllib.request.urlopen(u, timeout=10) as r:\n print(u, r.status)\nPY(网络出口代理返回 403,无法完成外网检索)
  • uv run ruff format src/Undefined/webui/routes/_config.py src/Undefined/webui/routes/_shared.py src/Undefined/webui/app.py src/Undefined/api/app.py tests/test_webui_management_api.py
  • uv run ruff check src/Undefined/webui/routes/_config.py src/Undefined/webui/routes/_shared.py src/Undefined/webui/app.py src/Undefined/api/app.py tests/test_webui_management_api.py
  • uv run pytest tests/test_webui_management_api.py -q

View task →

@69gg
Copy link
Owner Author

69gg commented Mar 8, 2026

@codex 再进行一次全量审查和修复。着重于ci跨平台自动构建

@chatgpt-codex-connector
Copy link

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

devin-ai-integration[bot]

This comment was marked as resolved.

devin-ai-integration[bot]

This comment was marked as resolved.

docs: 添加AGENT/CLAUDE.md和README.md中的PyPI徽标
@69gg 69gg merged commit 293a199 into main Mar 9, 2026
3 checks passed
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.

1 participant