Skip to content

Codex/opencode theme - #6220

Closed
q3cc wants to merge 3 commits into
QuantumNous:mainfrom
q3cc:codex/opencode-theme
Closed

Codex/opencode theme#6220
q3cc wants to merge 3 commits into
QuantumNous:mainfrom
q3cc:codex/opencode-theme

Conversation

@q3cc

@q3cc q3cc commented Jul 15, 2026

Copy link
Copy Markdown

⚠️ 提交说明 / PR Notice

Important

  • 请提供人工撰写的简洁摘要,避免直接粘贴未经整理的 AI 输出。

📝 变更描述 / Description

(简述:做了什么?为什么这样改能生效?请基于你对代码逻辑的理解来写,避免粘贴未经整理的内容)

🚀 变更类型 / Type of change

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

🔗 关联任务 / Related Issue

  • Closes # (如有)

✅ 提交前检查项 / Checklist

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

📸 运行证明 / Proof of Work

(请在此粘贴截图、关键日志或测试报告,以证明变更生效)

Summary by CodeRabbit

  • New Features
    • Added the OpenCode theme preset with warm-neutral colors, monospaced typography, and a zero-radius style.
    • Added IBM Plex Mono font support and improved animated transitions when changing theme radius settings.
    • Added streamlined development-mode sign-in and sign-out support.
  • Improvements
    • API key switching now preserves the selected key name across applications.
    • Added OpenCode translations across supported languages.
  • Bug Fixes
    • Improved authentication error handling during development sessions.

@q3cc q3cc closed this Jul 15, 2026
@coderabbitai

coderabbitai Bot commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 1bd0c83a-2f08-4cc4-83f8-e3ac39dbcca8

📥 Commits

Reviewing files that changed from the base of the PR and between a63364d and 03c9d2d.

⛔ Files ignored due to path filters (1)
  • web/bun.lock is excluded by !**/*.lock
📒 Files selected for processing (26)
  • .github/workflows/docker-build.yml
  • .github/workflows/docker-image-branch.yml
  • web/default/package.json
  • web/default/scripts/sync-i18n.mjs
  • web/default/src/components/config-drawer.tsx
  • web/default/src/context/theme-customization-provider.tsx
  • web/default/src/features/auth/api.ts
  • web/default/src/features/auth/hooks/use-auth-redirect.ts
  • web/default/src/features/auth/sign-in/components/user-auth-form.tsx
  • web/default/src/features/keys/components/api-keys-dialogs.tsx
  • web/default/src/features/keys/components/dialogs/cc-switch-dialog.tsx
  • web/default/src/i18n/locales/en.json
  • web/default/src/i18n/locales/fr.json
  • web/default/src/i18n/locales/ja.json
  • web/default/src/i18n/locales/ru.json
  • web/default/src/i18n/locales/vi.json
  • web/default/src/i18n/locales/zh-TW.json
  • web/default/src/i18n/locales/zh.json
  • web/default/src/lib/api.ts
  • web/default/src/lib/dev-auth.ts
  • web/default/src/lib/theme-customization.ts
  • web/default/src/main.tsx
  • web/default/src/stores/auth-store.ts
  • web/default/src/styles/index.css
  • web/default/src/styles/theme-presets.css
  • web/default/src/styles/theme.css

Walkthrough

The PR moves Docker publishing to GHCR, adds an OpenCode theme with IBM Plex Mono support and radius transitions, introduces development-only local authentication, and updates the CC switch dialog to use the selected API key’s name.

Changes

GHCR publishing workflows

Layer / File(s) Summary
GHCR image build configuration
.github/workflows/docker-build.yml, .github/workflows/docker-image-branch.yml
Both workflows authenticate with GHCR, use ghcr.io/q3cc/new-api, publish per-architecture tags, and derive branch tags from the current ref where applicable.
Multi-architecture manifests and signing
.github/workflows/docker-build.yml, .github/workflows/docker-image-branch.yml
Manifest jobs create, sign, and inspect versioned and latest GHCR images with updated permissions and conditional main-branch handling.

OpenCode theme and visual customization

Layer / File(s) Summary
OpenCode preset and font contracts
web/default/src/lib/theme-customization.ts, web/default/src/i18n/locales/*, web/default/package.json, web/default/scripts/sync-i18n.mjs
Adds the OpenCode preset, locale keys, mono font dependency, and translation heuristic support.
OpenCode palette and mono typography
web/default/src/styles/theme-presets.css, web/default/src/styles/theme.css, web/default/src/styles/index.css
Adds OpenCode light/dark tokens, IBM Plex Mono imports, mono font variables, font features, and surface-bridge exclusions.
Radius transition wiring
web/default/src/context/theme-customization-provider.tsx, web/default/src/components/config-drawer.tsx, web/default/src/styles/theme.css
Triggers timed radius transitions when presets or radius values change and updates the radius preview to use var(--radius).

Development authentication

Layer / File(s) Summary
Development session storage
web/default/src/lib/dev-auth.ts
Creates, validates, persists, identifies, and clears browser-local development authentication sessions.
Authentication and API integration
web/default/src/features/auth/api.ts, web/default/src/lib/api.ts, web/default/src/stores/auth-store.ts, web/default/src/features/auth/hooks/use-auth-redirect.ts
Uses development sessions for login, logout, initialization, self lookup, persistence, request interception, and authentication error handling.
Development authentication UI and error guards
web/default/src/features/auth/sign-in/components/user-auth-form.tsx, web/default/src/main.tsx
Bypasses development-only Turnstile and legal consent requirements and suppresses production React Query error handling for development sessions.

API-key dialog naming

Layer / File(s) Summary
Current key name propagation
web/default/src/features/keys/components/api-keys-dialogs.tsx, web/default/src/features/keys/components/dialogs/cc-switch-dialog.tsx
Passes the selected API key name into the CC switch dialog and synchronizes its name state and placeholder with that prop.
Application configuration cleanup
web/default/src/features/keys/components/dialogs/cc-switch-dialog.tsx
Removes application default names, reduces Codex model fields, and updates its endpoint template construction.

Estimated code review effort: 4 (Complex) | ~60 minutes

Sequence Diagram(s)

sequenceDiagram
  participant UserAuthForm
  participant authApi
  participant DevAuth
  participant AuthStore
  participant ApiClient
  UserAuthForm->>authApi: Submit development login
  authApi->>DevAuth: startDevAuthSession(username)
  DevAuth-->>authApi: Return AuthUser
  authApi-->>UserAuthForm: Return successful login response
  AuthStore->>DevAuth: getDevAuthUser()
  ApiClient->>DevAuth: getDevAuthUser()
  DevAuth-->>ApiClient: Return local AuthUser
Loading

Possibly related PRs

Suggested reviewers: calcium-ion, t0ng7u

Poem

I’m a rabbit hopping through the build,
GHCR stars where Docker spilled.
OpenCode wears a mono thread,
Dev auth tucks tokens in bed.
Key names bloom in dialogs bright—
Hop, hop, ship into the night!

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

Warning

⚠️ This pull request shows signs of AI-generated slop (description_diff_mismatch, ai_padded_prose). It has been flagged by CodeRabbit slop detection and should be reviewed carefully.

@coderabbitai coderabbitai Bot mentioned this pull request Jul 18, 2026
11 tasks
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