Critical fixes:
- Smart Home: invalidate entity state query after toggle mutation
- Beszel live mode: use 5s refetchInterval instead of global 30s
- Fix unit test assertions for 5-arg setQueryCacheAsync signature
- Fix serialize/deserialize mismatch: JSON.parse on read (matches persister's JSON.stringify)
- Remove render-time setActiveQueryCacheBoardId race (keep only useEffect)
Error handling:
- Log persistence errors instead of swallowing with catch(() => {})
- Log QueryCacheHydration failures with ErrorWithMetadata
- Beszel: log partial failures (system details, container stats)
Dead code removal:
- Remove dead queryKey from all 39 request handlers + lib files
- Delete unused Redis APIs: createCacheChannel, createChannelWithLatestAndEvents,
createChannelEventHistory, history-channel.ts
- Remove stale createCacheChannel mock from docker test
Cleanup:
- Seed system-resources chart from initial query data (no empty start)
- Remove redundant refetchOnWindowFocus/refetchOnReconnect from BoardProvider
23 lines
827 B
TypeScript
23 lines
827 B
TypeScript
import type { AnchorNote, AnchorNotesListInput, AnchorNoteSummary } from "@homarr/integrations";
|
|
import { createIntegrationAsync } from "@homarr/integrations";
|
|
|
|
import { createIntegrationRequestHandler } from "./lib/integration-request-handler";
|
|
|
|
export const anchorNotesListRequestHandler = createIntegrationRequestHandler<
|
|
AnchorNoteSummary[],
|
|
"anchor",
|
|
AnchorNotesListInput
|
|
>({
|
|
async requestAsync(integration, input) {
|
|
const instance = await createIntegrationAsync(integration);
|
|
return instance.listNotesAsync(input);
|
|
},
|
|
});
|
|
|
|
export const anchorNoteRequestHandler = createIntegrationRequestHandler<AnchorNote, "anchor", { noteId: string }>({
|
|
async requestAsync(integration, input) {
|
|
const instance = await createIntegrationAsync(integration);
|
|
return instance.getNoteAsync(input.noteId);
|
|
},
|
|
});
|