Skip to content

improve(ui): standardize the refresh icon button - #190390

Merged
vyctorbrzezowski merged 9 commits into
mainfrom
brzezowski/standardize-refresh-button
Nov 2, 2026
Merged

vyctorbrzezowski merged 9 commits into
mainfrom
brzezowski/standardize-refresh-button

Conversation

@vyctorbrzezowski

@vyctorbrzezowski vyctorbrzezowski commented Nov 1, 2026 •

Copy link
Copy Markdown
Member

What Problem This Solves

The icon that reloads a page's data had a different form on each page: a bordered square with a shadow on Usage and Channels, a 13px glyph on Automations, an 11px glyph on Models. On Automations the existing spinner never showed, because the jobs read holds its update in a transition until it settles. Logbook's button had no accessible name.

User Impact

These icon buttons are now one quiet form. While refreshing, each spins, is disabled, keeps its size and keeps its accessible name. Logbook's button now has a name.

Why This Change Was Made

RefreshButton is the shared btn btn--icon btn--ghost: no chrome at rest, fill on hover, theme radius. It is 32px with a 16px glyph, and 36px on touch or narrow widths. Settings and Automations keep their own 44px touch rule, which is invisible at rest. Usage's header rule no longer applies to this button, which made it 36×32 on touch; it now measures 36×36, and 32×32 at 1280.

  • Right edge: at the end of a row, the glyph's ink lines up with the card below. The hover box extends 10px into empty gutter, not into a neighbour. On touch and narrow widths the glyph moves inside its box instead, since touch paints no hover box. Beside a neighbor, the large box starts at that neighbor and reaches into the gutter, so the glyph stays 16px from it, the same as at 1280.
  • Section headers: Channels keeps its 28px header and 8px gap, so its content doesn't move. The 32px box has a negative block margin, and the compact-section rule in channels.css now also matches this button. Without that rule the section gap went back to 12px, which was the extra 4px after the 4px of box growth.
  • Phone: a lone refresh icon stays on the section heading row instead of taking its own row, here on Channels, Plugins Advanced and Installed agents. Sections with other actions, such as Models, still stack. improve(ui): keep Channels refresh and setup on their rows on phones #190381 also handles Channels; the overlap is mechanical.
  • Sessions: keeps 34px and 18px to match the search and filter icons beside it. It only gains the spin and aria-busy.

Labelled refresh buttons moved to the icon are in a separate PR, #190426. Both changes use the same RefreshButton owner; the labelled-button migration is already included in main.

Left alone on purpose:

Instance Reason
Terminal, Portals, session panel rails Same rail family as their sibling buttons. Terminal also stays enabled during a reload to keep focus, which its tests assert
Desktop panel rail Labelled rail button that names what it refreshes
Systems sidebar 24px hover action inside the filter field, with its own read status
Debug, Profile Stand alone with width-stable labels; Debug's description refers to the word Refresh
Memory "Refresh status", Dreaming header Hero action or status line where the label carries the meaning
Meeting capture health row The row title doesn't say what the control does, so the label does
Agent Skills panel One of five labelled actions, next to Reload Config, where an icon would be ambiguous
Usage empty state, Devices, Browser, Labs, retry actions Recovery calls to action
Chat context panel, session diff, link reader Compact panel chrome; judged from source, not checked in a browser

Not Verified

Existing Jitter, Not Changed

Refreshing Channels shows a blue "Refreshing channel status in the background" callout that moves the page down about 90px. Main does the same, measured on both. It is visible in the refreshing image.

Evidence

Mock data, real clicks. The refreshing image holds the response of the request the click sent with the mock Gateway's deferNext. Size measured the same at rest, busy and after on each page, except Logbook. Real Safari 27 is shown for the spinning state in a narrow window; there a proxy added a small page script that reports the button's position and holds that same response, and the click is a real OS click. Open mobile PRs move some of these controls on phone; this standardizes what is on main.

Absolutely light
Before and after, Absolutely light

Absolutely dark
Before and after, Absolutely dark

CRT, square corners kept
Before and after, CRT

390px
Before and after, 390px

Refreshing
Refreshing

Right edge, at rest and on hover
Right edge

Usage at 390px, real Gateway

Real Safari, spinning
Safari, Usage refreshing

Integration validation

Kept the current phone layouts and extracted Usage toolbar. Cron refresh now releases a retired presentation during Gateway replacement without cancelling the admitted read. A mounted-page regression failed before that correction and passed afterward; 104 targeted tests, UI and UI-test typechecks, and touched-file lint/format checks passed. The correction received an independent code review.

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

clawsweeper Bot commented Nov 1, 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: sufficient ClawSweeper judged the real behavior proof convincing. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. 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 1, 2026
@clawsweeper

clawsweeper Bot commented Nov 1, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs changes before merge.

What this changes

This PR replaces varied page refresh controls with a shared, accessible icon button and adds immediate Automations refresh feedback.

Example: Refresh Meetings while its list request is pending.

  • Before: A labeled Refresh button uses page-specific presentation.
  • After: A quiet icon button retains its accessible Refresh name and fixed box while showing busy feedback.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) Strong visual evidence supports the approved direction, but the sizing defect and two attributable CI failures require focused repair.
Proof confidence 🦞 diamond lobster (5/6) ✨ media proof bonus Sufficient (screenshot): The shared refresh presentation is exercised in the actual browser UI with synthetic Gateway data and real clicks; inspected screenshots show theme variants, narrow layouts, labeled conversions, and held-response busy states.
Patch quality 🦐 gold shrimp (3/6) 3 actionable review findings remain.

Product

Kind: Preference · Worth it: Yes · Fix scope: Complete
User problem: Refresh controls look and behave differently across pages, and changing loading labels can move nearby content.
Reason: The maintainer-authored direction is approved under the supplied rules, and the screenshots demonstrate a coherent improvement without adding settings or changing request ownership.

Merge readiness

⛔ Needs changes before merge - 3 items remain

Keep open for focused repair; this maintainer-authored visual consolidation is useful but not yet merge-ready.

Priority: P3
Reviewed head: 175e1163e2039a3a5eeb17b247d90e672d2bc684

Before merge

  • Update the Sessions browser assertion for the refresh tooltip (P2) - Replacing the Sessions button with RefreshButton introduces an openclaw-tooltip ancestor, but session-kinds.e2e.test.ts still requires tooltip:false for every action. CI fails this assertion at both 1440px and 390px. Remove the obsolete structural expectation for Refresh while retaining the geometry, accessible-name, and interaction checks.
  • Bring the added styles within the paired CSS size ratchet (P2) - The added refresh rules cause control-ui-performance to fail its paired base/head check: total CSS raw grows beyond the 64-byte allowance on an already over-budget base. Consolidate the new rules with existing styles or remove superseded CSS until the paired check passes, preserving the visual behavior rather than raising the budget.
  • Preserve the Sessions height exception on coarse pointers (P3) - On a coarse-pointer device, min-height:36px overrides the retained Sessions toolbar height:34px because that selector does not set min-height. Refresh therefore becomes 36px tall while its neighboring Sessions actions remain 34px, contrary to the stated sizing exception. Let the Sessions owner override the minimum height and cover this case with a coarse-pointer browser measurement.

Findings

  • [P2] Update the Sessions browser assertion for the refresh tooltip — ui/src/pages/sessions/view.tsx:123-124
  • [P2] Bring the added styles within the paired CSS size ratchet — ui/src/styles/components.css:1286-1291
  • [P3] Preserve the Sessions height exception on coarse pointers — ui/src/styles/components.css:1312-1313

Tests

  • Missing end-to-end proof: No base-red/head-green regression is shown for the Automations spinner fix.
Agent review details

How this fits together

The Control UI renders refresh controls from existing page loading and permission facts, forwards clicks to existing request owners, and displays their resulting state.

flowchart LR
  User[Browser user] --> Button[Shared refresh button]
  Button --> Callback[Existing page callback]
  Callback --> Owner[Page request owner]
  Owner --> Gateway[Gateway RPC]
  Owner --> State[Loading and result state]
  State --> Button
Loading

Technical review

Best possible solution:

Keep one shared presentation component, preserve page-owned request behavior and sizing exceptions, and repair the specific browser and CSS gate failures.

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

Current-main source shows the inconsistent controls and changing loading labels, supported by the author's inspected before-and-after browser captures.

Is this the best way to solve the issue?

The shared component is a proportionate solution that reuses existing button, icon, tooltip, and request owners; its sizing exception and affected validation need correction.

Full review comments:

  • [P2] Update the Sessions browser assertion for the refresh tooltip — ui/src/pages/sessions/view.tsx:123-124
    Replacing the Sessions button with RefreshButton introduces an openclaw-tooltip ancestor, but session-kinds.e2e.test.ts still requires tooltip:false for every action. CI fails this assertion at both 1440px and 390px. Remove the obsolete structural expectation for Refresh while retaining the geometry, accessible-name, and interaction checks.
    Confidence: 1
  • [P2] Bring the added styles within the paired CSS size ratchet — ui/src/styles/components.css:1286-1291
    The added refresh rules cause control-ui-performance to fail its paired base/head check: total CSS raw grows beyond the 64-byte allowance on an already over-budget base. Consolidate the new rules with existing styles or remove superseded CSS until the paired check passes, preserving the visual behavior rather than raising the budget.
    Confidence: 0.99
  • [P3] Preserve the Sessions height exception on coarse pointers — ui/src/styles/components.css:1312-1313
    On a coarse-pointer device, min-height:36px overrides the retained Sessions toolbar height:34px because that selector does not set min-height. Refresh therefore becomes 36px tall while its neighboring Sessions actions remain 34px, contrary to the stated sizing exception. Let the Sessions owner override the minimum height and cover this case with a coarse-pointer browser measurement.
    Confidence: 0.96

Overall correctness: patch is incorrect
Overall confidence: 0.96

AGENTS.md: found and applied where relevant.

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

Provenance checked

Testing

Proof path: shipped entry point.

Security

None.

Evidence

Acceptance criteria:

  • pnpm test:ui:e2e ui/src/e2e/session-kinds.e2e.test.ts
  • pnpm --dir ui test src/pages/skills/view.test.tsx src/pages/agents/panel-cron.test.tsx --maxWorkers=1
  • pnpm tsgo:ui
  • pnpm lint:ui:styles
  • pnpm ui:check-performance:base 9936c8f

What I checked:

Likely related people:

  • Vyctor H. Brzezowski: Raw commit 52eb013 adds ui/src/styles/components.css:2437 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 52eb01333049; files: ui/src/styles/components.css)

PR surface

Source +30, Tests +2. Total +32 across 35 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 25 193 163 +30
Tests 10 23 21 +2
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 35 216 184 +32

Labels

Label changes:

  • add P3: This is UI consistency and accessibility polish with limited runtime impact; the identified repairs are focused.
  • add proof: sufficient: Contributor real behavior proof is sufficient.
  • add proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence.
  • add rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦞 diamond lobster and patch quality is 🦐 gold shrimp.
  • 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 accessibility polish with limited runtime impact; the identified repairs are focused.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦞 diamond lobster and patch quality is 🦐 gold shrimp.
  • status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action.
  • proof: sufficient: Contributor real behavior proof is sufficient.
  • 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 1, 2026, 9:30 AM ET / 14:30 UTC.

@vyctorbrzezowski vyctorbrzezowski changed the title improve(ui): standardize the refresh button improve(ui): standardize the refresh icon button Nov 1, 2026
@vyctorbrzezowski
vyctorbrzezowski merged commit f83b1cf into main Nov 2, 2026
10 checks passed
@vyctorbrzezowski
vyctorbrzezowski deleted the brzezowski/standardize-refresh-button branch November 2, 2026 14:28
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Nov 3, 2026
Standardize page refresh controls on RefreshButton while preserving current phone layouts and accessible busy and disabled states. Retire a pending Cron refresh presentation on Gateway replacement using its existing lifetime signal.

Validated with 104 targeted tests, UI and UI-test typechecks, touched-file checks, and independent correction review. Broad CI may remain pending under the maintainer-authorized ordered landing policy.
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. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. size: M 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