feat(onboarding): enhance integration setup with Docker discovery, URL templating, and API key helpers

Add automatic Docker container discovery during onboarding to pre-select
and pre-fill integrations. Introduce base URL templating with subdomain/port
modes, API key settings path links, and a curated onboarding list that
hides niche integrations (GitHub, npm, Docker Hub, etc.). Prevent duplicate
widget seeding and remove the timetable widget from defaults.
This commit is contained in:
Thomas Camlong committed 2026-05-27 14:36:04 +02:00
1 parent 1fcc149c91
commit 309ba0590d
18 files changed
+1056 -56

No files matched your search

@@ -0,0 +1,31 @@
import { describe, expect, it } from "vitest";
import { getIntegrationApiKeyUrl } from "../integration";
describe("getIntegrationApiKeyUrl", () => {
it("builds URL for sonarr", () => {
expect(getIntegrationApiKeyUrl("http://192.168.1.10:8989", "sonarr")).toBe(
"http://192.168.1.10:8989/settings/general",
);
});
it("builds URL for jellyfin", () => {
expect(getIntegrationApiKeyUrl("http://media.local:8096", "jellyfin")).toBe(
"http://media.local:8096/web/index.html#!/dashboard/keys",
);
});
it("returns null for integrations without apiKeySettingsPath", () => {
expect(getIntegrationApiKeyUrl("http://localhost", "plex")).toBeNull();
});
it("returns null for empty URL", () => {
expect(getIntegrationApiKeyUrl("", "sonarr")).toBeNull();
});
it("strips trailing slash from base URL", () => {
expect(getIntegrationApiKeyUrl("http://sonarr.local/", "sonarr")).toBe(
"http://sonarr.local/settings/general",
);
});
});