Skip to content

Commit 9219ad1

Browse files
ryancbahanclaude
andcommitted
fix render lifecycle race: await ink unmount before resolving
renderTasks and renderSingleTask resolved their promises via onComplete={resolve}, which fires inside the React tree before ink unmounts. This caused the caller to write to stdout while ink was still tearing down, resulting in loading bars staying visible and last lines of output being cut off. Changed both functions to await render() (which awaits waitUntilExit()) before returning, matching the pattern the prompt functions already use. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 128f408 commit 9219ad1

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

  • packages/cli-kit/src/public/node

packages/cli-kit/src/public/node/ui.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -486,7 +486,7 @@ interface RenderTasksOptions {
486486
export async function renderTasks<TContext>(
487487
tasks: Task<TContext>[],
488488
{renderOptions, noProgressBar}: RenderTasksOptions = {},
489-
) {
489+
): Promise<TContext> {
490490
let taskResult: TContext
491491
await render(
492492
<Tasks

0 commit comments

Comments
 (0)