[Plan Mode 5/8] Web UI + i18n#70017
Conversation
…ion tests (rebase fixup) Pure rebase fixup. The `exit_plan_mode` tool gained a mandatory `title` parameter in upstream main between Part 5's original base and current HEAD. After rebasing Part 5 onto upstream/main, four integration tests (in `src/agents/plan-mode/integration.test.ts`) were failing with `ToolInputError: exit_plan_mode requires a title field` instead of the originally-asserted error messages. This commit just adds `title: "..."` to the four failing test calls so they exercise the validation paths they were originally testing (empty plan, multiple in_progress, unknown status). No production code changes.
|
Too many files changed for review. ( |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b16488a57f
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| // (/plan off, another channel approved, timeout, compaction). | ||
| return invalid( | ||
| "planApproval requires an active plan-mode session (the approval window may have expired or been resolved on another channel)", | ||
| ErrorCodes.PLAN_APPROVAL_EXPIRED, |
There was a problem hiding this comment.
Define PLAN_APPROVAL_EXPIRED before returning it
applySessionsPatchToStore returns invalid(..., ErrorCodes.PLAN_APPROVAL_EXPIRED) here, but this commit never adds PLAN_APPROVAL_EXPIRED to src/gateway/protocol/schema/error-codes.ts. In runtime JS this property is undefined, so invalid() falls back to INVALID_REQUEST, which breaks the stale-approval path that expects a distinct code to dismiss outdated approval cards correctly.
Useful? React with 👍 / 👎.
| const sanitized = answer | ||
| .replace(/\p{Cc}/gu, " ") | ||
| .replace(/\s+/g, " ") | ||
| .trim() |
There was a problem hiding this comment.
Preserve exact option text when answering questions
This sanitization rewrites all answers (including button-picked options) by collapsing whitespace and stripping control chars before sending planApproval.action="answer". The server enforces non-freetext answers with exact offeredOptions.includes(answer), so any option containing internal newlines or repeated spaces will be transformed client-side and then rejected as not matching an offered option, blocking the user from answering.
Useful? React with 👍 / 👎.
|
Closed for sequential rollout — please disregard cumulative diff. This PR was opened with The fix: sequential rollout. Each Currently open:
Next: when 1/9 merges, This PR's branch is preserved on the fork and will be reopened with a clean diff in its turn. |
Summary
[Plan Mode 5/8] — part of the 8-part decomposition of #68939, stacking on #69449 (Part 1).
Stacks on: previous part (see [Plan Mode 4/8] / [Plan Mode 1/9 #69449]).
Plan-mode UI: inline approval card, sidebar, mode chip, plan-approval views + 12 locale files. Stacks on Part 4/8.
Lines: ~5501
Diff note
This PR is opened cross-repo (head:
100yenadmin:restack/68939-pr6-web-ui-i18n) againstopenclaw:main. Because GitHub doesn't support stacked-PR bases that point at fork refs, the displayed diff cumulatively includes all previous parts in the stack. Reviewers should focus on the changes specific to this part — see commit list for the new content beyond what previous parts established.Test status
After post-v2026.4.21 rebase: all targeted plan-mode tests pass (53/53 in unit-fast for approval + integration suites). The full suite has pre-existing vitest workspace project-name conflicts unrelated to this work.
Related