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

..
Автор SHA1 Повідомлення Дата
l0ng-ai dff68f8527 perf(search): switch editors in the frame the Switcher closes
Releasing Ctrl in the Switcher (and picking from Recent Files / Recent
Locations) closed the popup, painted a frame of the old editor, and only
then opened the selection from a timeout. The popup now unmounts
synchronously (`flushSync`), gives focus back, and the selection opens in
the same task, so closing and switching paint together.

`pnpm perf` measures Ctrl+Tab between file tabs (`tabs.switcher*`) with a
p50 budget of two frames, and the agent tab switch budget is tightened.
2026-11-09 12:04:34 +08:00
l0ng-ai 36fae164a8 perf: add a scenario for switching between and scrolling long agent conversations (#2259)
Adds the agentTabs perf scenario: two 2,100-entry agent conversations switched with Ctrl+Tab and scrolled, with budgets on DOM size, rows skipping rendering off screen, switch latency, scroll jumps and frame pacing.
2026-11-09 11:36:35 +08:00
arookieofc 8c21a1e088 fix(run): scroll the config list and form independently in the editor dialog (#2255)
.editBody had a min-height but no cap, so a tall form grew it past the
viewport and the dialog body scrolled both panes together. Cap it below
the dialog's own body bound and let each pane's overflow take over.
2026-11-09 11:36:21 +08:00
l0ng-ai ecba8aff68 docs(readme): update the WeChat group QR code 2026-11-09 11:33:51 +08:00
6 змінених файлів з 67 додано та 6 видалено

No files matched your search

Бінарний файл не відображається.

До

Ширина:  |  Висота:  |  Розмір: 377 KiB

Після

Ширина:  |  Висота:  |  Розмір: 86 KiB

+2 -1
Переглянути файл
@@ -72,10 +72,11 @@
"tabs.openSmallMs": 100,
"tabs.switchP95Ms": 33,
"tabs.switcherP50Ms": 33,
"agentTabs.conversationNodes": 20000,
"agentTabs.rowsAlwaysRendered": 0,
"agentTabs.switchP95Ms": 66,
"agentTabs.switchP95Ms": 50,
"agentTabs.switchMainThreadMs": 50,
"agentTabs.switchTbtMs": 50,
"agentTabs.scrollJumps": 0,
+15 -1
Переглянути файл
@@ -455,7 +455,21 @@ const tabs: Scenario = {
switches.push(await h.measure(() => tab.click(), ".cm-content", `// tab-${i}`));
}
}
return { openSmallMs, ...latencySummary(switches, "switch") };
// The Switcher (Ctrl+Tab) back and forth between the two most recent tabs.
const before = await h.counters();
const switcher: number[] = [];
for (let i = 0; i < 10; i++) {
const tag = i % 2 ? names.length - 1 : names.length - 2;
switcher.push(await h.measure(() => h.pressAction("navigate.switcher"), ".cm-content", `// tab-${tag}`));
await h.page.waitForTimeout(150);
}
const work = Harness.delta(before, await h.counters());
return {
openSmallMs,
...latencySummary(switches, "switch"),
...latencySummary(switcher, "switcher"),
switcherMainThreadMs: work.taskMs / switcher.length,
};
},
};
+6
Переглянути файл
@@ -435,10 +435,15 @@
display: flex;
height: 100%;
min-height: min(520px, calc(100vh - 200px));
/* A cap, not just a floor: left list and right form scroll on their own
(IDEA), so the panes never grow the dialog body into one shared scroller.
vh − ~104px is what a full-height resized dialog's body can hold anyway. */
max-height: calc(100vh - 120px);
}
.editSidebar {
flex: none;
width: 250px;
min-height: 0;
display: flex;
flex-direction: column;
border-right: 1px solid var(--border-popup);
@@ -452,6 +457,7 @@
}
.editList {
flex: 1;
min-height: 0;
overflow: auto;
padding: 4px 0;
}
+37 -1
Переглянути файл
@@ -55,7 +55,7 @@ vi.mock("../find/windowStore", async (orig) => ({
const contributions = await import("@/workbench/contributions");
const { commands } = await import("@/platform/ipc");
const { RecentPopupsOverlay } = await import("../recent/RecentPopups");
const { showRecentPopup, hideRecentPopup, useRecentPopup } = await import("../recent/store");
const { cycleSwitcher, showRecentPopup, hideRecentPopup, useRecentPopup } = await import("../recent/store");
const { openLocation } = await import("../common/open");
const { usePlatform } = await import("@/platform/platformInfo");
const { allActions } = await import("@/platform/actions");
@@ -476,6 +476,42 @@ describe("Recent Files multi-selection", () => {
});
});
describe("Switcher", () => {
afterEach(() => vi.restoreAllMocks());
it("opens the selection when Ctrl is released, once the popup gave focus back, in the same task", async () => {
const tab = (key: string, lastActive: number) => ({
input: { kind: "agent-session", key },
title: key,
icon: "toolwindow-agents",
lastActive,
});
const seen: Array<{ key: string; popup: boolean; focus: Element | null }> = [];
vi.spyOn(commands, "recentFiles").mockResolvedValue({ status: "ok", data: [] });
vi.spyOn(contributions, "maybeEditorService").mockReturnValue({
openTabs: () => [tab("task-b", 2), tab("task-a", 1)],
openPaths: () => [],
activePath: () => null,
openInput: async (input: { key: string }) => {
seen.push({ key: input.key, popup: !!screen.queryByRole("dialog"), focus: document.activeElement });
},
} as unknown as import("@/workbench/contributions").EditorService);
render(
<>
<button type="button">editor</button>
<RecentPopupsOverlay />
</>,
);
const editor = screen.getByRole("button", { name: "editor" });
editor.focus();
act(() => cycleSwitcher(1));
await tick();
expect(screen.getByRole("dialog", { name: "Switcher" })).toBeInTheDocument();
act(() => void fireEvent.keyUp(window, { key: "Control" }));
expect(seen).toEqual([{ key: "task-a", popup: false, focus: editor }]);
});
});
describe("Find in Files dialog", () => {
it("streams results and highlights the matches while replacing, as IDEA", async () => {
render(<FindInFilesOverlay />);
+7 -3
Переглянути файл
@@ -1,5 +1,6 @@
import { useFilePresentation } from "@/platform/filePresentation";
import { useEffect, useMemo, useRef, useState, type KeyboardEvent, type MouseEvent as ReactMouseEvent } from "react";
import { flushSync } from "react-dom";
import clsx from "clsx";
import { editorsFor, getNavigationHistory } from "@/editor/api";
import { call, commands, type OutlineItem } from "@/platform/ipc";
@@ -61,10 +62,13 @@ export function RecentPopupsOverlay() {
const NAV_KEYS = ["ArrowDown", "ArrowUp", "PageDown", "PageUp"];
/** Defers work until the dialog unmounted and restored focus. */
/**
* Runs `fn` once the dialog has unmounted and given focus back, in the same frame: the
* popup closing and what it opens paint together, without a frame of the old editor between.
*/
const afterClose = (fn: () => void) => {
hideRecentPopup();
setTimeout(fn, 0);
flushSync(hideRecentPopup);
fn();
};
// ---------------------------------------------------------------------------