diff --git a/CHANGELOG.md b/CHANGELOG.md index ff1e602..f73eed5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,15 @@ Updating is changing the image tag and redeploying. The database migrates itself forward on start, and no release so far has needed anything else — where a release changes what your listeners see, it says so. +## 1.11.1 — 2026-11-06 + +### Fixed + +- **Creating a show that was refused said only "Something went wrong."** The reason — + a folder name already in use, a name that can't be a folder, or a shows folder + SelfPod can't write to — was thrown away by the page. It now appears under the field + in the *New show* dialog. + ## 1.11.0 — 2026-10-28 ### Added — adverts a host inserts as it serves, whatever their language diff --git a/README.md b/README.md index 59059cf..4820da3 100644 --- a/README.md +++ b/README.md @@ -382,7 +382,7 @@ Reading the words is the slow part of a pass. With an NVIDIA card, use the GPU i instead of the regular one — same app, same data, different tag: ``` -ghcr.io/meetvox-ai/selfpod:1.11.0-cuda +ghcr.io/meetvox-ai/selfpod:1.11.1-cuda ``` It is amd64 only, about two and a half gigabytes, and uses the `small` model by default, diff --git a/package-lock.json b/package-lock.json index eed017a..4d7983e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "selfpod", - "version": "1.11.0", + "version": "1.11.1", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "selfpod", - "version": "1.11.0", + "version": "1.11.1", "license": "MIT", "dependencies": { "@fastify/compress": "9.2.1", diff --git a/package.json b/package.json index 94d06a9..896c949 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "selfpod", - "version": "1.11.0", + "version": "1.11.1", "description": "SelfPod — a self-hosted podcast server. Drop a file in a folder; it's an episode.", "license": "MIT", "type": "module", diff --git a/src/web/routes/fragments.js b/src/web/routes/fragments.js index 1ae5e11..c845e4f 100644 --- a/src/web/routes/fragments.js +++ b/src/web/routes/fragments.js @@ -965,7 +965,10 @@ export default async function fragmentRoutes(fastify, services) { return reply.send(''); } catch (err) { if (!err.status || err.status >= 500) throw err; - reply.status(err.status); + // 422 whatever the cause (bad name, folder taken, folder not writable): the + // browser only swaps a 422 into the modal, and any other status would be + // reported as a bare "Something went wrong" with the real reason discarded. + reply.status(422); return reply.view('partials/modal-new-show.eta', { title: request.body?.title, slug: request.body?.slug, diff --git a/test/integration/ui.test.js b/test/integration/ui.test.js index b93fa92..bbde634 100644 --- a/test/integration/ui.test.js +++ b/test/integration/ui.test.js @@ -265,6 +265,18 @@ describe('htmx fragments', () => { assert.equal(server.shows.get(show.id).title, 'No JS Title'); }); + it('answers a refused new show with 422, so the modal can show the reason', async () => { + const show = await seed(); + await server.login(); + // 409 and 400 used to leave the modal untouched with a bare "Something went wrong". + const taken = await server.post('/ui/shows', { title: 'Again', slug: show.slug }, { 'hx-request': 'true' }); + assert.equal(taken.statusCode, 422); + assert.ok(taken.body.includes('already uses the folder name')); + const bad = await server.post('/ui/shows', { title: 'Bad', slug: '..' }, { 'hx-request': 'true' }); + assert.equal(bad.statusCode, 422); + assert.ok(/be used as a folder name/.test(bad.body)); + }); + it('requires the exact folder name before deleting a show', async () => { const show = await seed(); await server.login();