Skip to content

feat(nav): 「自动化」子菜单 + API Token 更名为 API Key - #58

Open
sunnylqm wants to merge 1 commit into
mainfrom
claude/automation-menu-api-key
Open

feat(nav): 「自动化」子菜单 + API Token 更名为 API Key#58
sunnylqm wants to merge 1 commit into
mainfrom
claude/automation-menu-api-key

Conversation

@sunnylqm

@sunnylqm sunnylqm commented Aug 5, 2026

Copy link
Copy Markdown
Collaborator

把 API Token 与 MCP 服务收进一个「自动化 / Automation」子菜单,同时把用户可见的 "API Token" 统一改称 "API Key"。

改了什么

  • 顶部导航新增 automation 分组(ThunderboltOutlined),api-tokensmcp-connections 作为它的 children。桌面横向菜单与移动端抽屉共用同一份 authenticatedItems,一处改动两端生效。
  • getSelectedKeys 补上 mcpConnections —— 之前漏了,停在 MCP 页面时导航不高亮。
  • i18n 两个语言包里 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


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.

Summary by CodeRabbit

  • New Features

    • Added an Automation navigation menu grouping API key management and MCP connections.
    • MCP connections now display the correct active navigation state.
  • Improvements

    • Updated English and Chinese interface terminology from “API Token” to “API Key.”
    • Clarified validation messaging for MCP connection names.

- 顶部导航新增 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>
@netlify

netlify Bot commented Aug 5, 2026

Copy link
Copy Markdown

Deploy Preview for pushy ready!

Name Link
🔨 Latest commit bdbb152
🔍 Latest deploy log https://app.netlify.com/projects/pushy/deploys/6a7355322e105f000858d9f0
😎 Deploy Preview https://deploy-preview-58--pushy.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@coderabbitai

coderabbitai Bot commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

The 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.

Changes

Automation navigation and API key terminology

Layer / File(s) Summary
Automation navigation grouping
src/components/top-navigation/index.tsx, src/components/top-navigation/nav-items.tsx
The navigation nests API key and MCP connection routes under an Automation menu. MCP route selection now returns mcp-connections.
Localized API key terminology
src/i18n/locales/en.json, src/i18n/locales/zh-CN.json
English and Chinese messages replace API token terminology with API key terminology and include the Automation label.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the two main changes: adding the automation submenu and renaming API Token to API Key.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch claude/automation-menu-api-key

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

📥 Commits

Reviewing files that changed from the base of the PR and between b6a56b2 and bdbb152.

📒 Files selected for processing (4)
  • src/components/top-navigation/index.tsx
  • src/components/top-navigation/nav-items.tsx
  • src/i18n/locales/en.json
  • src/i18n/locales/zh-CN.json

Comment thread src/i18n/locales/en.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",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 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.

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