mirror of
https://github.com/openclaw/openclaw.git
synced 2026-08-25 20:05:46 -06:00
fix(ui): separate stop action from microphone picker (#125669)
This commit is contained in:
committed by
GitHub
parent
6afaf82e1e
commit
a910d6c80d
@@ -572,6 +572,25 @@ suite.define(() => {
|
||||
await textarea.fill("");
|
||||
const stop = page.getByRole("button", { name: "Stop generating" });
|
||||
await expect.poll(() => stop.isVisible()).toBe(true);
|
||||
await voice.hover();
|
||||
await expect
|
||||
.poll(() => microphonePickerShell.evaluate((node) => getComputedStyle(node).opacity))
|
||||
.toBe("1");
|
||||
const [runningVoiceBox, runningPickerBox, runningStopBox] = await Promise.all([
|
||||
voice.boundingBox(),
|
||||
microphonePicker.boundingBox(),
|
||||
stop.boundingBox(),
|
||||
]);
|
||||
expect(runningVoiceBox).not.toBeNull();
|
||||
expect(runningPickerBox).not.toBeNull();
|
||||
expect(runningStopBox).not.toBeNull();
|
||||
if (!runningVoiceBox || !runningPickerBox || !runningStopBox) {
|
||||
throw new Error("expected running composer action layout boxes");
|
||||
}
|
||||
const microphonePickerGap = runningPickerBox.x - (runningVoiceBox.x + runningVoiceBox.width);
|
||||
const stopGap = runningStopBox.x - (runningPickerBox.x + runningPickerBox.width);
|
||||
expect(microphonePickerGap).toBeLessThanOrEqual(1);
|
||||
expect(stopGap).toBeGreaterThanOrEqual(8);
|
||||
await textarea.press("Escape");
|
||||
const abortRequest = await gateway.waitForRequest("chat.abort");
|
||||
expect(abortRequest.params).toMatchObject({
|
||||
|
||||
@@ -3040,7 +3040,7 @@ button.chat-pr__diff {
|
||||
.agent-chat__composer-actions {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 4px;
|
||||
gap: 8px;
|
||||
flex: 0 0 auto;
|
||||
}
|
||||
|
||||
@@ -3633,7 +3633,7 @@ button.chat-pr__diff {
|
||||
--chat-voice-hover-color: var(--text);
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 4px;
|
||||
gap: 0;
|
||||
flex: 0 0 auto;
|
||||
}
|
||||
|
||||
@@ -4053,7 +4053,8 @@ button.chat-pr__diff {
|
||||
|
||||
.agent-chat__composer-actions {
|
||||
flex-direction: column;
|
||||
gap: 4px;
|
||||
row-gap: 4px;
|
||||
column-gap: 8px;
|
||||
margin-left: var(--chat-box-inset);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user