Skip to content

Fix loading bar cleanup when tasks log messages - #8531

Open
gonzaloriestra wants to merge 1 commit into
mainfrom
gonzalo/fix-ink-log-cleanup
Open

Fix loading bar cleanup when tasks log messages#8531
gonzaloriestra wants to merge 1 commit into
mainfrom
gonzalo/fix-ink-log-cleanup

Conversation

@gonzaloriestra

@gonzaloriestra gonzaloriestra commented Sep 11, 2026

Copy link
Copy Markdown
Contributor

WHY are these changes introduced?

Calling outputInfo() or outputWarn() during an Ink task writes directly to stderr, leaving the loading bar behind when the task finishes.

WHAT is this pull request doing?

Send stderr logs through Ink's existing console interception so messages remain visible and the task UI clears correctly. Add regression coverage for info/warning logs, task cleanup, and results staying on stdout.

How to manually test your changes?

pnpm exec nx build cli-kit

node --input-type=module -e '
import {renderSingleTask} from "./packages/cli-kit/dist/public/node/ui.js";
import {outputInfo, outputWarn, outputResult, TokenizedString} from "./packages/cli-kit/dist/public/node/output.js";
import {setTimeout as sleep} from "node:timers/promises";
await renderSingleTask({title: new TokenizedString("Preparing the result"), task: async () => {
  await sleep(1000);
  outputInfo("Prepared an item");
  outputWarn("Sample warning");
}});
outputResult("Done");
'
Before After
image image

Checklist

  • I've considered possible cross-platform impacts (Mac, Linux, Windows)
  • I've considered possible documentation changes
  • I've considered analytics changes to measure impact
  • The change is user-facing — I've identified the correct bump type (patch for bug fixes · minor for new features · major for breaking changes) and added a changeset with pnpm changeset add

@github-actions github-actions Bot added the Area: @shopify/cli @shopify/cli package issues label Sep 11, 2026
@gonzaloriestra
gonzaloriestra force-pushed the gonzalo/fix-ink-log-cleanup branch from 6274e50 to dddec36 Compare September 11, 2026 13:47
@gonzaloriestra
gonzaloriestra marked this pull request as ready for review September 11, 2026 13:52
@gonzaloriestra
gonzaloriestra requested a review from a team as a code owner September 11, 2026 13:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area: @shopify/cli @shopify/cli package issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant