Skip to content

fix(ui): show the check mark on the custom ask_user answer - #199999

Merged
obviyus merged 2 commits into
openclaw:mainfrom
tre1d:fix/ask-user-custom-answer-tick
Nov 24, 2026
Merged

obviyus merged 2 commits into
openclaw:mainfrom
tre1d:fix/ask-user-custom-answer-tick

Conversation

@tre1d

@tre1d tre1d commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

Root cause: ui/src/pages/chat/components/chat-question-answer-controls.tsx:267 (QuestionFreeText) renders an empty marker span for a multi-select own answer, so the row gets the selected style but never the ✓ that the regular options render from the same state.

What Problem This Solves

In a multi-select ask_user question, typing a custom answer highlights the custom row but its checkbox has no tick. The regular options show a check mark when selected; the custom answer row does not, so the user cannot tell that the custom answer will be included.

The regular option marker renders {implicit() ? "−" : selected() ? "✓" : ""}, but the custom-answer branch rendered an empty marker span for multiSelect. The selected class is applied, so the box lit up without a mark.

Fix

Render {props.selected ? "✓" : ""} inside the custom marker span, matching the regular option branch. selected is the same trimmed-text test that decides whether the typed answer is submitted (questionDraftValues), so the tick appears exactly when the custom answer will be sent and goes away when the text is cleared. Single-select own answers keep their radio mark.

Evidence

  • Regression in ui/src/pages/chat/components/chat-question-card.test.tsx: after typing an own answer in the existing single-to-multi-select flow, the custom marker's text must be ✓. Fails on the base source (expected '' to be '✓'), passes with the fix.
  • Built Gateway + built Control UI in a real browser (Chromium), with a scripted model that calls ask_user: base shows the lit custom row with an empty box; this PR shows ✓; the agent receives both the option and the custom answer; clearing the custom text removes the tick and the answer together. Proof and screenshots: fix(ui): show the check mark on the custom ask_user answer #199999 (comment)

Fixes #199997. Thanks @tre1d for the report and the fix.

Merge danger

Two-way door: presentation-only change in one Control UI component; a revert fully undoes it. No state, config or contract change. Blast radius: the own-answer row of multi-select question cards in Control UI chat.

@clawsweeper

clawsweeper Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@openclaw-barnacle openclaw-barnacle Bot added app: web-ui App: web-ui size: XS triage: needs-pr-context Candidate: external PR body lacks required problem context or evidence. labels Nov 16, 2026
@openclaw-barnacle openclaw-barnacle Bot removed the triage: needs-pr-context Candidate: external PR body lacks required problem context or evidence. label Nov 16, 2026
@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. labels Nov 16, 2026
@clawsweeper

clawsweeper Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs real behavior proof before merge.

What this changes

Shows a check mark when a custom answer is selected in a multi-select question.

Example: Select Tests and Docs, then type Metrics as a custom answer.

  • Before: The Metrics row is highlighted but its checkbox is empty.
  • After: The Metrics checkbox shows ✓, matching the selected options.

Review scores

Measure Result What it means
Overall readiness 🧂 unranked krab (1/6) The focused implementation appears correct, but the supplied evidence does not satisfy the required visual behavior proof.
Proof confidence 🧂 unranked krab (1/6) Real behavior proof is necessary before merge. See Before merge.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Bug fix · Worth it: Yes · Fix scope: Complete
User problem: A highlighted custom answer has an empty checkbox, leaving its selected state unclear.
Reason: The change restores consistency with selected multi-select options without changing the prior single-select radio design or adding state.

Merge readiness

⛔ Blocked before merge - 1 item remains

Keep open: this PR fixes a current UI defect with a focused change, and no introduced correctness bug was found.

Priority: P3
Reviewed head: 85984f22ced38f8e7576f20efcf901e863f2008d

Before merge

  • Add real behavior proof - The body and comments provide a jsdom question-panel regression assertion but no browser capture or live output exercising QuestionFreeText after the fix; the contributor should attach before/after screenshots and redact IPs, API keys, phone numbers, and non-public endpoints. After adding proof, update the PR body, then request a new review with @clawsweeper re-review. The PR author or someone with repository write access can request it.

Findings

None.

Tests

  • Missing end-to-end proof: Provide sanitized before/after browser screenshots of typing Metrics into a multi-select custom answer on the served fixed build; the body claims red/green regression results but supplies no execution output.
Agent review details

How this fits together

The Control UI question panel derives selection from the answer draft and passes it to the answer controls, which render selection feedback before submission.

flowchart LR
  A[Gateway question] --> B[Question panel]
  C[Custom answer draft] --> B
  B --> D[Answer controls]
  D --> E[Selected checkbox mark]
  B --> F[Answer submission]
Loading

Technical review

Best possible solution:

Render the custom checkbox tick directly from its existing selected prop while preserving radio rendering and answer submission.

Do we have a high-confidence way to reproduce the issue?

Source traces nonempty custom text to selected styling and an empty checkbox on current main; no browser reproduction or tests were run during this read-only review.

Is this the best way to solve the issue?

This is the smallest complete fix: use the selection value already owned by the panel and extend its existing behavioral test with the missing visible-marker assertion.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 799bc0bde925.

Provenance checked

  • Custom-answer selection marker keeps the original intent (8dd41fc: The merged radio-standardization PR deliberately separated radios from multi-select checkboxes and carried forward the empty custom checkbox; it does not establish when that omission originated.)

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

PR surface

Source +2, Tests +5. Total +7 across 2 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 1 3 1 +2
Tests 1 5 0 +5
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 2 8 1 +7

Preflight source

Source unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified.

Labels

Label changes:

No label changes.

Label justifications:

  • P3: This repairs visual selection feedback; the existing flow already includes the custom text in submitted answers.
  • rating: 🧂 unranked krab: Overall readiness is 🧂 unranked krab; proof is 🧂 unranked krab and patch quality is 🐚 platinum hermit.
  • status: 📣 needs proof: The PR needs real behavior proof before ClawSweeper can clear the contributor ask.

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Attach the browser evidence described in the proof assessment.

Rating scale

6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

Reviewed November 16, 2026, 1:35 AM ET / 06:35 UTC.

@tre1d

tre1d commented Nov 16, 2026

Copy link
Copy Markdown
Contributor Author

The review is code-clean (patch quality 4/6, no findings); the only blocker is the before/after browser capture. This is a one-line visual marker fix: the custom answer row now renders ✓ from the existing selected prop, and the focused regression test asserts the marker text after typing a custom answer.

I do not have a served fixed build on the authoring host: the installed build is 2026.11.3 (unpatched), and the branch has not been built locally. The before state is reproducible in 11.3; the after state requires the branch build.

Could a maintainer confirm whether the focused regression assertion is acceptable for this visual-only change, or approve the CI workflow so the UI suite runs? If screenshots are mandatory, guidance on the expected build/run path (or a CI artifact) would help.

@obviyus

obviyus commented Nov 24, 2026

Copy link
Copy Markdown
Collaborator

Real-browser proof for this PR at 85984f22ce, against base b3ee208526 (the PR's merge base; both changed files are unchanged on current main 0656fde4b1).

Setup: each ref built in a secretless node:24.22.1 Docker container (pnpm install --frozen-lockfile && pnpm build, which includes the Control UI). Built Gateway serving the built Control UI, with an isolated state dir and a scripted OpenAI Responses model that calls ask_user. Chromium 156 (Playwright 1.64.1) drives the chat. The model logs the exact tool output it gets back.

Step Base b3ee208526 This PR 85984f22ce
Multi-select: tick Tests, type own answer "Metrics" custom row lit, marker "" (empty box) custom row lit, marker ✓
Regular options (Tests/Docs/Lint) ✓ when selected, "" otherwise unchanged
Submit Tests + Metrics: what the agent receives {"extras":["Tests","Metrics"]} {"extras":["Tests","Metrics"]}
Clear the custom text row unlit, marker "" row unlit, marker "" (tick gone)
Docs + type "Temp", clear it, submit: what the agent receives {"extras":["Docs"]} {"extras":["Docs"]}
Single-select own answer "Own path" radio data-checked radio data-checked (unchanged); agent gets {"target":["Own path"]}

So the tick appears exactly when the custom answer is submitted, and clearing the text removes the tick and the answer together: the marker reads the same trimmed-text selected state that questionDraftValues uses to build the answer.

Observed lines (candidate, Chromium):

A2 custom typed: [{"row":"Tests","selectedClass":true,"mark":"\"✓\""},{"row":"Docs","selectedClass":false,"mark":"\"\""},{"row":"Lint","selectedClass":false,"mark":"\"\""},{"row":"custom(Metrics)","selectedClass":true,"mark":"\"✓\""}]
A3 custom cleared: [... {"row":"custom()","selectedClass":false,"mark":"\"\""}]
A5 submitted agent reply: ANSWER_RECEIVED Extras: Tests, Metrics {"status":"answered","answers":{"answers":{"extras":["Tests","Metrics"]}}}
B2 custom cleared: [... {"row":"Docs","selectedClass":true,"mark":"\"✓\""}, ..., {"row":"custom()","selectedClass":false,"mark":"\"\""}]
B3 submitted agent reply: ANSWER_RECEIVED Extras: Docs {"status":"answered","answers":{"answers":{"extras":["Docs"]}}}
C1 single custom typed: [... {"row":"custom(Own path)","selectedClass":true,"mark":"radio:checked"}]
C2 submitted agent reply: ANSWER_RECEIVED Target: Own path {"status":"answered","answers":{"answers":{"target":["Own path"]}}}

Base, same step A2: {"row":"custom(Metrics)","selectedClass":true,"mark":"\"\""}.

Regression: chat-question-card.test.tsx fails on the base source (expected '' to be '✓') and passes at this head (23/23).

Control UI bundle: owning chunk chat-question-panel-*.js +54 B raw / +8 B gzip; all of dist/control-ui +80 B gzip.

Screenshots, in order: base with the own answer typed (empty box), this PR with the own answer typed (✓), this PR after clearing the own answer, and this PR's single-select own answer (radio mark).

Base: the custom answer row is selected but its checkbox is empty
This PR: the custom answer row shows a check mark like Tests
This PR: after clearing the custom text the row and its check mark are cleared
This PR: single-select own answer keeps its radio mark

@obviyus
obviyus merged commit 10b7402 into openclaw:main Nov 24, 2026
182 of 186 checks passed
@obviyus

obviyus commented Nov 24, 2026

Copy link
Copy Markdown
Collaborator

Merged in 10b7402. Thanks @tre1d for the report and the fix. In a multi-select ask_user question, your own typed answer now shows the same check mark as the other selected options, exactly when it will be submitted. Clearing the text removes the tick, and single-select questions are unchanged.

vincentkoc added a commit that referenced this pull request Nov 24, 2026
* commit '391dea93e0a97fff97f9f3d5e94eac992b247b09': (21 commits)
  test(update): cover maintenance release before conversion (#204548)
  fix(ci): control memory pressure in cron rearm fixture (#204543)
  fix: align release workflow tests with retained evidence
  test(ui): open the Settings drawer by keyboard before the Escape check (#204539)
  fix(ci): avoid redundant globs for literal test inventories (#204529)
  fix(pr): retain protected resources after native squash merges (#204496)
  fix(ui): show the check mark on the custom ask_user answer (#199999)
  chore(ui): refresh control ui locales (#204542)
  fix(update): build Git releases only once (#204512)
  fix(ci): avoid repeated full-inventory matching (#204525)
  test(ci): align exec completion fixtures with process instances (#204507)
  test(update): replace mocked JSON routing with child proof (#204527)
  fix(slack): reject system events with an unresolved conversation type (#204444)
  test(agents): distinguish the source-session root (#204524)
  perf(ai): keep Responses tool history checkpointed across turns (#204519)
  feat(zai): add GLM-5.4 as the Coding Plan default (#204522)
  ci: cover unscheduled test files daily and fail when a test has no scheduled lane (#204472)
  fix(ci): model a distinct FRV job retry in CLI fixtures (#204517)
  improve(ui): defer sign-in controls until needed (#204484)
  test(agents): assert the prepared MCP hook prompt (#204508)
  ...
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Nov 25, 2026
…199999)

Root cause: ui/src/pages/chat/components/chat-question-answer-controls.tsx:267 (`QuestionFreeText`) renders an empty marker span for a multi-select own answer, so the row gets the selected style but never the `✓` that the regular options render from the same state.

## What Problem This Solves

In a multi-select `ask_user` question, typing a custom answer highlights the custom row but its checkbox has no tick. The regular options show a check mark when selected; the custom answer row does not, so the user cannot tell that the custom answer will be included.

The regular option marker renders `{implicit() ? "−" : selected() ? "✓" : ""}`, but the custom-answer branch rendered an empty marker span for `multiSelect`. The selected class is applied, so the box lit up without a mark.

## Fix

Render `{props.selected ? "✓" : ""}` inside the custom marker span, matching the regular option branch. `selected` is the same trimmed-text test that decides whether the typed answer is submitted (`questionDraftValues`), so the tick appears exactly when the custom answer will be sent and goes away when the text is cleared. Single-select own answers keep their radio mark.

## Evidence

- Regression in `ui/src/pages/chat/components/chat-question-card.test.tsx`: after typing an own answer in the existing single-to-multi-select flow, the custom marker's text must be `✓`. Fails on the base source (`expected '' to be '✓'`), passes with the fix.
- Built Gateway + built Control UI in a real browser (Chromium), with a scripted model that calls `ask_user`: base shows the lit custom row with an empty box; this PR shows `✓`; the agent receives both the option and the custom answer; clearing the custom text removes the tick and the answer together. Proof and screenshots: openclaw#199999 (comment)

Fixes openclaw#199997. Thanks @tre1d for the report and the fix.

## Merge danger

Two-way door: presentation-only change in one Control UI component; a revert fully undoes it. No state, config or contract change. Blast radius: the own-answer row of multi-select question cards in Control UI chat.

Co-authored-by: Ayaan Zaidi <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app: web-ui App: web-ui P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. size: XS status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: ask_user custom answer shows a selected checkbox with no tick in multi-select

2 participants