Skip to content

[Plan Mode 5/8] Web UI + i18n#70017

Closed
100yenadmin wants to merge 6 commits into
openclaw:mainfrom
electricsheephq:restack/68939-pr6-web-ui-i18n
Closed

[Plan Mode 5/8] Web UI + i18n#70017
100yenadmin wants to merge 6 commits into
openclaw:mainfrom
electricsheephq:restack/68939-pr6-web-ui-i18n

Conversation

@100yenadmin

Copy link
Copy Markdown
Contributor

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) against openclaw: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

Eva added 6 commits April 22, 2026 12:39
…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.
Copilot AI review requested due to automatic review settings April 22, 2026 06:20
@greptile-apps

greptile-apps Bot commented Apr 22, 2026

Copy link
Copy Markdown
Contributor

Too many files changed for review. (159 files found, 100 file limit)

Copilot AI 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.

Copilot wasn't able to review this pull request because it exceeds the maximum number of lines (20,000). Try reducing the number of changed lines and requesting a review from Copilot again.

@openclaw-barnacle openclaw-barnacle Bot added app: macos App: macos app: web-ui App: web-ui gateway Gateway runtime commands Command implementations agents Agent runtime and tooling size: XL labels Apr 22, 2026

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 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,

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.

P1 Badge 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 👍 / 👎.

Comment thread ui/src/ui/app.ts
Comment on lines +1158 to +1161
const sanitized = answer
.replace(/\p{Cc}/gu, " ")
.replace(/\s+/g, " ")
.trim()

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 Badge 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 👍 / 👎.

@100yenadmin

Copy link
Copy Markdown
Contributor Author

Closed for sequential rollout — please disregard cumulative diff.

This PR was opened with --base main against the upstream repo. Cross-repo PRs can't reference fork branches as bases, so opening all 8 stack parts simultaneously produced cumulative diffs (each PR included all prior parts, 10k → 30k lines). That's review-hostile and reproduces exactly the problem the original umbrella #68939 had.

The fix: sequential rollout. Each [Plan Mode N/9] PR opens only AFTER the previous one merges to main, so its diff is incremental.

Currently open:

Next: when 1/9 merges, [Plan Mode 2/9] Core backend MVP opens with a clean ~2,000-line diff. Etc.

This PR's branch is preserved on the fork and will be reopened with a clean diff in its turn.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling app: macos App: macos app: web-ui App: web-ui commands Command implementations gateway Gateway runtime size: XL

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants