fix(assistant): preserve lazy board boundaries
This commit is contained in:
7 files changed
+8
-20
No files matched your search
@@ -5,7 +5,7 @@ import { useMemo } from "react";
|
||||
import dynamic from "next/dynamic";
|
||||
|
||||
import { useScopedI18n } from "@homarr/translation/client";
|
||||
import { AssistantWidgetRendererProvider } from "@homarr/widgets";
|
||||
import { AssistantWidgetRendererProvider } from "@homarr/widgets/assistant/context";
|
||||
|
||||
import { AssistantContext } from "./assistant-context";
|
||||
import { AssistantBoardWidgetLazy } from "./assistant-widget-lazy";
|
||||
|
||||
@@ -20,13 +20,9 @@ import { clientApi, fetchApi } from "@homarr/api/client";
|
||||
import { createId } from "@homarr/common";
|
||||
import { hotkeys } from "@homarr/definitions";
|
||||
import { showErrorNotification, showWarningNotification } from "@homarr/notifications";
|
||||
import { closeSpotlight } from "@homarr/spotlight/store";
|
||||
import { useScopedI18n } from "@homarr/translation/client";
|
||||
import {
|
||||
closeSpotlight,
|
||||
openMediaRequestSearch,
|
||||
openSpotlight,
|
||||
useRegisterSpotlightContextResults,
|
||||
} from "@homarr/spotlight";
|
||||
import { openMediaRequestSearch, openSpotlight, useRegisterSpotlightContextResults } from "@homarr/spotlight";
|
||||
import { AssistantWidgetRendererProvider } from "@homarr/widgets";
|
||||
|
||||
import { AssistantContext, AssistantPreferencesContext, useAssistantPreferences } from "./assistant-context";
|
||||
|
||||
@@ -92,7 +92,7 @@ describe("calendarRouter.findAllEvents", () => {
|
||||
).rejects.toThrow();
|
||||
});
|
||||
|
||||
test("returns an integration-scoped error instead of silently dropping a failed calendar", async () => {
|
||||
test("rejects the query when every selected calendar fails", async () => {
|
||||
const { caller, integrationId } = await createCallerAsync();
|
||||
getDataAsync.mockRejectedValueOnce(new Error("remote calendar unavailable"));
|
||||
|
||||
@@ -104,12 +104,6 @@ describe("calendarRouter.findAllEvents", () => {
|
||||
releaseType: ["inCinemas", "digitalRelease", "physicalRelease"],
|
||||
showUnmonitored: true,
|
||||
}),
|
||||
).resolves.toEqual([
|
||||
{
|
||||
events: [],
|
||||
integration: { id: integrationId, name: "Radarr", kind: "radarr" },
|
||||
error: "Calendar events could not be loaded from this integration.",
|
||||
},
|
||||
]);
|
||||
).rejects.toThrow("All integration queries failed");
|
||||
});
|
||||
});
|
||||
@@ -15,6 +15,7 @@
|
||||
".": "./index.ts",
|
||||
"./component": "./src/component.ts",
|
||||
"./open": "./src/open.ts",
|
||||
"./store": "./src/spotlight-store.ts",
|
||||
"./styles.css": "./src/styles.css"
|
||||
},
|
||||
"scripts": {
|
||||
|
||||
@@ -1,13 +1,8 @@
|
||||
"use client";
|
||||
|
||||
import { spotlightActions } from "./spotlight-store";
|
||||
|
||||
export { Spotlight } from "./components/spotlight";
|
||||
export { openSpotlight, openMediaRequestSearch, mediaRequestSearchEvent } from "./open";
|
||||
export {
|
||||
SpotlightProvider,
|
||||
useRegisterSpotlightContextResults,
|
||||
useRegisterSpotlightContextActions,
|
||||
} from "./modes/home/context";
|
||||
|
||||
export const closeSpotlight = spotlightActions.close;
|
||||
@@ -6,6 +6,7 @@ import { createSpotlight } from "@mantine/spotlight";
|
||||
import { atom } from "jotai";
|
||||
|
||||
export const [spotlightStore, spotlightActions] = createSpotlight();
|
||||
export const closeSpotlight = spotlightActions.close;
|
||||
|
||||
export interface MediaRequestSearchScope {
|
||||
integrationIds?: string[];
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
"./custom-api/component": "./src/custom-api/component.tsx",
|
||||
"./custom-api/custom-jsx-display": "./src/custom-api/custom-jsx-display.tsx",
|
||||
"./custom-api/extract-display-data": "./src/custom-api/extract-display-data.ts",
|
||||
"./assistant/context": "./src/assistant/context.tsx",
|
||||
"./catalog": "./src/catalog.ts",
|
||||
"./definition": "./src/definition.ts",
|
||||
"./errors": "./src/errors/component.tsx",
|
||||
|
||||
Reference in new issue
Block a user