Skip to content

Keep JSON prompts and concurrent process output on stderr - #8804

Open
isaacroldan wants to merge 1 commit into
mainfrom
codex/json-ui-routing
Open

isaacroldan wants to merge 1 commit into
mainfrom
codex/json-ui-routing

Conversation

@isaacroldan

@isaacroldan isaacroldan commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor

WHY are these changes introduced?

Interactive prompts and concurrent process output can write terminal text to stdout in JSON mode, which prevents commands from returning one parseable JSON document.

This is the shared UI prerequisite for #8801.

WHAT is this pull request doing?

Send finite concurrent process output as JSON diagnostic and progress events to stderr. Send interactive UI to stderr in JSON mode while preserving input policy and streaming behavior.

How to manually test your changes?

With dependent PR #8801 checked out, use a disposable local app with installed dependencies:

  1. Run shopify app build --path <app> --skip-dependencies-installation --json --no-input > build.json 2> build.events.jsonl. Check that stdout contains one result and build output appears as events on stderr.
  2. After deleting a previously selected config in an app with at least two remaining configs, repeat without --no-input. Select a config and check that the prompt appears on stderr while stdout remains valid JSON.
  3. Repeat without --json and check that normal build output remains.

Validation

70 focused UI tests passed, including existing task and concurrent-output tests. CLI Kit build, type checks, scoped lint, and Knip passed. Full CI and other operating systems were not run locally.

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
  • Added a CLI Kit patch changeset.

@isaacroldan
isaacroldan requested a review from a team as a code owner October 6, 2026 16:27
@github-actions github-actions Bot added the Area: @shopify/cli @shopify/cli package issues label Oct 6, 2026
@github-actions

github-actions Bot commented Oct 6, 2026

Copy link
Copy Markdown
Contributor

Differences in type declarations

We detected differences in the type declarations generated by Typescript for this branch compared to the baseline ('main' branch). Please, review them to ensure they are backward-compatible. Here are some important things to keep in mind:

  • Some seemingly private modules might be re-exported through public modules.
  • If the branch is behind main you might see odd diffs, rebase main into this branch.

New type declarations

We found no new type declarations in this PR

Existing type declarations

packages/cli-kit/dist/private/node/ui/components/ConcurrentOutput.d.ts
@@ -1,4 +1,4 @@
-import { OutputProcess } from '../../../../public/node/output.js';
+import { type OutputProcess } from '../../../../public/node/output.js';
 import { AbortSignal } from '../../../../public/node/abort.js';
 import { FunctionComponent } from 'react';
 export interface ConcurrentOutputProps {
@@ -14,6 +14,8 @@ interface ConcurrentOutputContext {
     stripAnsi?: boolean;
 }
 declare function useConcurrentOutputContext<T>(context: ConcurrentOutputContext, callback: () => T): T;
+/** Runs finite processes concurrently and routes their output through the shared diagnostic context. */
+export declare function runConcurrentProcessesForJson({ processes, abortSignal, }: Pick<ConcurrentOutputProps, 'processes' | 'abortSignal'>): Promise<void>;
 /**
  * Renders output from concurrent processes to the terminal.
  * Output will be divided in a three column layout

@isaacroldan isaacroldan mentioned this pull request Oct 6, 2026
1 of 4 tasks
@isaacroldan
isaacroldan added this pull request to stack #8805 October 6, 2026 16:32

This branch has not been deployed

No deployments
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