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

...
Автор SHA1 Повідомлення Дата
l0ng-ai 07fc889bd2 fix(run): keep configuration types reachable in short windows 2026-11-23 05:49:27 +08:00
l0ng-ai 844c2f3145 test(maven): wait for the background refresh of jdtls import roots (#5272)
external_maven_link_persists_reloads_and_unlink_keeps_files failed on the macOS runner: setting languages.java.maven.linkedProjects refreshes the language server's import roots on a blocking task, and the test read them right after build_model returned. It now waits up to 5 s for them to change.
2026-11-23 05:18:24 +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
6 змінених файлів з 83 додано та 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",
+15 -2
Переглянути файл
@@ -49,7 +49,7 @@ async fn external_maven_link_persists_reloads_and_unlink_keeps_files() {
assert_eq!(b.pom, canonical);
assert_eq!(dunce::canonicalize(root.join(&b.dir)).unwrap(), sibling);
assert_eq!(host.project("main").unwrap().content_roots(), vec![sibling.clone()]);
assert_eq!(host.project("main").unwrap().lsp.jdtls_import_roots(), vec![sibling.clone()]);
assert_eq!(import_roots(&host, |roots| !roots.is_empty()).await, vec![sibling.clone()]);
let reloaded = ops::build::build_model(&host, "main").await.unwrap();
assert_eq!(
@@ -63,13 +63,26 @@ async fn external_maven_link_persists_reloads_and_unlink_keeps_files() {
let gone = ops::build::build_model(&host, "main").await.unwrap();
assert!(gone.maven.unwrap().projects.iter().all(|p| p.artifact_id != "b"));
assert!(host.project("main").unwrap().content_roots().is_empty());
assert!(host.project("main").unwrap().lsp.jdtls_import_roots().is_empty());
assert!(import_roots(&host, |roots| roots.is_empty()).await.is_empty());
assert_eq!(saved(), Vec::<String>::new());
assert_eq!(std::fs::read_to_string(root.join("pom.xml")).unwrap(), a_pom);
assert_eq!(std::fs::read_to_string(sibling.join("pom.xml")).unwrap(), b_pom);
host.shutdown().await;
}
/// The language server's Maven import roots once `ready` holds: a settings change refreshes them in
/// the background.
async fn import_roots(host: &Host, ready: impl Fn(&[std::path::PathBuf]) -> bool) -> Vec<std::path::PathBuf> {
for _ in 0..200 {
let roots = host.project("main").unwrap().lsp.jdtls_import_roots();
if ready(&roots) {
return roots;
}
tokio::time::sleep(std::time::Duration::from_millis(25)).await;
}
host.project("main").unwrap().lsp.jdtls_import_roots()
}
#[tokio::test(flavor = "multi_thread", worker_threads = 2)]
async fn reactor_module_beside_a_trusted_project_is_a_content_root_until_removed() {
let temp = tempfile::tempdir().unwrap();
+26
Переглянути файл
@@ -55,6 +55,32 @@ test("long run target names leave room for configuration names in the sidebar",
await expect(dialog.getByRole("textbox", { name: "Name", exact: true })).toHaveValue("Payments development server");
});
test("the configuration type list scrolls below its search field in a short window", async ({ workbench: page }) => {
await page.setViewportSize({ width: 780, height: 370 });
await openConfigurations(page);
const dialog = page.getByRole("dialog", { name: "Run/Debug Configurations", exact: true });
await dialog.getByRole("button", { name: "Add New Configuration", exact: true }).click();
const chooser = page.getByRole("dialog", { name: "Add New Configuration", exact: true });
const search = chooser.getByRole("textbox", { name: "Search configuration types" });
const list = chooser.getByRole("listbox", { name: "Configuration types" });
await expect(search).toBeFocused();
expect(await chooser.evaluate((el) => el.scrollHeight - el.clientHeight)).toBeLessThanOrEqual(1);
expect(await list.evaluate((el) => el.scrollHeight - el.clientHeight)).toBeGreaterThan(0);
await search.press("End");
const active = list.getByRole("option", { selected: true });
await expect(active).toBeInViewport({ ratio: 0.98 });
expect(await list.evaluate((el) => el.scrollTop)).toBeGreaterThan(0);
await expect(active.locator("svg")).toHaveAttribute("width", "16");
await expect(search).toBeInViewport({ ratio: 1 });
await search.fill("Tomcat");
await expect(list.getByRole("option", { name: "Tomcat Server", selected: true })).toBeVisible();
await search.press("Enter");
await expect(chooser).toBeHidden();
await expect(dialog.getByRole("tab", { name: "Server", exact: true })).toBeVisible();
});
test("run configuration sidebar resizes with mouse and keyboard and remembers the layout", async ({
workbench: page,
}) => {
+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[] = [];
+25 -14
Переглянути файл
@@ -1,6 +1,17 @@
import { useMemo, useState, type KeyboardEvent } from "react";
import { useMemo, useRef, useState, type KeyboardEvent } from "react";
import clsx from "clsx";
import { HighlightedText, Icon, List, Popup, SearchField, fuzzyMatch, listNavigate, T, type PopupAnchor } from "@/ui";
import {
HighlightedText,
Icon,
List,
Popup,
SearchField,
firstSelectable,
fuzzyMatch,
listNavigate,
T,
type PopupAnchor,
} from "@/ui";
import { useRowHeight } from "@/ui/density";
import { useRunConfigTypes, runConfigTypes, type RunConfigTypeContribution } from "@/workbench/contributions";
import styles from "./Run.module.css";
@@ -64,12 +75,11 @@ export function AddConfigPopup({
const [query, setQuery] = useState("");
const rows = useMemo(() => typeRows(runConfigTypes(types), query), [types, query]);
const isSection = (r: TypeRow) => r.kind === "group";
const first = Math.max(
0,
rows.findIndex((r) => r.kind === "type"),
);
const [active, setActive] = useState(first);
const [active, setActive] = useState(-1);
const clamped = Math.min(active, rows.length - 1);
const selected = rows[clamped]?.kind === "type" ? clamped : firstSelectable(rows, isSection);
const viewport = useRef<HTMLDivElement>(null);
const height = Math.max(1, Math.min(rows.length, 30)) * rowHeight;
const pick = (row: TypeRow | undefined) => {
if (row?.kind !== "type") return;
@@ -80,10 +90,11 @@ export function AddConfigPopup({
const onKeyDown = (e: KeyboardEvent) => {
if (e.key === "Enter") {
e.preventDefault();
pick(rows[clamped]);
pick(rows[selected]);
return;
}
const next = listNavigate(e.key, { items: rows, active: clamped, isSection, wrap: true });
const pageSize = Math.max(1, Math.floor((viewport.current?.clientHeight ?? height) / rowHeight) - 1);
const next = listNavigate(e.key, { items: rows, active: selected, isSection, pageSize, wrap: true });
if (next !== null) {
e.preventDefault();
setActive(next);
@@ -97,7 +108,7 @@ export function AddConfigPopup({
onClose={onClose}
placement="bottom-start"
aria-label="Add New Configuration"
className={styles.chooser}
className={clsx(styles.chooser, styles.typeChooser)}
trapFocus
>
<div className={styles.chooserCaption}>
@@ -108,7 +119,7 @@ export function AddConfigPopup({
value={query}
onChange={(v) => {
setQuery(v);
setActive(0);
setActive(-1);
}}
placeholder="Search types"
aria-label="Search configuration types"
@@ -117,7 +128,7 @@ export function AddConfigPopup({
variant="bare"
/>
</div>
<div style={{ height: Math.max(rowHeight, Math.min(rows.length * rowHeight, 14 * rowHeight)) }}>
<div ref={viewport} className={styles.chooserViewport} style={{ height }}>
<List<TypeRow>
aria-label="Configuration types"
className={styles.chooserList}
@@ -125,7 +136,7 @@ export function AddConfigPopup({
getKey={(r) => r.key}
isSection={isSection}
renderSection={(r) => (r.kind === "group" ? r.label : null)}
activeIndex={rows[clamped]?.kind === "type" ? clamped : first}
activeIndex={selected}
onActiveChange={setActive}
focusable={false}
hoverSelects
@@ -139,7 +150,7 @@ export function AddConfigPopup({
renderItem={(r) =>
r.kind === "type" ? (
<span className={clsx(styles.chooserRow, r.nested && styles.typeNested)} title={r.type.description}>
<Icon name={r.type.icon} size={13} className={styles.chooserIcon} />
<Icon name={r.type.icon} size={16} className={styles.chooserIcon} />
<span className={styles.chooserName}>
{r.indices?.length ? <HighlightedText text={r.type.label} indices={r.indices} /> : r.type.label}
</span>
+11
Переглянути файл
@@ -560,6 +560,17 @@
color: var(--fg-secondary);
font-weight: 500;
}
.typeChooser {
width: 280px;
}
.typeChooser .chooserCaption {
padding: var(--space-2) var(--space-3) 0;
color: var(--fg-strong);
font-weight: 600;
}
.typeChooser .chooserSearch {
padding: var(--space-1) var(--space-3);
}
.chooserMnemonic {
flex: none;
width: 8px;