Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -370,6 +370,9 @@ Monaco 视图。语法 token 仍使用统一的 `color-mappings.json` 与共享
选择、当前行和缩进引导线仍使用当前主题颜色。只把 SwiftUI 外层设为透明是不够的,
因为不透明的 WebView 或 `editor.background` 仍会覆盖图片。也不能把 Monaco 永久设成
透明,否则没有背景图时会丢失正常的编辑器表面和主题颜色。
主题背景色还必须传给 `editorOverviewRuler.background`。启用右侧代码缩略图时,
Monaco 会给未指定背景的概览标尺填入默认分词背景色,在壁纸模式下形成黑色竖条;
显式传入透明色后,概览标尺与编辑区一起露出工作台图片。

### 只读差异视图

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,11 @@ Git subprocesses, sometimes rebuilding several repositories in one case. The
SharedRust lane assigns the `tests::git_history_rewrite::` module and the older
`tests::git::git_write_squashes_`, `git_write_deletes_a_local_commit_`, and
`git_write_edits_a_local_commit_message_` scenarios a 30-second process budget.
Core rebase requests use a nested 20-second deadline. Other cases retain the
normal 15-second budget. The Rust runner's repeatable
The `tests::git_patch_exchange::patch_metadata_can_list_an_oversized_export_before_selecting_a_small_subset`
case also gets 30 seconds because it writes and inspects a real file larger
than the 32 MiB patch limit; Windows CI terminated it at 16.1 seconds under
the default 15-second limit. Core rebase requests use a nested 20-second
deadline. Other cases retain the normal 15-second budget. The Rust runner's repeatable
`--test-budget prefix=milliseconds` option uses the most specific matching
prefix, records each case's effective budget in JSON, uses that budget for
HTML/JUnit classification, and remains capped by the shared suite deadline.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,8 @@ function Invoke-TimedRustTests {
"tests::git_history_rewrite::",
"tests::git::git_write_squashes_",
"tests::git::git_write_deletes_a_local_commit_",
"tests::git::git_write_edits_a_local_commit_message_"
"tests::git::git_write_edits_a_local_commit_message_",
"tests::git_patch_exchange::patch_metadata_can_list_an_oversized_export_before_selecting_a_small_subset"
)) {
$arguments += @("--test-budget", "${prefix}=30000")
}
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/ci-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -463,6 +463,7 @@ jobs:
--test-budget tests::git::git_write_squashes_=30000 `
--test-budget tests::git::git_write_deletes_a_local_commit_=30000 `
--test-budget tests::git::git_write_edits_a_local_commit_message_=30000 `
--test-budget tests::git_patch_exchange::patch_metadata_can_list_an_oversized_export_before_selecting_a_small_subset=30000 `
--build-timeout-ms 600000 `
--suite-timeout-ms 1200000 `
--report .artifacts/test-stability/windows-real-jdt.json
Expand Down
1 change: 1 addition & 0 deletions docs/development/platform-parity-matrix.csv
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ workspace-tabs-projects,工作区,工作区生命周期,多项目与多标签,
editor-text-tabs,编辑器,文本编辑,文本编辑与标签生命周期,已实现,待验证,已实现,待验证,Editor,打开、编辑、保存、关闭和恢复多个文本文件,确认光标、脏状态和标签状态;在 macOS 打开无扩展名文本文件,确认标签与项目树图标一致;从外部改为二进制后折叠并展开项目树,确认两处图标更新一致。,,macos/Sources/Lithe/Views/Editor; macos/Sources/Lithe/Models/Editor,windows/tauri/src/features/editor; windows/tauri/src/features/tabs
editor-pointer-selection,编辑器,文本编辑,鼠标与触控板点击、选词和拖选,已实现,待验证,已实现,待验证,Editor,macOS 分别启用微信输入法和系统 ABC,快速轻点不同位置后松手移动,确认不扩展选区、不移动文字;验证同位置双击选词、Shift 点击扩选、按住拖选、选中文字拖放、主编辑器和分屏及 diff。运行 scripts/probe-macos-monaco.sh --workbench-tests;Windows 验证同样的正常鼠标交互。,macOS 在宿主修正 WebKit 零按钮按下事件,保留 Monaco 选择语义。Linux Chromium 真实 Monaco 控制事件回放通过,仍待 macOS 微信输入法与 Windows WebView2 实机验证。,macos/EditorFrontend/main.ts; macos/EditorFrontend/mouse-input.ts; macos/Experiments/Monaco/mouse-input.integration.ts,windows/tauri/src/features/editor/components/monaco-editor.tsx
editor-language-basics,编辑器,文本编辑,语法高亮与编辑器模型,已实现,待验证,已实现,待验证,Editor,分别打开 Java、Markdown 和普通文本,确认语言识别、语法高亮和模型切换;开启缩略图并滚动,确认滚动条轨道不透出编辑器代码。,,macos/Sources/Lithe/Views/Editor; macos/Sources/Lithe/Models/Editor,windows/tauri/src/features/editor; frontend/editor; windows/tauri/src/features/editor/engines/monaco/theme.ts
editor-wallpaper-overview-ruler,编辑器,编辑器外观,macOS 工作台壁纸模式下,编辑器概览标尺与代码缩略图随编辑器背景透明,不显示黑色竖条;普通主题仍保持实体背景,已实现,待验证,平台专属,不适用,Editor,在 macOS 选择工作台背景并打开文本文件,分别关闭和打开右侧 Agent 面板,确认编辑器最右侧概览标尺不出现黑色竖条;关闭背景图后确认普通主题底色保持不变。运行真实 WebKit 工作台主题集成测试。Windows 不使用 macOS 原生工作台壁纸。,,frontend/editor/src/theme.ts; macos/Sources/Lithe/Platform/MacOS/MonacoWorkbenchEditor.swift; macos/Experiments/Monaco/workbench.integration.ts,windows/tauri/src/features/editor/engines/monaco/theme.ts
editor-semantic-highlighting,编辑器,文本编辑,LSP 语义高亮,已实现,待验证,已实现,待验证,Editor / Language Tooling,打开普通 Java 文件并等待 JDTLS 就绪,开启语义高亮,确认字段、方法等按协商图例上色;编辑、切换、关闭文档和重连服务器后不应用旧结果;服务器 refresh 后重新请求;关闭设置或大文件降级时保留基础语法高亮。,Windows 复用 Core semanticTokens 和共享 fixture,修复 #675;Linux 上的适配器与模型测试不替代 Windows WebView2/JDTLS 实机验收。,macos/Sources/Lithe/Models/AppModel/AppModel+LanguageEditing.swift; macos/Sources/LitheLanguageIntelligenceModule/Runtime/LanguageServerSession.swift; frontend/editor/src/semantic-tokens.ts,windows/tauri/src/platform/lsp-core-adapter.ts; windows/tauri/src/features/editor/lsp/lsp-client.ts; windows/tauri/src/features/editor/engines/monaco/semantic-token-provider.ts; windows/tauri/src/features/editor/engines/monaco/semantic-token-provider.test.ts; windows/tauri/src/platform/lsp-core-adapter.test.ts
editor-multiline-tabs,编辑器,文本编辑,多行标签与标签导航,已实现,待验证,已实现,待验证,Editor,打开足够多文件触发多行标签,确认滚动、切换、关闭和活动文件保持。,,macos/Sources/Lithe/Views/Editor,windows/tauri/src/features/tabs
search-quick-open,搜索,搜索与导航,快速打开文件与符号,已实现,待验证,已实现,待验证,Search,使用文件名、路径和符号查询,确认排序、键盘导航和打开位置。,,macos/Sources/Lithe/Views/Search; macos/Sources/Lithe/Views/Workbench,windows/tauri/src/features/quick-open
Expand Down
9 changes: 5 additions & 4 deletions docs/development/platform-parity-matrix.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@

- 最后复核:2026-09-27
- 盘点状态:initial-static-inventory(根据 macOS Views/Application/Services、Windows features/extensions 和共享契约的代码入口进行初版盘点;未替代真实运行验收。)
- 功能项:101
- macOS:实现:✅ 88 已实现,🟡 3 部分实现,❌ 7 未实现,🧩 3 平台专属;验证:✔️ 0 已验证,🔍 91 待验证,— 10 不适用
- Windows:实现:✅ 87 已实现,🟡 10 部分实现,❌ 4 未实现,🧩 0 平台专属;验证:✔️ 0 已验证,🔍 97 待验证,— 4 不适用
- 功能项:102
- macOS:实现:✅ 89 已实现,🟡 3 部分实现,❌ 7 未实现,🧩 3 平台专属;验证:✔️ 0 已验证,🔍 92 待验证,— 10 不适用
- Windows:实现:✅ 87 已实现,🟡 10 部分实现,❌ 4 未实现,🧩 1 平台专属;验证:✔️ 0 已验证,🔍 97 待验证,— 5 不适用

## 实现状态定义

Expand Down Expand Up @@ -66,13 +66,14 @@
</details>

<details>
<summary><strong>编辑器</strong> · 13 个能力点</summary>
<summary><strong>编辑器</strong> · 14 个能力点</summary>

| 功能组 | 能力点 | macOS | Windows | 负责人 | 验证方式 | 备注 |
| --- | --- | --- | --- | --- | --- | --- |
| 文本编辑 | **文本编辑与标签生命周期**<br><sub>editor-text-tabs</sub> | ✅ 已实现<br><sub>🔍 待验证</sub><br><sub>`macos/Sources/Lithe/Views/Editor`、`macos/Sources/Lithe/Models/Editor`</sub> | ✅ 已实现<br><sub>🔍 待验证</sub><br><sub>`windows/tauri/src/features/editor`、`windows/tauri/src/features/tabs`</sub> | Editor | 打开、编辑、保存、关闭和恢复多个文本文件,确认光标、脏状态和标签状态;在 macOS 打开无扩展名文本文件,确认标签与项目树图标一致;从外部改为二进制后折叠并展开项目树,确认两处图标更新一致。 | |
| 文本编辑 | **鼠标与触控板点击、选词和拖选**<br><sub>editor-pointer-selection</sub> | ✅ 已实现<br><sub>🔍 待验证</sub><br><sub>`macos/EditorFrontend/main.ts`、`macos/EditorFrontend/mouse-input.ts`、`macos/Experiments/Monaco/mouse-input.integration.ts`</sub> | ✅ 已实现<br><sub>🔍 待验证</sub><br><sub>`windows/tauri/src/features/editor/components/monaco-editor.tsx`</sub> | Editor | macOS 分别启用微信输入法和系统 ABC,快速轻点不同位置后松手移动,确认不扩展选区、不移动文字;验证同位置双击选词、Shift 点击扩选、按住拖选、选中文字拖放、主编辑器和分屏及 diff。运行 scripts/probe-macos-monaco.sh --workbench-tests;Windows 验证同样的正常鼠标交互。 | macOS 在宿主修正 WebKit 零按钮按下事件,保留 Monaco 选择语义。Linux Chromium 真实 Monaco 控制事件回放通过,仍待 macOS 微信输入法与 Windows WebView2 实机验证。 |
| 文本编辑 | **语法高亮与编辑器模型**<br><sub>editor-language-basics</sub> | ✅ 已实现<br><sub>🔍 待验证</sub><br><sub>`macos/Sources/Lithe/Views/Editor`、`macos/Sources/Lithe/Models/Editor`</sub> | ✅ 已实现<br><sub>🔍 待验证</sub><br><sub>`windows/tauri/src/features/editor`、`frontend/editor`、`windows/tauri/src/features/editor/engines/monaco/theme.ts`</sub> | Editor | 分别打开 Java、Markdown 和普通文本,确认语言识别、语法高亮和模型切换;开启缩略图并滚动,确认滚动条轨道不透出编辑器代码。 | |
| 编辑器外观 | **macOS 工作台壁纸模式下,编辑器概览标尺与代码缩略图随编辑器背景透明,不显示黑色竖条;普通主题仍保持实体背景**<br><sub>editor-wallpaper-overview-ruler</sub> | ✅ 已实现<br><sub>🔍 待验证</sub><br><sub>`frontend/editor/src/theme.ts`、`macos/Sources/Lithe/Platform/MacOS/MonacoWorkbenchEditor.swift`、`macos/Experiments/Monaco/workbench.integration.ts`</sub> | 🧩 平台专属<br><sub>— 不适用</sub><br><sub>`windows/tauri/src/features/editor/engines/monaco/theme.ts`</sub> | Editor | 在 macOS 选择工作台背景并打开文本文件,分别关闭和打开右侧 Agent 面板,确认编辑器最右侧概览标尺不出现黑色竖条;关闭背景图后确认普通主题底色保持不变。运行真实 WebKit 工作台主题集成测试。Windows 不使用 macOS 原生工作台壁纸。 | |
| 文本编辑 | **LSP 语义高亮**<br><sub>editor-semantic-highlighting</sub> | ✅ 已实现<br><sub>🔍 待验证</sub><br><sub>`macos/Sources/Lithe/Models/AppModel/AppModel+LanguageEditing.swift`、`macos/Sources/LitheLanguageIntelligenceModule/Runtime/LanguageServerSession.swift`、`frontend/editor/src/semantic-tokens.ts`</sub> | ✅ 已实现<br><sub>🔍 待验证</sub><br><sub>`windows/tauri/src/platform/lsp-core-adapter.ts`、`windows/tauri/src/features/editor/lsp/lsp-client.ts`、`windows/tauri/src/features/editor/engines/monaco/semantic-token-provider.ts`、`windows/tauri/src/features/editor/engines/monaco/semantic-token-provider.test.ts`、`windows/tauri/src/platform/lsp-core-adapter.test.ts`</sub> | Editor / Language Tooling | 打开普通 Java 文件并等待 JDTLS 就绪,开启语义高亮,确认字段、方法等按协商图例上色;编辑、切换、关闭文档和重连服务器后不应用旧结果;服务器 refresh 后重新请求;关闭设置或大文件降级时保留基础语法高亮。 | Windows 复用 Core semanticTokens 和共享 fixture,修复 #675;Linux 上的适配器与模型测试不替代 Windows WebView2/JDTLS 实机验收。 |
| 文本编辑 | **多行标签与标签导航**<br><sub>editor-multiline-tabs</sub> | ✅ 已实现<br><sub>🔍 待验证</sub><br><sub>`macos/Sources/Lithe/Views/Editor`</sub> | ✅ 已实现<br><sub>🔍 待验证</sub><br><sub>`windows/tauri/src/features/tabs`</sub> | Editor | 打开足够多文件触发多行标签,确认滚动、切换、关闭和活动文件保持。 | |
| Markdown | **Markdown 预览与富文本渲染**<br><sub>markdown-rendering</sub> | ✅ 已实现<br><sub>🔍 待验证</sub><br><sub>`macos/Sources/Lithe/Views/Editor/MarkdownPreviewView.swift`、`macos/Sources/Lithe/Core/Ports/MarkdownRendering.swift`</sub> | ✅ 已实现<br><sub>🔍 待验证</sub><br><sub>`windows/tauri/src/features/editor/markdown`</sub> | Editor | 使用代码高亮、表格、Mermaid、链接和相对路径 fixture 对比渲染结果。 | |
Expand Down
3 changes: 2 additions & 1 deletion frontend/editor/src/theme.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,9 @@ export function defineWorkbenchTheme(input: WorkbenchThemeInput, palette: Syntax
"editorOverviewRuler.wordHighlightTextForeground": "#00000000",
};
const surfaceColors: [keyof NonNullable<WorkbenchThemeInput["colors"]>, string[]][] = [
// Monaco otherwise fills the right overview ruler from tokenizer defaults when the minimap is enabled.
["background", ["editor.background", "editorGutter.background", "editorStickyScroll.background",
"editorStickyScrollGutter.background", "minimap.background"]],
"editorStickyScrollGutter.background", "minimap.background", "editorOverviewRuler.background"]],
["cursor", ["editorCursor.foreground"]],
["selection", ["editor.selectionBackground", "editor.inactiveSelectionBackground"]],
["lineHighlight", ["editor.lineHighlightBackground"]],
Expand Down
14 changes: 14 additions & 0 deletions macos/Experiments/Monaco/workbench.integration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -393,6 +393,14 @@ async function verify() {
});
const surface = editor.getDomNode()!;
const backgroundColor = () => getComputedStyle(surface).backgroundColor.replace(/ /g, "");
const overviewRulerBackground = () => getComputedStyle(surface)
.getPropertyValue("--vscode-editorOverviewRuler-background").trim().replace(/ /g, "");
const overviewRulerPixel = () => {
editor.render();
const canvas = surface.querySelector<HTMLCanvasElement>(".decorationsOverviewRuler")!;
assert(canvas.width > 0 && canvas.height > 0, "overview ruler has no render surface");
return [...canvas.getContext("2d")!.getImageData(Math.floor(canvas.width / 2), Math.floor(canvas.height / 2), 1, 1).data];
};
try {
window.lithe.configure({
fontFamily: "monospace", fontSize: 13, wrap: false, minimap: true,
Expand All @@ -403,6 +411,9 @@ async function verify() {
const solid = backgroundColor();
assert(["rgb(242,243,244)", "rgba(242,243,244,1)"].includes(solid),
`host light theme did not replace Monaco's initial dark surface: ${solid}`);
assert(overviewRulerBackground() === "#f2f3f4",
`opaque overview ruler background did not match the editor surface: ${overviewRulerBackground()}`);
assert(overviewRulerPixel().join() === "242,243,244,255", "solid overview ruler rendered with a different background");
window.lithe.configure({
fontFamily: "monospace", fontSize: 13, wrap: false, minimap: true,
theme: { id: "probe-light-wallpaper", dark: false, colors: {
Expand All @@ -412,6 +423,9 @@ async function verify() {
const transparent = backgroundColor();
assert(transparent === "rgba(0,0,0,0)",
`transparent Monaco surface still covered the native wallpaper: ${transparent}`);
assert(overviewRulerBackground() === "rgba(0,0,0,0)",
`overview ruler still covered the native wallpaper: ${overviewRulerBackground()}`);
assert(overviewRulerPixel().join() === "0,0,0,0", "transparent overview ruler rendered an opaque strip");
} finally {
window.lithe.configure({ dark: false, fontFamily: "monospace", fontSize: 13, wrap: false, minimap: true });
await window.lithe.retain([]);
Expand Down
22 changes: 22 additions & 0 deletions shared/platform-feature-matrix.json
Original file line number Diff line number Diff line change
Expand Up @@ -460,6 +460,28 @@
"owner": "Editor",
"verification": "分别打开 Java、Markdown 和普通文本,确认语言识别、语法高亮和模型切换;开启缩略图并滚动,确认滚动条轨道不透出编辑器代码。"
},
{
"id": "editor-wallpaper-overview-ruler",
"area": "编辑器",
"group": "编辑器外观",
"capability": "macOS 工作台壁纸模式下,编辑器概览标尺与代码缩略图随编辑器背景透明,不显示黑色竖条;普通主题仍保持实体背景",
"macos": {
"implementationStatus": "implemented",
"verificationStatus": "pending",
"evidence": [
"frontend/editor/src/theme.ts",
"macos/Sources/Lithe/Platform/MacOS/MonacoWorkbenchEditor.swift",
"macos/Experiments/Monaco/workbench.integration.ts"
]
},
"windows": {
"implementationStatus": "platform-specific",
"verificationStatus": "not-applicable",
"evidence": ["windows/tauri/src/features/editor/engines/monaco/theme.ts"]
},
"owner": "Editor",
"verification": "在 macOS 选择工作台背景并打开文本文件,分别关闭和打开右侧 Agent 面板,确认编辑器最右侧概览标尺不出现黑色竖条;关闭背景图后确认普通主题底色保持不变。运行真实 WebKit 工作台主题集成测试。Windows 不使用 macOS 原生工作台壁纸。"
},
{
"id": "editor-semantic-highlighting",
"area": "编辑器",
Expand Down
Loading