From 534d89e73f135c86c593e5b92463263eefd83ef2 Mon Sep 17 00:00:00 2001 From: Jarek Krochmalski Date: Thu, 24 Sep 2026 15:24:18 +0200 Subject: [PATCH 1/7] bump docker-compose, devalue and nodemailer --- Dockerfile | 2 +- package.json | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index 9df60288c..891630d03 100644 --- a/Dockerfile +++ b/Dockerfile @@ -37,7 +37,7 @@ RUN APKO_ARCH=$([ "$TARGETARCH" = "arm64" ] && echo "aarch64" || echo "x86_64") " - busybox" \ " - tzdata" \ " - docker-cli" \ - " - docker-compose=5.5.0-r5" \ + " - docker-compose=5.5.1-r1" \ " - docker-cli-buildx" \ " - sqlite" \ " - postgresql-client" \ diff --git a/package.json b/package.json index 72c31e9e2..5f777e887 100644 --- a/package.json +++ b/package.json @@ -47,7 +47,7 @@ "better-sqlite3": "11.7.0", "croner": "9.1.0", "cronstrue": "3.9.0", - "devalue": "5.8.1", + "devalue": "5.9.2", "drizzle-orm": "0.45.2", "fast-xml-parser": "5.7.3", "isomorphic-dompurify": "3.22.0", @@ -56,7 +56,7 @@ "marked": "18.0.9", "modern-tar": "0.8.0", "mqtt": "5.15.2", - "nodemailer": "9.1.0", + "nodemailer": "9.1.1", "otpauth": "9.4.1", "postgres": "3.4.8", "prom-client": "15.1.3", @@ -118,6 +118,6 @@ "@codemirror/search": "6.6.0", "@lezer/common": "1.5.0", "@lezer/highlight": "1.2.3", - "devalue": "5.8.1" + "devalue": "5.9.2" } } From ca90e7a78266065b7f2a13374a1fc5709d49c61a Mon Sep 17 00:00:00 2001 From: Jarek Krochmalski Date: Thu, 24 Sep 2026 15:24:19 +0200 Subject: [PATCH 2/7] release housekeeping for 1.0.49 and 1.0.50 notes --- src/lib/data/changelog.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib/data/changelog.json b/src/lib/data/changelog.json index 84798c1b3..5b4e3f35d 100644 --- a/src/lib/data/changelog.json +++ b/src/lib/data/changelog.json @@ -1,8 +1,8 @@ [ { "version": "1.0.49", - "date": "2026-09-22", - "comingSoon": true, + "date": "2026-09-23", + "comingSoon": false, "changes": [ { "type": "fix", "text": "select-all checkbox shows a partial state, not a full tick, for a partial selection (#1605)" }, { "type": "fix", "text": "a long backup no longer crashes the app when its log stream goes quiet (#1610)" }, From 852c817acc4ff68eee438fba28df1129eca44497 Mon Sep 17 00:00:00 2001 From: Jarek Krochmalski Date: Thu, 24 Sep 2026 15:24:19 +0200 Subject: [PATCH 3/7] advertise the latest released version on the site, not a coming-soon entry --- scripts/generate-changelog-page.ts | 12 ++++++--- tests/changelog-filter.test.ts | 39 ++++++++++++++++++++++++++++++ 2 files changed, 48 insertions(+), 3 deletions(-) diff --git a/scripts/generate-changelog-page.ts b/scripts/generate-changelog-page.ts index e17d6a770..85d397d73 100644 --- a/scripts/generate-changelog-page.ts +++ b/scripts/generate-changelog-page.ts @@ -311,6 +311,12 @@ export function stripRefs(text: string): string { .trim(); } +// The version the site advertises as current. A coming-soon entry is not downloadable, +// so it is never the answer; null means nothing has shipped yet. +export function latestReleasedVersion(entries: ChangelogEntry[]): string | null { + return entries.find((e) => !e.comingSoon)?.version ?? null; +} + // Build an RSS 2.0 feed from the released changelog entries (coming-soon excluded). function generateRssFeed(entries: ChangelogEntry[]): string { const released = entries.filter((e) => !e.comingSoon && e.date); @@ -375,9 +381,9 @@ if (import.meta.main) { indexHtml = indexHtml.replace(changelogRegex, newChangelogSection); - // Also update softwareVersion in JSON-LD schema - if (changelog.length > 0) { - const latestVersion = changelog[0].version; + // Also update softwareVersion in JSON-LD schema. + const latestVersion = latestReleasedVersion(changelog); + if (latestVersion) { // Match "softwareVersion": "X.X" or "softwareVersion": "X.X.X" const versionRegex = /"softwareVersion":\s*"[\d.]+"/; if (versionRegex.test(indexHtml)) { diff --git a/tests/changelog-filter.test.ts b/tests/changelog-filter.test.ts index 56be0f001..69b564be6 100644 --- a/tests/changelog-filter.test.ts +++ b/tests/changelog-filter.test.ts @@ -1,5 +1,7 @@ import { describe, test, expect } from 'bun:test'; import { releasedEntries } from '../src/lib/utils/changelog-filter'; +import { latestReleasedVersion } from '../scripts/generate-changelog-page'; +import changelogJson from '../src/lib/data/changelog.json'; describe('releasedEntries', () => { test('drops coming-soon (unreleased) entries', () => { @@ -29,3 +31,40 @@ describe('releasedEntries', () => { expect(releasedEntries(entries)[0].version).toBe('1.0.47'); }); }); + +describe('latestReleasedVersion (landing page JSON-LD softwareVersion)', () => { + test('skips a coming-soon top entry and resolves to the newest shipped one', () => { + // The distinguishing case: reading entries[0] here would advertise a version + // nobody can download. + expect( + latestReleasedVersion([ + { version: '1.0.50', comingSoon: true }, + { version: '1.0.49' }, + { version: '1.0.48' } + ] as never) + ).toBe('1.0.49'); + }); + + test('resolves to the first entry when nothing is coming-soon', () => { + expect( + latestReleasedVersion([{ version: '1.0.49' }, { version: '1.0.48' }] as never) + ).toBe('1.0.49'); + }); + + test('returns null when every entry is coming-soon, so the caller leaves the schema alone', () => { + expect(latestReleasedVersion([{ version: '1.0.50', comingSoon: true }] as never)).toBeNull(); + }); + + test('returns null for an empty changelog', () => { + expect(latestReleasedVersion([])).toBeNull(); + }); + + test('the shipped changelog resolves to a version that is not the coming-soon top entry', () => { + const changelog = changelogJson as { version: string; comingSoon?: boolean }[]; + const resolved = latestReleasedVersion(changelog as never); + expect(resolved).toBe(changelog.find((e) => !e.comingSoon)!.version); + if (changelog[0].comingSoon) { + expect(resolved).not.toBe(changelog[0].version); + } + }); +}); From 56eefe98404785afa96114917558bd85b6f3090f Mon Sep 17 00:00:00 2001 From: Jarek Krochmalski Date: Thu, 24 Sep 2026 15:24:19 +0200 Subject: [PATCH 4/7] mount a row's confirm popover only when opened so grid filtering stays fast --- src/lib/components/ConfirmPopover.svelte | 37 +++++++++++++++++++++--- 1 file changed, 33 insertions(+), 4 deletions(-) diff --git a/src/lib/components/ConfirmPopover.svelte b/src/lib/components/ConfirmPopover.svelte index fccdbe644..6e4cca93d 100644 --- a/src/lib/components/ConfirmPopover.svelte +++ b/src/lib/components/ConfirmPopover.svelte @@ -1,4 +1,5 @@ +{#if !activated} + + +{:else} {#snippet child({ props })} @@ -124,3 +152,4 @@ +{/if} From 959ebc4e33ff5e38b9b273a8dc69d79d6567ae07 Mon Sep 17 00:00:00 2001 From: Jarek Krochmalski Date: Thu, 24 Sep 2026 15:24:19 +0200 Subject: [PATCH 5/7] open the edit modal when you click an environment or git repository name --- .../settings/environments/EnvironmentsTab.svelte | 11 ++++++++++- src/routes/settings/git/GitRepositoriesTab.svelte | 11 ++++++++++- 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/src/routes/settings/environments/EnvironmentsTab.svelte b/src/routes/settings/environments/EnvironmentsTab.svelte index 20d72a044..298bedb95 100644 --- a/src/routes/settings/environments/EnvironmentsTab.svelte +++ b/src/routes/settings/environments/EnvironmentsTab.svelte @@ -456,7 +456,16 @@ {/if} - {env.name} + {#if $canAccess('environments', 'edit')} + + {:else} + {env.name} + {/if} diff --git a/src/routes/settings/git/GitRepositoriesTab.svelte b/src/routes/settings/git/GitRepositoriesTab.svelte index b9c687187..89c4778ac 100644 --- a/src/routes/settings/git/GitRepositoriesTab.svelte +++ b/src/routes/settings/git/GitRepositoriesTab.svelte @@ -165,7 +165,16 @@
- {repo.name} + {#if $canAccess('settings', 'edit')} + + {:else} + {repo.name} + {/if}
From f36196afee428c2d80b1e50e87619aecce35cbdd Mon Sep 17 00:00:00 2001 From: Jarek Krochmalski Date: Thu, 24 Sep 2026 15:24:19 +0200 Subject: [PATCH 6/7] keep the dashboard top-containers and recent-events lists across an event refresh --- src/routes/+page.svelte | 18 ++++++++---- src/routes/api/dashboard/stats/+server.ts | 18 ++++++++++-- tests/merge-partial-stats.test.ts | 35 +++++++++++++++++++++++ 3 files changed, 62 insertions(+), 9 deletions(-) diff --git a/src/routes/+page.svelte b/src/routes/+page.svelte index 8d5aa220d..2a216a07f 100644 --- a/src/routes/+page.svelte +++ b/src/routes/+page.svelte @@ -799,12 +799,18 @@ const stats = await response.json() as EnvironmentStats; - tiles = tiles.map(t => - t.id === envId - ? { ...t, stats, loading: false } - : t - ); - dashboardData.updateTile(envId, { stats, loading: false }); + // MERGE, don't replace: this endpoint doesn't compute topContainers/recentEvents + // (only the SSE stream does), so replacing the whole stats object would blank the + // richer lists the tile already got from the stream. Merge keeps them (it skips + // undefined fields) while still applying the fresh counts this refresh carries. + tiles = tiles.map(t => { + if (t.id !== envId) return t; + const merged = { ...t.stats } as Record; + mergePartialStats(merged, stats as any); + return { ...t, stats: merged as EnvironmentStats, loading: false }; + }); + dashboardData.updateTilePartial(envId, definedPartialForStore(stats as any)); + dashboardData.updateTile(envId, { loading: false }); } catch { // Ignore errors - next full refresh will catch up } diff --git a/src/routes/api/dashboard/stats/+server.ts b/src/routes/api/dashboard/stats/+server.ts index c71e6a7b0..be9a82469 100644 --- a/src/routes/api/dashboard/stats/+server.ts +++ b/src/routes/api/dashboard/stats/+server.ts @@ -98,7 +98,10 @@ export interface EnvironmentStats { total: number; today: number; }; - topContainers: Array<{ + // Optional: this non-streaming endpoint does NOT compute topContainers or recentEvents + // (only the SSE stream does). Omitting them lets the dashboard's merge keep the richer + // lists it already received from the stream instead of blanking them on an event refresh. + topContainers?: Array<{ id: string; name: string; cpuPercent: number; @@ -190,8 +193,8 @@ export const GET: RequestHandler = async ({ cookies, url }) => { networks: { total: 0 }, stacks: { total: 0, running: 0, partial: 0, stopped: 0 }, metrics: null, - events: { total: 0, today: 0 }, - topContainers: [] + events: { total: 0, today: 0 } + // topContainers / recentEvents intentionally omitted - not computed here. }; try { @@ -233,6 +236,15 @@ export const GET: RequestHandler = async ({ cookies, url }) => { envStats.containers.restarting = containers.filter((c: any) => c.state === 'restarting').length; envStats.containers.unhealthy = containers.filter((c: any) => c.health === 'unhealthy').length; + // This endpoint does not compute topContainers (only the SSE stream does), so it + // omits the field and the dashboard's merge keeps the stream's list. But when + // there are zero running containers the list is genuinely empty, so send [] as an + // explicit signal the merge honours - otherwise a just-emptied env would show a + // stale "Top containers" list until the next stream cycle. + if (envStats.containers.running === 0) { + envStats.topContainers = []; + } + // Helper to get valid size (Docker API returns -1 for uncalculated sizes) const getValidSize = (size: number | undefined | null): number => { return size && size > 0 ? size : 0; diff --git a/tests/merge-partial-stats.test.ts b/tests/merge-partial-stats.test.ts index 00cc0378a..fd3d553fc 100644 --- a/tests/merge-partial-stats.test.ts +++ b/tests/merge-partial-stats.test.ts @@ -124,6 +124,41 @@ describe('mergePartialStats - skeleton placeholders never blank a populated tile }); }); +describe('mergePartialStats - event-triggered refresh keeps lists the non-stream endpoint omits', () => { + // The non-streaming /api/dashboard/stats does not compute topContainers/recentEvents + // (only the SSE stream does). An event-triggered refresh must MERGE its response so the + // richer lists a tile already got from the stream survive, instead of being blanked. + it('undefined topContainers/recentEvents in the refresh keep the stream-provided lists', () => { + // existing = what the SSE stream delivered + const existing: any = { + id: 8, + containers: { total: 8, running: 8, stopped: 0 }, + topContainers: [{ id: 'a' }, { id: 'b' }, { id: 'c' }, { id: 'd' }, { id: 'e' }, { id: 'f' }, { id: 'g' }, { id: 'h' }], + recentEvents: Array.from({ length: 10 }, (_, i) => ({ action: 'start', container_name: `c${i}` })), + events: { today: 400, total: 700 } + }; + // partial = the non-stream refresh: correct counts, no lists (fields omitted) + mergePartialStats(existing, { + id: 8, + containers: { total: 8, running: 8, stopped: 0 }, + topContainers: undefined, + recentEvents: undefined, + events: { today: 488, total: 712 } + }); + expect(existing.topContainers.length).toBe(8); // preserved, not blanked + expect(existing.recentEvents.length).toBe(10); // preserved, not blanked + expect(existing.events).toEqual({ today: 488, total: 712 }); // fresh counts applied + expect(existing.containers.running).toBe(8); + }); + + it('a genuine empty topContainers array (present, no loading flag) DOES replace', () => { + // If the endpoint ever explicitly sends [] (real "no running containers"), honour it. + const existing: any = { id: 8, topContainers: [{ id: 'a' }] }; + mergePartialStats(existing, { id: 8, topContainers: [] }); + expect(existing.topContainers).toEqual([]); + }); +}); + describe('definedPartialForStore - store payload drops placeholder sections but keeps loading', () => { it('drops a loading section, keeps loading + ready sections', () => { const partial: any = { From 99dc1044a427d38a9e370eb87346a69b5aa1e0bb Mon Sep 17 00:00:00 2001 From: Jarek Krochmalski Date: Thu, 24 Sep 2026 15:24:19 +0200 Subject: [PATCH 7/7] don't fail a restore redeploy when a follow-log stream is cancelled on container exit --- src/lib/server/docker.ts | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/lib/server/docker.ts b/src/lib/server/docker.ts index c3f0735e4..c24f85c53 100644 --- a/src/lib/server/docker.ts +++ b/src/lib/server/docker.ts @@ -5497,12 +5497,13 @@ async function streamLocalStderr( onStdout?: (data: string) => void ): Promise { const wantStdout = onStdout ? 'true' : 'false'; - // Pass the caller's abort signal to the fetch itself, not only to the reader below: - // with no body timeout on the streaming dispatcher, a fetch that stalls BEFORE the - // response arrives has no other bound, so container-exit must be able to cancel it. + // The abort signal cancels the READER on container exit (below), NOT the fetch itself: + // aborting the fetch surfaces as a thrown "operation aborted" that a caller without a + // .catch (restore redeploy) reads as a real failure. A pre-header stall is already + // bounded by undici's default headersTimeout, so the fetch needs no signal. const response = await dockerFetch( `/containers/${containerId}/logs?stdout=${wantStdout}&stderr=true&follow=true`, - { streaming: true, signal }, + { streaming: true }, envId );