From be6614182fff6bb101c9ab5a64c836974559e796 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 10 Sep 2026 16:51:28 +0000 Subject: [PATCH 1/2] Bump gridstack from 11.5.1 to 13.2.0 in /web Bumps [gridstack](https://github.com/gridstack/gridstack.js) from 11.5.1 to 13.2.0. - [Release notes](https://github.com/gridstack/gridstack.js/releases) - [Changelog](https://github.com/gridstack/gridstack.js/blob/master/doc/CHANGES.md) - [Commits](https://github.com/gridstack/gridstack.js/commits/v13.2.0) --- updated-dependencies: - dependency-name: gridstack dependency-version: 13.2.0 dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- web/package-lock.json | 8 ++++---- web/package.json | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/web/package-lock.json b/web/package-lock.json index 6a564dc..79ee4e4 100644 --- a/web/package-lock.json +++ b/web/package-lock.json @@ -15,7 +15,7 @@ "@codemirror/state": "^6.7.4", "@codemirror/view": "^6.43.11", "echarts": "^6.1.0", - "gridstack": "^11.5.0" + "gridstack": "^13.2.0" }, "devDependencies": { "@sveltejs/adapter-static": "^3.0.10", @@ -751,9 +751,9 @@ } }, "node_modules/gridstack": { - "version": "11.5.1", - "resolved": "https://registry.npmjs.org/gridstack/-/gridstack-11.5.1.tgz", - "integrity": "sha512-qgbH65F6TtyKyi9t6fCkrxLhiobgYR3RBjnK0AzZl+YO7hreMVlsZ1MFbkPV0+7ZhjXdvcaRSZp3UA1yAJqYBQ==", + "version": "13.2.0", + "resolved": "https://registry.npmjs.org/gridstack/-/gridstack-13.2.0.tgz", + "integrity": "sha512-+ImmOx6qd1wiF0EagY7e/pPdngh/6s0FM+r9hh4d8AsXslO51iHEuoAF7CMrXCFr0Xqd0X4WS/bqRLXtEUThug==", "funding": [ { "type": "paypal", diff --git a/web/package.json b/web/package.json index 56dd8df..8a686de 100644 --- a/web/package.json +++ b/web/package.json @@ -29,7 +29,7 @@ "@codemirror/state": "^6.7.4", "@codemirror/view": "^6.43.11", "echarts": "^6.1.0", - "gridstack": "^11.5.0" + "gridstack": "^13.2.0" }, "overrides": { "cookie": "^0.7.2" From efc8886bd8d74bc5187edf87a4ddcf38133a8cad Mon Sep 17 00:00:00 2001 From: John Coffey Date: Thu, 10 Sep 2026 09:59:14 -0700 Subject: [PATCH 2/2] Take gridstack to 13, and handle the grid it may not return gridstack 13 changed `GridStack.init` to return `GridStack | null` where 11 always handed one back. The dashboard held the result in a `GridStack | undefined` and called `.on('change')` on it straight after, so svelte-check stopped on two errors: null is not undefined, and the value is possibly neither. Coalesced to undefined so the declared type stays as it was, then guarded before the listener is attached. `gridEl` is already checked at the top of the function, so a null here should not occur -- but the type allows it, and a dashboard that quietly stops persisting drags beats one that throws inside an effect. Nothing else in the repository touches gridstack: one import of `GridStack` and its stylesheet, in this file. Worth noting `vite build` passes either way. Only `npm run check` sees this, and no CI job runs it -- the two majors would have gone in looking clean. --- web/src/routes/dashboards/[id]/+page.svelte | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/web/src/routes/dashboards/[id]/+page.svelte b/web/src/routes/dashboards/[id]/+page.svelte index 5e17c3b..968ae04 100644 --- a/web/src/routes/dashboards/[id]/+page.svelte +++ b/web/src/routes/dashboards/[id]/+page.svelte @@ -167,7 +167,12 @@ function setupGrid() { if (!gridEl || !dashboard?.panels) return; grid?.destroy(false); - grid = GridStack.init({ float: true, cellHeight: 60, column: 12 }, gridEl); + // gridstack 13 returns null when it cannot bind to the element, where + // 11 always handed back a grid. `gridEl` is guarded above so this + // should not happen -- but the type says it can, and a missed drag is + // better than a thrown error inside an effect. + grid = GridStack.init({ float: true, cellHeight: 60, column: 12 }, gridEl) ?? undefined; + if (!grid) return; grid.on('change', (_event: Event, items: GridStackNode[]) => { for (const item of items) { const panel = dashboard?.panels?.find((p) => p.id === item.id);