Add a spinner to coder --dev while the server boots

47bfbc2dc617 · AtlantisPleb · · parent faeff9918721

Add a spinner to coder --dev while the server boots

The dev server first boot compiles, which can take a minute with no
feedback. startDevServer now reports elapsed time, and the CLI draws a
spinner on the same line so the reader sees the wait is alive.

Generated with [Devin](https://devin.ai)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-Authored-By
Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>

Deploy story

What this commit did to the running system — joined from the forge receipt chain, the part a commit page elsewhere cannot show.

Not deployed through the forge lane

No push, promotion, build, or deploy receipt references this commit (receipts are scanned over a bounded recent window). Changes shipped by full node replacement carry their proof in the release gate receipt instead.

Changed files

  • modified packages/openagents-cli/src/cli.ts
  • modified packages/openagents-cli/src/coder-dev-server.ts

Diff

2 files changed, +13 -1

packages/openagents-cli/src/cli.ts modified +8

@@ -1860,9 +1860,17 @@ const coderCommand = Command.make(

1860 1860
            notice: (message) => {
1861 1861
              process.stderr.write(`${message}\n`);
1862 1862
            },
1863
            onProgress: (elapsedMs) => {
1864
              const elapsed = Math.floor(elapsedMs / 1_000);
1865
              const frame = ["⠋", "⠙", "⠹", "⠸", "⠼", "⠴", "⠦", "⠧", "⠇", "⠏"];
1866
              process.stderr.write(
1867
                `\r${frame[elapsed % frame.length]} Compiling openagents.com... ${elapsed}s`,
1868
              );
1869
            },
1863 1870
          }),
1864 1871
        );
1865 1872
1873
        process.stderr.write("\n");
1866 1874
        if (boot.refusal !== undefined) {
1867 1875
          return yield* new InputError({ message: boot.refusal });
1868 1876
        }
packages/openagents-cli/src/coder-dev-server.ts modified +5 -1

@@ -109,12 +109,15 @@ export const startDevServer = async (

109 109
  origin: string,
110 110
  options: {
111 111
    readonly notice?: (message: string) => void;
112
    readonly onProgress?: (elapsedMs: number) => void;
112 113
    readonly timeoutMs?: number;
113 114
    readonly cwd?: string;
114 115
  } = {},
115 116
): Promise<DevServerStart> => {
116 117
  const notice = options.notice ?? (() => undefined);
117
  const deadline = Date.now() + (options.timeoutMs ?? 240_000);
118
  const onProgress = options.onProgress ?? (() => undefined);
119
  const start = Date.now();
120
  const deadline = start + (options.timeoutMs ?? 240_000);
118 121
119 122
  const current = await health(origin);
120 123
  if (current === "ok") return { started: false };

@@ -155,6 +158,7 @@ export const startDevServer = async (

155 158
156 159
  let migrated = false;
157 160
  for (;;) {
161
    onProgress(Date.now() - start);
158 162
    if (Date.now() > deadline) {
159 163
      return {
160 164
        started: false,

This page updates live while a promote is in flight · changelog