Skip to content

fix(ui): restore lint for chat suggestion dismissal - #208159

Merged
daniel-lxs merged 2 commits into
mainfrom
openclaw/control-ui-guard-on-main-deb887
Nov 29, 2026
Merged

daniel-lxs merged 2 commits into
mainfrom
openclaw/control-ui-guard-on-main-deb887

Conversation

@roboclaw-bot

Copy link
Copy Markdown
Collaborator

Related: #208093. Follow-up to #207792.

What Problem This Solves

Chat UI changes can fail check-lint on main even when they do not change suggestion dismissal. The controller guard rejects three DOM queries that the chat pane uses to decide where keyboard focus goes when a moderator dismisses a suggestion.

User Impact

There is no intended change for moderators. A dismissed suggestion disappears before the Gateway replies. Keyboard review continues at the next visible suggestion, then the previous one if there is no next row, or the composer if the tray is empty. A rejected dismissal restores the suggestion without taking focus from a newer draft.

Why This Change Was Made

I kept the decision to hide a row in the pane, where the pending request and author receipt are already tracked. When a focused row is about to be hidden, its Solid component now uses refs to the summaries it actually rendered. The last-row case uses the shared composer focus helper. This removes the pane-wide DOM search without changing the guard, its allowlist, or its baselines.

Evidence

I ran node --import ./scripts/tsx.mjs scripts/check-control-ui-controllers.mts on AWS. Main at da10129bea36 failed with querySelector is not allowed here at chat-pane-shared.ts:236, :241, and :242. The same command passed on the fix: Control UI controller guard OK. I matched all five tested Git blobs to 7e35b3e64fee.

The focused production Control UI Chromium E2E passed (1 selected, 11 skipped by name filter). With the Gateway reply held, dismiss removed the row and focused the next summary, which Enter could open. Rejecting the request restored the row in order without replacing the newer draft or taking its focus. A successful retry kept the row gone, sent no chat message, and dismissing the last row returned focus to the composer. The test used synthetic Gateway responses, not a live multi-user session. Formatting and git diff --check passed. I did not run the full suite.

Requested and co-authored by @daniel-lxs.

Work sessions

Linked for team reference; these sessions aren’t public.

Worked on by

🦞 Made with OpenClaw

roboclaw-bot and others added 2 commits November 29, 2026 08:38
Keep the pane responsible for deciding when to hide a suggestion. Let the Solid tray move focus through its keyed summary refs before the focused row disappears.

Co-authored-by: daniel-lxs <[email protected]>
Worked on by:
- @daniel-lxs

Co-authored-by: daniel-lxs <[email protected]>
OpenClaw-Publication: 18621df4-9113-4261-9213-112561ef7516
@clawsweeper

clawsweeper Bot commented Nov 29, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

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

@clawsweeper clawsweeper Bot added the P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. label Nov 29, 2026
@daniel-lxs
daniel-lxs marked this pull request as ready for review November 29, 2026 08:46
@daniel-lxs

Copy link
Copy Markdown
Member

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Nov 29, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀

Re-review progress:

@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. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. 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 29, 2026
@clawsweeper

clawsweeper Bot commented Nov 29, 2026

Copy link
Copy Markdown
Contributor

Codex review: passed.

What this changes

Moves dismissal focus handling from pane-wide DOM queries to Solid-owned suggestion refs.

Example: A moderator dismisses Alice’s last pending suggestion.

  • Before: Focus returns to the composer, but the implementation fails the controller guard.
  • After: Focus still returns to the composer using refs and the existing focus helper.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) A focused, source-supported repair with useful browser coverage; runtime evidence uses a synthetic Gateway and broad CI remains pending.
Proof confidence 🦐 gold shrimp (3/6) This maintainer-authored, behavior-preserving repair is outside the contributor proof gate; reported guard results and focused Chromium coverage support it, while synthetic Gateway responses and historical screenshots limit runtime evidence.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Bug fix · Worth it: Yes · Fix scope: Complete
User problem: Validating otherwise unrelated chat UI changes fails because the existing suggestion-dismissal implementation violates the controller guard.
Reason: This is a focused repair of a demonstrated repository validation failure, with maintainer-authored direction and no intended change to moderator behavior.

Regression provenance

Regression provenance — suspected predecessor, not a causality claim: source commit 57c752a46c04 by Vyctor H. Brzezowski; no PR verified.

Possible regression — probable (reviewed change; failure trace). No predecessor PR is attributed.

Merge readiness

✅ Ready for maintainer review

This PR repairs a current-main controller-guard failure while preserving dismissal behavior; no actionable defects found.

Reviewed head: 8ad14483fa873600b6c474a804cc956f68c74a43

Before merge

None.

Findings

None.

Agent review details

How this fits together

The Control UI suggestion tray presents Gateway-owned suggestions, sends moderator actions through the chat pane, and manages keyboard focus around row removal.

flowchart LR
  Moderator --> Tray[Solid suggestion tray]
  Tray --> Pane[Chat pane dismissal owner]
  Pane --> Gateway
  Gateway --> Pane
  Pane --> Tray
  Tray --> Composer[Composer focus helper]
Loading

Technical review

Best possible solution:

Keep pending-dismissal decisions in the pane and keyboard focus in the Solid tray, using the existing composer focus helper.

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

Current-main queries necessarily reach the guard’s forbidden-query branch, matching the linked report’s failure trace; this review did not execute the guard.

Is this the best way to solve the issue?

The change follows the existing Solid ownership contract, removes the replaced helper, and preserves the pane’s dismissal and recovery decisions without weakening enforcement.

AGENTS.md: found and applied where relevant.

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

Provenance checked

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

PR surface

Source +12, Tests +6. Total +18 across 5 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 4 41 29 +12
Tests 1 6 0 +6
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 5 47 29 +18

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.

Root-cause cluster

Relationship: same_root_cause
Canonical: #208153
Summary: This PR repairs the exact three forbidden DOM queries documented by the canonical report.

Members:

Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.

Labels

Label changes:

  • add rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Label justifications:

  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

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 29, 2026, 3:50 AM ET / 08:50 UTC.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Nov 30, 2026
Move keyboard focus through the suggestion tray's rendered summary refs when the pane hides a dismissed row. Preserve the author's receipt and the composer's focus on rejection. Cover focus returning to the composer after the last dismissal.

Co-authored-by: daniel-lxs <[email protected]>
OpenClaw-Publication: 18621df4-9113-4261-9213-112561ef7516
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: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. size: S status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants