fix(ui): remove stale startup CSS (#130032)

Amp-Thread-ID: https://ampcode.com/threads/T-01a03a19-be71-77a7-a886-4c688012c709

Co-authored-by: Amp <amp@ampcode.com>
This commit is contained in:
Peter Steinberger
2026-08-26 02:18:28 -07:00
committed by GitHub
parent 1ed6f7aa86
commit 33a24b6d8e
2 changed files with 2 additions and 26 deletions
@@ -136,7 +136,6 @@ function createPage(params: {
connected?: boolean;
hello?: ApplicationGatewaySnapshot["hello"];
id?: string;
withBootFallback?: boolean;
}) {
const source = createGateway(params.client, params.connected, params.hello);
const page = document.createElement(APPROVAL_PAGE_ELEMENT_NAME) as TestApprovalPage;
@@ -145,11 +144,6 @@ function createPage(params: {
gateway: source.gateway,
} as unknown as ApplicationContext);
page.approvalId = params.id ?? "exec:approval-1";
if (params.withBootFallback) {
const fallback = document.createElement("main");
fallback.className = "approval-page approval-page--booting";
page.append(fallback);
}
provider.append(page);
document.body.append(provider);
return { page, source };
@@ -401,19 +395,6 @@ describe("ApprovalPage", () => {
expect(page.querySelectorAll("[data-decision]")).toHaveLength(0);
});
it("replaces the host boot fallback instead of duplicating the page", async () => {
const request = vi.fn(async () => ({ approval: pendingApproval() }));
const { page } = createPage({
client: { request } as unknown as GatewayBrowserClient,
withBootFallback: true,
});
await settle(page);
expect(page.querySelectorAll(".approval-page")).toHaveLength(1);
expect(page.querySelector(".approval-page--booting")).toBeNull();
});
it("loads a durable approval and sends a kind-bound resolution", async () => {
const pending = pendingApproval();
const terminal = allowedApproval();
+2 -7
View File
@@ -40,10 +40,5 @@ openclaw-approval-page {
}
}
.approval-page--booting {
align-content: center;
color: var(--muted);
}
/* Only the shell's pre-hydration booting state lives here; the full approval
* page styles load with the lazy page chunk (see approval-page.ts). */
/* Only the shared page frame lives here; detailed approval styles load with
* the lazy page chunk (see approval-page.ts). */