chore: 0.7.5 维护更新 — 卡片激活态 + OpenCode Go 探针 + Codex 徽标 - #20
Merged
Conversation
- 新增 `.apple-group.is-active` 内描边 + 内发光样式,暗色模式下描边与发光强度提升,激活态视觉信号专属 - `ProfileCard` 改用全局 `apple-group is-active` 类承担激活视觉,移除内联渐变与「活动」徽标;激活态发光与悬停描边通过特异性别分层 - `ProfilesView` 列表容器从 `apple-group` 改为 `space-y-[var(--gap-page)]`,由新增间距变量承担卡片分隔,去掉自定义分割线实现 🐛 fix(shell): Tauri 启动后主动抢焦点 - 启动序列在 `appWindow.show()` 后补一次 `setFocus()`,避免冷启动/静默启动场景下窗口可见却未获焦
- 把全部 Tailwind 类里的 `bg-[var(--xxx)]` / `hover:bg-[var(--xxx)]` / `group-hover:bg-[var(--xxx)]` 等改写为 `bg-(--xxx)` 形式,覆盖 AppShell、AppErrorBoundary、ProfileCard、ProfileEdit、ProfileIconEdit、McpView、McpEdit、PluginsView、SkillsView、SettingsSections、ChatGPTAccount、ProfileIconTile 等组件。 - `scripts/check-style-leaks.mjs` 新增「Tailwind CSS 变量简写」规则,禁止再使用旧的方括号写法,确保后续不会回退。 - `src/style.css` 顺手收尾:调整 `--window-chrome-height` 与品牌按钮浮标位置修正,并把 `.apple-group.is-active / :hover` 的发光描边用 `.profile-list >` 收敛到配置卡片专属作用域,避免污染其他 `.apple-group` 用法。
- `src/style.css` 删除 `profile-list > .apple-group:hover` 与 `.is-active:hover` 的旧描边样式,避免与近期新增的激活态发光描边叠加导致描边颜色异常。 - `--window-chrome-height` 由 `2.25rem` 修正为 `2.125rem`,同步 `.apple-sidebar-brand + .apple-sidebar-flyout` 的 `top` 注释,确保浮标垂直居中锚定准确。 - `ProfileCard.tsx` 标题悬停类由 `[-hover:text-accent-]` 修正为 `hover:text-accent`,恢复 Tailwind 变体语法生效。
- 拖拽原卡时改为 `invisible`,避免半透明叠加导致双层描边残留。 - `ProfileDragPreview` 接收 `active` 标记,激活态复用 `--selection-bg` 渐变与发光描边样式。 - 新增 `.profile-drag-preview.is-active` 在亮/暗模式下的 `box-shadow` 定义,与列表卡片保持一致。
- 在 `.profile-list > .apple-group.is-active` 与暗色变体中补回 `0 0 0 1px var(--panel-ring)`,避免与 `apple-group` 基类的 1px 外环重叠时仅保留 inset 描边而出现外描边残缺。 - 同步在 `.profile-drag-preview.is-active` 的非暗色选择器补齐同一描边,保持暗/亮主题下激活态卡片与拖拽预览视觉一致。
- 新增 `test_opencode_connection`:针对 `https://opencode.ai/zen/go/v1` 使用 `/responses` 接口带密钥触发鉴权后的请求校验,避免 `/models` 不鉴权导致的假阳 - 通过 400/422 + `max_output_tokens` 校验拒绝识别为探测成功,其余状态语义与原 `test_models_endpoint` 一致 - 网页调试模式(`webInvoke`)同步实现相同分支,并明确提示跨域被拦截时使用桌面版验证
- 抽取全局 `.codex-status` 系列样式并复用到 Profiles 页面,避免内联等价样式。 - 修正运行状态下的边框/背景配色,沿用成功色变量并通过 `color-mix` 柔和融合。 - 徽标新增 `role="status"`、`aria-live`、`aria-atomic` 等无障碍属性。
- 将 `VERSION` 从 `0.7.4` 升级到 `0.7.5`。 - 同步更新 `package.json`、`src-tauri/Cargo.toml`、`src-tauri/Cargo.lock`、`src-tauri/tauri.conf.json` 中的版本号。
- 后端:移除 `capture_profile` 中的 `set_active_profile`,仅同步 live 文档/auth 回当前激活档案;测试同步更新断言。 - 前端:移除 web-mock 捕获时设置 `webActiveProfileId` 的副作用;ProfilesView 成功提示改为"捕获成功"。 - 调整 `get_state` 中激活来源注释,明确激活状态只由手动应用建立。 ✨ feat(profiles): 编辑页支持 auth.json 只读预览与切换账号刷新 - 新增 `auth_preview` 命令与 API:读取当前或指定账号的 `~/.codex/auth.json` 原文用于预览。 - `ProfileEdit` 对官方供应商在无自定义 auth 时加载预览,编辑器进入只读模式并阻止保存。 - 切换绑定账号时刷新预览;`ConfigTextEditor` 新增 `readOnly` 透传与重配置支持。 - `Feedback` 补充 toast 文案归一化与关闭按钮,避免重复"连接失败"前缀。 🐛 fix(profiles): 供应商卡片拖拽预览与悬停态修正 - 拆出 `ProfileCardContent` / `ProfileCardActions` 供拖拽预览复用,承载余额、连通性等交互。 - 拖拽期间锁定悬停态:`is-drag-hover` 样式接管标题高亮与操作按钮可见性,移除 `drag-settling` 全局抑制。 - Codex 状态徽标改为 CSS 呼吸圆点,避免 SVG 描边动画抖动。 🌈 style(plugins): 统一插件安装/卸载/升级成功提示文案 - 调整 `PluginsView` 中插件操作的成功提示为"插件「xxx」"格式,提升一致性。 🌈 style(mcp): 移除 MCP 同步对话框的方向冗余标签 - 删除同步方向末尾的"数据库 → 文件 / 文件 → 数据库"重复文案。 🔧 chore(settings): 导出数据库成功提示精简路径 - `SettingsSections` 导出数据库成功提示去除本地路径,仅保留状态反馈。
- 新增 `--profile-active-bg` 主题变量(浅色 7%、深色 14%),统一激活态底色基调 - 用渐变底色替换原内发光阴影,整卡激活观感更克制 - 微调 ProfileCard 文本区域上移 2px,平衡激活态视觉重心
- `McpEdit`、`McpSyncDialog`、`PluginsView`、`SettingsSections` 将原生的 `apple-disclosure` 折叠面板替换为全局 `AppDisclosure` 组件,消除重复实现并保持视觉一致 - `McpSyncDialog` 差异列表结构改为 `mcp-sync-diff` 样式,字段对比改为「字段名 + 双列值」排版,并补充 `unmodeled_only` 时的回退说明 - 新增 `mcp-sync-diff` 及子元素全局样式,遵循现有 CSS 变量与 `apple-disclosure` 内部类
- `ProfileSummary` 增加 `kind`(`official` / `third_party`),依据 `provider_id` 自动推导;同步更新 web mock 与前端类型,保持 Rust 模型与 TS 定义一致。 - 新增解析逻辑:从插件本地清单的 `skills/`、`.mcp.json` 推断 `MarketplacePlugin.contains`(skills、mcp、app、hooks 等),市场元数据读取与单测同步覆盖。 🐛 fix(plugins): 第三方档案下提示插件加载限制 - `PluginsView` 接收 `AppState`,根据当前激活档案判断 `thirdPartyProfile`,市场详情页顶部展示提示:带 App 或 MCP 连接器的插件在第三方模型下可能无法加载,建议切换至 ChatGPT 官方订阅。 - 同步调整 `MarketplaceDetailView` / `PluginMarketplaceView` 的 props 传递链路,新增 `ContainsChips` 展示 `plugin.contains`。 ♻️ refactor(plugins): 重构 codex CLI 探测顺序 - 拆分 `cli_candidates(home, path_dirs)` 与 `find_codex_cli(home)`,探测顺序调整为 `~/.codex/bin` → PATH → 桌面版 appserver 兜底。 - 错误信息同步更新为"已尝试 `~/.codex/bin`、PATH 与桌面版 appserver 目录",并补充 `cli_candidates_prefer_path_before_desktop_appserver` 单元测试。
- 删除 `restart_codex` 命令的 `AppHandle` 参数与 `restart-progress` 事件订阅链路 - 移除 `RestartStage` 类型、`onRestartProgress` API 及前后端相关状态/样式/动画定义 - 重启按钮仅以 `LoadingSpinner` + "重启中…" 文案提示进行中态,不再展开进度卡
主要变更: - 新增 AuthSource 枚举区分 Desktop / OAuth,仅官方供应商有效;缺失时按 account_id 兼容推断 - 新增 apply_profile_with_auth 把配置切换 + OAuth 认证写入合并为同一事务,杜绝异步 token 刷新覆盖较新的切换 - 移除启动/聚焦时的 sync_active_profile_auth,OAuth 档案不再吸收 live 快照污染 - 编辑页 account 下拉改为「Codex登录 / OAuth登录」两态,新增「+ 添加或管理 ChatGPT 账号」入口跳转设置 → 账号 - AppShell 接收 onManageChatgptAccounts 回调,SettingsView 支持 initialSection 定位 重构: - accounts.rs:write_codex_auth_json → write_auth_json;提取 read_external_codex_auth 复用 - apply.rs:apply_profile 拆分为锁定内部方法,apply_profile_locked 共用同步/异步路径 - profiles.rs:get_profile 不再读取 live_auth,新增 desktop_login 字段展示 Desktop 登录邮箱 测试: - 重写 desktop_profile_syncs_and_restores_auth_snapshot 覆盖 Desktop 认证同步+恢复 - 移除 apply_profile_snapshots_active_official_live_auth_before_switching(已被新测试覆盖)
- 后端实现 `auth_get_quota` 命令,按 Desktop/OAuth 来源获取 access_token 并请求 chatgpt.com/backend-api/wham/usage,统一返回主/次用量窗口的已用百分比、重置时间与窗口标签。 - 官方档案(kind=official)走 ChatGPT 官方额度查询,支持空闲/Plus 等按窗口长度区分显示(5小时、7天、30天),不再使用 MiniMax 占位的 5h/7d 文案。 - `ProfileBalanceInfo` 扩展 `usage_reset_at`/`usage_label`/`weekly_reset_at`/`weekly_label` 字段,前端设置页与档案卡片复用同一数据源展示剩余额度与重置时间。 - 设置页 ChatGPT 账号卡片新增进度条形式的额度面板,设备码登录授权码支持一键复制并显示复制成功反馈。 - 补充后端 ChatGPT 窗口映射、跳过空窗口以及官方配置鉴权流程的单元测试,前端 web mock 同步新字段。
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.
概要
0.7.5 维护更新,主要围绕三件事:
配置卡片激活态重做
.apple-group.is-active发光描边(明/暗双套),.profile-drag-preview.is-active同步保留.is-drag-hover):标题变 accent、操作区常显Codex 状态徽标
.codex-status全局样式:暗/亮 + running/stopped + 信号点呼吸动画 +prefers-reduced-motion回退role="status" aria-live="polite" aria-atomic="true"可达性OpenCode Go 鉴权探针
/models不校验密钥,改发{model,input,max_output_tokens:0}到/responses触发 400/422 +max_output_tokens文本视为鉴权通过杂项
bg-[var(--…)]简写统一为 Tailwind 4 的bg-(--…),并入scripts/check-style-leaks.mjs防止回滚AppDisclosure--window-chrome-height: 2.5rem → 2.125remappWindow.setFocus()保证窗口激活文件清单(11 commits)
验证
pnpm check(typecheck + vitest + cargo fmt/clippy/test)备注
工作树还有未提交的草稿改动(auth 预览、卡片重构等),未纳入本 PR。