diff --git a/README.en.md b/README.en.md index 4e0ffed7..e25a5079 100644 --- a/README.en.md +++ b/README.en.md @@ -12,17 +12,36 @@

-Universal Code is a desktop AI coding workbench. Connect your chosen model and move a project forward in one conversation, with file changes, command results, and sources available for review. +Universal-Code is a desktop AI coding workbench. Connect your chosen model and move a project forward in one conversation, with file changes, command results, and sources available for review. **v1.0.0 “First Voyage” is being prepared for release.** The [release notes](docs/releases/v1.0.0.md) record verified scope and remaining work. Public downloads still include older previews; new Mac packages are unnotarized previews. -## Why Universal Code? +## Why Universal-Code? - **Work on a real project**: read and edit files, run builds, and inspect the resulting changes. - **Fewer interruptions, with control**: select Full Access for a task to allow ordinary file changes and network commands to proceed automatically; file deletion still requires confirmation. - **Keep research traceable**: prefer native search when the provider supports it, read GitHub, Hacker News, and RSS/Atom sources, and retain page snapshots and citations. - **Continue existing work**: task history, tool records, and checkpoints stay on your machine so you can inspect progress and continue the conversation. +## Appearance + +Choose **System, Light, Dark, or Mist** in **Settings → Appearance**. System follows your device’s light or dark setting. Mist uses a muted blue-gray canvas and light frosted surfaces, with adjustable blur, opacity, and brightness. + +![The same Universal-Code conversation in Light and Dark, split diagonally](docs/images/appearance/light-dark.png) + +Captured from a production build of the current source using a local demo project and offline sample replies. Light is on the left; Dark is on the right. + +
+View theme options and Mist + +![System, Light, Dark, and Mist theme options](docs/images/appearance/theme-options.png) + +![Universal-Code in Mist](docs/images/appearance/conversation-mist.png) + +
+ +See the [appearance guide](docs/usage.md#外观--appearance) for details. + ## Quick start ### 1. Open the app diff --git a/README.md b/README.md index fe5419b1..9bb213e4 100644 --- a/README.md +++ b/README.md @@ -12,17 +12,36 @@

-Universal Code 是一个桌面 AI 编程工作台。连接你选择的模型,在同一段对话中推进项目,查看文件改动、命令结果和资料来源。 +Universal-Code 是一个桌面 AI 编程工作台。连接你选择的模型,在同一段对话中推进项目,查看文件改动、命令结果和资料来源。 **v1.0.0「启航」正在准备发布。** [发布说明](docs/releases/v1.0.0.md)记录已验证范围和待完成事项;目前公开下载仍有历史预览,Mac 新包为未公证预览。 -## 为什么选择 Universal Code +## 为什么选择 Universal-Code - **围绕真实项目工作**:阅读和修改文件、运行构建、查看差异,把任务结果落到工作区。 - **少打断,保留控制**:选择当前任务的 Full Access 后,普通文件修改与联网命令可自动执行;文件删除仍需确认。 - **查资料时保留来源**:优先使用供应商支持的原生搜索,也能读取 GitHub、Hacker News 和 RSS/Atom,并保留网页快照与引用。 - **继续已有工作**:任务历史、工具记录和检查点保存在本机,可回看进度、检查改动和继续对话。 +## 外观 + +在 **设置 → 外观** 中选择 **系统、浅色、深色、雾透**。系统模式随设备设置切换浅深;雾透使用灰蓝底色与轻盈的磨砂材质,还可调整模糊度、磨砂度和亮度。 + +![Universal-Code 同一段对话的浅色与深色外观,左浅右深斜向分割](docs/images/appearance/light-dark.png) + +截图来自当前源码的生产构建,使用本地演示项目与离线示例回复。左侧为浅色,右侧为深色。 + +
+查看主题选项与雾透外观 + +![系统、浅色、深色、雾透四个主题选项](docs/images/appearance/theme-options.png) + +![Universal-Code 雾透外观](docs/images/appearance/conversation-mist.png) + +
+ +更多设置见[外观说明](docs/usage.md#外观--appearance)。 + ## 快速开始 ### 1. 打开应用 diff --git a/docs/images/appearance/conversation-dark.png b/docs/images/appearance/conversation-dark.png new file mode 100644 index 00000000..9687f7ee Binary files /dev/null and b/docs/images/appearance/conversation-dark.png differ diff --git a/docs/images/appearance/conversation-light.png b/docs/images/appearance/conversation-light.png new file mode 100644 index 00000000..874f67c2 Binary files /dev/null and b/docs/images/appearance/conversation-light.png differ diff --git a/docs/images/appearance/conversation-mist.png b/docs/images/appearance/conversation-mist.png new file mode 100644 index 00000000..aa3457dc Binary files /dev/null and b/docs/images/appearance/conversation-mist.png differ diff --git a/docs/images/appearance/light-dark.png b/docs/images/appearance/light-dark.png new file mode 100644 index 00000000..1f94d995 Binary files /dev/null and b/docs/images/appearance/light-dark.png differ diff --git a/docs/images/appearance/theme-options.png b/docs/images/appearance/theme-options.png new file mode 100644 index 00000000..75548f58 Binary files /dev/null and b/docs/images/appearance/theme-options.png differ diff --git a/docs/usage.md b/docs/usage.md index 5c382780..780da408 100644 --- a/docs/usage.md +++ b/docs/usage.md @@ -23,6 +23,34 @@ compatibility identifiers. The CLI binary and commands, `/api/v1/runs`, `/api/v1/sessions`, OpenAPI schemas, event types, and SQLite `work_item` identities remain unchanged. / 上述 CLI、API、协议、事件与 SQLite 标识保持不变。 +## 外观 / Appearance + +打开「设置 → 外观」选择主题,偏好保存在当前设备,重新打开应用后继续生效。 +Open **Settings → Appearance** to choose a theme. Your choice is saved on the current device. + +| 选项 / Option | 效果 / Behavior | +| --- | --- | +| 系统 / System | 随设备的浅色或深色设置即时切换,包括已打开的代码编辑器。Follows device appearance changes, including open code editors. | +| 浅色 / Light | 明亮的中性白色界面。A bright, neutral white interface. | +| 深色 / Dark | 深灰界面与玻璃材质。Dark gray surfaces with glass materials. | +| 雾透 / Mist | 灰蓝透色与轻盈磨砂,可调模糊度、磨砂度、背景亮度和光斑。Muted blue-gray frosted surfaces with adjustable blur, opacity, brightness, and ambient glow. | + +![外观设置中的四个主题选项](images/appearance/theme-options.png) + +系统选项的预览左右分色;其他预览展示对应主题的侧栏、对话与输入框。手动选择浅色、 +深色或雾透后,设备设置的变化不会覆盖该选择。雾透的「还原默认值」恢复标准云母参数。 +System uses a split preview; the other previews show their sidebar, conversation, and composer. +An explicit theme stays selected when the device appearance changes. Mist’s **Reset to defaults** +restores the standard Mica settings. + +查看[浅色原图](images/appearance/conversation-light.png)、[深色原图](images/appearance/conversation-dark.png) +和[雾透原图](images/appearance/conversation-mist.png)。截图于 2026-10-19 在 Windows / Edge +中从生产构建拍摄,窗口为 1440 × 900;项目、回复和用量属于离线演示数据。 +README 的分割图由同一对话的浅色与深色原图组合。 +Screenshots were captured from a production build in Edge on Windows at 1440 × 900 on +2026-10-19. Project content, replies, and usage are offline demonstration data. The README +combines the Light and Dark captures of the same conversation. + ## Portable Build Diagnostics ```powershell diff --git a/web/src/components/file-proposal-editor.test.tsx b/web/src/components/file-proposal-editor.test.tsx index b904af86..71d39219 100644 --- a/web/src/components/file-proposal-editor.test.tsx +++ b/web/src/components/file-proposal-editor.test.tsx @@ -1,13 +1,14 @@ import { QueryClient, QueryClientProvider } from "@tanstack/react-query"; -import { render, screen, waitFor } from "@testing-library/react"; +import { act, render, screen, waitFor } from "@testing-library/react"; import userEvent from "@testing-library/user-event"; import type { APIClient } from "../api/client"; import type { FileEditProposalSourceView } from "../api/types"; import { FileProposalEditor } from "./file-proposal-editor"; +import { applyPrayuTheme } from "../lib/appearance"; vi.mock("@monaco-editor/react", () => ({ - default: ({ value, onChange }: { value: string; onChange: (value: string) => void }) => -