feat: add prominent CLI action to console header - #682
Open
think-back wants to merge 2 commits into
Open
Conversation
Constraint: Keep the CTA authenticated-shell-only, mobile-visible, and linked to the official /cli landing page. Rejected: Reusing TopNav | It is shared with public navigation and hidden below lg in AppHeader. Confidence: high Scope-risk: narrow Directive: Do not repoint ordinary navigation to /cli/authorize because it requires a device code. Tested: Spec placeholder scan and git diff --check. Not-tested: UI implementation is intentionally deferred to the implementation commit.
Expose the official CLI landing page as a responsive header action while preserving the console-only navigation boundary. Constraint: Keep Home and Rankings absent and leave shared public navigation unchanged. Rejected: Add the CTA to shared TopNav | That would hide it on mobile and leak it into public navigation. Confidence: high Scope-risk: narrow Directive: Keep the CTA pointed at the public CLI landing page, never the device authorization route. Tested: bun test targeted navigation and CTA tests; ESLint; Prettier; TypeScript; production build; git diff checks.
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.
📝 变更描述 / Description
在登录后的 Console 顶栏加入独立的 CLI 入口,放在普通导航之后、通知按钮之前。入口使用终端图标、紫色渐变和阴影增强识别度;桌面显示
Flatkey CLI,窄屏显示CLI。入口仅存在于认证后的
AppHeader,不会进入共享TopNav或公开站点导航;目标为官网/cli落地页,并以安全的新标签页方式打开。现有“主页 / 排行榜 / Playground”移除逻辑保持不变。🚀 变更类型 / Type of change
🔗 关联任务 / Related Issue
✅ 提交前检查项 / Checklist
noopener noreferrer,未引入敏感凭据或新依赖。📸 运行证明 / Proof of Work
bun test src/components/layout/components/console-cli-cta.test.tsx src/hooks/use-top-nav-links.test.ts:4 pass,0 failbun run typecheck:通过bun run build:通过