Skip to content

feat(ui): 完成 2.0 界面整理与代码清理 - #1043

Open
appergb wants to merge 15 commits into
betafrom
codex/ui-2.0-details
Open

feat(ui): 完成 2.0 界面整理与代码清理#1043
appergb wants to merge 15 commits into
betafrom
codex/ui-2.0-details

Conversation

@appergb

@appergb appergb commented Sep 8, 2026

Copy link
Copy Markdown
Collaborator

摘要

整合 OpenLess 2.0 的本地界面改动,完成设置子页、风格图标和追问页整理,并清理废弃代码、重写过时注释、统一应用源码格式。目标分支为 beta,已同步最新 Fn 快捷键与百炼连接修复。

修复 / 新增 / 改进

  • 实验功能与渠道编辑使用右侧设置子页;渠道表单支持内容滚动,删除渠道使用明确的按钮。
  • 删除追问顶部示例区;风格卡片使用灰色选中态,统一公共图标,并支持上传 SVG、恢复默认图标。上传内容转为 PNG 后由 Core 保存,可随风格包导出。
  • 删除无运行时引用的旧快捷键录制、风格偏好模块及对应测试,清理无消费方的模型目录缓存、废弃文案和样式变量;开启 TypeScript 未使用代码检查。
  • 注释改为说明当前职责、边界和生命周期,移除失效文档引用;按 macOS SDK 统一 CoreFoundation Boolean 声明。
  • 增加可复用的格式配置与 npm run format / format:check,统一前端、Rust、Kotlin、C/C++ 与 shell 格式。格式调整单独提交于 4519f19c,可按提交审查。

兼容

  • 不包含:稳定发布、安装包签名或真实设备验收。
  • 风格图标沿用既有图片与 ZIP 资源限制;跨平台业务规则和公共 Host 合同继续由 Core 管理。
  • 新增依赖仅为锁定版本的开发格式工具;未提交本地编辑器交换文件。

测试计划

  • npm test:生产前端构建及自动发现的 70 个前端/合同测试文件通过。
  • cargo test --workspace --locked:946 项 Core/Linux Host 测试通过;默认忽略的 CLI 集成合同已另行通过。
  • cargo test --locked --manifest-path src-tauri/Cargo.toml --lib:macOS 443 项通过。
  • cargo test --locked --manifest-path src-tauri/backend-tests/Cargo.toml:1 项通过。
  • 使用固定 CLI 0.146.0 补跑 hardening_actually_narrows_the_writable_roots -- --ignored:1 项通过;修正测试跨说明段计数的问题。
  • cargo build --locked --manifest-path src-tauri/Cargo.toml:macOS 应用二进制构建成功。
  • Prettier、三个 Cargo manifest 的 rustfmt、clang-format、ktfmt 检查及 git diff --check 通过。
  • Windows / Android 目标编译与平台测试由本 PR 的 CI 验证;Linux 原生设备交互需 Linux 环境。

本机构建仍有既有原生/依赖警告;测试和编译成功不代表所有警告已消除。测试入口与平台范围见 docs/architecture.md,格式规范见 docs/structure.md

sim added 15 commits September 7, 2026 12:51
- 主页前置下一步与真实服务状态,服务卡直达对应设置;概览与热力图排布调整
- 设置按任务分类并支持搜索、焦点返回与 Escape 语义;旧 section ID 保持稳定
- AI 分区拆分语言模型/语音识别/本地模型/连接;渠道列表与表单重构,设置实底
- 本地模型管理与下载目录重排,补空态、主操作与窄屏布局
- Core 生成 provider descriptor 公开目录供浏览器预览懒加载,原生 IPC 合同不变
- Linux egui 按开始/听写/AI 服务/模型/工具/手机输入/历史/设置组织页面并加环境引导
- 五语言文案与文档(体验梳理、架构、计划收口)同步
删除已完成/已收口任务的规划与过程记录(2.0 UX 收口、Core 2.0 计划、
PR#1019 复核与桌面复审、平台边界审计、Linux 引导知识快照、
Linux 共享后端阶段计划、供应商渠道计划、Windows sherpa 规划、
PR#711 评审截图、应用内测试计划),保留规范性文档、验收清单、
Linux 交接目录与运营指南,并修复全部引用链接。
修正 92da4fb 中误随 git add -A 提交的 Mimosa 安全钩子运行状态文件;
该目录为插件会话状态,不属于版本库,已忽略以防再次混入。
前端:chat 桶文件、SegSimple、SwitchLite、androidMicrophonePermission 转发
shim、SelectionPolishSection 孤儿分区、autostart 环境类型声明;依赖移除
@formkit/auto-animate 与 @tauri-apps/plugin-autostart npm 包装层(Rust 插件
与 capability 保留,autostart 经原生 invoke 字符串调用)。
Rust:polish 旧副本两文件、android/types.rs、remote_server/lan_addresses.rs
(均为 Core 2.0 整合遗留,模块树未引用,编译行为不变)。
npm test 构建与全部测试通过;三 crate cargo fmt --check 干净。
保留目录骨架与文件名,内容全部以当前源码为依据重写:范围与版本锚点
(2.0.0-Beta.1 / crate 0.1.0 / com.openless.app)、架构分层与 Core 模块地图、
桌面验收清单(功能域→源码入口→证据)、Linux 交接 8 篇(沿用 L01-L12 登记体系,
锚点落到 settings.rs/audio.rs/ports.rs 等)、后端接口契约、Android 计划、
运营指南 5 篇(以 provider descriptor 与实际 CSP/.gitmodules 为锚)。
原过程中的计划叙述、截图与历史收口记录不再保留。
volcengine-setup.md 重写为以 descriptor 为锚后,旧指南的 4 张控制台
截图不再被任何文档引用。
#1021 重构后 WindowsKeyboardRuntimeTarget 由插入模式派生:默认 TSF 模式下
翻转 keyboard-list 偏好不产生有效目标变化,Linux 接受并广播 PreferencesChanged;
将插入模式切到 SendInput 且隐藏键盘列表会真正驱动 Windows 语言 profile,
合同仍要求显式拒绝(Unsupported)。旧断言只翻转原始字段,与新语义冲突。
Consolidate the current 2.0 sidebar, overview, settings, vocabulary editing, correction rules page, and first-launch splash with their Core and Tauri adapters. Include the accompanying source and architecture documentation updates.

Validation: npm test (build and 73 discovered test files); cargo test -p openless-core --locked; Core/Linux and Tauri rustfmt checks.
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