Порівняти коміти

...
Автор SHA1 Повідомлення Дата
l0ng-ai a05296c509 fix(build): keep diagnostic names and elapsed time readable 2026-11-23 05:21:43 +08:00
Charlie.Weiтаcharli117 76d67145f5 test(smoke): give the language-smoke closure tests a 20s timeout (#5240)
The two Language smoke workflow tests compute the repo-wide import closure and crate tree. On a CI runner running the whole suite they took longer than vitest's default 5 s and failed the Frontend job on main.

Co-authored-by: charli117 <[email protected]>
2026-11-23 01:13:43 +08:00
Charlie.Weiтаcharli117 cf4273eeea chore(deps): bump url to 2.5.9 for RUSTSEC-2026-0592 (#5237)
url 2.5.8 overflows the stack in Url::origin() on nested blob: URLs (RUSTSEC-2026-0592), which failed Cargo deny on main. 2.5.9 fixes it; form_urlencoded moves to 1.2.3 with it. The rest of the lockfile stays as on main.

Co-authored-by: charli117 <[email protected]>
2026-11-23 01:13:33 +08:00
5 змінених файлів з 86 додано та 22 видалено

No files matched your search

Створено
+4 -4
Переглянути файл
@@ -2361,9 +2361,9 @@ checksum = "aa9a19cbb55df58761df49b23516a86d432839add4af60fc256da840f66ed35b"
[[package]]
name = "form_urlencoded"
version = "1.2.2"
version = "1.2.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cb4cb245038516f5f85277875cdaa4f7d2c9a0fa0468de06ed190163b1581fcf"
checksum = "afa489199eaffb1211795df1c6236ce1ad0d41a6fa45250add73e3b02420f06e"
dependencies = [
"percent-encoding",
]
@@ -10827,9 +10827,9 @@ checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1"
[[package]]
name = "url"
version = "2.5.8"
version = "2.5.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ff67a8a4397373c3ef660812acab3268222035010ab8680ec4215f38ba3d0eed"
checksum = "f00cd2407bb42c0ef17be88d4cf020f5cceffd121665bac9b8b9493a369b3b1a"
dependencies = [
"form_urlencoded",
"idna",
+26 -4
Переглянути файл
@@ -1,8 +1,8 @@
import type { Page } from "@playwright/test";
import { expect, test } from "./fixtures";
async function showBuild(page: Page) {
await page.evaluate(async () => {
async function showBuild(page: Page, diagnosticPath: string | null = null) {
await page.evaluate(async (path) => {
const storePath = "/src/features/build/store.ts";
const layoutPath = "/src/workbench/toolwindows/store.ts";
const { useBuildRun } = await import(/* @vite-ignore */ storePath);
@@ -17,10 +17,10 @@ async function showBuild(page: Page) {
{ kind: "out", text: "Compiling TypeScript" },
{ kind: "err", text: "Expected a number" },
],
messages: [{ severity: "error", text: "Expected a number", path: null, range: null, code: null }],
messages: [{ severity: "error", text: "Expected a number", path, range: null, code: null }],
});
showToolWindow("build", true);
});
}, diagnosticPath);
const build = page.getByRole("region", { name: "Build", exact: true });
await expect(build.getByRole("log", { name: "Build output" })).toBeVisible();
return build;
@@ -35,6 +35,28 @@ test("Build gives about two thirds of the initial split to output", async ({ wor
expect(treeWidth / (treeWidth + consoleWidth)).toBeCloseTo(0.33, 2);
});
test("Build reserves room for duration and file counts beside long directory paths", async ({ workbench: page }) => {
await page.setViewportSize({ width: 760, height: 680 });
const path = "/dev/acme-api/src/services/regional-catalogs/generated/api/development/builders/catalog.ts";
const build = await showBuild(page, path);
const root = build.getByRole("treeitem", { name: /^Build Project/ });
const filename = build.getByTitle(path, { exact: true }).getByText("catalog.ts", { exact: true });
const counts = build.getByTitle(path, { exact: true }).getByText("1 error", { exact: true });
const errorSummary = root.getByText("1 error", { exact: true });
const elapsed = root.getByText("1 s 200 ms", { exact: true });
await expect(elapsed).toHaveCSS("font-size", "12px");
await expect(counts).toBeInViewport({ ratio: 1 });
const textFits = (el: Element) => {
const range = document.createRange();
range.selectNodeContents(el);
return range.getBoundingClientRect().width <= el.getBoundingClientRect().width;
};
expect(await filename.evaluate(textFits)).toBe(true);
expect(await errorSummary.evaluate(textFits)).toBe(true);
const [duration, row] = await Promise.all([elapsed.boundingBox(), root.boundingBox()]);
expect(row!.x + row!.width - duration!.x - duration!.width).toBeLessThan(12);
});
test("Build output and diagnostics respond to a console font change", async ({ workbench: page }) => {
const build = await showBuild(page);
const log = build.getByRole("log", { name: "Build output" });
+2 -2
Переглянути файл
@@ -26,12 +26,12 @@ describe("the Language smoke workflow", () => {
const { files, problems } = await smokeInputs(repo, workflow);
expect(problems).toEqual([]);
expect(describeUnselected(await unselected(workflow, [...files.keys()]), files)).toBe("");
});
}, 20000);
it("runs every language when a crate the smoke runs changes", async () => {
const crates = rustSmokeInputs(repo);
expect(describeUnselected(await unselected(workflow, [...crates.keys()]), crates)).toBe("");
});
}, 20000);
});
const dirs: string[] = [];
+30
Переглянути файл
@@ -30,6 +30,16 @@
.strong {
color: var(--fg-strong);
}
.strong,
.rootDetail,
.directory {
min-width: 0;
overflow: hidden;
text-overflow: ellipsis;
}
.row > svg {
flex: none;
}
.selected {
color: var(--fg-strong);
}
@@ -37,6 +47,26 @@
flex: none;
color: var(--fg-subtle);
}
.rootDetail {
max-width: 50%;
}
.fileLabel {
display: flex;
min-width: 0;
gap: var(--space-1-5);
}
.fileName {
flex: none;
max-width: 100%;
}
.muted.directory {
flex: 0 1 auto;
}
.duration {
margin-inline-start: auto;
font-size: var(--fs-small);
font-variant-numeric: tabular-nums;
}
.fileIcon {
flex: none;
color: var(--fg-muted);
+24 -12
Переглянути файл
@@ -67,13 +67,12 @@ function StatusIcon({ status }: { status: BuildStatus }) {
return <Icon name={name} size={14} className={styles[`status-${status}`]} />;
}
function rootDetail(status: BuildStatus, durationMs: number | null, errors: number, warnings: number): string {
function rootDetail(status: BuildStatus, errors: number, warnings: number): string {
if (status === "running") return "running…";
if (status === "cancelled") return "cancelled";
const summary = finishSummary({ success: status === "success", errors, warnings, durationMs });
return status === "success"
? `finished ${formatDuration(durationMs ?? 0)}`
: summary.replace(/^Build failed:?\s*/, "") || "failed";
if (status === "success") return tx("Finished");
const summary = finishSummary({ success: false, errors, warnings, durationMs: null });
return summary.replace(/^Build failed:?\s*/, "") || "failed";
}
export function BuildHeaderActions() {
@@ -130,15 +129,19 @@ function BuildTree() {
const renderNode = (n: BuildNode, state: TreeRowState) => {
if (n.kind === "root") {
const detail = rootDetail(n.status, n.errors, n.warnings);
const elapsed = n.status !== "running" && durationMs != null ? formatDuration(durationMs) : null;
return (
<span className={styles.row}>
<span className={styles.row} title={[n.title, detail, elapsed].filter(Boolean).join(" ")}>
<StatusIcon status={n.status} />
<span className={styles.strong}>{n.title}</span>
<span className={styles.muted}>{rootDetail(n.status, durationMs, n.errors, n.warnings)}</span>
<span className={clsx(styles.muted, styles.rootDetail)}>{detail}</span>
{elapsed && <span className={clsx(styles.muted, styles.duration)}>{elapsed}</span>}
</span>
);
}
if (n.kind === "file") {
const directory = relativeDir(root, n.path);
const errors = n.messages.filter((m) => m.severity === "error").length;
const warnings = n.messages.filter((m) => m.severity === "warning").length;
const counts = [
@@ -148,13 +151,22 @@ function BuildTree() {
.filter(Boolean)
.join(", ");
return (
<span className={styles.row}>
<span className={styles.row} title={n.path}>
<Icon name={fileIconName(basename(n.path), n.path)} size={16} className={styles.fileIcon} />
<span className={clsx(styles.strong, errors > 0 && styles.fileError, state.selected && styles.selected)}>
{basename(n.path)}
<span className={styles.fileLabel}>
<span
className={clsx(
styles.strong,
styles.fileName,
errors > 0 && styles.fileError,
state.selected && styles.selected,
)}
>
{basename(n.path)}
</span>
{directory && <span className={clsx(styles.muted, styles.directory)}>{directory}</span>}
</span>
<span className={styles.muted}>{relativeDir(root, n.path)}</span>
<span className={styles.muted}>{counts}</span>
{counts && <span className={styles.muted}>{counts}</span>}
</span>
);
}