mirror of
https://github.com/openclaw/openclaw.git
synced 2026-08-24 11:25:50 -06:00
improve(ui): align transient menu chrome with design-system geometry (#122109)
* improve(ui): align transient menu chrome with design-system geometry Use one shared transient-menu recipe across Control UI panels and items. Match the carapace reference: 6px item radius plus 4px inset yields a 10px panel radius, with restrained motion for fixed menus. * test(ui): align gateway picker menu expectations * test(cli): keep benign sqlite diagnostics out of ACP exit stderr assertions * fix(ui): restore 44px menu touch targets on coarse pointers
This commit is contained in:
committed by
GitHub
parent
cc9119e22a
commit
8fa897a3f1
@@ -7,7 +7,7 @@ import {
|
||||
} from "node:child_process";
|
||||
import { createServer } from "node:http";
|
||||
import path from "node:path";
|
||||
import { promisify } from "node:util";
|
||||
import { promisify, stripVTControlCharacters } from "node:util";
|
||||
import { describe, expect, it } from "vitest";
|
||||
import { type RawData, WebSocketServer } from "ws";
|
||||
import {
|
||||
@@ -62,6 +62,17 @@ function createAcpProcessEnv(baseEnv: NodeJS.ProcessEnv): NodeJS.ProcessEnv {
|
||||
};
|
||||
}
|
||||
|
||||
function withoutSqliteTransactionWarnings(stderr: string): string {
|
||||
// Slow-hold logger output is load-dependent performance diagnostics, not ACP clean-exit
|
||||
// signal; see logSlowTransactionHold in sqlite-transaction.ts.
|
||||
return stderr
|
||||
.split("\n")
|
||||
.filter(
|
||||
(line) => !stripVTControlCharacters(line).trimStart().startsWith("[sqlite/transaction]"),
|
||||
)
|
||||
.join("\n");
|
||||
}
|
||||
|
||||
function waitForExit(child: ChildProcessWithoutNullStreams) {
|
||||
return new Promise<{ code: number | null; signal: NodeJS.Signals | null }>((resolve, reject) => {
|
||||
child.once("error", reject);
|
||||
@@ -139,7 +150,7 @@ describe("ACP CLI process exit", () => {
|
||||
},
|
||||
);
|
||||
|
||||
expect(result.stderr).toBe("");
|
||||
expect(withoutSqliteTransactionWarnings(result.stderr)).toBe("");
|
||||
expect(result.stdout).toContain(usage);
|
||||
} finally {
|
||||
await state.cleanup();
|
||||
@@ -173,7 +184,7 @@ describe("ACP CLI process exit", () => {
|
||||
expect(result.error).toBeUndefined();
|
||||
expect(result.signal).toBeNull();
|
||||
expect(result.status).toBe(0);
|
||||
expect(result.stderr).toBe("");
|
||||
expect(withoutSqliteTransactionWarnings(result.stderr)).toBe("");
|
||||
} finally {
|
||||
await state.cleanup();
|
||||
}
|
||||
@@ -272,7 +283,7 @@ describe("ACP CLI process exit", () => {
|
||||
child.stdin.end();
|
||||
const exit = await exitPromise;
|
||||
expect(exit).toEqual({ code: 0, signal: null });
|
||||
expect(stderr).toBe("");
|
||||
expect(withoutSqliteTransactionWarnings(stderr)).toBe("");
|
||||
} finally {
|
||||
child?.kill("SIGKILL");
|
||||
for (const socket of wss.clients) {
|
||||
|
||||
Reference in New Issue
Block a user