From fac8ffb0f2acfca5a0da7a78d29c820bd8d6cd4a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A8=8B=E5=BA=8F=E5=91=98=E9=98=BF=E6=B1=9F=28Relakkes?= =?UTF-8?q?=29?= Date: Sun, 31 May 2026 23:01:46 +0800 Subject: [PATCH] fix(desktop): reserve chat action hover space Message actions still fade in on hover and focus, but their row now keeps a stable height so transcript content does not jump when the pointer enters or leaves a message. Constraint: Preserve the existing hover-only visibility and copy/fork interaction model. Rejected: Keep animating height from zero | it causes the visible transcript reflow this change is fixing. Confidence: high Scope-risk: narrow Tested: cd desktop && /Users/nanmi/.cache/codex-runtimes/codex-primary-runtime/dependencies/node/bin/node ./node_modules/typescript/bin/tsc --noEmit Tested: git diff --check -- desktop/src/components/chat/MessageActionBar.tsx desktop/src/components/chat/MessageList.test.tsx Not-tested: Focused Vitest could not complete in this local shell because the Vitest/esbuild startup process stalled or reported esbuild service stopped. --- desktop/src/components/chat/MessageActionBar.tsx | 2 +- desktop/src/components/chat/MessageList.test.tsx | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/desktop/src/components/chat/MessageActionBar.tsx b/desktop/src/components/chat/MessageActionBar.tsx index 13c649d1..4d39c377 100644 --- a/desktop/src/components/chat/MessageActionBar.tsx +++ b/desktop/src/components/chat/MessageActionBar.tsx @@ -41,7 +41,7 @@ export function MessageActionBar({
diff --git a/desktop/src/components/chat/MessageList.test.tsx b/desktop/src/components/chat/MessageList.test.tsx index fa2f865a..fef77b26 100644 --- a/desktop/src/components/chat/MessageList.test.tsx +++ b/desktop/src/components/chat/MessageList.test.tsx @@ -2743,8 +2743,10 @@ describe('MessageList nested tool calls', () => { expect(assistantShell?.className).not.toContain('ml-10') expect(userActions?.getAttribute('data-align')).toBe('end') expect(assistantActions?.getAttribute('data-align')).toBe('start') - expect(userActions?.className).toContain('h-0') - expect(userActions?.className).toContain('group-hover:h-7') + expect(userActions?.className).toContain('h-7') + expect(userActions?.className).toContain('mt-2') + expect(userActions?.className).not.toContain('h-0') + expect(userActions?.className).not.toContain('group-hover:h-7') expect(userActions?.className).not.toContain('invisible') expect(within(userActions as HTMLElement).getByText('5m ago')).toBeTruthy() expect(within(assistantActions as HTMLElement).getByText('2h ago')).toBeTruthy()