Skip to content

ui: move dialog closes and ghost icon actions onto IconButton - #194152

Merged
vyctorbrzezowski merged 3 commits into
mainfrom
brzezowski/icon-button-settings
Nov 7, 2026
Merged

vyctorbrzezowski merged 3 commits into
mainfrom
brzezowski/icon-button-settings

Conversation

@vyctorbrzezowski

@vyctorbrzezowski vyctorbrzezowski commented Nov 6, 2026 •

Copy link
Copy Markdown
Member

Problem and change

Dialog closes and ghost icon actions used inconsistent boxes, glyphs, hover states, and focus treatments. This layer moves them onto the existing IconButton, includes its styles inside modal shadow roots, and removes superseded CSS. Dialog closes retain their accessible labels and existing 28px desktop / 40–44px touch targets, use the shared radius, and omit tooltips.

This PR now contains only its own layer, replayed after the already-merged parent standardization. The newer checkbox, alert, menu, mobile-layout, and icon-type fixes are retained. Bordered controls and the board close's frosted background keep their existing treatment.

Validation

  • 41 focused tests passed across modal dialogs, model setup, usage sessions, suggestions, and curated settings.
  • The widget suite reproduced two obsolete native-title expectations. Updated those existing assertions to check shared tooltip feedback while preserving focus, disabled state, retry, and membership behavior: 26 passed. pnpm test ui/src/pages/chat/components/widget-card.test.tsx --maxWorkers=1: 5.45s wall; net test-line change 0. Current CI seconds are pending.
  • UI typecheck, targeted TypeScript/CSS lint, formatting, and git diff --check passed. Removed the unused icon import and combined an adjacent duplicate selector without changing declarations.
  • pnpm ui:build passed. Performance measurement passes CSS limits but exceeds largest JS by 23 B (560,556 / 560,533), Chat boot by 767 B (1,289,797 / 1,289,030), and New Session boot by 1,026 B (798,406 / 797,380). No budget baseline was changed; the authorized parent lander owns the final exception.
  • Fresh independent Codex review: no actionable P0–P2 findings.
  • The old run 42232295796 belongs to the incoming head. Its UI shards ended during startup without an assertion failure; that is not current-head test evidence.

Visual evidence

Existing approved captures were inspected and retained; the user waived recapture for the incoming design and mechanical integration.

Scenario Before After
Dialog close X · hover · 1280 light 01-dialog-close-before 02-dialog-close-after-v2
Usage session copy · top row: hover · bottom row: rest · 1280 light 03-usage-copy-before 04-usage-copy-after
State Screenshot
Dialog close X · hover · 1280 dark 05-dialog-dark-v2
Dialog close X · focus · 1280 CRT dark 06-dialog-crt-focus-v2
Dialog close X · hover · 390 light (40px touch box) 07-dialog-390-v2

These captures cover the shown dialogs and usage controls. The remaining migrated surfaces were not recaptured live: board close, ChatGPT usage-limit close, Review diff toolbar/file actions, widget pin/menu, annotation delete, suggestions, portals preview, devices approval, memory actions/menu, plugin editor menu, lazy error action, disclosure chevrons, exec-approval info, personal session groups, and other dialogs. Focused tests cover only the named scenarios above.

@vyctorbrzezowski vyctorbrzezowski self-assigned this Nov 6, 2026
@clawsweeper

clawsweeper Bot commented Nov 6, 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.

@clawsweeper clawsweeper Bot added clawsweeper:intake:feature Preliminary submission classification; full source review pending. P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. and removed clawsweeper:intake:feature Preliminary submission classification; full source review pending. labels Nov 6, 2026
@clawsweeper

clawsweeper Bot commented Nov 6, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs changes before merge.

What this changes

This PR moves dialog closes and selected icon actions onto the shared IconButton presentation.

Example: Hover the copy action beside a session on Usage.

  • Before: The 28px copy button has a bordered box.
  • After: The button uses the shared ghost appearance and Copy tooltip.

Review scores

Measure Result What it means
Overall readiness 🦪 silver shellfish (2/6) Useful consolidation with direct visual evidence, but the current head introduces failing consumer assertions and additional asset-budget violations.
Proof confidence 🐚 platinum hermit (4/6) This maintainer-authored PR is outside the ordinary contributor proof gate; four inspected browser screenshots demonstrate channel-dialog close and Usage copy styling, while the body explicitly identifies unverified migrated surfaces.
Patch quality 🦪 silver shellfish (2/6) 2 actionable review findings remain.

Product

Kind: Refactor · Worth it: Yes · Fix scope: Complete
User problem: Equivalent icon actions have inconsistent boxes, glyphs, hover surfaces, and focus presentation.
Reason: The maintainer-authored direction consolidates existing UI presentation without introducing another state or action owner.

Merge readiness

⛔ Needs changes before merge - 2 items remain

Keep open: this maintainer-directed consolidation is worthwhile, but introduced consumer-test failures and additional boot-budget violations need repair before merge.

Priority: P3
Reviewed head: 0964deedaeab5bfc0df4956a9c3b538342982416

Before merge

  • Migrate the affected consumer assertions with the controls (P2) - Replacing native titles and .btn controls leaves existing regression suites failing on this head. widget-card.test.tsx:575 and subsequent retry assertions still read button.title, memory/view.test.ts:814 still selects the removed .btn class, chat-annotations.browser.test.tsx:292 rejects the intentional shared 2px focus outline, and session-diff-panel.browser.test.ts:582 assumes the newly tooltip-wrapped trigger has no remaining anchor name. Update these assertions to exercise the shared tooltip, accessible action, focus, and menu-cleanup contracts while retaining their identity, retry, and keyboard checks.
  • Keep the migration within the existing boot asset limits (P2) - The new inline stylesheet import adds another JavaScript representation of icon-button.css to the modal dependency graph. Head CI reports New Session boot JS at 779.4 KiB against 779.0 KiB and Chat boot JS at 1259.0 KiB against 1258.9 KiB. The parent already has a smaller New Session violation, but this head adds growth beyond the permitted 64-byte variance and introduces the reported Chat violation. Reduce the added boot payload while preserving shadow-root styling; do not raise the budgets to accommodate the migration.

Findings

  • [P2] Migrate the affected consumer assertions with the controls — ui/src/pages/chat/components/widget-pin-button.tsx:66-72
  • [P2] Keep the migration within the existing boot asset limits — ui/src/components/modal-dialog.tsx:13

Tests

  • Missing end-to-end proof: Supplied screenshots cover close and copy appearance; interaction parity across the other migrated surfaces, including Chromium/WebKit focus and menu behavior, is not demonstrated.
Agent review details

How this fits together

Control UI dialogs and page actions render native buttons through shared Solid components; existing callbacks continue to handle closing, copying, and other actions.

flowchart LR
  A[Dialogs and page actions] --> B[IconButton]
  B --> C[Native button]
  B --> D[Tooltip owner]
  E[Shared icon styles] --> C
  F[Modal style registration] --> E
  C --> G[Existing action callbacks]
Loading

Technical review

Best possible solution:

Keep IconButton as the presentation owner, preserve existing action semantics and shadow-root styling, and repair consumer assertions and boot growth without relaxing existing gates.

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

This PR addresses presentation inconsistency rather than a functional bug; its supplied images show the difference, and existing head CI records the validation failures.

Is this the best way to solve the issue?

Reusing the existing component and deleting local styling is the smallest coherent approach, provided the affected consumer contracts and asset limits remain covered.

Full review comments:

  • [P2] Migrate the affected consumer assertions with the controls — ui/src/pages/chat/components/widget-pin-button.tsx:66-72
    Replacing native titles and .btn controls leaves existing regression suites failing on this head. widget-card.test.tsx:575 and subsequent retry assertions still read button.title, memory/view.test.ts:814 still selects the removed .btn class, chat-annotations.browser.test.tsx:292 rejects the intentional shared 2px focus outline, and session-diff-panel.browser.test.ts:582 assumes the newly tooltip-wrapped trigger has no remaining anchor name. Update these assertions to exercise the shared tooltip, accessible action, focus, and menu-cleanup contracts while retaining their identity, retry, and keyboard checks.
    Confidence: 0.99
  • [P2] Keep the migration within the existing boot asset limits — ui/src/components/modal-dialog.tsx:13
    The new inline stylesheet import adds another JavaScript representation of icon-button.css to the modal dependency graph. Head CI reports New Session boot JS at 779.4 KiB against 779.0 KiB and Chat boot JS at 1259.0 KiB against 1258.9 KiB. The parent already has a smaller New Session violation, but this head adds growth beyond the permitted 64-byte variance and introduces the reported Chat violation. Reduce the added boot payload while preserving shadow-root styling; do not raise the budgets to accommodate the migration.
    Confidence: 0.9

Overall correctness: patch is incorrect
Overall confidence: 0.94

AGENTS.md: found and applied where relevant.

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

Provenance checked

Testing

Proof path: shipped entry point.

Security

None.

Evidence

Acceptance criteria:

  • pnpm --dir ui test src/pages/chat/components/widget-card.test.tsx src/pages/agents/memory/view.test.ts --project unit
  • pnpm --dir ui test src/pages/chat/components/chat-annotations.browser.test.tsx src/pages/chat/components/session-diff-panel.browser.test.ts --project browser
  • pnpm tsgo:ui
  • Verify the repaired head's control-ui-performance check against its pinned base without changing budgets.
  • Verify migrated dialog focus and close behavior in Chromium and WebKit.

What I checked:

  • Verified introduced change: The pinned parent-to-head diff replaces presentation while retaining action callbacks, disabled conditions, and dialog selector classes. (0964deedaeab)
  • Current main still uses local dialog presentation: Current main renders DialogHeader with a native button and maintains separate close-button geometry, hover, glyph, and focus rules. (ui/src/components/solid/dialog-header.tsx:18, 8dd41fc95291)
  • Introduced consumer-test failures: Head CI reports widget pin assertions expecting native title feedback, a memory-menu assertion still selecting .btn, annotation assertions rejecting the shared 2px focus outline, and a Review assertion expecting no anchor name despite the newly retained tooltip anchor. (ui/src/pages/chat/components/widget-card.test.tsx:575, 0964deedaeab)
  • Additional boot growth: The head asset check reports New Session boot JS at 779.4 KiB against 779.0 KiB and Chat at 1259.0 KiB against 1258.9 KiB; growth beyond the 64-byte variance allowance fails when the base already exceeds its cap. (ui/src/components/modal-dialog.tsx:13, 0964deedaeab)
  • Inherited failures separated: Parent CI already reports the presentation-primitives, session-search, session-windowing, and session-menu failures, plus a smaller New Session asset-budget violation; these are not attributed to this PR. (080f27a669ba)
  • Inspected visual evidence: The four prepared images show before/after channel-dialog close hover and Usage copy hover. The remaining dark, CRT, and phone images could not be inspected: scratch downloads failed with curl error 23 and browser fetches returned Cache miss; that reviewer limitation is not a contributor defect. (0964deedaeab)

Likely related people:

  • Vyctor H. Brzezowski: Raw commit 3c43252 adds ui/src/components/solid/dialog-header.tsx:7 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 3c43252c068c; files: ui/src/components/solid/dialog-header.tsx)

PR surface

Source -104. Total -104 across 43 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 43 213 317 -104
Tests 0 0 0 0
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 43 213 317 -104

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:

  • add P3: This is UI consistency and presentation cleanup with no established urgent user-facing failure.
  • add proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence.
  • add rating: 🦪 silver shellfish: Overall readiness is 🦪 silver shellfish; proof is 🐚 platinum hermit and patch quality is 🦪 silver shellfish.
  • add status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action.

Label justifications:

  • P3: This is UI consistency and presentation cleanup with no established urgent user-facing failure.
  • rating: 🦪 silver shellfish: Overall readiness is 🦪 silver shellfish; proof is 🐚 platinum hermit and patch quality is 🦪 silver shellfish.
  • status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action.
  • proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence.

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 6, 2026, 8:54 AM ET / 13:54 UTC.

@vyctorbrzezowski
vyctorbrzezowski force-pushed the brzezowski/icon-button-rest branch from 080f27a to 85be61d Compare November 6, 2026 18:44
Base automatically changed from brzezowski/icon-button-rest to main November 6, 2026 18:51
@vyctorbrzezowski
vyctorbrzezowski force-pushed the brzezowski/icon-button-settings branch from 0b79ffe to 5d67385 Compare November 7, 2026 02:04
@vyctorbrzezowski
vyctorbrzezowski merged commit aa9968d into main Nov 7, 2026
88 of 93 checks passed
@vyctorbrzezowski
vyctorbrzezowski deleted the brzezowski/icon-button-settings branch November 7, 2026 02:10
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Nov 7, 2026
…aw#194152)

Reuse the existing IconButton for dialog close controls and ghost icon actions, including shadow-root styles, while preserving dialog sizing, accessible labels and recovery behavior.

Co-authored-by: Vyctor H. Brzezowski <[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. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. size: L status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant