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.
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.
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.
| Pointer on the disabled button | main | this PR |
|---|---|---|
| Light, confirmation pending | no change | #e8ebf1 to #ccd7ee |
| Dark, confirmation pending | no change | #3f4350 to #3d4965 |
| Agent not active, light and dark | no change | the same backgrounds |
| Contrast of the disabled icon, light | 4.22 at rest, 3.50 under the pointer | |
| Click | does nothing | does 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.
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
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.
| Button under the pointer, light | Chat header | History panel header |
|---|---|---|
| SUSE and community | #ccd7ee | #b9ccf4 |
| Primary color #d9480f | #edd1c6 | #b9ccf4 |
| Dark (for comparison) | #3d4965 | #35415c, the same token |
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
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.
| Hover | Size | Corner |
|---|---|---|
| History | 32x30 | 8px |
| Menu | 14x30 | 4px |
| Close | 32x30 | 8px |
| Rancher's menu in a table row | 38x32 | 4px |
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
The button computes 4px with the rule, 4px with the rule removed in the page, and 4px on main.
Optional: this `border-radius` has no effect, the button is already 4px without it.
Read in the code. Both are identical today.
Optional: this gradient is written again in `History.vue`, and the two headers only match while both stay the same.
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 | #e8ebf1 | match |
| Header, dark | #3f4350 | #3f4350 | match |
| Text and icons | color of the page | #141419 / #fffafa | match |
| Hover, disabled, history panel | not shown | points 1, 2 and 3 | not defined there |
| What | How Rancher does it | This PR |
|---|---|---|
| Header surface | Panels use quiet surfaces. The active color is for the active item of the side bar | Better: the selected row background instead of the active color |
| Text contrast | 4.5 to 1 | Better: header 15.4 light, 9.5 dark. History panel icon 16.4, it was 3.7 |
| Keyboard focus | 3 to 1 for the ring | Better: 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 button | Uneven: right color, but the menu is a strip (3) and the history panel keeps its own blue in light (2) |
| Disabled button | RcButton keeps its disabled look under the pointer | Worse than main (1). The not-allowed cursor now shows, which is better |
| Brand color | Tints selected rows lightly in light, fixed grey in dark | Same, except point 2 |
| Badge text | Readable on its own background | Better: 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.
The PR adds no request and changes none. What decides how the header looks, read live:
| What | Where | Read |
|---|---|---|
| Theme | /v1/userpreferences, theme | light and dark |
| Brand and colors | /v3/settings/ui-brand, ui-primary-color | mf: value suse, source default. No custom primary color |
| Agent state, disables the history button | /v1/apps.deployments, rancher-ai-agent | active |
| Permissions, hides the history and menu buttons | list on deployments and config maps | allowed for admin |
| Confirmation waiting, disables the history button | frames of /v1/ws/messages | scripted in the browser |
| History list | agent REST /v1/api/chats, through the service proxy | 200 with the session cookie, 401 with a bearer token: the agent reads the cookie |
| What the new e2e writes | PUT /v3/settings/ui-brand, set to empty at the end | empty 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.
| Check | Result |
|---|---|
| Unit tests of the badge | 30 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 check | On 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 CI | Green 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 CI | Green. ESLint clean on the touched files here too |
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.