windmill-labs/windmill · error
No app draft found for "${path}".
Error message
No app draft found for "${path}". What it means
Thrown by rebaseAppDraft when no app draft is stored for the path, or the draft value is a string or lacks a `files` field (i.e. not a real app draft). The app rebase returns the draft's changes versus its fork base as a diff; with no valid draft there is nothing to diff.
Source
Thrown at frontend/src/lib/components/copilot/chat/global/core.ts:6367
success: true,
message:
`Discarded the stale draft for "${path}". Your changes are in "your_changes" (a JSON diff against ` +
`the version you forked from). Re-apply them with the flow edit tools — the new draft will be ` +
`based on the latest deployed version (version ${latest.version_id}) — then deploy.`,
latest_version: latest.version_id,
your_changes: yourChanges
},
null,
2
)
}
async function rebaseAppDraft(path: string, ctx: WriteDraftCtx): Promise<string> {
const { workspace, toolId, toolCallbacks } = ctx
const draft = await getGlobalDraft(workspace, 'app', path)
if (!draft || !draft.value || typeof draft.value === 'string' || !('files' in draft.value)) {
throw new Error(`No app draft found for "${path}".`)
}
if (!(await AppService.existsApp({ workspace, path }))) {
throw new Error(`App "${path}" is not deployed; there is no newer version to rebase onto.`)
}
const deployed = await AppService.getAppByPath({ workspace, path })
const headVersion = deployed.versions?.[deployed.versions.length - 1]
const baseVersion = draft.parentVersionId
if (baseVersion != null && baseVersion === headVersion) {
const message = `Draft "${path}" is already based on the latest deployed version (${headVersion}).`
toolCallbacks.setToolStatus(toolId, { content: message })
return JSON.stringify({
success: true,
alreadyLatest: true,
latest_version: headVersion,
message
})
}View on GitHub (pinned to e474e8803c)
Solutions
- Create an app draft (edit the app or use the app write tools) before rebasing
- Verify the path points at an app that actually has a draft
- If the draft was discarded, re-apply the saved your_changes diff with the app tools
Defensive patterns
Strategy: try-catch
When it happens
Trigger: Thrown at frontend/src/lib/components/copilot/chat/global/core.ts:6367 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of windmill-labs/windmill@e474e8803c (2026-09-03).
Data as JSON: /api/errors/c8363338c61b64af.
Report an issue: GitHub.