fix: i18n ephemeral policy keys + planning loading race#2298
Conversation
Full Suite 29642536622: shard 4 failed i18n key parity after FN-8265 added ephemeralAgentTaskCreationPolicy only in en; shard 3 flaked when a 50ms second-question SSE overtook .planning-loading under CI load.
📝 WalkthroughWalkthroughThe PR makes the PlanningModeModal test deterministic by gating follow-up question emission, and adds ephemeral-agent task creation policy translations for Spanish, French, Korean, Simplified Chinese, and Traditional Chinese. ChangesPlanningModeModal test synchronization
Ephemeral-agent policy translations
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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 |
Greptile SummaryThis PR adds missing policy translations and changes the Planning Mode loading test. The main changes are:
Confidence Score: 5/5The locale changes look mergeable, but the loading-race test has a non-blocking coverage gap.
packages/dashboard/app/components/tests/PlanningModeModal.ui-interactions.test.tsx Important Files Changed
Reviews (1): Last reviewed commit: "fix: i18n parity for ephemeral policy + ..." | Re-trigger Greptile |
| }); | ||
|
|
||
| mockRespondToPlanning.mockImplementation(async () => { | ||
| // Simulate server broadcasting second question via the existing SSE connection | ||
| setTimeout(() => { | ||
| // Hold the follow-up question until the loading UI has been observed. | ||
| void secondQuestionGate.then(() => { | ||
| if (streamHandlers) { | ||
| streamHandlers.onQuestion?.(secondQuestion); |
There was a problem hiding this comment.
When the follow-up SSE question arrives immediately after the response, the loading paint can still be skipped. This mock now prevents that ordering by withholding the question until after the loading assertion, so the test passes without covering the reported race or enforcing the product invariant.
Context Used: AGENTS.md (source)
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 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 `@packages/i18n/locales/ko/app.json`:
- Line 5902: Update the ephemeralAgentTaskCreationPolicyHint translation to use
natural Korean: replace the awkward “검증 후는” phrasing and avoid repeating “거부” in
the final clause, while preserving the original meanings for unset defaults,
one-click approval, and rejecting follow-up task creation.
🪄 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 Plus
Run ID: 50087fb4-14a2-46ca-aa9c-0cc879a39d63
📒 Files selected for processing (6)
packages/dashboard/app/components/__tests__/PlanningModeModal.ui-interactions.test.tsxpackages/i18n/locales/es/app.jsonpackages/i18n/locales/fr/app.jsonpackages/i18n/locales/ko/app.jsonpackages/i18n/locales/zh-CN/app.jsonpackages/i18n/locales/zh-TW/app.json
| "moveNavItemLater": "{{item}} 뒤로 이동" | ||
| "moveNavItemLater": "{{item}} 뒤로 이동", | ||
| "ephemeralAgentTaskCreationPolicy": "임시 에이전트 후속 작업", | ||
| "ephemeralAgentTaskCreationPolicyHint": "기본값 없음 — 미설정 시 허용으로 폴백합니다. 검증 후는 받은편지함으로 제안을 보내 원클릭 승인합니다. 거부는 후속 작업 생성을 거부합니다.", |
There was a problem hiding this comment.
📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win
Polish the Korean hint wording.
검증 후는 is grammatically awkward, and 거부는 ... 거부합니다 is repetitive. Use more natural wording before shipping this user-facing translation.
Proposed wording
- "ephemeralAgentTaskCreationPolicyHint": "기본값 없음 — 미설정 시 허용으로 폴백합니다. 검증 후는 받은편지함으로 제안을 보내 원클릭 승인합니다. 거부는 후속 작업 생성을 거부합니다.",
+ "ephemeralAgentTaskCreationPolicyHint": "기본값 없음 — 미설정 시 허용으로 대체됩니다. ‘검증 후’는 받은편지함으로 제안을 보내 한 번의 클릭으로 승인할 수 있도록 하며, ‘거부’는 후속 작업 생성을 차단합니다.",📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| "ephemeralAgentTaskCreationPolicyHint": "기본값 없음 — 미설정 시 허용으로 폴백합니다. 검증 후는 받은편지함으로 제안을 보내 원클릭 승인합니다. 거부는 후속 작업 생성을 거부합니다.", | |
| "ephemeralAgentTaskCreationPolicyHint": "기본값 없음 — 미설정 시 허용으로 대체됩니다. ‘검증 후’는 받은편지함으로 제안을 보내 한 번의 클릭으로 승인할 수 있도록 하며, ‘거부’는 후속 작업 생성을 차단합니다.", |
🤖 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 `@packages/i18n/locales/ko/app.json` at line 5902, Update the
ephemeralAgentTaskCreationPolicyHint translation to use natural Korean: replace
the awkward “검증 후는” phrasing and avoid repeating “거부” in the final clause, while
preserving the original meanings for unset defaults, one-click approval, and
rejecting follow-up task creation.
…2299) ## Summary - Full Suite [29643371961](https://github.com/Runfusion/Fusion/actions/runs/29643371961) after #2298: shards 1–2 green; shard 3 confirm Other race; shard 4 MCP + re-emit planning tests. - MCP lane mock: follow-up prompts return `complete` (product defaults clarification off). - Re-emit suite: pass `clarificationEnabled: true` so multi-question interview invariants still run. - Confirm Other UI test: `findByTestId("planning-other-input")` after click. ## Test plan - [x] mcp-lane-forwarding + planning-answered-question-reemit (14) - [x] confirm Other desktop/mobile planning-flow - [ ] Full Suite all 4 shards green on main <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Tests** * Improved automated coverage for planning-mode interviews, including “Other” responses and follow-up prompts. * Increased test reliability by handling asynchronous input updates more consistently. * Added validation for clarification-enabled interviews and completion behavior in MCP forwarding scenarios. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
Summary
settings.general.ephemeralAgentTaskCreationPolicy*to zh-CN/zh-TW/fr/es/ko (FN-8265 keys were en-only)..planning-loadingis assertable before the next question arrives (CI race).Test plan
@fusion/i18nparity + gate-coverage testsSummary by CodeRabbit
New Features
Tests