Skip to content

Commit 6e6b8d4

Browse files
nickwesselmanclaude
andcommitted
Add JSDoc to terminalSupportsHyperlinks and restore missing JSDoc on terminalSupportsPrompting
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 3d38f4a commit 6e6b8d4

2 files changed

Lines changed: 17 additions & 8 deletions

File tree

packages/app/src/cli/services/dev/ui/components/DevSessionUI.test.tsx

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -568,11 +568,13 @@ describe('DevSessionUI', () => {
568568

569569
await waitForInputsToBeReady()
570570

571-
// Then - shortcuts should be present but URL list should be hidden
571+
// Then - shortcuts with label text should be present but URL list should be hidden
572572
const output = unstyled(renderInstance.lastFrame()!)
573-
expect(output).toContain('(p)')
574-
expect(output).toContain('(g)')
573+
expect(output).toContain('(p) Open app preview')
574+
expect(output).toContain('(c) Open Dev Console for extension previews')
575+
expect(output).toContain('(g) Open GraphiQL (Admin API)')
575576
expect(output).not.toContain('Preview URL:')
577+
expect(output).not.toContain('Dev Console URL:')
576578
expect(output).not.toContain('GraphiQL URL:')
577579

578580
renderInstance.unmount()
@@ -595,11 +597,13 @@ describe('DevSessionUI', () => {
595597

596598
await waitForInputsToBeReady()
597599

598-
// Then - both shortcuts and URL list should be present
600+
// Then - both shortcuts with label text and URL list should be present
599601
const output = unstyled(renderInstance.lastFrame()!)
600-
expect(output).toContain('(p)')
601-
expect(output).toContain('(g)')
602+
expect(output).toContain('(p) Open app preview')
603+
expect(output).toContain('(c) Open Dev Console for extension previews')
604+
expect(output).toContain('(g) Open GraphiQL (Admin API)')
602605
expect(output).toContain('Preview URL: https://shopify.com')
606+
expect(output).toContain('Dev Console URL: https://mystore.myshopify.com/admin?dev-console=show')
603607
expect(output).toContain('GraphiQL URL: https://graphiql.shopify.com')
604608

605609
renderInstance.unmount()

packages/cli-kit/src/public/node/system.ts

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -348,14 +348,19 @@ export async function sleep(seconds: number): Promise<void> {
348348
}
349349

350350
/**
351-
* Check if the standard input and output streams support prompting.
351+
* Check if the terminal supports OSC 8 hyperlinks.
352352
*
353-
* @returns True if the standard input and output streams support prompting.
353+
* @returns True if the terminal supports hyperlinks.
354354
*/
355355
export function terminalSupportsHyperlinks(): boolean {
356356
return supportsHyperlinks.stdout
357357
}
358358

359+
/**
360+
* Check if the standard input and output streams support prompting.
361+
*
362+
* @returns True if the standard input and output streams support prompting.
363+
*/
359364
export function terminalSupportsPrompting(): boolean {
360365
if (isTruthy(process.env.CI)) {
361366
return false

0 commit comments

Comments
 (0)