Skip to content

fix(plan): surface open-questions block + i18n the plan flow#497

Merged
esengine merged 1 commit into
mainfrom
fix/477-plan-open-questions-and-i18n
May 9, 2026
Merged

fix(plan): surface open-questions block + i18n the plan flow#497
esengine merged 1 commit into
mainfrom
fix/477-plan-open-questions-and-i18n

Conversation

@esengine

@esengine esengine commented May 9, 2026

Copy link
Copy Markdown
Owner

Summary

The banner in PlanConfirm already detected Open Questions / Risks / Unknowns / Assumptions headings, but the questions themselves were never shown — PlanStepList (when steps were present) and the 24-line body cap (when they weren't) both swallowed the block. Refine then opened a blank input with no echo of what the model raised, so the user either invented an answer or hit Enter and we asked the model to re-derive its own questions on a follow-up turn.

This PR makes the questions visible and removes the round-trip:

  • New extractOpenQuestionsSection util pulls the matching block (heading down to the next same-or-shallower heading); rendered under the banner regardless of steps / body cap.
  • The extracted block is forwarded to PlanRefineInput, which now shows it above the input on mode === "refine".
  • The blank-refine synthetic no longer asks the model to re-derive questions; it instructs the model to pick safe defaults and call them out explicitly.
  • All plan-flow strings (PlanConfirm, PlanRefineInput, PlanCheckpointConfirm, PlanStepList counter) move through t() under a new planFlow namespace in EN + zh-CN. Plan flow was the last hold-out hardcoded surface; this lands the localization gap the issue called out.

Closes #477

Test plan

  • New tests/plan-open-questions.test.ts — 7 cases covering extraction (open block, ends at next heading, nested deeper headings), Chinese headings, case-insensitivity, plurals, and the "literal-word-in-body doesn't false-match" guard.
  • Two new cases in tests/plan-confirm.test.tsx — questions are visible when steps are present and when the body is past the truncation cap.
  • npm run verify (full suite, 2303 tests).

…an flow

The banner already detected `Open Questions` / `Risks` / `Unknowns` headings
but the questions themselves were never shown — PlanConfirm rendered either
a step list or a 24-line body cap, both of which can hide the block. Refine
mode then reopened a blank input with no echo of the questions, so the user
either invented an answer or hit Enter and we asked the model to re-derive
its own questions on a follow-up turn.

- Extract the matching block (heading down to next same-or-shallower heading)
  via `extractOpenQuestionsSection` and render it under the banner regardless
  of steps / body cap.
- Forward the extracted block to `PlanRefineInput`, which now renders the
  questions above the input on `mode === "refine"`.
- Replace the blank-refine synthetic that asks the model to re-derive
  questions with one that tells it to pick safe defaults and call them out.
- Move all plan-flow strings (PlanConfirm / PlanRefineInput /
  PlanCheckpointConfirm / PlanStepList counter line) through `t()` under a
  new `planFlow` namespace in EN + zh-CN.

Closes #477
@esengine esengine merged commit d421970 into main May 9, 2026
2 checks passed
@esengine esengine deleted the fix/477-plan-open-questions-and-i18n branch May 9, 2026 04:56
@esengine esengine mentioned this pull request May 9, 2026
2 tasks
ChasLui pushed a commit to ChasLui/DeepSeek-Reasonix that referenced this pull request May 23, 2026
…an flow (esengine#497)

The banner already detected `Open Questions` / `Risks` / `Unknowns` headings
but the questions themselves were never shown — PlanConfirm rendered either
a step list or a 24-line body cap, both of which can hide the block. Refine
mode then reopened a blank input with no echo of the questions, so the user
either invented an answer or hit Enter and we asked the model to re-derive
its own questions on a follow-up turn.

- Extract the matching block (heading down to next same-or-shallower heading)
  via `extractOpenQuestionsSection` and render it under the banner regardless
  of steps / body cap.
- Forward the extracted block to `PlanRefineInput`, which now renders the
  questions above the input on `mode === "refine"`.
- Replace the blank-refine synthetic that asks the model to re-derive
  questions with one that tells it to pick safe defaults and call them out.
- Move all plan-flow strings (PlanConfirm / PlanRefineInput /
  PlanCheckpointConfirm / PlanStepList counter line) through `t()` under a
  new `planFlow` namespace in EN + zh-CN.

Closes esengine#477
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.

Plan mode: "open questions / risks" banner fires but the questions are never shown

1 participant