fix: remove history item click outline

This commit is contained in:
2026-07-28 17:41:04 +08:00
parent 73896a893f
commit 3ba62ceacb
3 changed files with 22 additions and 1 deletions
@@ -187,7 +187,7 @@ export function AgentHistoryPanel({
<motion.button <motion.button
key="session-summary" key="session-summary"
type="button" type="button"
className="min-w-0 text-left" className="agent-history-session-trigger min-w-0 text-left"
disabled={itemLoading || deleting} disabled={itemLoading || deleting}
initial="initial" initial="initial"
animate="animate" animate="animate"
+4
View File
@@ -761,6 +761,10 @@ button:disabled {
background-color: var(--agent-floating-reading-active); background-color: var(--agent-floating-reading-active);
} }
button.agent-history-session-trigger:not(:disabled):active {
outline: none;
}
.agent-history-rename-input, .agent-history-rename-input,
.agent-history-rename-input:focus-visible { .agent-history-rename-input:focus-visible {
border-color: #cbd5e1; border-color: #cbd5e1;
+17
View File
@@ -134,6 +134,23 @@ test("desktop Agent header expands into one attached acrylic history surface", a
.poll(() => getSurfacePresentation(historyButton)) .poll(() => getSurfacePresentation(historyButton))
.toEqual(historyButtonPresentationBefore); .toEqual(historyButtonPresentationBefore);
const sessionTrigger = history.locator(".agent-history-session-trigger").first();
const sessionTriggerBox = await sessionTrigger.boundingBox();
const historyHeadingBox = await history.getByText("历史记录", { exact: true }).boundingBox();
expect(sessionTriggerBox).not.toBeNull();
expect(historyHeadingBox).not.toBeNull();
await page.mouse.move(
sessionTriggerBox!.x + sessionTriggerBox!.width / 2,
sessionTriggerBox!.y + sessionTriggerBox!.height / 2
);
await page.mouse.down();
await expect(sessionTrigger).toHaveCSS("outline-style", "none");
await page.mouse.move(
historyHeadingBox!.x + historyHeadingBox!.width / 2,
historyHeadingBox!.y + historyHeadingBox!.height / 2
);
await page.mouse.up();
const headerBox = await agentHeader.boundingBox(); const headerBox = await agentHeader.boundingBox();
const agentPanelBox = await agentPanel.boundingBox(); const agentPanelBox = await agentPanel.boundingBox();
const historyBox = await history.boundingBox(); const historyBox = await history.boundingBox();