feat(nav): 「自动化」子菜单 + API Token 更名为 API Key - #58
Conversation
- 顶部导航新增 automation 分组,api-tokens / mcp-connections 收进去 - getSelectedKeys 补上 mcpConnections(此前高亮丢失) - 用户可见文案统一改称 API Key;接口名 x-api-token / 路由 / i18n key 不变 Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
✅ Deploy Preview for pushy ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
📝 WalkthroughWalkthroughThe top navigation now groups API key and MCP connection routes under Automation. MCP route selection is handled explicitly. English and Chinese localization use API key terminology. ChangesAutomation navigation and API key terminology
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@src/i18n/locales/en.json`:
- Line 300: Restore consistent “token” terminology for the MCP localization
strings: update the affected English MCP entries, including token_name_required
and the additional key at the corresponding MCP message, and ensure
mcp.token_name remains “Token name.” Keep the API-token wording isolated to
api_tokens and align the equivalent MCP messages in both en.json and zh-CN.json.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: 8a1b6e0e-a897-4ec5-8c91-ea5a497dcfb9
📒 Files selected for processing (4)
src/components/top-navigation/index.tsxsrc/components/top-navigation/nav-items.tsxsrc/i18n/locales/en.jsonsrc/i18n/locales/zh-CN.json
| "privacy_notice": "Results go to the client you authorize, which may forward them to the model provider you chose. Grant only the apps you need to debug.", | ||
| "token_name": "Token name", | ||
| "token_name_required": "Please enter a token name", | ||
| "token_name_required": "Please enter a name", |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
Keep MCP credential terminology as “token”.
These keys are under mcp, not api_tokens. mcp.token_name at Line 299 still says Token name, and src/i18n/locales/zh-CN.json keeps the MCP messages as token labels. The current English UI can report an MCP token as an API key being revoked.
Restore the MCP wording, or apply the same terminology change consistently to all MCP strings and both locales.
Proposed fix
- "token_name_required": "Please enter a name",
+ "token_name_required": "Please enter a token name",
...
- "revoke_success": "API Key revoked",
+ "revoke_success": "Token revoked",Also applies to: 340-340
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@src/i18n/locales/en.json` at line 300, Restore consistent “token” terminology
for the MCP localization strings: update the affected English MCP entries,
including token_name_required and the additional key at the corresponding MCP
message, and ensure mcp.token_name remains “Token name.” Keep the API-token
wording isolated to api_tokens and align the equivalent MCP messages in both
en.json and zh-CN.json.
把 API Token 与 MCP 服务收进一个「自动化 / Automation」子菜单,同时把用户可见的 "API Token" 统一改称 "API Key"。
改了什么
automation分组(ThunderboltOutlined),api-tokens与mcp-connections作为它的 children。桌面横向菜单与移动端抽屉共用同一份authenticatedItems,一处改动两端生效。getSelectedKeys补上mcpConnections—— 之前漏了,停在 MCP 页面时导航不高亮。api_tokens块的用户可见文案全部改称 API Key(含列头、按钮、撤销确认、创建成功提示等)。没有改的(有意为之)
请求头
x-api-token、环境变量PUSHY_API_TOKEN/CRESC_API_TOKEN、路由/api-tokens、i18n key 名api_tokens.*、数据库表名、后端标识符 —— 这些是对外契约,改了就是破坏性变更。站点文档里已加了一条说明,讲清楚「接口名保持 token、界面叫 API Key,指的是同一样东西」。验证
bun run ci全绿(typecheck + biome + test)。🤖 Generated with Claude Code
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.Summary by CodeRabbit
New Features
Improvements