From c57ec96e62fb83b691755ed024f867d1ae946fa9 Mon Sep 17 00:00:00 2001 From: nicktrn <55853254+nicktrn@users.noreply.github.com> Date: Thu, 2 Jul 2026 18:39:30 +0100 Subject: [PATCH] fix(webapp): allow resuming manually paused environments --- .server-changes/fix-resume-user-paused-environment.md | 6 ++++++ apps/webapp/app/v3/services/pauseEnvironment.server.ts | 7 ++++++- 2 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 .server-changes/fix-resume-user-paused-environment.md diff --git a/.server-changes/fix-resume-user-paused-environment.md b/.server-changes/fix-resume-user-paused-environment.md new file mode 100644 index 0000000000..2be70288a1 --- /dev/null +++ b/.server-changes/fix-resume-user-paused-environment.md @@ -0,0 +1,6 @@ +--- +area: webapp +type: fix +--- + +Fixed manually paused environments not being resumable. Resuming incorrectly failed with a billing-limit error even when no billing limit was in effect. diff --git a/apps/webapp/app/v3/services/pauseEnvironment.server.ts b/apps/webapp/app/v3/services/pauseEnvironment.server.ts index 4311edbee3..4cafbac140 100644 --- a/apps/webapp/app/v3/services/pauseEnvironment.server.ts +++ b/apps/webapp/app/v3/services/pauseEnvironment.server.ts @@ -78,7 +78,12 @@ export class PauseEnvironmentService extends WithRunEngine { const resumed = await this._prisma.runtimeEnvironment.updateMany({ where: { id: environment.id, - NOT: { pauseSource: EnvironmentPauseSource.BILLING_LIMIT }, + // NOT on a nullable field excludes NULL rows in Prisma, which made + // user-paused envs (pauseSource null) unresumable. + OR: [ + { pauseSource: null }, + { NOT: { pauseSource: EnvironmentPauseSource.BILLING_LIMIT } }, + ], }, data: { paused: false,