Compare commits

..
Author SHA1 Message Date
ajnart 268c864801 fix: narrow PR to verified bug fixes 2026-08-22 10:52:15 +02:00
ajnart 3f9941f9c7 Merge remote-tracking branch 'origin/dev' into feat/pr-6510-polish 2026-08-22 10:47:15 +02:00
ajnart 6868e4b8d2 test(auth): assert complete membership set for invalid OIDC claim
Address CodeRabbit: query all memberships instead of findFirst so a
handler that preserves the existing row but adds a membership is caught.
2026-08-08 12:25:11 +02:00
ajnart cc4e11fce4 Merge remote-tracking branch 'origin/dev' into fix/three-xs-fixes
# Conflicts:
#	apps/nextjs/src/components/board/items/widget-context-menu.tsx
2026-08-08 12:07:10 +02:00
ajnart 71b986f249 fix: gate scrollbar resize guard on size, preserve parse causes
Address CodeRabbit review on #6510:
- gridstack: only suppress recalculation when the width delta is
  insignificant AND (non-dynamic OR height unchanged), so dynamic
  sections still rebuild on height changes
- beszel: propagate the response parse failure via { cause } in both
  error wrappers
- auth tests: cover invalid (non-string) OIDC groups claims
2026-08-08 11:35:42 +02:00
ajnart e0ebdd9047 test(auth): add regression test for single-string OIDC groups claim 2026-08-08 11:16:39 +02:00
Thomas Camlong b2a4dcad1c fix: revert ineffective Uptime-Kuma paused fix; harden Unraid CPU divisor
The Uptime-Kuma status-page API (toPublicJSON) does not emit a status
field on monitor objects, so the added status schema field and paused
early-return were dead code and did not resolve #6002. Paused monitors
stop producing heartbeats and the two consumed endpoints expose no
paused signal, so revert the change.

Unraid CPU: divide by cpus.length (the array actually being averaged)
instead of info.cpu.threads, which is more robust if the two ever
disagree, while keeping the SMT over-reporting fix.
2026-08-03 17:41:24 +02:00
ajnart 751dd751e0 style: auto-fix lint and format 2026-08-03 15:31:09 +00:00
Thomas Camlong 7dd7d9280a chore: remove leaked docs sitemap entry from this PR 2026-08-03 17:30:00 +02:00
Thomas Camlong ebd8e00119 fix: scope app right-click bypass to view mode only 2026-08-03 17:21:38 +02:00
ajnart c51dbca9bc style: auto-fix lint and format 2026-08-03 15:17:53 +00:00
Thomas Camlong 60b0f59fe7 chore: remove board hotkeys from this PR (owned by #6393) 2026-08-03 17:16:50 +02:00
Thomas Camlong bc71cb7f16 chore: remove ISSUES.md from PR 2026-08-03 17:13:40 +02:00
Thomas Camlong 6e9136c5a0 chore: remove ISSUES.md from PR, merge BoardHotkeys into hook file 2026-08-03 17:11:04 +02:00
Thomas Camlong ef9ead60ba fix: address CodeRabbit review — guard OIDC group types and CPU division 2026-08-03 17:09:05 +02:00
ajnart ac8e0b1abe style: auto-fix lint and format 2026-08-03 15:04:34 +00:00
Thomas Camlong ce6a637220 fix: right-click apps, board keyboard shortcuts, scrollbar oscillation, Beszel JSON errors
- #6416: Skip widget context menu for app widgets (pass through native right-click)
- #6392: Add board keyboard shortcuts (mod+shift+arrows to cycle, mod+shift+1-9 for direct)
- #6080: Prevent GridStack scrollbar oscillation by thresholding resize events
- #6024: Add try-catch for Beszel response.json() calls in auth and testing paths
2026-08-03 17:03:24 +02:00
ajnart afe5f2b6b4 style: auto-fix lint and format 2026-08-03 14:52:40 +00:00
Thomas Camlong 7de2fc04ec fix: correct Unraid CPU calculation, OIDC single-group sync, and Uptime-Kuma paused status
- **Unraid CPU calculation** (#6082): Use thread count instead of core count
  when normalizing CPU utilization. Each cpus[] entry is one thread, so
  dividing by physical cores (cores) over-reports on SMT systems.

- **OIDC single-group sync** (#5716): Normalize the groups claim to always
  be an array. Some providers (e.g. Jumpcloud) send a single group as a
  plain string instead of an array, which caused the Array.isArray check
  to skip group synchronization entirely.

- **Uptime-Kuma paused status** (#6002): Add the status field to the
  monitor schema and check it before falling back to heartbeat inference.
  When a monitor is paused, heartbeats stop arriving, so the latest
  heartbeat may still show 'up' from before pausing. The status page
  returns status=2 for paused monitors, which this change now respects.
2026-08-03 16:51:21 +02:00
7 changed files with 19 additions and 205 deletions

No files matched your search

@@ -30,7 +30,7 @@ Using the `PUID` and `PGID` will require you to set the correct permissions on t
| `PUID` | User ID to run the container as | Any valid user ID | `0` |
| `PGID` | Group ID to run the container as | Any valid group ID | `0` |
| `LOG_LEVEL` | Log level to use | `debug` / `info` / `warn` / `error` | `info` |
| `NO_EXTERNAL_CONNECTION` | Disables Homarr's internet-backed requests, including update checks, weather, location search, and RSS feeds | `true` or `false` | `false` |
| `NO_EXTERNAL_CONNECTION` | Disables Homarr's internet-backed requests, including update checks, weather, and RSS feeds | `true` or `false` | `false` |
| `ENABLE_DNS_CACHING` | Enables dns caching. Enabled by default, but if you experience issues with IPv6 or static IPs, see [#4006](https://github.com/homarr-labs/homarr/issues/4006) or disable this flag | `true` or `false` | `true` |
| `HOMARR_DISABLE_IPV6` | Disables the IPv6 listener of the internal nginx proxy, even when the host supports IPv6. IPv6 is normally disabled automatically when the host has no IPv6 configured. See [#4596](https://github.com/homarr-labs/homarr/issues/4596) | `true` or `false` | `false` |
+14 -16
View File
@@ -1,22 +1,26 @@
---
title: "Weather"
description: "Displays the current weather information of a set location."
title: 'Weather'
description: 'Displays the current weather information of a set location.'
hide_title: true
---
import { AddingWidget } from "@site/src/components/widgets/adding";
import { WidgetConfig } from "@site/src/components/widgets/configuration";
import { WidgetHeader } from "@site/src/components/widgets/header";
import { weatherWidget } from ".";
import { AddingWidget } from '@site/src/components/widgets/adding';
import { WidgetConfig } from '@site/src/components/widgets/configuration';
import { WidgetHeader } from '@site/src/components/widgets/header';
import { weatherWidget } from '.';
<WidgetHeader widget={weatherWidget} categories={["Weather"]} />
<WidgetHeader
widget={weatherWidget}
categories={["Weather"]}
/>
The Weather Widget uses your location to display the current, highest and lowest temperature.
### Screenshots
import forecastWeather from "./img/forecast.png";
import currentWeather from "./img/current.png";
import forecastWeather from './img/forecast.png';
import currentWeather from './img/current.png';
<div className="flex flex-col gap-1">
<img src={forecastWeather} alt="weather forecast-5-days" width={128 * 4.5} />
@@ -28,15 +32,9 @@ import currentWeather from "./img/current.png";
<AddingWidget />
### Configuration
<WidgetConfig configuration={weatherWidget.configuration} />
### Data source
We use the Open Meteo API to fetch the weather and locations.
If you need to whitelist the api, please use the following URL: `https://open-meteo.com`
:::note
When the `NO_EXTERNAL_CONNECTION` environment variable is enabled, the widget (and the city
search inside its configuration) cannot load any data from Open Meteo.
:::
If you need to whitelist the api, please use the following URL: `https://open-meteo.com`
-3
View File
@@ -1,6 +1,5 @@
import { z } from "zod/v4";
import { env } from "@homarr/common/env";
import { fetchWithTrustedCertificatesAsync } from "@homarr/core/infrastructure/http";
import { withTimeoutAsync } from "@homarr/core/infrastructure/http/timeout";
@@ -38,8 +37,6 @@ export const locationRouter = createTRPCRouter({
.input(locationSearchCityInput)
.output(locationSearchCityOutput)
.query(async ({ input }) => {
if (env.NO_EXTERNAL_CONNECTION) return { results: [] };
const res = await withTimeoutAsync(async (signal) => {
return await fetchWithTrustedCertificatesAsync(
`https://geocoding-api.open-meteo.com/v1/search?name=${input.query}`,
@@ -1,80 +0,0 @@
import { afterEach, describe, expect, test, vi } from "vitest";
import { createDb } from "@homarr/db/test";
const mocks = vi.hoisted(() => ({
fetchWithTrustedCertificatesAsync: vi.fn(),
env: { NO_EXTERNAL_CONNECTION: false },
}));
vi.mock("@homarr/common/env", () => ({
env: mocks.env,
}));
vi.mock("@homarr/core/infrastructure/http", () => ({
fetchWithTrustedCertificatesAsync: mocks.fetchWithTrustedCertificatesAsync,
}));
vi.mock("@homarr/core/infrastructure/http/timeout", () => ({
withTimeoutAsync: async (callback: (signal: AbortSignal) => Promise<Response>) => {
return await callback(new AbortController().signal);
},
}));
import { locationRouter } from "../location";
const createJsonResponse = (body: unknown) =>
new Response(JSON.stringify(body), { status: 200, headers: { "content-type": "application/json" } });
const createCaller = () => locationRouter.createCaller({ db: createDb(), deviceType: undefined, session: null });
afterEach(() => {
mocks.env.NO_EXTERNAL_CONNECTION = false;
mocks.fetchWithTrustedCertificatesAsync.mockReset();
});
describe("locationRouter.searchCity", () => {
test("should return empty results when external connections are disabled", async () => {
// Arrange
mocks.env.NO_EXTERNAL_CONNECTION = true;
const caller = createCaller();
// Act
const result = await caller.searchCity({ query: "Paris" });
// Assert
expect(result.results).toEqual([]);
expect(mocks.fetchWithTrustedCertificatesAsync).not.toHaveBeenCalled();
});
test("should fetch the geocoding API when external connections are enabled", async () => {
// Arrange
mocks.env.NO_EXTERNAL_CONNECTION = false;
mocks.fetchWithTrustedCertificatesAsync.mockResolvedValue(
createJsonResponse({
results: [
{
id: 1,
name: "Paris",
country: "France",
country_code: "FR",
latitude: 48.85341,
longitude: 2.3488,
population: 2138551,
},
],
}),
);
const caller = createCaller();
// Act
const result = await caller.searchCity({ query: "Paris" });
// Assert
expect(result.results[0]?.name).toBe("Paris");
expect(mocks.fetchWithTrustedCertificatesAsync).toHaveBeenCalledWith(
expect.stringContaining("geocoding-api.open-meteo.com"),
expect.anything(),
);
});
});
@@ -1,64 +0,0 @@
import { afterEach, describe, expect, test, vi } from "vitest";
import { createDb } from "@homarr/db/test";
const mocks = vi.hoisted(() => ({
getDataAsync: vi.fn(),
handler: vi.fn(),
env: { NO_EXTERNAL_CONNECTION: false },
}));
vi.mock("@homarr/common/env", () => ({
env: mocks.env,
}));
vi.mock("@homarr/request-handler/weather", () => ({
weatherRequestHandler: {
handler: mocks.handler,
},
}));
import { weatherRouter } from "../../widgets/weather";
const weatherData = {
current: { weathercode: 0, temperature: 20, windspeed: 10 },
daily: [],
};
const createCaller = () => weatherRouter.createCaller({ db: createDb(), deviceType: undefined, session: null });
afterEach(() => {
mocks.env.NO_EXTERNAL_CONNECTION = false;
mocks.handler.mockReset();
mocks.getDataAsync.mockReset();
});
describe("weatherRouter.atLocation", () => {
test("should return null when external connections are disabled", async () => {
// Arrange
mocks.env.NO_EXTERNAL_CONNECTION = true;
const caller = createCaller();
// Act
const result = await caller.atLocation({ latitude: 48.85341, longitude: 2.3488 });
// Assert
expect(result).toBeNull();
expect(mocks.handler).not.toHaveBeenCalled();
});
test("should return the weather data when external connections are enabled", async () => {
// Arrange
mocks.env.NO_EXTERNAL_CONNECTION = false;
mocks.handler.mockReturnValue({ getDataAsync: mocks.getDataAsync });
mocks.getDataAsync.mockResolvedValue({ data: weatherData, timestamp: new Date() });
const caller = createCaller();
// Act
const result = await caller.atLocation({ latitude: 48.85341, longitude: 2.3488 });
// Assert
expect(result).toEqual(weatherData);
expect(mocks.handler).toHaveBeenCalledWith({ latitude: 48.85341, longitude: 2.3488 });
});
});
-5
View File
@@ -2309,11 +2309,6 @@
}
},
"currentWindSpeed": "{currentWindSpeed} {unit}",
"error": {
"disabled": "Weather data is unavailable because outbound connections are disabled",
"failed": "Failed to load weather data",
"retry": "Retry"
},
"dailyForecast": {
"sunrise": "Sunrise",
"sunset": "Sunset",
+4 -36
View File
@@ -1,14 +1,7 @@
"use client";
import { Box, Button, Group, HoverCard, Stack, Text } from "@mantine/core";
import {
IconArrowDownRight,
IconArrowUpRight,
IconCloudOff,
IconDroplets,
IconMapPin,
IconWind,
} from "@tabler/icons-react";
import { Box, Group, HoverCard, Stack, Text } from "@mantine/core";
import { IconArrowDownRight, IconArrowUpRight, IconDroplets, IconMapPin, IconWind } from "@tabler/icons-react";
import combineClasses from "clsx";
import dayjs from "dayjs";
@@ -23,38 +16,13 @@ import { AnimatedWeatherIcon } from "./animated-icon";
import { WeatherDescription } from "./icon";
export default function WeatherWidget({ isEditMode, options }: WidgetComponentProps<"weather">) {
const tError = useScopedI18n("widget.weather.error");
const input = {
latitude: options.location.latitude,
longitude: options.location.longitude,
};
const { data: weather, isPending, isError, refetch } = clientApi.widget.weather.atLocation.useQuery(input);
const { data: weather } = clientApi.widget.weather.atLocation.useQuery(input);
if (isPending) return <WidgetEmptyState />;
if (isError) {
return (
<Stack align="center" justify="center" gap="xs" w="100%" h="100%" p="sm">
<IconCloudOff size={24} />
<Text c="red" size="sm" ta="center">
{tError("failed")}
</Text>
<Button variant="subtle" size="compact-xs" onClick={() => void refetch()}>
{tError("retry")}
</Button>
</Stack>
);
}
if (!weather) {
return (
<Stack align="center" justify="center" gap="xs" w="100%" h="100%" p="sm">
<Text c="dimmed" size="sm" ta="center">
{tError("disabled")}
</Text>
</Stack>
);
}
if (!weather) return <WidgetEmptyState />;
return (
<Stack