feat!: 品牌改名 Claude Code Hub -> CC Hub,补充 Anthropic 商标免责声明 - #1361
Conversation
Rename all user-facing references from Claude Code Hub to CC Hub across the application UI, i18n strings, documentation, deployment scripts, OpenAPI specs, and database defaults. Add an Anthropic trademark disclaimer to the login page footer and both README files, with localized translations for all five supported locales. Remove the sk- API key placeholder from the login form. A database migration updates the site_title column default and migrates any existing rows still set to the old name. BREAKING CHANGE: The default site title and all user-visible product branding change from Claude Code Hub to CC Hub. Existing deployments with the default site_title will be migrated automatically; customized titles are unaffected.
|
Caution The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased. |
📝 WalkthroughWalkthrough项目统一将品牌名称更新为“CC Hub”,同步调整默认站点标题、登录免责声明、公共状态投影、数据库迁移、OpenAPI 文档、多语言文案、部署脚本、README 和测试,并新增 TFFT/TTFB 字段区分及启动期站点标题对账流程。 ChangesCC Hub 品牌、站点标题与运行时更新
Estimated code review effort: 4 (Complex) | ~45 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 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.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 06d8c6f791
ℹ️ 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".
There was a problem hiding this comment.
Actionable comments posted: 3
🤖 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 `@docs/prd-claude-code-hub-2025-11-29.md`:
- Line 14: Replace the user-visible legacy “CCH” branding in the PRD, including
the references around lines 32–35 and 24, with “CC Hub.” Retain “CCH” only where
it is explicitly defined as an official abbreviation.
In `@scripts/deploy.ps1`:
- Line 1: Save scripts/deploy.ps1 as UTF-8 with BOM so Windows PowerShell 5.1
correctly renders its Chinese text; preserve the script contents and behavior
unchanged.
In `@src/components/customs/footer.tsx`:
- Line 23: 更新全局页脚中显示“© {year} CC Hub · v{version}”的组件,接入 next-intl 并渲染现有的
auth.disclaimer 文案;为该键补充 5 种语言的翻译,保留现有版权与版本信息。
🪄 Autofix (Beta)
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: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 4ec53a23-b707-47e3-ae4d-c2e6ebff90bb
📒 Files selected for processing (102)
.github/prompts/changelog-update.md.github/prompts/docs-update.md.github/prompts/release-analysis.md.github/prompts/release-notes.md.github/workflows/claude-unified-docs.ymlCONTRIBUTING.mdMakefileREADME.en.mdREADME.mddeploy/k8s/README.mddev/Makefiledocs/api-authentication-guide.mddocs/api-docs-summary.mddocs/api/v1/README.mddocs/architecture-claude-code-hub-2025-11-29.mddocs/k8s-deployment.mddocs/prd-claude-code-hub-2025-11-29.mddocs/product-brief-claude-code-hub-2025-11-29.mddocs/public-status-api.mddrizzle/0114_silent_starhawk.sqldrizzle/meta/0114_snapshot.jsondrizzle/meta/_journal.jsonmessages/en/auth.jsonmessages/en/bigScreen.jsonmessages/en/settings/config.jsonmessages/en/settings/providers/form/url.jsonmessages/en/usage.jsonmessages/ja/auth.jsonmessages/ja/bigScreen.jsonmessages/ja/settings/config.jsonmessages/ja/settings/providers/form/url.jsonmessages/ja/usage.jsonmessages/ru/auth.jsonmessages/ru/bigScreen.jsonmessages/ru/settings/config.jsonmessages/ru/settings/providers/form/url.jsonmessages/ru/usage.jsonmessages/zh-CN/auth.jsonmessages/zh-CN/bigScreen.jsonmessages/zh-CN/settings/config.jsonmessages/zh-CN/settings/providers/form/url.jsonmessages/zh-CN/usage.jsonmessages/zh-TW/auth.jsonmessages/zh-TW/bigScreen.jsonmessages/zh-TW/settings/config.jsonmessages/zh-TW/settings/providers/form/url.jsonmessages/zh-TW/usage.jsonscripts/cchscripts/clear-session-bindings.tsscripts/deploy-k8s.shscripts/deploy.ps1scripts/deploy.shsrc/app/[locale]/login/page.tsxsrc/app/api/actions/[...route]/route.tssrc/app/api/v1/_root/document.tssrc/components/customs/footer.tsxsrc/drizzle/schema.tssrc/instrumentation.tssrc/lib/config/system-settings-cache.tssrc/lib/layout-site-metadata.tssrc/lib/public-status/config-snapshot.tssrc/lib/public-status/openapi.tssrc/lib/site-title.tssrc/repository/_shared/transformers.test.tssrc/repository/_shared/transformers.tstests/README.mdtests/api/api-openapi-spec.test.tstests/api/v1/system/system-config.test.tstests/e2e/v1-management-smoke.test.tstests/integration/public-status/config-publish.test.tstests/unit/actions/admin-user-insights.test.tstests/unit/actions/system-config-fake-streaming-setting.test.tstests/unit/actions/system-config-gemini-function-id-setting.test.tstests/unit/actions/system-config-non-chat-retry-setting.test.tstests/unit/actions/system-config-stream-gate-affinity-settings.test.tstests/unit/actions/system-config-thinking-effort-conflict-setting.test.tstests/unit/api/public-site-meta-route.test.tstests/unit/api/public-status-api-contract.test.tstests/unit/api/v1/api-client-actions.test.tstests/unit/api/v1/docs-routes.test.tstests/unit/auth/login-page-site-title.test.tsxtests/unit/i18n/auth-login-keys.test.tstests/unit/layout-site-metadata.test.tstests/unit/lib/config/system-settings-cache.test.tstests/unit/lib/timezone/timezone-resolver.test.tstests/unit/public-site-meta.test.tstests/unit/public-status/config-publisher.test.tstests/unit/public-status/config-snapshot.test.tstests/unit/public-status/layout-metadata.test.tstests/unit/public-status/public-api-loader.test.tstests/unit/public-status/rebuild-worker.test.tstests/unit/public-status/status-page-locale.test.tstests/unit/public-status/status-page-title.test.tsxtests/unit/public-status/status-slug-page.test.tsxtests/unit/public-status/system-config-publish.test.tstests/unit/repository/system-config-degradation-ladder.test.tstests/unit/repository/system-config-update-missing-columns.test.tstests/unit/settings/system-settings-form-fake-streaming.test.tsxtests/unit/settings/system-settings-form-ip-extraction.test.tsxtests/unit/settings/system-settings-form-non-chat-fallback.test.tsxtests/unit/settings/system-settings-form-replay-cache-toggles.test.tsxtests/unit/settings/system-settings-form-upstream-error-message.test.tsx
🧪 测试结果
总体结果: ✅ 所有测试通过 |
There was a problem hiding this comment.
Code Review Summary
This PR is XL and mixes runtime behavior, migration SQL, docs/scripts, and broad test fixture churn, which makes upgrade-path verification harder than it needs to be. I found one upgrade-safety gap in the new migration and one documentation-drift issue in the rebranded docs that should be addressed before merge.
PR Size: XL
- Lines changed: 5680
- Files changed: 102
- Split suggestion: Separate runtime/database/UI changes (
src/*,drizzle/*) from docs/scripts/prompt rebranding, and keep the mass test-string updates isolated from behavior changes where possible.
Issues Found
| Category | Critical | High | Medium | Low |
|---|---|---|---|---|
| Logic/Bugs | 0 | 0 | 0 | 0 |
| Security | 0 | 0 | 0 | 0 |
| Error Handling | 0 | 0 | 0 | 0 |
| Types | 0 | 0 | 0 | 0 |
| Comments/Docs | 0 | 0 | 1 | 0 |
| Tests | 0 | 1 | 0 | 0 |
| Simplification | 0 | 0 | 0 | 0 |
Critical Issues (Must Fix)
None.
High Priority Issues (Should Fix)
- [HIGH] [TEST-MISSING-CRITICAL]
drizzle/0114_silent_starhawk.sql:2rewrites persistedsite_titlevalues during upgrade, but the new backfill has no automated regression guard. A follow-up edit to the predicate can silently overwrite customized titles. - [MEDIUM] [COMMENT-INACCURATE]
README.md:17still statesNext.js 15even though the repo is already onnext: ^16; the same drift appears in the mirrored rebrand docs touched by this PR.
Review Coverage
- Logic and correctness
- Security (OWASP Top 10)
- Error handling
- Type safety
- Documentation accuracy
- Test coverage
- Code clarity
Automated review by Codex AI
There was a problem hiding this comment.
- Reviewed PR
#1361, applied thesize/XLlabel, and submitted the summary review comment. - Posted inline comments on
drizzle/0114_silent_starhawk.sql:2andREADME.md:17. - Main findings: the new
site_titlebackfill migration lacks an automated regression guard, and the rebranded docs still claimNext.js 15even though the repo is already onnext: ^16. - The review summary also includes XL split guidance: separate runtime/database changes from docs/scripts/prompt renames and keep broad test-string churn isolated from behavior changes.
- If you want, I can do a second pass after the author pushes follow-up fixes.
Resolve the 0114 migration collision by preserving the TTFB migration and regenerating the CC Hub site-title migration as 0115. Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Keep the login footer in document flow and allow vertical scrolling while preserving the existing desktop composition. Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Skip matching projections, preserve the active version when replacing legacy titles, and report unavailable Redis writes without triggering rebuild churn. Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Reconcile the database title before production and development schedulers start, while keeping Redis failures non-fatal. Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Align the mirrored project overviews and architecture diagrams with the current Next.js 16 dependency. Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Update the rebranded architecture summary, diagram, rationale, and comparison table to the repository's current framework version. Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Use CC Hub consistently in user-facing product goals, scenarios, and workflow descriptions. Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Add the UTF-8 BOM required by Windows PowerShell 5.1 without changing the decoded deployment script. Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Apply text-balance to the card description and disclaimer so wrapped lines distribute evenly instead of leaving orphaned words. Widen the disclaimer container on large screens to reduce excessive line breaks. Adds a regression test asserting the new utility classes are present.
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (2)
tests/unit/auth/login-page-site-title.test.tsx (1)
170-177: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value通过
parentElement链推断布局结构较脆弱。一旦登录页多包一层容器,
footer/page的推断即失效,失败信息也难定位。建议为页脚与页面容器加上data-testid并直接查询;类名断言本身作为重叠回归的守护可以保留。🤖 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 `@tests/unit/auth/login-page-site-title.test.tsx` around lines 170 - 177, Replace the brittle parentElement traversal in the login layout test with direct queries using dedicated data-testid attributes for the footer and page container. Add the corresponding test IDs to the rendered elements, then keep the existing class-name assertions and footer placement check against those directly queried elements.tests/unit/drizzle/site-title-migration.test.ts (1)
26-31: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win断言依赖“journal 最后两条”,新增迁移后必然失败。
任何后续迁移(0116…)加入都会让该断言崩掉,与本次校验目标无关。建议按
idx精确查找条目,并用 JSON 解析替代字符串包含校验,使意图更明确。♻️ 建议改法
- expect(new Set(indexes).size).toBe(indexes.length); - expect(journal.entries.slice(-2).map(({ idx, tag }) => ({ idx, tag }))).toEqual([ - { idx: 114, tag: "0114_overconfident_ronan" }, - { idx: 115, tag: "0115_breezy_polaris" }, - ]); - expect(snapshotSource).toContain('"first_byte_ms"'); - expect(snapshotSource).toContain("'CC Hub'"); + expect(new Set(indexes).size).toBe(indexes.length); + expect(journal.entries.find(({ idx }) => idx === 114)?.tag).toBe("0114_overconfident_ronan"); + expect(journal.entries.find(({ idx }) => idx === 115)?.tag).toBe("0115_breezy_polaris"); + expect(indexes.indexOf(115)).toBeGreaterThan(indexes.indexOf(114)); + + const snapshot = JSON.parse(snapshotSource); + expect(snapshot.tables["public.message_request"].columns.first_byte_ms).toBeDefined(); + expect(snapshot.tables["public.system_settings"].columns.site_title.default).toBe("'CC Hub'");🤖 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 `@tests/unit/drizzle/site-title-migration.test.ts` around lines 26 - 31, 更新迁移测试中的 journal 断言,改为按 idx 精确查找并校验 0114 和 0115 条目,避免依赖最后两条记录。将 snapshotSource 的字符串包含断言改为解析 JSON 后验证对应字段和值,明确校验 first_byte_ms 与 “CC Hub”。
🤖 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/lib/public-status/config-publisher.ts`:
- Line 184: Update the comparison in the snapshot reconciliation flow around
readCurrentPublicStatusConfigSnapshot so missing siteTitle values do not call
trim on undefined; use optional chaining for the snapshot field, treating a
missing value as unequal and allowing the republish path to run.
---
Nitpick comments:
In `@tests/unit/auth/login-page-site-title.test.tsx`:
- Around line 170-177: Replace the brittle parentElement traversal in the login
layout test with direct queries using dedicated data-testid attributes for the
footer and page container. Add the corresponding test IDs to the rendered
elements, then keep the existing class-name assertions and footer placement
check against those directly queried elements.
In `@tests/unit/drizzle/site-title-migration.test.ts`:
- Around line 26-31: 更新迁移测试中的 journal 断言,改为按 idx 精确查找并校验 0114 和 0115
条目,避免依赖最后两条记录。将 snapshotSource 的字符串包含断言改为解析 JSON 后验证对应字段和值,明确校验 first_byte_ms 与
“CC Hub”。
🪄 Autofix (Beta)
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: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 50cbeb86-af6d-4413-8bd1-b217ea379220
📒 Files selected for processing (17)
README.en.mdREADME.mddocs/architecture-claude-code-hub-2025-11-29.mddocs/prd-claude-code-hub-2025-11-29.mddrizzle/0115_breezy_polaris.sqldrizzle/meta/0115_snapshot.jsondrizzle/meta/_journal.jsonscripts/deploy.ps1src/app/[locale]/login/page.tsxsrc/drizzle/schema.tssrc/instrumentation.tssrc/lib/public-status/config-publisher.tssrc/lib/public-status/startup-reconciliation.tstests/unit/auth/login-page-site-title.test.tsxtests/unit/drizzle/site-title-migration.test.tstests/unit/public-status/config-publisher.test.tstests/unit/public-status/startup-reconciliation.test.ts
🚧 Files skipped from review as they are similar to previous changes (5)
- README.en.md
- src/app/[locale]/login/page.tsx
- README.md
- scripts/deploy.ps1
- docs/architecture-claude-code-hub-2025-11-29.md
🧪 测试结果
总体结果: ✅ 所有测试通过 |
Superseded by head 42ea8c2. All three actionable findings were addressed or dispositioned with replies: PRD branding and PowerShell BOM were fixed, while the conditional global-footer suggestion was kept out of scope because the localized disclaimer is intentionally on the login page. All eight review threads are resolved and the latest CodeRabbit status is successful.
Legacy public-status config snapshots persisted before siteTitle was introduced can have an undefined siteTitle field. The reconciliation check called .trim() on the snapshot value without a null guard, causing a crash. Adding optional chaining lets these snapshots be detected as stale and republished while preserving their existing configVersion.
Replace positional journal slicing and raw substring checks with tag-based migration lookup and parsed snapshot structure assertions. The previous approach relied on the last two journal entries and loose string matching, which would break as soon as a new migration is appended. Finding entries by tag and validating the full column definitions makes the test resilient to future journal growth.
Replace find-based lookups with index-based checks so the test verifies that 0115_breezy_polaris follows 0114_overconfident_ronan in execution order and that each migration tag appears exactly once. This guards against journal corruption from concurrent or reordered appends.
🧪 测试结果
总体结果: ✅ 所有测试通过 |
|
别忘了改仓库名称.jpg |
背景
为尊重 Anthropic 的商标权利、避免名称侵权与商业误解,将用户可见的品牌名从
Claude Code Hub改为CC Hub,并在登录页页脚与 README 末尾补充商标免责声明。改动范围
DEFAULT_SITE_TITLE改为CC Hub;transformers.ts/system-settings-cache.ts/layout-site-metadata.ts/config-snapshot.ts四处硬编码 fallback 收敛到该常量drizzle/0114_silent_starhawk.sql,改列默认值 + 条件回填(只更新仍等于旧默认值的行,用户自定义标题不受影响)auth.brand.disclaimersk-xxxxxxxx占位符(易被误认为要填 Anthropic 官方 key),连同只服务于它的整个auth.placeholders段<sub>免责声明免责声明文案
刻意未改动的技术标识符
package.jsonname、ghcr 镜像名、GitHub 仓库 URL、DB 名claude_code_hub、k8s 资源名、localStorage key(-theme/-columns/-onboarding)、advisory lock 名、postgresapplication_name、urn:claude-code-hub:problem:*错误类型、x-cch-*header、CCH_*环境变量、cch:redis 前缀、cchCLI 名、上游 UA fallback、MCP 厂商归因 header、CHANGELOG 历史条目、docs 归档文件名。改这些会重置用户 UI 状态、破坏滚动升级期的互斥锁、破坏 API 契约,或让存量部署升级失败。
验证
bun run typecheckbun run buildbun run testbun run test:v1bun run openapi:checkbiome check(改动文件)src/components/ui/__tests__/language-switcher.test.tsx有 1 例失败,已在 pristine HEAD 上复现,属存量问题,与本 PR 无关。迁移端到端实测
临时 postgres 上先迁到 0113、灌入存量数据,再应用 0114:
```
迁移前 迁移后
1 | Claude Code Hub -> 1 | CC Hub 旧默认值已回填
2 | 我司内部网关 -> 2 | 我司内部网关 自定义标题未被覆盖
3 | CC Hub 新行默认值正确
```
重复执行回填语句返回
UPDATE 0,幂等。注意
commit 标记为
feat!+BREAKING CHANGE,会触发 major 版本号跃升。如果不希望这样,我可以改写 commit message。🤖 Generated with Claude Code
Greptile Summary
Updates the product branding from Claude Code Hub to CC Hub.
Confidence Score: 5/5
The PR appears safe to merge.
No blocking failure remains in the previously reported login-footer layout path.
Important Files Changed
Reviews (3): Last reviewed commit: "test(db): assert migration journal order..." | Re-trigger Greptile