Skip to content

fix(ui): resolve undefined --panel-2 token and harden the theme-token guard - #113776

Merged
steipete merged 1 commit into
mainfrom
steipete/carapace-closeout
Jul 25, 2026
Merged

steipete merged 1 commit into
mainfrom
steipete/carapace-closeout

Conversation

@steipete

Copy link
Copy Markdown
Contributor

What Problem This Solves

Closes out the Carapace design-contract review series (#113684, #113724, #113726). A final sweep of all of ui/src — CSS plus TS inline styles and Lit css templates — found one surviving undefined-token bug: the skills page's ClawHub verdict callout uses var(--panel-2), which is defined nowhere, so its background silently drops and the callout renders flat on the page. The token guard test added in #113726 only covers six alias names and only scans ui/src/styles/*.css, so this class of bug could keep reappearing in TS templates. Separately, base.css still carried a spacing mandate ("use --space-* instead of hardcoded px") that ~800 existing sites ignore, leaving contributors with a rule that contradicts the codebase.

Why This Change Was Made

The callout maps to the canonical --panel-strong tier. The guard test now covers every alias name this bug class has produced (--success, --warning, --warning-subtle, --panel-2, and the six from #113726) and scans all .css and non-test .ts files under ui/src, killing the class rather than patching instances. The spacing comment now codifies the actual policy: settings surfaces use the scale (per ui/docs/design-system/settings-design.md, which settings.css follows), everywhere else raw px is grandfathered and migrates opportunistically when rules are rewritten — no mass migration.

User Impact

The ClawHub verdict callout on the skills page gets its intended elevated panel background (previously invisible). No other visual change; the test and comment changes are contributor-facing only.

Evidence

  • node scripts/run-vitest.mjs ui/src/styles/base-theme-tokens.node.test.ts: 2/2 passing with the extended name list over all of ui/src — proving no other instance of this bug class exists anywhere in the Control UI today.
  • node scripts/check-changed.mjs over the three touched files: coreTests + ui lanes green on delegated Testbox (exit 0).
  • Codex autoreview (gpt-5.6-sol, xhigh): clean, 0 findings.
  • Design-system docs re-verified against base.css by scripted comparison (token names and hex values): all six docs clean.
  • Before/after:

before/after: skills callout panel background

(Artifact manifest: https://artifacts.openclaw.ai/pr-carapace-closeout-a1d448d5ecc/artifact-manifest.json)

@steipete
steipete marked this pull request as ready for review July 25, 2026 17:22
@openclaw-barnacle openclaw-barnacle Bot added app: web-ui App: web-ui size: XS maintainer Maintainer-authored PR labels Jul 25, 2026
@clawsweeper clawsweeper Bot added proof: sufficient ClawSweeper judged the real behavior proof convincing. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. 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. P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. labels Jul 25, 2026
@clawsweeper

clawsweeper Bot commented Jul 25, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed July 25, 2026, 1:26 PM ET / 17:26 UTC.

ClawSweeper review

What this changes

The PR replaces an undefined skills-page panel token with the canonical elevated-panel token, expands the theme-token guard to scan Control UI CSS and TypeScript templates, and updates the spacing-scale guidance comment.

Merge readiness

⚠️ Ready for maintainer review - 2 items remain

Keep this PR open: it addresses a concrete Control UI rendering defect with a bounded source-level guard, but the maintainer label requires explicit maintainer handling and the branch should be refreshed against current main before merge.

Priority: P3
Reviewed head: a1d448d5eccbf47ee481a90dbc6af04740f4564d
Owner decision: Required. See Decision needed.

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused visual bug fix with direct before/after evidence, a relevant expanded guard, and no actionable correctness or security finding.
Proof confidence 🦞 diamond lobster (5/6) ✨ media proof bonus Sufficient (screenshot): The PR body provides a targeted before/after screenshot of the repaired skills callout background, and the supplied check state includes a successful Real behavior proof run; the visual evidence directly matches this user-visible CSS change.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (screenshot): The PR body provides a targeted before/after screenshot of the repaired skills callout background, and the supplied check state includes a successful Real behavior proof run; the visual evidence directly matches this user-visible CSS change.
Evidence reviewed 4 items Concrete rendering repair: The branch changes the skills-page ClawHub verdict callout from undefined --panel-2 to the defined semantic tier --panel-strong, directly addressing the declaration that otherwise drops its background.
Guard covers the affected source boundary: The branch extends the node test from CSS-only scanning to CSS plus non-test TypeScript under ui/src, including the panel-2, success, and warning aliases implicated by this cleanup series.
Related merged token work: The supplied related-item history shows that the earlier status-token cleanup merged as commit e2790760102aee5d99504bce640a5b3160df5331; this PR is a bounded follow-up that expands the same guard to the remaining inline-style surface.
Findings None None.
Security None None.

How this fits together

Control UI components render their styles from the canonical theme tokens in ui/src/styles/base.css. The skills page passes a panel token into an inline callout style, while a node test scans UI source to prevent known undefined aliases from silently invalidating CSS declarations.

flowchart LR
  A[Canonical theme tokens] --> B[Control UI components]
  B --> C[Skills-page verdict callout]
  C --> D[Rendered panel background]
  A --> E[Theme-token guard test]
  F[CSS and TypeScript templates] --> E
  E --> G[Reject known undefined aliases]
Loading

Decision needed

Question Recommendation
Should this maintainer-labeled Control UI token follow-up land after a current-main refresh confirms the three-file patch remains clean? Refresh and merge: Rebase or refresh the branch onto current main, let the required checks validate the resulting head, then merge the focused visual repair.

Why: The code path is bounded and the supplied proof is relevant, but repository policy keeps items carrying the protected maintainer label open for explicit maintainer handling rather than automated cleanup.

Before merge

  • Resolve merge risk (P1) - The branch is reported behind current main; refresh or rebase it and require the merge gate to validate the exact resulting head before landing.
Agent review details

Security

None.

PR surface

Source +2, Tests +14. Total +16 across 3 files.

View PR surface stats
Area Files Added Removed Net
Source 2 4 2 +2
Tests 1 27 13 +14
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 3 31 15 +16

Review metrics

None.

Stored data model

Persistent data-model change detected: migration/backfill/repair: ui/src/styles/base.css. Confirm migration or upgrade compatibility proof before merge.

Merge-risk options

Maintainer options:

  1. Decide the mitigation before merge
    Land the narrow token substitution and source-boundary guard after refreshing the branch against current main, retaining the canonical-token policy rather than adding another alias definition.
  2. Pause or close
    Do not merge this PR until maintainers decide whether the risk is worth taking.

Technical review

Best possible solution:

Land the narrow token substitution and source-boundary guard after refreshing the branch against current main, retaining the canonical-token policy rather than adding another alias definition.

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

Yes, from source: the skills-page callout references var(--panel-2) while the canonical palette uses --panel-strong; rendering that callout on current main is the focused reproduction path. This review did not execute the UI locally.

Is this the best way to solve the issue?

Yes. Replacing the undefined use with the existing canonical token and extending the existing guard to the affected CSS-and-TypeScript source boundary is narrower and safer than introducing a new theme alias.

AGENTS.md: found and applied where relevant.

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

Labels

Label changes:

  • add P3: This is a narrow visual consistency fix with a focused regression guard and no evidence of message, state, authentication, security, or availability impact.
  • add proof: sufficient: Contributor real behavior proof is sufficient. The PR body provides a targeted before/after screenshot of the repaired skills callout background, and the supplied check state includes a successful Real behavior proof run; the visual evidence directly matches this user-visible CSS change.
  • add proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence. The PR body provides a targeted before/after screenshot of the repaired skills callout background, and the supplied check state includes a successful Real behavior proof run; the visual evidence directly matches this user-visible CSS change.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🦞 diamond lobster and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (screenshot): The PR body provides a targeted before/after screenshot of the repaired skills callout background, and the supplied check state includes a successful Real behavior proof run; the visual evidence directly matches this user-visible CSS change.

Label justifications:

  • P3: This is a narrow visual consistency fix with a focused regression guard and no evidence of message, state, authentication, security, or availability impact.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🦞 diamond lobster and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (screenshot): The PR body provides a targeted before/after screenshot of the repaired skills callout background, and the supplied check state includes a successful Real behavior proof run; the visual evidence directly matches this user-visible CSS change.
  • proof: sufficient: Contributor real behavior proof is sufficient. The PR body provides a targeted before/after screenshot of the repaired skills callout background, and the supplied check state includes a successful Real behavior proof run; the visual evidence directly matches this user-visible CSS change.
  • proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence. The PR body provides a targeted before/after screenshot of the repaired skills callout background, and the supplied check state includes a successful Real behavior proof run; the visual evidence directly matches this user-visible CSS change.

Evidence

What I checked:

  • Concrete rendering repair: The branch changes the skills-page ClawHub verdict callout from undefined --panel-2 to the defined semantic tier --panel-strong, directly addressing the declaration that otherwise drops its background. (ui/src/pages/skills/view.ts:782, a1d448d5eccb)
  • Guard covers the affected source boundary: The branch extends the node test from CSS-only scanning to CSS plus non-test TypeScript under ui/src, including the panel-2, success, and warning aliases implicated by this cleanup series. (ui/src/styles/base-theme-tokens.node.test.ts:7, a1d448d5eccb)
  • Related merged token work: The supplied related-item history shows that the earlier status-token cleanup merged as commit e2790760102aee5d99504bce640a5b3160df5331; this PR is a bounded follow-up that expands the same guard to the remaining inline-style surface. (ui/src/styles/base-theme-tokens.node.test.ts:7, e2790760102a)
  • Real behavior evidence: The PR body supplies a before/after screenshot specifically showing the skills callout background before the undefined token repair and after the canonical token repair; the supplied checks also include a successful Real behavior proof run. (ui/src/pages/skills/view.ts:782, a1d448d5eccb)

Likely related people:

  • steipete: Authored the current PR and the related merged Control UI token follow-ups, including the prior status-token guard work this change extends. (role: recent design-token series contributor; confidence: high; commits: e2790760102a, 4acf03fce667, a1d448d5eccb; files: ui/src/pages/skills/view.ts, ui/src/styles/base-theme-tokens.node.test.ts, ui/src/styles/base.css)

Rank-up moves

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

  • Refresh the branch against current main so the required merge checks cover the exact head maintainers would land.

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.

… guard

The skills page ClawHub verdict callout referenced var(--panel-2), which
is defined nowhere, silently dropping its background; use the canonical
--panel-strong tier. Extend base-theme-tokens.node.test.ts to every
alias name this bug class has produced (--success/--warning/--panel-2
included) and scan all of ui/src including TS inline styles and Lit css
templates, not just the styles directory. Codify the real spacing-scale
policy in base.css: settings surfaces use --space-*, elsewhere raw px is
grandfathered and migrates opportunistically.
@steipete
steipete force-pushed the steipete/carapace-closeout branch from a1d448d to f9ce02e Compare July 25, 2026 18:25
@steipete
steipete merged commit b9ec38a into main Jul 25, 2026
93 checks passed
@steipete
steipete deleted the steipete/carapace-closeout branch July 25, 2026 18:36
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Jul 26, 2026
… guard (openclaw#113776)

The skills page ClawHub verdict callout referenced var(--panel-2), which
is defined nowhere, silently dropping its background; use the canonical
--panel-strong tier. Extend base-theme-tokens.node.test.ts to every
alias name this bug class has produced (--success/--warning/--panel-2
included) and scan all of ui/src including TS inline styles and Lit css
templates, not just the styles directory. Codify the real spacing-scale
policy in base.css: settings surfaces use --space-*, elsewhere raw px is
grandfathered and migrates opportunistically.
vyctorbrzezowski added a commit that referenced this pull request Aug 10, 2026
Control UI declares its typography tokens once, in ui/src/styles/base.css:
--mono and --font-body. Fifteen rules asked for --font-mono / --font-sans
instead, names that only exist in other documents (canvas widget host,
provider OAuth page, MCP Apps spec keys). Those references are invalid at
computed-value time, so the declarations were dropped: nine had no fallback
and silently inherited the body font, and the four `font:` shorthand sites
lost their size, weight, and line height along with the family.

Point every reference at the canonical token and drop the now-dead generic
fallbacks so ui/src has one spelling per font token.

ui/src/styles/base-theme-tokens.node.test.ts already guards this bug class
for color tokens (#113726, #113776) but never listed the font aliases; add
them so a re-introduction fails the existing lane instead of shipping.
vyctorbrzezowski added a commit that referenced this pull request Aug 10, 2026
Control UI declares its typography tokens once, in ui/src/styles/base.css:
--mono and --font-body. Fifteen rules asked for --font-mono / --font-sans
instead, names that only exist in other documents (canvas widget host,
provider OAuth page, MCP Apps spec keys). Those references are invalid at
computed-value time, so the declarations were dropped: nine had no fallback
and silently inherited the body font, and the four `font:` shorthand sites
lost their size, weight, and line height along with the family.

Point every reference at the canonical token and drop the now-dead generic
fallbacks so ui/src has one spelling per font token.

ui/src/styles/base-theme-tokens.node.test.ts already guards this bug class
for color tokens (#113726, #113776) but never listed the font aliases; add
them so a re-introduction fails the existing lane instead of shipping.
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 10, 2026
Control UI declares its typography tokens once, in ui/src/styles/base.css:
--mono and --font-body. Fifteen rules asked for --font-mono / --font-sans
instead, names that only exist in other documents (canvas widget host,
provider OAuth page, MCP Apps spec keys). Those references are invalid at
computed-value time, so the declarations were dropped: nine had no fallback
and silently inherited the body font, and the four `font:` shorthand sites
lost their size, weight, and line height along with the family.

Point every reference at the canonical token and drop the now-dead generic
fallbacks so ui/src has one spelling per font token.

ui/src/styles/base-theme-tokens.node.test.ts already guards this bug class
for color tokens (openclaw#113726, openclaw#113776) but never listed the font aliases; add
them so a re-introduction fails the existing lane instead of shipping.
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 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: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: XS 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.

1 participant