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

...
Автор SHA1 Повідомлення Дата
l0ng-ai 10436c46f5 fix(search): keep file context visible in Find previews 2026-11-23 05:35:24 +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 додано та 28 видалено

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();
+28 -2
Переглянути файл
@@ -15,7 +15,7 @@ async function run(page: Page, id: string) {
}, id);
}
async function stubFindMatches(page: Page) {
async function stubFindMatches(page: Page, firstPath = LONG_RESULT_PATH) {
await stubDesktop(page);
await page.evaluate((longPath) => {
window.__ipc.handlers.search_validate = () => null;
@@ -39,7 +39,7 @@ async function stubFindMatches(page: Page) {
}, 20);
return null;
};
}, LONG_RESULT_PATH);
}, firstPath);
}
async function expectControlsFit(page: Page) {
@@ -205,3 +205,29 @@ test("Find in Files prioritizes the preview and remembers an adjusted split", as
await expect(handle).toBeAttached();
await expect.poll(resultsShare).toBeCloseTo(adjusted, 2);
});
test("Find in Files keeps the file and its parent folder visible in the preview caption", async ({
workbench: page,
}) => {
await page.setViewportSize({ width: 400, height: 570 });
const prefix = "config/generated/regional-integrations/sandbox/development/notifications";
const name = "RegionalLedgerSettings.txt";
const path = `${prefix}/runtime/${name}`;
await stubFindMatches(page, path);
await run(page, "find.inPath");
const dialog = page.getByRole("dialog", { name: "Find in Files" });
const search = dialog.getByPlaceholder("Search");
await search.fill("http://localhost:8080");
const preview = dialog.locator("[data-panel][id=preview]");
const caption = preview.getByTitle(path, { exact: true });
const folder = caption.getByText("/runtime", { exact: true });
const beginning = caption.getByText(prefix, { exact: true });
await expect(caption.getByText(name, { exact: true })).toBeInViewport({ ratio: 1 });
await expect(folder).toBeInViewport({ ratio: 1 });
await expect(folder).toHaveCSS("font-size", "13px");
expect(await beginning.evaluate((el) => el.scrollWidth > el.clientWidth)).toBe(true);
expect(await folder.evaluate((el) => el.scrollWidth <= el.clientWidth)).toBe(true);
await search.press("ArrowDown");
await search.press("ArrowDown");
await expect(preview.getByTitle("config/endpoint-1.txt", { exact: true })).toContainText("endpoint-1.txt");
});
+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[] = [];
+17 -8
Переглянути файл
@@ -201,23 +201,32 @@
.previewHeader {
flex: none;
display: flex;
align-items: center;
justify-content: space-between;
gap: 10px;
height: 36px;
padding: 0 20px;
align-items: baseline;
gap: var(--space-1);
padding: 10px 20px var(--space-1-5);
border-top: 1px solid var(--border-popup);
color: var(--fg-subtle);
font-size: var(--fs-ui);
line-height: 1.25;
white-space: nowrap;
}
.previewPath {
.previewDirectory {
display: flex;
min-width: 0;
}
.previewName,
.previewSegment {
min-width: 0;
max-width: 100%;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.previewName,
.previewParent {
flex: none;
}
.previewName {
color: var(--fg-strong);
margin-right: 8px;
}
.previewBox {
flex: 1;
+17 -10
Переглянути файл
@@ -284,6 +284,8 @@ function FindInFilesDialog() {
const rows = useMemo(() => matchRows(state.files), [state.files]);
const active = rows.length ? Math.min(sel.lead, rows.length - 1) : -1;
const selected = active >= 0 ? rows[active] : undefined;
const previewDirectory = selected?.relPath.includes("/") ? dirname(selected.relPath) : "";
const previewParentStart = Math.max(0, previewDirectory.lastIndexOf("/"));
const chosen = useMemo(() => selectedRows(rows, sel), [rows, sel]);
const fileHighlights = useMemo(() => {
if (stale || !selected) return [];
@@ -890,16 +892,21 @@ function FindInFilesDialog() {
</SplitPanel>
<SplitHandle hairline={false} />
<SplitPanel id="preview" minSize={96}>
<div className={styles.previewHeader}>
{selected ? (
<span className={styles.previewPath}>
<span className={styles.previewName}>{basename(selected.relPath)}</span>
{selected.relPath.includes("/") && dirname(selected.relPath)}
</span>
) : (
<span />
)}
</div>
{selected && (
<div className={styles.previewHeader} title={selected.relPath}>
<span className={styles.previewName}>{basename(selected.relPath)}</span>
{previewDirectory && (
<span className={styles.previewDirectory} dir="ltr">
{previewParentStart > 0 && (
<span className={styles.previewSegment}>{previewDirectory.slice(0, previewParentStart)}</span>
)}
<span className={clsx(styles.previewSegment, styles.previewParent)}>
{previewDirectory.slice(previewParentStart)}
</span>
</span>
)}
</div>
)}
<div className={styles.previewBox}>
{!stale && previewMode && s.replace && selected ? (
<ReplaceDiffPreview