feat: show which part of the copy a fork being created is in

The background copy reports its phase (data tables, settings, resources,
scripts, flows, apps, drafts, triggers) through a watch channel. The heartbeat
task records it on the fork's creation row as soon as it changes, and
fork_creation_status returns it. The fork wizard shows it on its button, and
the CLI logs each step.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Ruben Fiszel
2026-09-29 12:33:08 +02:00
co-authored by Claude Opus 5.5
parent fd032a16c5
commit 1d52d20dee
7 changed files with 100 additions and 29 deletions
+5
View File
@@ -30,6 +30,7 @@ import {
*/
async function waitForForkCreation(parentWorkspace: string, forkId: string) {
let failedPolls = 0;
let lastStep: string | undefined;
while (true) {
let result:
| Awaited<ReturnType<typeof wmill.getForkCreationStatus>>
@@ -47,6 +48,10 @@ async function waitForForkCreation(parentWorkspace: string, forkId: string) {
if (exists) return;
if (++failedPolls >= 10) throw e;
}
if (result?.status === "running" && result.step && result.step !== lastStep) {
lastStep = result.step;
log.info(colors.gray(`${lastStep}...`));
}
if (result?.status === "completed") return;
if (result?.status === "failed") {
throw new Error(result.error ?? "Unknown error");