Skip to content

fix: i18n ephemeral policy keys + planning loading race#2298

Merged
gsxdsm merged 1 commit into
mainfrom
fix/main-tests-v16
Jul 18, 2026
Merged

fix: i18n ephemeral policy keys + planning loading race#2298
gsxdsm merged 1 commit into
mainfrom
fix/main-tests-v16

Conversation

@gsxdsm

@gsxdsm gsxdsm commented Jul 18, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Full Suite 29642536622 after test(core): align settings parity + schema 0020 bookkeeping #2297: shards 1–2 green; shard 4 i18n parity + shard 3 PlanningMode loading.
  • Add settings.general.ephemeralAgentTaskCreationPolicy* to zh-CN/zh-TW/fr/es/ko (FN-8265 keys were en-only).
  • Gate the follow-up SSE question in the PlanningMode loading test so .planning-loading is assertable before the next question arrives (CI race).

Test plan

  • @fusion/i18n parity + gate-coverage tests
  • PlanningModeModal loading-after-response test
  • Full Suite all 4 shards green on main

Summary by CodeRabbit

  • New Features

    • Added localized settings text for configuring ephemeral agent follow-up task creation policies in Spanish, French, Korean, Simplified Chinese, and Traditional Chinese.
    • Added options to allow, require validation, or deny follow-up task creation.
  • Tests

    • Improved planning mode loading-state test reliability with deterministic synchronization.

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.
@coderabbitai

coderabbitai Bot commented Jul 18, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

The 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.

Changes

PlanningModeModal test synchronization

Layer / File(s) Summary
Deterministic follow-up question release
packages/dashboard/app/components/__tests__/PlanningModeModal.ui-interactions.test.tsx
The test replaces timeout-based second-question emission with a promise gate released after asserting the planning loading state.

Ephemeral-agent policy translations

Layer / File(s) Summary
Policy setting locale strings
packages/i18n/locales/{es,fr,ko,zh-CN,zh-TW}/app.json
Adds setting labels, hints, and allow, validation, and deny option strings for ephemeralAgentTaskCreationPolicy.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the two main changes: new i18n keys for ephemeral policy settings and a fix for the PlanningMode loading race.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/main-tests-v16

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@greptile-apps

greptile-apps Bot commented Jul 18, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR adds missing policy translations and changes the Planning Mode loading test. The main changes are:

  • Add ephemeral-agent task policy strings to five locale catalogs.
  • Replace the timed follow-up SSE event with an explicit test gate.
  • Assert the loading UI before releasing the next question.

Confidence Score: 5/5

The locale changes look mergeable, but the loading-race test has a non-blocking coverage gap.

  • The locale keys match the expected namespace and data shape.
  • The explicit gate removes timer flakiness but prevents the test from exercising an immediate follow-up event.

packages/dashboard/app/components/tests/PlanningModeModal.ui-interactions.test.tsx

Important Files Changed

Filename Overview
packages/dashboard/app/components/tests/PlanningModeModal.ui-interactions.test.tsx Makes the test deterministic by withholding the follow-up event, but no longer covers the immediate-event race.
packages/i18n/locales/es/app.json Adds the complete Spanish policy translation set.
packages/i18n/locales/fr/app.json Adds the complete French policy translation set.
packages/i18n/locales/ko/app.json Adds the complete Korean policy translation set.
packages/i18n/locales/zh-CN/app.json Adds the complete Simplified Chinese policy translation set.
packages/i18n/locales/zh-TW/app.json Adds the complete Traditional Chinese policy translation set.

Reviews (1): Last reviewed commit: "fix: i18n parity for ephemeral policy + ..." | Re-trigger Greptile

Comment on lines 550 to 556
});

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);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P2 Gate Hides Immediate SSE Race

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!

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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

📥 Commits

Reviewing files that changed from the base of the PR and between e436635 and b3d1180.

📒 Files selected for processing (6)
  • packages/dashboard/app/components/__tests__/PlanningModeModal.ui-interactions.test.tsx
  • packages/i18n/locales/es/app.json
  • packages/i18n/locales/fr/app.json
  • packages/i18n/locales/ko/app.json
  • packages/i18n/locales/zh-CN/app.json
  • packages/i18n/locales/zh-TW/app.json

"moveNavItemLater": "{{item}} 뒤로 이동"
"moveNavItemLater": "{{item}} 뒤로 이동",
"ephemeralAgentTaskCreationPolicy": "임시 에이전트 후속 작업",
"ephemeralAgentTaskCreationPolicyHint": "기본값 없음 — 미설정 시 허용으로 폴백합니다. 검증 후는 받은편지함으로 제안을 보내 원클릭 승인합니다. 거부는 후속 작업 생성을 거부합니다.",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

📐 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.

Suggested change
"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.

@gsxdsm
gsxdsm merged commit ec99f17 into main Jul 18, 2026
7 checks passed
@gsxdsm
gsxdsm deleted the fix/main-tests-v16 branch July 18, 2026 11:54
gsxdsm added a commit that referenced this pull request Jul 18, 2026
…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 -->
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.

1 participant