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

...
Автор SHA1 Повідомлення Дата
l0ng-ai b7dc200763 fix(search): keep line numbers visible in text results 2026-11-23 06:53:58 +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 змінених файлів з 100 додано та 10 видалено

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();
+60
Переглянути файл
@@ -1,4 +1,64 @@
import { doubleShift, expect, stubDesktop, test } from "./fixtures";
test("Search Everywhere keeps line numbers visible beside long Text result filenames", async ({ workbench: page }) => {
const relPath = "config/InternationalSettlementReconciliationEndpointsForStagingEnvironments.ts";
const query = "settlementEndpoint";
const text = `const ${query} = "/staging/settlement";`;
await stubDesktop(page);
await page.evaluate(
({ relPath, text, query }) => {
window.__ipc.handlers.search_start = (args) => {
setTimeout(() => {
const matches = [12344, 12345].map((line) => ({
line,
text,
ranges: [[6, 6 + query.length]],
textOffset: 0,
}));
window.__ipc.send(args.onEvent, {
type: "file",
file: { path: `/dev/acme-api/${relPath}`, relPath, matches },
});
window.__ipc.send(args.onEvent, {
type: "done",
summary: { files: 1, matches: 2, limitHit: false, cancelled: false, elapsedMs: 4 },
});
}, 20);
return null;
};
},
{ relPath, text, query },
);
await doubleShift(page);
const dialog = page.getByRole("dialog", { name: "Search Everywhere" });
await dialog.getByRole("tab", { name: "Text", exact: true }).click();
const search = dialog.getByRole("combobox", { name: "Search query" });
await search.fill(query);
const rows = dialog.getByRole("option");
await expect(rows).toHaveCount(2);
for (const width of [920, 440]) {
await page.setViewportSize({ width, height: 640 });
for (const line of [12345, 12346]) {
const row = rows.filter({ hasText: String(line) });
await expect(row.locator("mark")).toHaveText(query);
expect(
await row.evaluate((el) => {
const location = el.lastElementChild!;
const lineText = location.lastChild!;
const range = document.createRange();
range.selectNodeContents(lineText);
const bounds = range.getBoundingClientRect();
const clip = location.getBoundingClientRect();
return bounds.width > 0 && bounds.left >= clip.left && bounds.right <= clip.right + 1;
}),
).toBe(true);
await expect(row.getByText(relPath.split("/").at(-1)!, { exact: true })).toHaveAttribute("title", relPath);
}
}
await search.press("ArrowDown");
await expect(rows.nth(1)).toHaveAttribute("aria-selected", "true");
});
import type { Page } from "@playwright/test";
test("action names stay readable beside shortcuts and categories", 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[] = [];
+14
Переглянути файл
@@ -248,6 +248,20 @@
.rightActive {
color: var(--fg-muted);
}
.textLocation {
display: inline-flex;
align-items: baseline;
gap: var(--space-1);
}
.textFile {
min-width: 0;
overflow: hidden;
text-overflow: ellipsis;
}
.textLine {
flex: none;
font-variant-numeric: tabular-nums;
}
.actionRow {
flex: 1;
min-width: 0;
+5 -2
Переглянути файл
@@ -934,8 +934,11 @@ function ResultRow({
<span className={styles.main}>
<CodeText path={row.path} text={row.text} indices={row.indices} />
</span>
<span className={clsx(styles.right, active && styles.rightActive)}>
<span className={clsx(repeat && !active && styles.repeat)}>{basename(row.rel)}</span> {row.line + 1}
<span className={clsx(styles.right, styles.textLocation, active && styles.rightActive)}>
<span className={clsx(styles.textFile, repeat && !active && styles.repeat)} title={row.rel}>
{basename(row.rel)}
</span>{" "}
<span className={styles.textLine}>{row.line + 1}</span>
</span>
</>
);