feat(routes): GET / 自动重定向至 /dashboard#256
Merged
ThreeFish-AI merged 2 commits intoMay 28, 2026
Merged
Conversation
将根路径的 HEAD 与 GET handler 拆分:HEAD / 保持 200 响应(Claude Code 连通性探针依赖), GET / 改为 307 Temporary Redirect 至 /dashboard,提升浏览器访问体验。 同步更新单元测试与 E2E 测试的断言。 🤖 Generated with [Claude Code](https://github.com/claude), [CodeX](https://openai.com), [Gemini](https://github.com/apps/gemini-code-assist) Co-Authored-By: Aurelius Huang<threefish.ai@gmail.com>
🤖 Generated with [Claude Code](https://github.com/claude), [CodeX](https://openai.com), [Gemini](https://github.com/apps/gemini-code-assist) Co-Authored-By: Aurelius Huang<threefish.ai@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
GET /从返回空 200 改为 307 重定向至/dashboard,同时保持HEAD /返回 200 以兼容 Claude Code 的健康探测机制Implementation Details
root()拆分为root_head()(HEAD)和root_get()(GET),使用 FastAPI 的RedirectResponse实现 307 临时重定向Location头Test Plan
test_get_root_redirects_to_dashboard— 单元测试验证 307 重定向test_http_health_probe— E2E 测试验证 HEAD 200 / GET 307 / health ok