Skip to content

fix(dashboard): align planning tests with clarification default-off#2299

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

fix(dashboard): align planning tests with clarification default-off#2299
gsxdsm merged 1 commit into
mainfrom
fix/main-tests-v17

Conversation

@gsxdsm

@gsxdsm gsxdsm commented Jul 18, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Full Suite 29643371961 after fix: i18n ephemeral policy keys + planning loading race #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

  • mcp-lane-forwarding + planning-answered-question-reemit (14)
  • confirm Other desktop/mobile planning-flow
  • Full Suite all 4 shards green on main

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.

Full Suite 29643371961: API backfill failed when createSession defaulted
clarificationEnabled=false and mocked agents only returned questions;
re-emit tests hung on the suppressed-summary follow-up. Confirm Other
also needed findByTestId settle under CI load.
@coderabbitai

coderabbitai Bot commented Jul 18, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 1726d95d-be4c-499d-8b15-81d42c1502a0

📥 Commits

Reviewing files that changed from the base of the PR and between ec99f17 and 9aa5322.

📒 Files selected for processing (3)
  • packages/dashboard/app/components/__tests__/PlanningModeModal.planning-flow.test.tsx
  • packages/dashboard/src/__tests__/mcp-lane-forwarding.test.ts
  • packages/dashboard/src/__tests__/planning-answered-question-reemit.test.ts

📝 Walkthrough

Walkthrough

Planning tests now wait for asynchronously rendered inputs, model first and follow-up agent responses, and explicitly enable clarification in the answered-question test helper.

Changes

Planning test stability

Layer / File(s) Summary
Await the Other-answer modal flow
packages/dashboard/app/components/__tests__/PlanningModeModal.planning-flow.test.tsx
The “Other” answer test uses asynchronous input lookup and validates Continue-button state before submitting the _other payload.
Model planning session clarification paths
packages/dashboard/src/__tests__/mcp-lane-forwarding.test.ts, packages/dashboard/src/__tests__/planning-answered-question-reemit.test.ts
MCP lane mocks now return question and completion responses across prompts, while the answered-question helper explicitly enables clarification.

Estimated code review effort: 2 (Simple) | ~15 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 reflects the main change: aligning dashboard planning tests with clarification disabled by default.
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-v17

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 aligns planning tests with clarification being disabled by default. The main changes are:

  • Makes the MCP mock return a completed summary after its first question.
  • Enables clarification in tests that require an interactive multi-question flow.
  • Waits for the confirm-question Other input before interacting with it.

Confidence Score: 5/5

The changed behavior looks mergeable after the flaky-test policy cleanup.

  • The clarification option reaches the intended parameter.
  • The MCP mock matches the normal default-off flow.
  • The UI test wait leaves an observed flake outside the required quarantine process.

packages/dashboard/app/components/tests/PlanningModeModal.planning-flow.test.tsx

Important Files Changed

Filename Overview
packages/dashboard/app/components/tests/PlanningModeModal.planning-flow.test.tsx Waits for the Other input after a reported CI flake, but does not follow the required quarantine policy.
packages/dashboard/src/tests/mcp-lane-forwarding.test.ts Models the normal default-off question-to-summary prompt sequence.
packages/dashboard/src/tests/planning-answered-question-reemit.test.ts Enables clarification in the correct options slot for tests that require emitted questions.

Reviews (1): Last reviewed commit: "fix(dashboard): align planning tests wit..." | Re-trigger Greptile

const continueButton = screen.getByRole("button", { name: "Continue" });
fireEvent.click(screen.getByTestId("planning-option-other"));
expect(screen.getByTestId("planning-other-input")).toBeInTheDocument();
const otherInput = await screen.findByTestId("planning-other-input");

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 Observed Flake Is Only Delayed

The changed wait makes the reported CI flake pass without fixing its cause or quarantining the test. The repository requires observed flaky tests to be quarantined rather than stabilized with waits, and the same synchronous Other-input transition remains in sibling cases, so the underlying race can continue producing intermittent suite failures.

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!

@gsxdsm
gsxdsm merged commit 0aacee0 into main Jul 18, 2026
7 checks passed
@gsxdsm
gsxdsm deleted the fix/main-tests-v17 branch July 18, 2026 12:31
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