ui: align Codex++ injected UI with Codex appearance#907
Open
wangbax wants to merge 3 commits into
Open
Conversation
0978cff to
87f5668
Compare
Owner
|
f1e2c48 to
356d0d5
Compare
Author
|
@BigPizzaV3 这轮已经基于最新 主要新增和调整:
验证已过:
PR 描述也已经同步更新了需求背景、方案说明和最终 UI 展现。 |
Refine the injected Codex++ menu, modal, sidebar action controls, and localized labels so they track Codex appearance and language behavior more closely. Cache backend status during menu open/close to avoid transient disconnected flashes, improve CDP target selection around avatar overlays, and keep the launcher waiting for packaged Codex app exits. Tests: node --check assets/inject/renderer-inject.js; cargo test -p codex-plus-core --test cdp_bridge; ./node_modules/.bin/vite build; cargo build -p codex-plus-launcher -p codex-plus-manager --release --target aarch64-apple-darwin. Generated-By: Codex (GPT-5) Co-authored-by: Codex <codex@openai.com>
Align the Codex++ modal, menu trigger, sidebar actions, language detection, and native-control styling with Codex appearance behavior. Keep the bridge binding scoped to the existing V2 contract while improving CDP page-target selection and covering the injected UI behavior with tests. Generated-By: Codex (GPT-5) Co-authored-by: Codex <codex@openai.com>
Keep an explicit Codex++ manager theme preference when present, but fall back to the system color scheme on first launch instead of writing dark mode unconditionally. Generated-By: Codex (GPT-5) Co-authored-by: Codex <codex@openai.com>
356d0d5 to
2a27578
Compare
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.
需求背景
这轮改动来自 Codex++ 注入 UI 在新版 Codex 桌面端中的一组视觉和交互回归反馈。Codex++ 的顶部入口、设置弹框、侧边栏会话操作、Upstream worktree 弹框和后端状态展示都注入在 Codex 原生页面上,因此它们需要跟随 Codex 当前的 Appearance、语言、菜单层级和原生控件状态,而不是维护一套独立的暗色、透明度和自定义控件风格。
本次排查过程中主要聚焦这些问题:
方案说明
1. 统一注入 UI 的 Codex token 体系
Codex++ 弹框、菜单、按钮、输入框、选择框、radio / switch 状态统一改为 CSS token 驱动,优先读取 Codex 当前页面暴露的颜色变量,例如菜单背景、输入框背景、边框、foreground、accent、focus border 和 button token。
本次特别收敛了这些控件:
2. 顶部 Codex++ 菜单入口更稳定
顶部 Codex++ 版本入口保留在 Codex 原生顶部 menu 区域,并收敛为和 Codex 原生菜单协调的 outline chip:
3. 后端连接状态改为缓存展示,避免开关弹框闪红
后端仍然按 heartbeat 检测,但弹框打开/关闭时不再把展示态立即重置为 checking / disconnected。
新增展示层逻辑:
最终效果是:已连接状态下反复打开/关闭 Codex++ 弹框,不会先出现红色未连接再跳绿色。
4. 语言跟随 Codex,默认英文并保留中文切换
补齐注入 UI 的英文文案,默认英文界面显示英文;切到中文后显示中文,再切回英文也会恢复英文。
实现上不新增 Codex++ 独立语言下拉,而是读取 Codex 当前可见原生 UI 的语言信号:
补齐/修正的文案包括:
5. 弹框和控件贴近 Codex Settings
设置弹框最终表现为:
6. 侧边栏会话操作改成 Codex 原生风格
会话 item 右侧操作区改为更接近 Codex 原生 Archive Chat / More menu:
7. Upstream worktree 和 CDP 稳定性补强
这次还补了几处和 UI 稳定性相关的底层行为:
8. PR 范围收敛
这次 rebase 到最新 origin/main 后,移除了无关的 bridge binding diff:
最终 UI 展现
顶部菜单入口
顶部 Codex++ 1.2.x 入口现在是和 Codex 原生菜单协调的 outline 按钮,尺寸稳定,不会因为顶部 menu 预览态显得被压扁。
Codex++ 设置弹框
点击顶部入口打开的 Codex++ 弹框会跟随 Codex 日/夜间和 accent 配色,不再固定黑色,也没有透明面板感。Backend connection 已连接时显示 connected,Page enhancements 等开关使用 Codex accent + 白色指示;插件相关按钮使用 Codex 原生按钮色值,并避免 Not needed 换行。
侧边栏 More actions
侧边栏会话 item 的删除和 More actions 与 Codex 原生 Archive Chat / 更多菜单一致,hover、icon、tooltip 和弹出菜单都更贴近原生体验。More actions 菜单更短、更紧凑,背景色是实色菜单背景,不再显得过宽或透明。
补充效果:
影响范围
验证
备注
release build 已通过,目前仅保留 main 上已有的 warning:Windows uninstall 常量未使用、Windows proxy parser 未使用,以及一个 unused_mut warning。