fix: address PR review feedback

- Show error notification on setup failure instead of silent reset
- Fix toggleKind stale closure by using prop array directly
- Remove duplicate translations from en-gb.json (falls back to en.json)
- Align seed board columnCount to 12 (codebase default)
- Extract shared placeAllWidgetsAsync helper to @homarr/db/queries
- Remove redundant onboardingFormSchema; reuse formSchema for both paths
- Fix lint errors (optional chain, unused imports, unnecessary conditions)
This commit is contained in:
Thomas Camlong committed 2026-05-27 15:53:14 +02:00
1 parent c97513a61c
commit a6566f74c9
15 files changed
+233 -338

No files matched your search

@@ -68,7 +68,9 @@ export interface IntegrationGridItem {
widgets: WidgetKind[];
}
export const buildSortedIntegrations = (options: { enableMockIntegration?: boolean; onboarding?: boolean } = {}): IntegrationGridItem[] =>
export const buildSortedIntegrations = (
options: { enableMockIntegration?: boolean; onboarding?: boolean } = {},
): IntegrationGridItem[] =>
integrationKinds
.filter((kind) => {
if (options.onboarding && hiddenFromOnboarding.has(kind)) return false;
@@ -34,18 +34,21 @@ export const IntegrationMultiSelectGrid = ({
const toggleKind = useCallback(
(kind: IntegrationKind) => {
const next = new Set(selectedKinds);
if (next.has(kind)) {
next.delete(kind);
const current = new Set(selectedKindsArray);
if (current.has(kind)) {
current.delete(kind);
} else {
next.add(kind);
current.add(kind);
}
onSelectionChange(Array.from(next));
onSelectionChange(Array.from(current));
},
[selectedKinds, onSelectionChange],
[selectedKindsArray, onSelectionChange],
);
const integrations = useMemo(() => buildSortedIntegrations({ enableMockIntegration, onboarding }), [enableMockIntegration, onboarding]);
const integrations = useMemo(
() => buildSortedIntegrations({ enableMockIntegration, onboarding }),
[enableMockIntegration, onboarding],
);
const filtered = useMemo(() => filterIntegrations(integrations, search), [integrations, search]);
return (