Skip to content

fix(desktop): preserve configured generic ACP in settings - #444

Merged
x-lixu merged 3 commits into
QwenAudio:mainfrom
qinghuanandejiangshi:feature/20260915-preserve-custom-acp
Sep 18, 2026
Merged

x-lixu merged 3 commits into
QwenAudio:mainfrom
qinghuanandejiangshi:feature/20260915-preserve-custom-acp

Conversation

@qinghuanandejiangshi

Copy link
Copy Markdown
Contributor

Settings currently changes an env-configured AGENT_PROTOCOL=acp to none when rendering the backend picker, so applying unrelated preferences overwrites the user's backend selection.

Keep generic ACP in the detection-backed picker only when it is already selected, and preserve the renderer's current value. Its readiness still comes from detection: unavailable commands are not presented as ready, and unselected generic ACP remains hidden because this picker cannot configure its command. Explicitly selecting another backend still works. No command editor or configuration schema is added.

Closes #436.

Validation on macOS, Node 24.20.0:

  • Added option-state regressions; the selected-ACP case fails on the original implementation.
  • Added an Electron smoke using the real settings page, preload and settings store with temporary configuration. Saving unrelated language preferences after switching tabs preserves AGENT_PROTOCOL, ACP_COMMAND and ACP_ARGS; an unavailable command is not marked ready; explicitly selecting none persists. The smoke fails with the original implementation and passes with the fix.
  • npm run lint, npm test (2,374 passed, one conditional consumer-package test skipped), npm run build, npm run release:check, and npm run test:desktop-smoke passed.
  • Updated the Unreleased changelog.

Persistence/security: this uses the existing settings-store write path and does not expose or execute custom command arguments. Smoke fixtures use isolated directories and mocked detection, without starting a Gateway or external Agent. Reverting this PR restores the previous picker behavior; no data migration is required. Windows/Linux were not exercised locally.

@x-lixu

x-lixu commented Sep 17, 2026

Copy link
Copy Markdown
Collaborator

已合入最新 main 并解决 CHANGELOG 冲突,功能修复保持原有最小范围。验证结果:254 项桌面单元测试全部通过,Electron 设置页冒烟测试通过(修改语言保留 ACP 配置、不可用状态呈现、主动选择 none),相关 eslint 通过,最新提交全部 CI 通过。感谢提供修复和真实设置页回归测试。

@x-lixu

x-lixu commented Sep 18, 2026

Copy link
Copy Markdown
Collaborator

已同步最新 main,解决的冲突仅为 CHANGELOG 顶部条目,双方内容均保留。复核后功能范围不变:只保留已配置的通用 ACP 选项及实际可用状态,不新增命令配置入口。本地 254 项桌面测试通过(1 项 Windows 专用测试跳过),真实 Electron 设置页 smoke、改动文件 ESLint 通过;正在等待本次更新的 CI,全部通过后合并。

@x-lixu x-lixu left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

复核通过:修复桌面设置将已配置通用 ACP 静默改为 none 的明确问题。同步最新 main 后,本地桌面单测、Electron 设置页 smoke 与 ESLint 均通过,最新提交的跨平台 CI 全部通过。感谢贡献及回归测试。

@x-lixu
x-lixu merged commit 7638b93 into QwenAudio:main Sep 18, 2026
9 checks passed
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.

[Bug] Desktop Settings can't select generic ACP and overwrites a configured AGENT_PROTOCOL=acp

2 participants