mirror of
https://github.com/getpaseo/paseo.git
synced 2026-10-23 17:52:49 +00:00
* chore(ci): audit packaging costs and repeated test execution Read-only audit: Linux packaging and smokes consume 12-14 minutes; all three CLI shards repeat the 294-test source suite and build the server twice. Preserve the 17 required contexts, move packaging to main, run CLI source tests once, and consolidate repeated E2E setup into journeys. Historical logs and the complete audit were reported outside the repository. * ci: move packaging to main and remove repeated CLI suites PR runners were rebuilding distribution artifacts and executing the entire CLI source suite on all three E2E shards. Keep packaging coverage after merge, let the local E2E runner own its dependency build, and execute source tests once in an existing required check. Root typecheck already validates plugin examples. * test(ci): consolidate journeys and remove repeated startup work Run user journeys with shared setup, retain one Hub CLI contract, and weight the existing Playwright shards using observed costs. Remove implementation-only and ad-hoc measurement checks. Await root-watch closure and publish creation failure commands atomically so teardown and failure injection have completion boundaries. * test(hub): remove incidental observation and speculative shutdown changes Hub control RPCs need a connected client without an agent observation. Preserve the failed-create subscription contract and remove product shutdown changes whose Windows cleanup cause was not reproduced. * fix(client): clear the scheduled retry when a connect attempt opens a transport An explicit connect() during reconnect backoff opened a new transport but left the scheduled retry armed. When it fired on the healthy connection it disposed the transport and reconnected, dropping requests in flight. This is why owned-subscriptions-old-daemon could still fail after #4858 added the explicit reconnect. attemptConnect now owns the rule ensureConnected already applied; the new unit test fails on the old client. * test(e2e): keep the completed-block, font-readiness, and live-page guards inside journeys - agent-stream-ui: the auto-scroll journey anchors on the completed intro block by content and requires its Markdown root to stay the same mounted node while later blocks stream (#1989 guard, reshaped off the tail block). - changes-pane: the code-typography journey holds font loads and requires no diff geometry before they resolve, then applies the font change. - agent-timeline-pagination: the live-output page load runs against a thirty-minute mock stream and gates the release on the running turn, so the status assertion no longer races a ten-second turn. * test(desktop): install the Electron binary once before the unit suite Electron 44 downloads its binary on the first Node require("electron") instead of at npm ci. Vitest workers importing electron-log/main raced that download and extraction (File exists on dist/electron, then "Electron failed to install correctly" in a sibling worker) on both Ubuntu and Windows desktop-tests jobs. Run the package's idempotent install-electron in one process before vitest forks. * ci(desktop-packages): pin actions and smoke packaging-path pull requests Pin checkout, setup-node, and upload-artifact to full commit SHAs. Keep packaging off ordinary PR CI, but run the Linux package smoke on pull requests that touch packages/desktop, nix, or the workflow so a packaging or sandbox regression cannot land on main unchecked. The desktop release workflow already builds and smokes its own artifacts on all platforms.
181 lines
5.9 KiB
TypeScript
181 lines
5.9 KiB
TypeScript
import { expect, test } from "../../app/e2e/support/fixtures";
|
|
import { gotoAppShell, openSettings } from "../../app/e2e/support/helpers/app";
|
|
import { getServerId } from "../../app/e2e/support/helpers/server-id";
|
|
import {
|
|
openHostSection,
|
|
openSettingsHost,
|
|
seedSavedSettingsHosts,
|
|
} from "../../app/e2e/support/helpers/settings";
|
|
import {
|
|
loadRealDaemonState,
|
|
installDesktopRuntime,
|
|
openDesktopAboutSettings,
|
|
openDesktopSettings,
|
|
expectUpdateBanner,
|
|
clickCheckForUpdates,
|
|
expectPendingUpdateCheckResult,
|
|
expectReadyUpdateCheckResult,
|
|
clickInstallUpdate,
|
|
expectInstallInProgress,
|
|
interceptDaemonManagementConfirmDialog,
|
|
interceptDaemonStopConfirmDialog,
|
|
toggleDaemonManagement,
|
|
expectDaemonManagementConfirmDialog,
|
|
expectDaemonManagementEnabled,
|
|
expectDaemonManagementDisabled,
|
|
expectDaemonStatusPid,
|
|
expectDaemonStatusLogPath,
|
|
expectDaemonStatusVersion,
|
|
} from "./support/runtime";
|
|
|
|
// These renderer cases use the Desktop bridge fixture. Actual Electron ownership
|
|
// and native confirmation journeys live in daemon-lifecycle.e2e.mjs.
|
|
test.describe("Desktop updates", () => {
|
|
test("a desktop-managed daemon explains why its update action is disabled", async ({
|
|
page,
|
|
desktopManagedOutdatedDaemon,
|
|
}) => {
|
|
await seedSavedSettingsHosts(page, [desktopManagedOutdatedDaemon]);
|
|
await page.reload();
|
|
await openSettings(page);
|
|
await openSettingsHost(page, desktopManagedOutdatedDaemon.serverId);
|
|
await openHostSection(page, desktopManagedOutdatedDaemon.serverId, "host");
|
|
|
|
const updateCard = page.getByTestId("host-page-update-card");
|
|
await expect(updateCard).toBeVisible();
|
|
await expect(updateCard).toContainText(
|
|
"This daemon is managed by Paseo Desktop. Update Paseo Desktop on the host.",
|
|
);
|
|
await expect(page.getByTestId("host-page-update-button")).toBeDisabled();
|
|
});
|
|
|
|
test("clicking install shows the installing state on the callout", async ({ page }) => {
|
|
await installDesktopRuntime(page, {
|
|
serverId: getServerId(),
|
|
updateAvailable: true,
|
|
latestVersion: "1.2.3",
|
|
slowInstall: true,
|
|
});
|
|
await gotoAppShell(page);
|
|
|
|
await expectUpdateBanner(page, "1.2.3");
|
|
await clickInstallUpdate(page);
|
|
await expectInstallInProgress(page);
|
|
});
|
|
|
|
test("manual check reports a found update while it downloads", async ({ page }) => {
|
|
await installDesktopRuntime(page, {
|
|
serverId: getServerId(),
|
|
updateAvailable: true,
|
|
latestVersion: "1.2.3",
|
|
updateReadyToInstall: false,
|
|
});
|
|
await gotoAppShell(page);
|
|
await openDesktopAboutSettings(page);
|
|
|
|
await clickCheckForUpdates(page);
|
|
|
|
await expectPendingUpdateCheckResult(page, "1.2.3");
|
|
});
|
|
|
|
test("manual update remains available after the automatic rollout recheck", async ({ page }) => {
|
|
await installDesktopRuntime(page, {
|
|
serverId: getServerId(),
|
|
latestVersion: "1.2.3",
|
|
manualUpdateBypassesRollout: true,
|
|
});
|
|
await gotoAppShell(page);
|
|
await openDesktopAboutSettings(page);
|
|
|
|
await clickCheckForUpdates(page);
|
|
await expectPendingUpdateCheckResult(page, "1.2.3");
|
|
await expectReadyUpdateCheckResult(page, "1.2.3");
|
|
});
|
|
});
|
|
|
|
test.describe("Desktop daemon management", () => {
|
|
test("cancelling the management confirmation preserves the enabled daemon", async ({ page }) => {
|
|
const serverId = getServerId();
|
|
await installDesktopRuntime(page, {
|
|
serverId,
|
|
manageBuiltInDaemon: true,
|
|
ownedByDesktop: true,
|
|
confirmShouldAccept: false,
|
|
});
|
|
await gotoAppShell(page);
|
|
await openDesktopSettings(page, serverId);
|
|
|
|
const dialogArgs = await interceptDaemonManagementConfirmDialog(page);
|
|
expectDaemonManagementConfirmDialog(dialogArgs);
|
|
|
|
await expectDaemonManagementEnabled(page);
|
|
});
|
|
|
|
test("confirming the dialog disables built-in daemon management", async ({ page }) => {
|
|
const serverId = getServerId();
|
|
await installDesktopRuntime(page, {
|
|
serverId,
|
|
manageBuiltInDaemon: true,
|
|
ownedByDesktop: true,
|
|
confirmShouldAccept: true,
|
|
});
|
|
await gotoAppShell(page);
|
|
await openDesktopSettings(page, serverId);
|
|
|
|
await toggleDaemonManagement(page, "disable");
|
|
|
|
await expectDaemonManagementDisabled(page);
|
|
});
|
|
|
|
test("daemon status panel renders version, PID, and log path from the real daemon", async ({
|
|
page,
|
|
}) => {
|
|
const serverId = getServerId();
|
|
const realState = await loadRealDaemonState();
|
|
await installDesktopRuntime(page, {
|
|
serverId,
|
|
manageBuiltInDaemon: false,
|
|
daemonPid: realState.pid,
|
|
daemonVersion: realState.version,
|
|
daemonLogPath: realState.logPath,
|
|
});
|
|
await gotoAppShell(page);
|
|
await openDesktopSettings(page, serverId);
|
|
|
|
await expectDaemonStatusVersion(page, realState.version);
|
|
await expectDaemonStatusPid(page, realState.pid);
|
|
await expectDaemonStatusLogPath(page, realState.logPath);
|
|
});
|
|
|
|
for (const confirmShouldAccept of [false, true]) {
|
|
test(`${confirmShouldAccept ? "confirming" : "cancelling"} Stop identifies the owned daemon`, async ({
|
|
page,
|
|
}) => {
|
|
const serverId = getServerId();
|
|
const realState = await loadRealDaemonState();
|
|
const daemonHome = process.env.E2E_PASEO_HOME!;
|
|
await installDesktopRuntime(page, {
|
|
serverId,
|
|
daemonPid: realState.pid,
|
|
daemonHome,
|
|
ownedByDesktop: true,
|
|
confirmShouldAccept,
|
|
});
|
|
await gotoAppShell(page);
|
|
await openDesktopSettings(page, serverId);
|
|
|
|
const dialog = await interceptDaemonStopConfirmDialog(page);
|
|
expect(dialog).toEqual({
|
|
title: "Stop local daemon?",
|
|
message: [
|
|
"This daemon was launched by this Desktop session.",
|
|
`Home: ${daemonHome}`,
|
|
`Supervisor PID: ${realState.pid}`,
|
|
"Running agent work will be interrupted.",
|
|
].join("\n"),
|
|
});
|
|
await expectDaemonStatusPid(page, confirmShouldAccept ? null : realState.pid);
|
|
});
|
|
}
|
|
});
|