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

...
Автор SHA1 Повідомлення Дата
l0ng-ai 49d402e53d fix(vcs): keep commit subjects readable in the Amend chooser 2026-11-23 01:46:04 +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
7 змінених файлів з 76 додано та 9 видалено

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",
+54
Переглянути файл
@@ -1155,6 +1155,60 @@ async function stubEarlierAmend(page: Page) {
});
}
test("Amend sizes the chooser for long subjects while keeping the last commit action distinct", async ({
workbench: page,
}) => {
await stubEarlierAmend(page);
const tip = "Record regional settlement adjustments across the quarterly audit and reconciliation reports";
const earlier = "Expand the warehouse reconciliation report with monthly ledger and inventory audit totals";
await page.evaluate(
({ tip, earlier }) => {
const handlers = window.__ipc.handlers;
const log = handlers.vcs_log!;
handlers.vcs_log = (args) =>
(log(args) as { id: string; summary: string; message: string }[]).map((commit) => {
const subject = commit.id === "1111111" ? tip : commit.id === "aaaaaaa" ? earlier : commit.summary;
return { ...commit, summary: subject, message: subject };
});
},
{ tip, earlier },
);
await page.setViewportSize({ width: 1040, height: 700 });
await page.keyboard.press("Meta+k");
const panel = page.getByRole("region", { name: "Commit", exact: true });
const choose = panel.getByRole("button", { name: "Choose Commit to Amend", exact: true });
await choose.click();
const list = page.getByRole("listbox", { name: "Choose Commit to Amend", exact: true });
const popup = list.locator("xpath=ancestor::*[@data-popup]");
const search = popup.getByRole("textbox", { name: "Search commits", exact: true });
const last = list.getByRole("option", { name: /^Amend Last Commit/ });
const previous = list.getByRole("option", { name: earlier, exact: true });
await expect(previous).toBeVisible();
const wide = (await popup.boundingBox())!;
expect(wide.width).toBeGreaterThan(360);
expect(wide.width).toBeLessThanOrEqual(522);
await expect(last.getByText("Amend Last Commit", { exact: true })).toHaveCSS("font-weight", "600");
await expect(last.getByText(tip, { exact: true })).toHaveAttribute("title", tip);
await expect(previous.getByText(earlier, { exact: true })).toHaveAttribute("title", earlier);
await page.setViewportSize({ width: 440, height: 520 });
await expect
.poll(async () => {
const box = (await popup.boundingBox())!;
return box.x >= 0 && box.x + box.width <= 440 && box.width < wide.width;
})
.toBe(true);
await expect(search).toBeFocused();
await search.fill("inventory audit");
await expect(previous).toBeVisible();
await search.press("Enter");
await expect(list).toBeHidden();
await page.setViewportSize({ width: 1040, height: 700 });
await page.keyboard.press("Meta+k");
await expect(panel.getByRole("textbox", { name: "Commit message" })).toHaveValue(earlier);
});
test("Amend can select an earlier commit before protected history", async ({ workbench: page }) => {
await stubEarlierAmend(page);
await page.keyboard.press("Meta+k");
+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[] = [];
+1
Переглянути файл
@@ -42,6 +42,7 @@ export function AmendTargetMenu({ root }: { root: string }) {
{
value: LAST_COMMIT,
label: "Amend Last Commit",
emphasized: true,
detail: available?.latest?.summary,
verbatimDetail: true,
},
+5 -1
Переглянути файл
@@ -143,9 +143,13 @@
text-overflow: ellipsis;
}
.amendPicker {
width: min(360px, calc(100vw - var(--space-4)));
width: max-content;
min-width: min(280px, calc(100vw - var(--space-4)));
padding-block: var(--space-1);
}
.amendPicker > * {
max-width: 520px;
}
.amendPickerRows {
max-height: calc(5 * var(--h-list-row));
}
+3
Переглянути файл
@@ -113,6 +113,9 @@
text-overflow: ellipsis;
white-space: nowrap;
}
.emphasized {
font-weight: 600;
}
/* The label keeps its width (up to most of the row); a long detail (a path) is cut instead. */
.withDetail {
flex-shrink: 0;
+7 -2
Переглянути файл
@@ -22,6 +22,8 @@ import styles from "./Select.module.css";
export interface SelectOption<V extends string = string> {
value: V;
label: string;
/** Give the label extra weight in the list. */
emphasized?: boolean;
/** User values are displayed as written. */
verbatim?: boolean;
icon?: IconName | (string & {});
@@ -280,7 +282,7 @@ export function SelectListbox<V extends string = string>({
<span className={styles.check} />
{o.tree && <TreeIndent {...o.tree} />}
{o.icon && <Icon name={o.icon} size={14} />}
<span>{labelOf(o)}</span>
<span className={o.emphasized ? styles.emphasized : undefined}>{labelOf(o)}</span>
{o.detail && <span className={styles.sizerDetail}>{detailOf(o)}</span>}
</div>
))}
@@ -315,7 +317,10 @@ export function SelectListbox<V extends string = string>({
<span className={styles.check}>{o.value === value && <Icon name="check" size={12} />}</span>
{o.tree && <TreeIndent {...o.tree} />}
{o.icon && <Icon name={o.icon} size={14} />}
<span className={clsx(styles.optionLabel, detail && styles.withDetail)} title={label}>
<span
className={clsx(styles.optionLabel, detail && styles.withDetail, o.emphasized && styles.emphasized)}
title={label}
>
{highlight(label)}
</span>
{detail && (