Repository navigation
feat(remote): 自动识别容器环境并提供 Dev Container 基础配置表单 - #2438
Merged
Merged
Conversation
Show detected container environments and readiness, create standard devcontainer.json from basic configuration fields, and retain the selected Docker context or WSL distribution throughout build and connection. Pin Core d1b86b55 and include localized UI, shared-fixture consumer tests, bounded integration coverage, bundle immutability checks and platform verification status.
4 tasks done
xiaoyumuxi
marked this pull request as ready for review
November 26, 2026 07:39
18 of 21 tasks
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.
关联 Issue / Linked issue
38c60be716207fa99cd2f8827f81e7e7c75c4eb1。PR 类型 / Type
改动说明 / What changes
背景 / Why
目前创建 Dev Container 需要先准备 JSON,缺少面向人的基础配置入口,也不能明确选择 Docker Desktop、OrbStack 或 WSL 中的引擎。现在先显示真实容器环境及可用状态;空工作区可以填写镜像或 Dockerfile 等基础选项,确认后生成标准
devcontainer.json,再沿用信任、构建和连接流程。JSON 继续供 Agent 和官方 CLI 使用。改动 / Changes
configfileadapter 原子写入工作区.devcontainer/devcontainer.json,拒绝覆盖、符号链接越界及向安装目录写入。创建后重新读取真实配置,再沿用“信任并构建”。WSL 使用 Core 解析的原生路径供确认写入和信任,不假定/mnt/c。38c60be716207fa99cd2f8827f81e7e7c75c4eb1;共享契约和 fixture 仅在配套 Core PR,桌面测试读取当前链接的 Core。更新远程容器 Agent Note、跨平台功能矩阵、工作区配置生命周期及本地验证资源说明。Dev Container features、生命周期命令、Compose 和镜像语义继续交给官方 CLI;本次没有新增大型打包依赖,也不额外注入挂载或权限。
不在本 PR 范围内 / Out of scope
unix:///npipe://端点。pending。类型专属:feat
多平台对齐
implemented / pending。范围检查 / Scope checks
功能矩阵 / Feature matrix
shared/platform-feature-matrix/features/devcontainer-configuration.json,填写两端实现 / 验证状态、证据、owner 和具体验证动作;完整原生验收未完成,因此保持pending。verify-platform-feature-matrix-change.sh origin/main HEAD和verify-platform-feature-matrix.sh通过(224 项)。.artifacts/下生成的矩阵视图。matrix-exempt。插件归属 / Plugin ownership
UI 验证 / UI evidence
a84fbafb2f5dd00ebe0a0d0528a182710d964c03、取消本地 Core override 的条件下运行TestVisualDevcontainerActualRuntimeAndBasicForm;基础镜像表单、Dockerfile 表单、真实环境选择器及滚动到高级字段四个场景,light / dark × en-US / zh-Hans,共生成 16 张 PNG。逻辑窗口 1200×820,PNG 2400×1640;本 PR 附上已检查的四张代表截图。本次实现:真实容器环境与基础配置表单
真实环境来自本机 CLI:
default未就绪、desktop-linux(Docker Desktop)未就绪、orbstack(OrbStack)可用。工作文件夹为实际创建的临时目录;未替换或编造环境数据。镜像与 Dockerfile 的灰色文字是表单示例占位符。容器环境选择器 · 深色中文
镜像基础配置 · 浅色英文
Dockerfile 配置 · 浅色中文
表单滚动与高级字段 · 深色英文
统一日志系统 / Structured logging
界面文案 / i18n
shared/i18n/,通过生成器同步并提交desktop/internal/i18n/shared.generated.go,Viva 通过共享接口读取。逻辑归属 / Logic placement
性能与内存 / Performance and memory
设置 / Settings
插件契约 / Plugin contract
N/A:本次修改的是宿主应用 C ABI,不是插件 RPC、能力版本或
shared/plugins/contract/,不修改插件 schema / API / 协议版本,四语插件 SDK 与协议更新记录无需变更。应用边界文档和 fixture 在 Core #202;桌面端 pin 为38c60be716207fa99cd2f8827f81e7e7c75c4eb1,已在取消LITHE_CORE_RUST_DIR后验证可从远端固定修订构建并读取 fixture。为便于审查,列出本次应用命令;它们不属于 API-01–45 插件方法:
remote.containerRuntimesremote.devcontainerPrepareremote.devcontainerConfigsremote.devcontainerUpremote.listContainersremote.connect发行包与资源 / Bundle and resources
verify-runtime-bundle-immutability.sh通过(9 个工作流)。docs/ci-builds.md说明工作区配置与检出私有 CLI 验证资源的路径、所有权、生命周期及复制边界;不将运行时状态跨工作树复制。无用代码与重构 / Dead code and refactoring
验证 / Verification
按改动范围验证,不运行无关全量测试;完整 Go / Rust workspace 由 CI 继续检查。
Devcontainer|Remote.*Container|EveryLoggedEventIsAcceptedByTheKernel,./internal/core与./internal/workbenchdesktop-go.sh test -raceenv -u LITHE_CORE_RUST_DIR scripts/desktop/desktop-go.sh test ./internal/core ./internal/workbench -run 'Devcontainer|Remote.*Container|WindowSize|WindowPlacement|MainWindow' -count=1 -timeout=120sTestRemoteDevcontainerActualRuntimeLifecycle,显式选择orbstack/alpine:3.21,官方 CLI 0.91.0env -u LITHE_CORE_RUST_DIR TMPDIR=/tmp LITHE_VISUAL_OUTPUT_DIR="$PWD/.artifacts/devcontainer-pr-visual" LITHE_TEST_CONTAINER_RUNTIMES=1 scripts/desktop/desktop-go.sh test -tags 'vivahead lithevisual' ./internal/workbench -run '^TestVisualDevcontainerActualRuntimeAndBasicForm$' -count=1 -timeout=120s -vnode scripts/i18n/verify-app-language-localization.mjsnode scripts/i18n/generate-i18n.mjs --checknode --test --test-timeout=60000 scripts/i18n/test-i18n.mjsverify-platform-feature-matrix-change.sh origin/main HEAD/verify-platform-feature-matrix.sh./scripts/desktop/verify/verify-runtime-bundle-immutability.sh./scripts/agent-notes/verify-agent-notes.sh./.agents/skills/write-stable-tests/scripts/verify-test-stability.shx86_64-pc-windows-msvcclippy、fmt、注释和平台测试放置检查git diff --check真实生命周期复验入口(在仓库根目录执行;CLI 放在检出私有验证目录,不要求全局安装):
未能执行的检查和原因:
verify-core.sh、共享契约边界校验和日志生成 / 使用检查已经移除,等价门禁尚未恢复,记为未完成;现有定向测试和日志目录接纳测试不代替这些门禁。日志门禁恢复跟踪 [Feature] 恢复 Viva 日志事件类型生成和目录使用门禁 #1802。desktop-go.sh test ./...或全 Rust workspace;其他范围交给 CI。最新主线冲突处理
main的8330a78ff,解决remote.go/remote_container.go与标题栏主机切换器的冲突;同时保留完整窗口容器刷新取消和主机菜单发现取消,避免关闭后遗留后台工作。38c60be716207fa99cd2f8827f81e7e7c75c4eb1,验证未使用本地 Core override。Devcontainer|Remote.*Container|RemoteHostSwitcher|EveryLoggedEventIsAcceptedByTheKernel定向逐项计时:43 项通过,真实环境 opt-in 检查默认跳过 1 项(此前单独启用已通过);DevcontainerRuntimeRefresh|RemoteHostSwitcher的 race 检查通过。a84fbafb2,本次冲突处理未改表单布局。提交前确认 / Final checks
728a5d7a4合并主线8330a78ff、解决冲突;目标分支main。