fix(ui): make error callouts selectable (#130717)

Co-authored-by: roboclaw-bot <309084314+roboclaw-bot@users.noreply.github.com>
This commit is contained in:
RoboClaw
2026-08-26 22:54:05 -07:00
committed by GitHub
parent 42ce03e72e
commit be8b6ff3c4
2 changed files with 27 additions and 1 deletions
+26 -1
View File
@@ -74,7 +74,7 @@ suite.define(() => {
viewport: { height: 900, width: 1440 },
},
async ({ page }) => {
await installMockGateway(page, {
const gateway = await installMockGateway(page, {
historyMessages: [
{
role: "assistant",
@@ -214,6 +214,31 @@ suite.define(() => {
element.scrollTop = Math.min(160, element.scrollHeight - element.clientHeight);
});
await captureUiProof(page, "03-settings-contextual-scrollbars.png");
const usageError = "Unknown system error -122, write";
await gateway.setMethodResponse("sessions.usage", {
__mockError: { code: "UNAVAILABLE", message: usageError },
});
await gateway.setMethodResponse("usage.cost", {
updatedAt: Date.now(),
days: 1,
daily: [],
totals: {},
});
await gateway.setMethodResponse("usage.status", {
updatedAt: Date.now(),
providers: [],
});
await page.goto(`${suite.server.baseUrl}usage`);
const usageErrorCallout = page.locator(".usage-callout.callout.danger");
await usageErrorCallout.waitFor();
expect(await usageErrorCallout.textContent()).toContain(usageError);
expect(
await usageErrorCallout.evaluate((element) => getComputedStyle(element).userSelect),
).toBe("text");
await page.evaluate(() => globalThis.getSelection()?.removeAllRanges());
expect(await dragAcross(page, usageErrorCallout)).toContain(usageError);
await captureUiProof(page, "04-usage-selectable-error.png");
},
);
});
+1
View File
@@ -1525,6 +1525,7 @@ select.input {
font-size: 13px;
line-height: 1.5;
position: relative;
user-select: text;
}
.callout--dismissible,