fix: correct mentor user bubble in dark mode

This commit is contained in:
leefer
2026-08-03 22:34:13 +08:00
parent e1e76cd51e
commit 6a058c2929
2 changed files with 12 additions and 1 deletions
+1 -1
View File
@@ -2661,7 +2661,7 @@ body[data-active-view="mentorView"] .overview-strip {
background: var(--surface-subtle);
}
:root[data-theme="dark"] :is(.mentor-option, .mentor-message-content, .assistant-message-content) {
:root[data-theme="dark"] :is(.mentor-option, .assistant-message-content) {
border-color: var(--border);
background: var(--surface-subtle);
+11
View File
@@ -2608,6 +2608,17 @@ test("mentor pins, custom order and streamed replies work together", async ({ pa
await expect(answer.locator("br")).toHaveCount(0);
await expect(page.locator("#mentorMessages .assistant-stream-caret")).toHaveCount(0);
await page.locator("#themeToggle").click();
const userMessage = page.locator("#mentorMessages .mentor-message.user");
const darkUserMessageStyle = await userMessage.evaluate((element) => ({
background: getComputedStyle(element).backgroundColor,
border: getComputedStyle(element).borderTopColor,
contentBackground: getComputedStyle(element.querySelector(".mentor-message-content")).backgroundColor,
contentColor: getComputedStyle(element.querySelector(".mentor-message-content")).color,
}));
expect(darkUserMessageStyle.background).toBe("rgb(35, 54, 74)");
expect(darkUserMessageStyle.border).toBe("rgb(66, 105, 142)");
expect(darkUserMessageStyle.contentBackground).toBe("rgba(0, 0, 0, 0)");
expect(darkUserMessageStyle.contentColor).toBe("rgb(232, 234, 237)");
const darkMessageStyle = await answer.evaluate((element) => {
const style = getComputedStyle(element);
const content = element.querySelector(".mentor-message-content");