Skip to content

Conversation

@ericlee878
Copy link
Contributor

@ericlee878 ericlee878 commented Jan 23, 2026

Inspired by: https://docs.google.com/document/d/1zZVFeZn2jWbPI8pS9XvMMcXvNwXHKnEQoSGYeBMHyGk/edit?tab=t.0

Resolves: https://github.com/orgs/shop/projects/208/views/34?pane=issue&itemId=3840287153&issue=shop%7Cissues-api-foundations%7C1311

Problem

Users experience a noticeable delay (~1-3 seconds) between hitting enter and seeing any output. During this time, the CLI is performing necessary async operations (authentication, API version resolution) but provides no visual feedback, making the tool feel unresponsive.

Solution

Add a renderInfo call at the very start of each command's run() method, before any async work begins:

  • app execute: "Preparing GraphQL operation..."
  • app bulk execute: "Preparing bulk operation..."

Why this approach

This change may seem minimal, but it's the earliest possible point we can provide feedback.
The delay occurs during:

  1. prepareExecuteContext() - parses flags, validates query, loads app context, selects store
  2. createAdminSessionAsApp() - authenticates with Shopify
  3. resolveApiVersion() - determines API version

We cannot include the detailed info (store, app, API version) in this initial message because that information isn't available yet - it's the result of the async operations causing the delay.

There is still some lag at the beginning. Eliminating this lag entirely would require adding feedback to all Shopify CLI commands at the framework level, which is out of scope for this change.

Future considerations

If the two info banners ("Preparing..." followed by "Starting bulk operation" with details) feel like too much output, we could:

  1. Remove the second detailed banner.
  2. Move that detailed information to the final success/result output instead.

Tophatting

Before:

Screen Recording 2026-01-22 at 5.41.18 PM.mov (uploaded via Graphite)

After:
Screen Recording 2026-01-22 at 5.36.51 PM.mov (uploaded via Graphite)

Copy link
Contributor Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

@ericlee878 ericlee878 changed the title additional ui feedback Command Lagginess Jan 23, 2026
@ericlee878 ericlee878 changed the title Command Lagginess Immediate UI feedback for shopify app execute and shopify app bulk execute Jan 23, 2026
@github-actions
Copy link
Contributor

github-actions bot commented Jan 23, 2026

Coverage report

St.
Category Percentage Covered / Total
🟡 Statements
79.53% (+0.3% 🔼)
14378/18079
🟡 Branches
73.84% (+0.73% 🔼)
7114/9634
🟡 Functions
79.66% (+0.29% 🔼)
3674/4612
🟡 Lines
79.89% (+0.3% 🔼)
13591/17013
Show new covered files 🐣
St.
File Statements Branches Functions Lines
🟢
... / admin-as-app.ts
100% 100% 100% 100%
🟢
... / metafield_definitions.ts
100% 100% 100% 100%
🟢
... / metaobject_definitions.ts
100% 100% 100% 100%
🟢
... / bulk-operation-cancel.ts
100% 100% 100% 100%
🟢
... / bulk-operation-run-mutation.ts
100% 100% 100% 100%
🟢
... / bulk-operation-run-query.ts
100% 100% 100% 100%
🟢
... / get-bulk-operation-by-id.ts
100% 100% 100% 100%
🟢
... / list-bulk-operations.ts
100% 100% 100% 100%
🟢
... / staged-uploads-create.ts
100% 100% 100% 100%
🟢
... / fetch_store_by_domain.ts
100% 100% 100% 100%
🟢
... / organization_exp_flags.ts
100% 100% 100% 100%
🔴
... / import-custom-data-definitions.ts
0% 100% 0% 0%
🔴
... / cancel.ts
0% 100% 0% 0%
🔴
... / execute.ts
0% 0% 0% 0%
🔴
... / status.ts
0% 0% 0% 0%
🔴
... / pull.ts
0% 100% 0% 0%
🟡
... / execute-operation.ts
75% 50% 100% 75%
🔴
... / pull.ts
0% 0% 0% 0%
🟢
... / bulk-operation-status.ts
96.55% 92.11% 100% 100%
🟢
... / cancel-bulk-operation.ts
100% 100% 100% 100%
🟢
... / constants.ts
100% 100% 100% 100%
🟢
... / download-bulk-operation-results.ts
100% 100% 100% 100%
🟢
... / execute-bulk-operation.ts
86.76% 83.67% 100% 88.06%
🟢
... / format-bulk-operation-status.ts
100% 100% 100% 100%
🟢
... / run-mutation.ts
100% 100% 100% 100%
🟢
... / run-query.ts
100% 100% 100% 100%
🟡
... / stage-file.ts
73.53% 62.5% 85.71% 72.73%
🟢
... / watch-bulk-operation.ts
100% 94.74% 100% 100%
🟢
... / utilities.ts
100% 100% 100% 100%
🟢
... / declarative-definitions.ts
98.54% 93.18% 100% 98.51%
🟢
... / common.ts
97.62% 95% 100% 97.06%
🟢
... / execute-command-helpers.ts
100% 100% 100% 100%
🟢
... / file-formatter.ts
100% 100% 100% 100%
🔴
... / promiseWithResolvers.ts
33.33% 50% 50% 33.33%
Show files with reduced coverage 🔻
St.
File Statements Branches Functions Lines
🔴
... / execute.ts
0%
0% (-100% 🔻)
0% 0%
🟢
... / loader.ts
94.06% (+0.2% 🔼)
86.41% (-0.42% 🔻)
97.17% (+0.11% 🔼)
94.85% (+0.18% 🔼)
🟢
... / extension-instance.ts
84.8% (+0.23% 🔼)
77.6% (-0.91% 🔻)
92.06% (+0.13% 🔼)
85.11% (+0.24% 🔼)
🟡
... / specification.ts
69.64% (+0.55% 🔼)
75.61% (+2.44% 🔼)
76.47% (-1.31% 🔻)
69.39% (+0.64% 🔼)
🟢
... / ui_extension.ts
88.61% (-6.22% 🔻)
78.57% (-2.68% 🔻)
85.19% (-14.81% 🔻)
90.79% (-5.67% 🔻)
🟢
... / store-context.ts
100%
82.35% (-0.98% 🔻)
100% 100%
🟢
... / Logs.tsx
90%
90.91% (-5.97% 🔻)
100% 90%
🟢
... / fetch.ts
84.21% (+0.88% 🔼)
82.35% (-0.98% 🔻)
75%
85.29% (+1.42% 🔼)
🟢
... / app-event-watcher-handler.ts
86.36% (-4.11% 🔻)
75% 86.67%
85.71% (-5.19% 🔻)
🟡
... / middlewares.ts
77.33% (-0.87% 🔻)
75%
68.42% (-1.58% 🔻)
76.39% (-0.94% 🔻)
🔴
... / server.ts
1.23% (-0.02% 🔻)
0% 0%
1.3% (-0.02% 🔻)
🟢
... / bundle.ts
93.22%
63.33% (-3.33% 🔻)
94.12% (+5.88% 🔼)
96.3%
🟢
... / developer-platform-client.ts
84.62% (-1.5% 🔻)
71.43% (+0.84% 🔼)
81.82% (+1.82% 🔼)
93.75% (+0.42% 🔼)
🔴
... / http-reverse-proxy.ts
58.97% (-4.91% 🔻)
37.04% (-2.96% 🔻)
58.33% (-5.3% 🔻)
59.46% (-5.25% 🔻)
🟢
... / api.ts
87.07% (-0.43% 🔻)
76.71% (-0.1% 🔻)
100%
86.49% (-0.43% 🔻)
🟢
... / device-authorization.ts
88.24% (-0.83% 🔻)
76.47% (-2.94% 🔻)
100%
88.24% (-0.83% 🔻)
🟢
... / SingleTask.tsx
84.21% (-15.79% 🔻)
50% (-50% 🔻)
80% (-20% 🔻)
84.21% (-15.79% 🔻)
🔴
... / environment.ts
35% (-5% 🔻)
41.18%
40% (-10% 🔻)
36.84% (-5.26% 🔻)
🔴
... / ui.tsx
50.82% (-0.79% 🔻)
42.86% (-5.53% 🔻)
54.55% (+1.42% 🔼)
50% (-0.82% 🔻)
🟡
... / local.ts
68.63% (-1.37% 🔻)
56.25% (-1.2% 🔻)
54.55% (-2.6% 🔻)
68.63% (-1.37% 🔻)
🟢
... / console.ts
81.82% (+15.15% 🔼)
75% (-25% 🔻)
100% (+33.33% 🔼)
81.82% (+15.15% 🔼)
🟢
... / init.ts
88% (-0.89% 🔻)
71.43% (+4.76% 🔼)
86.67% (+4.85% 🔼)
88% (-0.89% 🔻)
🟢
... / storefront-renderer.ts
90.2% (-0.54% 🔻)
78.95%
81.82% (-1.52% 🔻)
90.2% (-0.54% 🔻)
🟡
... / theme-polling.ts
67.57% (-0.49% 🔻)
68.75% 78.57%
66.18% (-1.47% 🔻)

Test suite run success

3689 tests passing in 1431 suites.

Report generated by 🧪jest coverage report action from f689efe

@ericlee878 ericlee878 marked this pull request as ready for review January 23, 2026 01:42
@ericlee878 ericlee878 requested a review from a team as a code owner January 23, 2026 01:42
@github-actions
Copy link
Contributor

We detected some changes at packages/*/src and there are no updates in the .changeset.
If the changes are user-facing, run pnpm changeset add to track your changes and include them in the next release CHANGELOG.

Caution

DO NOT create changesets for features which you do not wish to be included in the public changelog of the next CLI release.

@ericlee878 ericlee878 force-pushed the more-responsive-ui-for-beginning-of-cli branch from 4876c88 to f689efe Compare January 23, 2026 01:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant