{"record":{"id":"17005bde7c44cf66","repo":"windmill-labs/windmill","slug":"app-path-is-not-deployed-there-is-no-newer-v","errorCode":null,"errorMessage":"App \"${path}\" is not deployed; there is no newer version to rebase onto.","messagePattern":"App \"(.+?)\" is not deployed; there is no newer version to rebase onto\\.","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"frontend/src/lib/components/copilot/chat/global/core.ts","lineNumber":6370,"sourceCode":"\t\t\t\t`the version you forked from). Re-apply them with the flow edit tools — the new draft will be ` +\n\t\t\t\t`based on the latest deployed version (version ${latest.version_id}) — then deploy.`,\n\t\t\tlatest_version: latest.version_id,\n\t\t\tyour_changes: yourChanges\n\t\t},\n\t\tnull,\n\t\t2\n\t)\n}\n\nasync function rebaseAppDraft(path: string, ctx: WriteDraftCtx): Promise<string> {\n\tconst { workspace, toolId, toolCallbacks } = ctx\n\n\tconst draft = await getGlobalDraft(workspace, 'app', path)\n\tif (!draft || !draft.value || typeof draft.value === 'string' || !('files' in draft.value)) {\n\t\tthrow new Error(`No app draft found for \"${path}\".`)\n\t}\n\tif (!(await AppService.existsApp({ workspace, path }))) {\n\t\tthrow new Error(`App \"${path}\" is not deployed; there is no newer version to rebase onto.`)\n\t}\n\n\tconst deployed = await AppService.getAppByPath({ workspace, path })\n\tconst headVersion = deployed.versions?.[deployed.versions.length - 1]\n\tconst baseVersion = draft.parentVersionId\n\tif (baseVersion != null && baseVersion === headVersion) {\n\t\tconst message = `Draft \"${path}\" is already based on the latest deployed version (${headVersion}).`\n\t\ttoolCallbacks.setToolStatus(toolId, { content: message })\n\t\treturn JSON.stringify({\n\t\t\tsuccess: true,\n\t\t\talreadyLatest: true,\n\t\t\tlatest_version: headVersion,\n\t\t\tmessage\n\t\t})\n\t}\n\n\ttoolCallbacks.setToolStatus(toolId, { content: `Rebasing draft \"${path}\" onto latest...` })\n","sourceCodeStart":6352,"sourceCodeEnd":6388,"githubUrl":"https://github.com/windmill-labs/windmill/blob/e474e8803ce2ff5c2df09a58dab51d45f5c922ca/frontend/src/lib/components/copilot/chat/global/core.ts#L6352-L6388","documentation":"Thrown by rebaseAppDraft when the app draft exists but the app has no deployed version with files to diff against. Rebase ports draft changes onto a newer deploy; with no deploy there is no target, so the operation is rejected rather than producing a meaningless diff.","triggerScenarios":"Thrown at frontend/src/lib/components/copilot/chat/global/core.ts:6370 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Deploy the app first; rebase only once a newer deploy exists","Deploy the draft directly — with no prior deploy the draft is already current","Confirm you targeted the correct app path and workspace"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"e474e8803ce2ff5c2df09a58dab51d45f5c922ca","analyzedAt":"2026-09-03T12:38:19.024Z","contentChangedAt":"2026-09-03T12:38:19.024Z","schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}