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

...
Автор SHA1 Повідомлення Дата
l0ng-ai 4dd8a89e4f fix(find): keep the usages popup size loader private and fix a knip import
#7048 exported the size loader only this file uses and imported a module from a literal path in an e2e spec; both made knip fail.
2026-11-30 21:06:28 +08:00
2 змінених файлів з 3 додано та 2 видалено

No files matched your search

+2 -1
Переглянути файл
@@ -50,7 +50,8 @@ test("Show Usages resizes from its corner, the list fills it, and it reopens at
await page.setViewportSize({ width: 1200, height: 800 });
const show = () =>
page.evaluate(async () => {
const { useUsagesPopup } = await import(/* @vite-ignore */ "/src/features/code-insight/usages.ts");
const usages = "/src/features/code-insight/usages.ts";
const { useUsagesPopup } = await import(/* @vite-ignore */ usages);
const path = "/dev/app/src/Main.ts";
useUsagesPopup.setState({
open: true,
+1 -1
Переглянути файл
@@ -60,7 +60,7 @@ const MIN_WIDTH = 360;
const MIN_HEIGHT = 160;
/** The size the popup was last resized to, if any (IDEA remembers Show Usages' size). */
export function loadUsagesPopupSize(): { w: number; h: number } | null {
function loadUsagesPopupSize(): { w: number; h: number } | null {
try {
const saved = JSON.parse(localStorage.getItem(SIZE_KEY) ?? "null") as { w?: unknown; h?: unknown } | null;
return typeof saved?.w === "number" && typeof saved.h === "number" && Number.isFinite(saved.w + saved.h)