PR 357, Fix Header's colors: review, run 1

rancher-ai-ui, by torchiaf. Built from 8f50c9f5, base main 41464b64, both previews on the same Rancher (mf, v2.16 head, Prime). Process B, strict. Nothing is posted.

Suggested: Request changes

The colors match the design, text and focus are easier to see than on main, and the badge fix holds in every brand and theme. What holds it back on a strict run is one state that got worse: the disabled history button now reacts to the pointer. It is a visual problem, nothing breaks, and the three points are small.

  1. The disabled history button reacts to the pointer: should fix, new in this PR
  2. The history panel keeps the old blue on hover, in light: should fix
  3. The hover of the menu is a thin strip: suggestion
  4. A style without effect: optional
  5. The same gradient in two files: optional

The guided tour: what the PR changes, the comments.

What changes

The header on main and in this PRThe history panel on main and in this PRThe Ask Liz badge on main and in this PR

Points

1

The disabled history button reacts to the pointer

Header.vue:56, hover rule at 157
Should fix

New in this PR. On main the wrapper had pointer-events: none through its disabled class. The class and its rule are gone, the hover rule is on the wrapper, so it applies while the button inside is disabled.

The disabled history button under the pointer
Pointer on the disabled buttonmainthis PR
Light, confirmation pendingno change#e8ebf1 to #ccd7ee
Dark, confirmation pendingno change#3f4350 to #3d4965
Agent not active, light and darkno changethe same backgrounds
Contrast of the disabled icon, light4.22 at rest, 3.50 under the pointer
Clickdoes nothingdoes nothing

Repeated in two separate runs on the preview for the confirmation, one for the inactive agent, and once in the real package on Rancher 2.16. The reviewer found it on its own too.

Text to post, inline on Header.vue:56

With the `disabled` class gone, the history button still gets the hover background while it is disabled, so it looks clickable when a confirmation is pending or the agent is not active. Clicking it does nothing. On main nothing changes under the pointer.

In the guide: the button, where it happens

2

The history panel keeps the old blue on hover, in light

HistoryHeader.vue:72, the rule at 116
Should fix

The dark hover moved to --accent-btn, the light one is still color-mix(#A7BFF1 80%, #fff), the blue of the header this PR removes. The two buttons sit on the same spot (973,67), so the color changes under the pointer when the panel opens.

The button under the pointer in both headers
Button under the pointer, lightChat headerHistory panel header
SUSE and community#ccd7ee#b9ccf4
Primary color #d9480f#edd1c6#b9ccf4
Dark (for comparison)#3d4965#35415c, the same token

Text to post, inline on HistoryHeader.vue:72

Only the dark hover moved to the new color. In light the rule at line 116 still has the old blue, so the button changes from one blue to another when the panel opens, and it stays blue when a primary color is set in Branding.

In the guide: the panel, live, both blues

3

The hover of the menu is a thin strip

Suggestion

The menu had no hover on main. The PR adds one and widens the close button from 14 to 32, the menu stays at 14.

Menu and close buttons under the pointer
HoverSizeCorner
History32x308px
Menu14x304px
Close32x308px
Rancher's menu in a table row38x324px

Text to post, inline on ChatPanelMenu.vue:143

The new hover of the menu is 14px wide with a 4px corner, next to 32px and 8px on the history and close buttons, so it shows as a strip behind the dots. The menu of a table row in Rancher is 38x32.

In the guide: the buttons, live, the hover

4

A style without effect

Optional

The button computes 4px with the rule, 4px with the rule removed in the page, and 4px on main.

Text to post, inline on ChatPanelMenu.vue:140

Optional: this `border-radius` has no effect, the button is already 4px without it.
5

The same gradient in two files

Optional

Read in the code. Both are identical today.

Text to post, inline on Header.vue:116

Optional: this gradient is written again in `History.vue`, and the two headers only match while both stay the same.

Against the design

The PR links no issue. The design is in rancher/ux 590 (the problem), 592 (before and after) and 599 (the review of this PR, closed). Colors read from the pictures of 592:

Design, "After"This PR
Header, light#e8ebf2#e8ebf1match
Header, dark#3f4350#3f4350match
Text and iconscolor of the page#141419 / #fffafamatch
Hover, disabled, history panelnot shownpoints 1, 2 and 3not defined there

UI and UX, against the usual patterns

WhatHow Rancher does itThis PR
Header surfacePanels use quiet surfaces. The active color is for the active item of the side barBetter: the selected row background instead of the active color
Text contrast4.5 to 1Better: header 15.4 light, 9.5 dark. History panel icon 16.4, it was 3.7
Keyboard focus3 to 1 for the ringBetter: 7.7 light and 5.9 dark with the SUSE brand, it was 1.4 and 1.3
Hover of an icon button--accent-btn around the whole buttonUneven: right color, but the menu is a strip (3) and the history panel keeps its own blue in light (2)
Disabled buttonRcButton keeps its disabled look under the pointerWorse than main (1). The not-allowed cursor now shows, which is better
Brand colorTints selected rows lightly in light, fixed grey in darkSame, except point 2
Badge textReadable on its own backgroundBetter: 6.2 everywhere, it was 2.9 in dark with the SUSE brand

Left to the design, not in the comments: the hover is faint in dark (1.09 to 1, main 1.23), and the header of the history panel is a lighter grey than the chat header on purpose.

Backend and APIs

The PR adds no request and changes none. What decides how the header looks, read live:

WhatWhereRead
Theme/v1/userpreferences, themelight and dark
Brand and colors/v3/settings/ui-brand, ui-primary-colormf: value suse, source default. No custom primary color
Agent state, disables the history button/v1/apps.deployments, rancher-ai-agentactive
Permissions, hides the history and menu buttonslist on deployments and config mapsallowed for admin
Confirmation waiting, disables the history buttonframes of /v1/ws/messagesscripted in the browser
History listagent REST /v1/api/chats, through the service proxy200 with the session cookie, 401 with a bearer token: the agent reads the cookie
What the new e2e writesPUT /v3/settings/ui-brand, set to empty at the endempty falls back to the default. A brand set by hand on the test server is not put back

All the theme colors used exist in release-2.13, 2.14, 2.15, 2.16 and master, and the extension asks for 2.13 or later.

Tests and CI

CheckResult
Unit tests of the badge30 pass. With the old color back, 1 fails, so it guards the change. The second edited line is a value of a mock
e2e, the new color checkOn main the color is 20,22,25 in dark with the SUSE brand and white in the other three, so the brand loop is what guards it. Checked in the browser, Cypress was not run here
e2e on CIGreen at attempt 3. Attempt 1: a resource button test, 3 of 3. Attempt 2: the agent was never ready, no test ran. The badge test is retried once in "default, dark": the Welcome dialog covers the filter, as on main
Lint, i18n, unit on CIGreen. ESLint clean on the touched files here too

Not checked

What I would post

Request changes, with this line and the comments above, pictures of 1, 2 and 3 attached to theirs.

Thanks, the new header looks good in both themes and the badge is readable in every brand now. Three small things on the buttons below, the first one is new with this change.