feat(remote-control): improve ACP agent alias resolution and add work…#1694
Conversation
…dir error handling
📝 WalkthroughWalkthroughThis PR fixes "Remote ACP Default Agent Flicker" by moving ACP alias resolution into shared utilities, updating main-side ChangesCore Fix: Alias Resolution & Agent ID Normalization
Renderer: Agent Option Reconciliation & Error Feedback
Test Coverage for Alias Resolution & Reconciliation
🎯 3 (Moderate) | ⏱️ ~20 minutes
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 ESLint
ESLint skipped: no ESLint configuration detected in root package.json. To enable, add Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
docs/issues/remote-acp-default-agent-flicker/plan.md (1)
6-6: 💤 Low valueOptional: Consider simplifying wording.
The phrase "exact same" could be simplified to just "same" for conciseness.
✍️ Suggested simplification
-- Promote `resolveAcpAgentAlias` and `ACP_LEGACY_AGENT_ID_ALIASES` to `src/shared/utils/acpAgentAlias.ts` so renderer code can reuse the exact same alias table that main relies on. `src/main/presenter/configPresenter/acpRegistryConstants.ts` re-exports them to keep all current `import` sites working. +- Promote `resolveAcpAgentAlias` and `ACP_LEGACY_AGENT_ID_ALIASES` to `src/shared/utils/acpAgentAlias.ts` so renderer code can reuse the same alias table that main relies on. `src/main/presenter/configPresenter/acpRegistryConstants.ts` re-exports them to keep all current `import` sites working.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@docs/issues/remote-acp-default-agent-flicker/plan.md` at line 6, Update the wording in the plan sentence that mentions the alias export: replace "exact same alias table" with "same alias table" to be more concise; ensure the sentence still references the exported symbols (resolveAcpAgentAlias and ACP_LEGACY_AGENT_ID_ALIASES) and that the surrounding sentence about re-exporting from src/main/presenter/configPresenter/acpRegistryConstants.ts remains unchanged.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@src/renderer/src/i18n/fa-IR/settings.json`:
- Around line 2026-2027: Update the two i18n keys acpDefaultWorkdirRequiredTitle
and acpDefaultWorkdirRequiredDescription to use the same Persian term as the
surrounding labels (change "شاخه" to "پوشه") so terminology for workdir is
consistent across the ACP section; edit the values for
acpDefaultWorkdirRequiredTitle and acpDefaultWorkdirRequiredDescription
accordingly.
---
Nitpick comments:
In `@docs/issues/remote-acp-default-agent-flicker/plan.md`:
- Line 6: Update the wording in the plan sentence that mentions the alias
export: replace "exact same alias table" with "same alias table" to be more
concise; ensure the sentence still references the exported symbols
(resolveAcpAgentAlias and ACP_LEGACY_AGENT_ID_ALIASES) and that the surrounding
sentence about re-exporting from
src/main/presenter/configPresenter/acpRegistryConstants.ts remains unchanged.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 44774f50-e1ac-4c41-b558-adfe62553716
📒 Files selected for processing (31)
docs/issues/remote-acp-default-agent-flicker/plan.mddocs/issues/remote-acp-default-agent-flicker/spec.mddocs/issues/remote-acp-default-agent-flicker/tasks.mdsrc/main/presenter/configPresenter/acpRegistryConstants.tssrc/main/presenter/index.tssrc/main/presenter/remoteControlPresenter/index.tssrc/renderer/settings/components/RemoteSettings.vuesrc/renderer/src/i18n/da-DK/settings.jsonsrc/renderer/src/i18n/de-DE/settings.jsonsrc/renderer/src/i18n/en-US/settings.jsonsrc/renderer/src/i18n/es-ES/settings.jsonsrc/renderer/src/i18n/fa-IR/settings.jsonsrc/renderer/src/i18n/fr-FR/settings.jsonsrc/renderer/src/i18n/he-IL/settings.jsonsrc/renderer/src/i18n/id-ID/settings.jsonsrc/renderer/src/i18n/it-IT/settings.jsonsrc/renderer/src/i18n/ja-JP/settings.jsonsrc/renderer/src/i18n/ko-KR/settings.jsonsrc/renderer/src/i18n/ms-MY/settings.jsonsrc/renderer/src/i18n/pl-PL/settings.jsonsrc/renderer/src/i18n/pt-BR/settings.jsonsrc/renderer/src/i18n/ru-RU/settings.jsonsrc/renderer/src/i18n/tr-TR/settings.jsonsrc/renderer/src/i18n/vi-VN/settings.jsonsrc/renderer/src/i18n/zh-CN/settings.jsonsrc/renderer/src/i18n/zh-HK/settings.jsonsrc/renderer/src/i18n/zh-TW/settings.jsonsrc/shared/contracts/remoteControlErrors.tssrc/shared/utils/acpAgentAlias.tstest/main/presenter/remoteControlPresenter/remoteControlPresenter.test.tstest/renderer/components/RemoteSettings.test.ts
…dir error handling
close #1693
Summary by CodeRabbit
Bug Fixes
New Features