chore: strip formatting noise, delete dead routes, fix CodeRabbit issues

- Remove 179 format-only file changes (docs, migrations, plex, patchmon, CSS)
- Delete .cursor/goal files from git tracking
- Delete 4 dead /api/about routes (unused, data loaded from static JSON)
- Fix resolveAlias to use absolute paths (CodeRabbit)
- Fix Tailwind classes in Mantine app layout fallback (CodeRabbit)
- Return stale data during cache revalidation (CodeRabbit)
This commit is contained in:
Thomas Camlong committed 2026-08-08 08:45:16 +02:00
1 parent 95a7d56989
commit 6692acbd33
187 files changed
+6549 -7752

No files matched your search

@@ -36,6 +36,7 @@ describe("getCachedIntegrationData", () => {
expect(fetcher).toHaveBeenCalledTimes(2);
vi.advanceTimersByTime(100);
await vi.advanceTimersByTimeAsync(0);
await expect(getCachedIntegrationData("integration-a", "widget:stale", fetcher, 50)).resolves.toEqual({ value: 2 });
vi.useRealTimers();
+1 -1
View File
@@ -24,7 +24,7 @@ export const getCachedIntegrationData = async <T>(
const existing = cache.get(key) as CachedEntry<T> | undefined;
const now = Date.now();
if (existing?.pending) return existing.pending;
if (existing?.pending) return existing.timestamp > 0 ? existing.data : existing.pending;
if (existing && existing.timestamp > 0 && now - existing.timestamp < ttlMs) {
return existing.data;
}
@@ -1,7 +1,6 @@
import { describe, expect, test, vi } from "vitest";
import * as homarrDefinitions from "@homarr/definitions";
import type { IntegrationInstanceOfKind } from "@homarr/integrations";
import * as homarrIntegrations from "@homarr/integrations";
import { testConnectionAsync } from "../../integration/integration-test-connection";
@@ -24,7 +23,7 @@ describe("testConnectionAsync should run test connection of integration", () =>
factorySpy.mockReturnValue(
Promise.resolve({
testConnectionAsync: async () => await Promise.resolve({ success: true }),
} as IntegrationInstanceOfKind<"piHole">),
} as homarrIntegrations.PiHoleIntegrationV6),
);
optionsSpy.mockReturnValue([["apiKey"]]);
@@ -67,7 +66,7 @@ describe("testConnectionAsync should run test connection of integration", () =>
factorySpy.mockReturnValue(
Promise.resolve({
testConnectionAsync: async () => await Promise.resolve({ success: true }),
} as IntegrationInstanceOfKind<"piHole">),
} as homarrIntegrations.PiHoleIntegrationV6),
);
optionsSpy.mockReturnValue([["apiKey"]]);
@@ -117,7 +116,7 @@ describe("testConnectionAsync should run test connection of integration", () =>
factorySpy.mockReturnValue(
Promise.resolve({
testConnectionAsync: async () => await Promise.resolve({ success: true }),
} as IntegrationInstanceOfKind<"piHole">),
} as homarrIntegrations.PiHoleIntegrationV6),
);
optionsSpy.mockReturnValue([["apiKey"]]);
@@ -167,7 +166,7 @@ describe("testConnectionAsync should run test connection of integration", () =>
factorySpy.mockReturnValue(
Promise.resolve({
testConnectionAsync: async () => await Promise.resolve({ success: true }),
} as IntegrationInstanceOfKind<"piHole">),
} as homarrIntegrations.PiHoleIntegrationV6),
);
optionsSpy.mockReturnValue([["username", "password"], ["apiKey"]]);
@@ -221,7 +220,7 @@ describe("testConnectionAsync should run test connection of integration", () =>
factorySpy.mockReturnValue(
Promise.resolve({
testConnectionAsync: async () => await Promise.resolve({ success: true }),
} as IntegrationInstanceOfKind<"piHole">),
} as homarrIntegrations.PiHoleIntegrationV6),
);
optionsSpy.mockReturnValue([["username", "password"], ["apiKey"]]);
@@ -101,7 +101,9 @@ describe("patchmonRouter.getStats access control", () => {
});
const caller = createCaller(db, null);
await expect(caller.getStats({ integrationId })).rejects.toThrow(new TRPCError({ code: "UNAUTHORIZED" }));
await expect(caller.getStats({ integrationId })).rejects.toThrow(
new TRPCError({ code: "UNAUTHORIZED" }),
);
});
test("should throw FORBIDDEN for authenticated users without board or integration access", async () => {