Skip to content

Simplify top navigation and restrict Rankings - #12

Merged
latioswang merged 2 commits into
mainfrom
codex/simplify-top-navigation
Aug 10, 2026
Merged

latioswang merged 2 commits into
mainfrom
codex/simplify-top-navigation

Conversation

@latioswang

Copy link
Copy Markdown

⚠️ 提交说明 / PR Notice

Important

  • 请提供人工撰写的简洁摘要,避免直接粘贴未经整理的 AI 输出。
  • This change was AI-assisted by Codex.

📝 变更描述 / Description

Remove the duplicate Home item from the top navigation so Console remains the single entry point for the dashboard. Show the Rankings link only when the signed-in user has the Root (SUPER_ADMIN) role. The existing rankings route is unchanged; this change only controls top-navigation visibility.

Add focused hook regression coverage for the remaining Console link and Rankings visibility for signed-out, User, Admin, and Root roles.

🚀 变更类型 / Type of change

  • 🐛 Bug 修复 (Bug fix) - 请关联对应 Issue,避免将设计取舍、理解偏差或预期不一致直接归类为 bug
  • ✨ 新功能 (New feature) - 重大特性建议先通过 Issue 沟通
  • ⚡ 性能优化 / 重构 (Refactor)
  • 📝 文档更新 (Documentation)

🔗 关联任务 / Related Issue

  • Closes # (如有)

✅ 提交前检查项 / Checklist

  • 人工确认: 我已亲自整理并撰写此描述,没有直接粘贴未经处理的 AI 输出。
  • 非重复提交: 我已搜索现有的 Issues 与 PRs,确认不是重复提交。
  • Bug fix 说明: 若此 PR 标记为 Bug fix,我已提交或关联对应 Issue,且不会将设计取舍、预期不一致或理解偏差直接归类为 bug。
  • 变更理解: 我已理解这些更改的工作原理及可能影响。
  • 范围聚焦: 本 PR 未包含任何与当前任务无关的代码改动。
  • 本地验证: 已在本地运行并通过测试或手动验证,维护者可以据此复核结果。
  • 安全合规: 代码中无敏感凭据,且符合项目代码规范。

📸 运行证明 / Proof of Work

  • bun test src/hooks/__tests__/top-nav-links.test.tsx — 5 passed, 0 failed
  • bun run typecheck — passed
  • bun x oxlint -c .oxlintrc.json src/hooks/use-top-nav-links.ts src/hooks/__tests__/top-nav-links.test.tsx — passed
  • bun x oxfmt --check src/hooks/use-top-nav-links.ts src/hooks/__tests__/top-nav-links.test.tsx — passed
  • git diff --check — passed

Repository-wide bun run copyright:check still reports four pre-existing files outside this PR; the new test file passes the copyright-header check.

@latioswang
latioswang marked this pull request as ready for review August 10, 2026 14:11
@latioswang

Copy link
Copy Markdown
Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Keep them coming!

Reviewed commit: b11c63e731

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@latioswang

Copy link
Copy Markdown
Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. You're on a roll.

Reviewed commit: 29700c7f78

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@latioswang
latioswang merged commit 90366aa into main Aug 10, 2026
1 of 2 checks passed
@latioswang
latioswang deleted the codex/simplify-top-navigation branch August 10, 2026 14:30
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