Skip to content

fix(ui): warning callouts render without warning styles - #128253

Closed
vyctorbrzezowski wants to merge 3 commits into
mainfrom
fix/callout-warning-style
Closed

vyctorbrzezowski wants to merge 3 commits into
mainfrom
fix/callout-warning-style

Conversation

@vyctorbrzezowski

@vyctorbrzezowski vyctorbrzezowski commented Aug 23, 2026 •

Copy link
Copy Markdown
Member

Closes #128251

What Problem This Solves

Fixes an issue where users viewing warning states in Model Setup, Models, Cloud workers, Updates, and Usage would see neutral or page-specific styling instead of the shared warning treatment.

Why This Change Was Made

All 18 warning callouts now use the existing canonical warn modifier. The page-local warning base style in Usage was removed, leaving one warning callout name and one shared visual implementation; the distinct Usage cache emphasis remains scoped to that page.

User Impact

Gateway-version, admin-access, catalog, cache, and model warnings now consistently use amber warning color, border, and background in dark and light themes across five pages.

Evidence

  • Control UI mock on 127.0.0.1:5334 with operator.read,operator.write reproduced the affected admin warning on Model Setup, Models, Cloud workers, and Updates.
  • Before: Model Setup, Cloud workers, and Updates computed background-image: none with neutral text/border in both themes. Models inherited a separate Usage-only style.
  • After: all four pages compute the canonical callout.warn gradient, warning text, and warning border in both themes.
  • Model-provider credential and default-model mutation failures now use the styled callout.danger variant while retaining accessible alert semantics.
  • Dark and light before/after screenshots are attached below.
  • node scripts/run-vitest.mjs ui/src/pages/model-providers/view.test.ts ui/src/pages/agents/panels-tools-skills.browser.test.ts (51 tests passed; the mutation-error regression failed before the fix and passed after it)
  • pnpm check:changed
  • pnpm ui:build
  • Production LOC: +25/-32 (net -7). Tests: +29/-11 (net +18). Focused coverage protects info and warning runtime notices, the canonical warn modifier, and styled danger callouts for both model mutation error renderers.

Dark theme

Dark theme before and after

Light theme

Light theme before and after

@clawsweeper

clawsweeper Bot commented Aug 23, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

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

@openclaw-barnacle openclaw-barnacle Bot added app: web-ui App: web-ui size: XS maintainer Maintainer-authored PR labels Aug 23, 2026
@vyctorbrzezowski
vyctorbrzezowski marked this pull request as ready for review August 23, 2026 15:29
@vyctorbrzezowski
vyctorbrzezowski marked this pull request as draft August 23, 2026 15:39
@clawsweeper

clawsweeper Bot commented Aug 23, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: blocked before merge. Reviewed September 4, 2026, 4:27 AM ET / 08:27 UTC.

ClawSweeper review

What this changes

The PR makes Control UI warnings and model-save errors use the shared severity styles, removes duplicate warning CSS, and updates render assertions.

Merge readiness

⛔ Blocked before merge - 2 items remain

The fix remains necessary on current main, and no introduced correctness or security defect was found. The broader notice refactor is still open and does not establish a safe replacement.

Priority: P2
Reviewed head: 306d69752a6e3794f69854a3063a25699014c546

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused, maintainable repair with useful regression assertions; branch integration remains separate from patch quality.
Proof confidence 🌊 off-meta tidepool Not applicable: This member-authored presentation fix is exempt from the external-contributor proof gate. The supplied body maps the changed page templates and shared CSS to dark/light results from a running Control UI mock; linked screenshots could not be independently reopened here.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: This member-authored presentation fix is exempt from the external-contributor proof gate. The supplied body maps the changed page templates and shared CSS to dark/light results from a running Control UI mock; linked screenshots could not be independently reopened here.
Evidence reviewed 10 items Verified patch boundary: The local checkout matches the pinned original head. The merge-base comparison matches the supplied introduced files; endpoint drift was excluded from patch attribution. The final working-tree status was clean.
Shared presentation contract: The shared stylesheet defines warn, danger, info, and success callouts. The entry stylesheet imports it globally, and the affected page components render into light DOM. The patch uses this existing implementation rather than adding another style alias.
Notice producer and renderer: The model mutation owner distinguishes committed success plus refresh warning from operation failure. The page passes these messages into the changed renderers, which retain their text and alert/status roles while selecting the existing severity styles.
Findings None None.
Security None None.

How this fits together

Control UI pages turn Gateway status and operation results into notices for operators. Shared CSS gives those notices consistent warning, error, informational, and success treatments.

flowchart LR
  A[Gateway status] --> C[Page notice rendering]
  B[Operation results] --> C
  C --> D[Severity class]
  D --> E[Shared theme styles]
  E --> F[Visible operator notice]
Loading

Before merge

  • Resolve merge risk (P1) - The supplied snapshot reports merge conflicts, and no pinned merge result establishes how the styling changes integrate with newer current-main notice producers.
  • Complete next step (P2) - Resolve the reported merge conflicts, cover the newer Models/Usage stalled warnings and Cloud workers form-error callout, then refresh focused tests and dark/light browser checks.
Agent review details

Security

None.

PR surface

Source -7, Tests +18. Total +11 across 11 files.

View PR surface stats
Area Files Added Removed Net
Source 9 25 32 -7
Tests 2 29 11 +18
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 11 54 43 +11

Review metrics

Metric Value Why it matters
Production versus test LOC Production net -7; tests net +18 The repair removes duplicate styling and extends existing render coverage without adding production machinery.

Root-cause cluster

Relationship: fixed_by_candidate
Canonical: #128251
Summary: This PR is the focused candidate fix for the linked warning-style issue; broader notice work overlaps without superseding it on main.

Members:

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

Merge-risk options

Maintainer options:

  1. Decide the mitigation before merge
    Keep one shared severity-style contract across all current notice producers, preserving Usage cache emphasis without restoring the duplicate warning alias.
  2. Pause or close
    Do not merge this PR until maintainers decide whether the risk is worth taking.

Technical review

Best possible solution:

Keep one shared severity-style contract across all current notice producers, preserving Usage cache emphasis without restoring the duplicate warning alias.

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

Yes: current-main templates emit warning classes that do not select the shared warning treatment, and the linked report gives a concrete non-admin Control UI scenario. This review established the mismatch from source without executing the application.

Is this the best way to solve the issue?

Yes: correcting the template modifiers reuses the established styles and matches sibling renderers; adding a CSS alias would preserve duplicate conventions. Integration must cover the newer current-main callouts.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 3ed226a746a8.

Labels

Label justifications:

  • P2: Permission, compatibility, and operation warnings lose their intended visual emphasis, but the underlying workflows remain available.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: This member-authored presentation fix is exempt from the external-contributor proof gate. The supplied body maps the changed page templates and shared CSS to dark/light results from a running Control UI mock; linked screenshots could not be independently reopened here.

Evidence

What I checked:

  • Verified patch boundary: The local checkout matches the pinned original head. The merge-base comparison matches the supplied introduced files; endpoint drift was excluded from patch attribution. The final working-tree status was clean. (306d69752a6e)
  • Shared presentation contract: The shared stylesheet defines warn, danger, info, and success callouts. The entry stylesheet imports it globally, and the affected page components render into light DOM. The patch uses this existing implementation rather than adding another style alias. (ui/src/styles/components.css:1748, 306d69752a6e)
  • Notice producer and renderer: The model mutation owner distinguishes committed success plus refresh warning from operation failure. The page passes these messages into the changed renderers, which retain their text and alert/status roles while selecting the existing severity styles. (ui/src/pages/model-providers/config-mutation.ts:34, 306d69752a6e)
  • Current main still needs the fix: Current main still emits callout warning across the affected pages, while its shared stylesheet defines callout.warn. It also contains newer warning producers for stalled usage in Models and Usage, plus a Cloud workers form error outside the editor; these are base-branch integration context, not PR-introduced defects. (ui/src/pages/model-providers/view.ts:655, 3ed226a746a8)
  • Regression assertions and review continuity: The earlier warning-class assertion finding is resolved: both refresh-warning assertions expect warn, both mutation-error renderers are checked for danger, and effective-tool notices cover info and warning. The supplied body reports 51 passing tests and a pre-fix failure; this read-only review did not rerun them. The previous completed review examined this same head. (ui/src/pages/model-providers/view.test.ts:425, 306d69752a6e)
  • Implementation boundary: Effective-tool notice severity is defined by OpenClaw's Gateway protocol as info or warning; the changed UI maps that value to its own CSS class. Neither the introduced patch nor its proof claims depends on the Codex runtime or protocol, so the dependency-specific Codex inspection gate does not apply. (packages/gateway-protocol/src/schema/agents-models-skills.ts:1323, 306d69752a6e)

Likely related people:

  • Patrick Erichsen: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • Vyctor H. Brzezowski: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

Rank-up moves

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

  • Resolve the reported conflicts and normalize the newer Models/Usage stalled notices and Cloud workers form-error callout.
  • Recheck focused render tests and dark/light browser presentation after integration, carrying forward the previous review's validation request.

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

History

Review history (9 earlier review cycles; latest 8 shown)
  • reviewed 2026-08-23T16:24:34.816Z sha 2238bef :: needs changes before merge. :: none
  • reviewed 2026-08-24T06:02:27.530Z sha 698e519 :: needs maintainer review before merge. :: none
  • reviewed 2026-08-24T09:05:53.824Z sha 396a4e7 :: needs changes before merge. :: [P2] Update the warning-class assertions
  • reviewed 2026-08-25T07:37:57.256Z sha eb13f73 :: needs maintainer review before merge. :: none
  • reviewed 2026-08-25T10:02:31.178Z sha 306d697 :: needs maintainer review before merge. :: none
  • reviewed 2026-08-25T10:33:35.824Z sha 306d697 :: needs maintainer review before merge. :: none
  • reviewed 2026-08-28T04:33:01.467Z sha 306d697 :: needs maintainer review before merge. :: none
  • reviewed September 4, 2026, 4:27 AM ET / 08:27 UTC sha unknown :: blocked before merge. :: none

@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. 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. labels Aug 23, 2026
@clawsweeper clawsweeper Bot added proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. and removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. labels Aug 24, 2026
@vyctorbrzezowski
vyctorbrzezowski force-pushed the fix/callout-warning-style branch from 698e519 to 396a4e7 Compare August 24, 2026 08:58
@clawsweeper clawsweeper Bot added 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 rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. labels Aug 24, 2026
@clawsweeper clawsweeper Bot added rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed 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. labels Aug 25, 2026
@clawsweeper clawsweeper Bot added proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. and removed proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. labels Aug 25, 2026
@vyctorbrzezowski vyctorbrzezowski self-assigned this Aug 26, 2026
@vyctorbrzezowski

vyctorbrzezowski commented Sep 7, 2026 •

Copy link
Copy Markdown
Member Author

Superseded by newer notices that @steipete landed on main: the Cloud Workers form error, the stalled provider usage notice, and the model setup wizard cancellation notice (#140336) all render with the .callout.warning style this draft removed from ui/src/styles/usage.css. Replaying the removal would strip styling from those notices, and normalizing them to .warn extends the visual change beyond the authored scope. Closing; a single canonical warning callout style is still worth doing, but as a fresh change that covers the new notices deliberately.

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 maintainer Maintainer-authored PR P2 Normal backlog priority with limited blast radius. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. 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.

fix(ui): warning callouts render without warning styles

1 participant