🎥 Make videos programmatically with React
Require nullable running app fields in Studio responses
Jonny Burger92fb60656757
diff --git a/packages/studio-shared/src/api-requests.ts b/packages/studio-shared/src/api-requests.tsindex 98c746caa8..7756001b2a 100644--- a/packages/studio-shared/src/api-requests.ts+++ b/packages/studio-shared/src/api-requests.ts@@ -1397,7 +1397,7 @@ export type GetDefaultEditorInfoRequest = {};export type EditorPickerId = BuiltInEditor | 'custom';export type GetDefaultEditorInfoResponse = {defaultEditor: EditorPickerId | null;- runningEditors?: readonly EditorPickerId[] | null;+ runningEditors: readonly EditorPickerId[] | null;installedEditors: {id: EditorPickerId;name: string;@@ -1408,7 +1408,7 @@ export type GetDefaultEditorInfoResponse = {export type GetDefaultCodingAgentInfoRequest = {};export type GetDefaultCodingAgentInfoResponse = {defaultCodingAgent: DefaultCodingAgent | null;- runningCodingAgents?: readonly DefaultCodingAgent[] | null;+ runningCodingAgents: readonly DefaultCodingAgent[] | null;installedCodingAgents: {id: DefaultCodingAgent;name: string;diff --git a/packages/studio/src/test/composition-menu-items.test.ts b/packages/studio/src/test/composition-menu-items.test.tsindex 651f72910e..dde1eca2fa 100644--- a/packages/studio/src/test/composition-menu-items.test.ts+++ b/packages/studio/src/test/composition-menu-items.test.ts@@ -106,6 +106,7 @@ const commonArgs = {defaultEditorName: 'Code',editorInfo: {defaultEditor: 'vscode' as const,+ runningEditors: null,installedEditors: [{id: 'vscode' as const, name: 'Code', nameWithType: 'Code'},],@@ -323,6 +324,7 @@ test('interactive composition context menus list GitHub as an alternative', () =...commonArgs.openInApps,codingAgentInfo: {defaultCodingAgent: 'cursor',+ runningCodingAgents: null,installedCodingAgents: [{id: 'cursor',@@ -335,6 +337,7 @@ test('interactive composition context menus list GitHub as an alternative', () =},editorInfo: {defaultEditor: 'vscode',+ runningEditors: null,installedEditors: [{id: 'vscode', name: 'Code', nameWithType: 'Code'},{id: 'cursor', name: 'Cursor', nameWithType: 'Cursor Editor'},diff --git a/packages/studio/src/test/default-editor-info.test.ts b/packages/studio/src/test/default-editor-info.test.tsindex fae29ec297..5a48f1d344 100644--- a/packages/studio/src/test/default-editor-info.test.ts+++ b/packages/studio/src/test/default-editor-info.test.ts@@ -34,6 +34,7 @@ test('prefers the running editor when one is detected', () => {expect(getPreferredEditorId({defaultEditor: null,+ runningEditors: null,installedEditors: [{id: 'zed', name: 'Zed', nameWithType: 'Zed'},{id: 'cursor', name: 'Cursor', nameWithType: 'Cursor Editor'},@@ -48,6 +49,7 @@ test('falls back if the detected editor is not in the installed list', () => {expect(getPreferredEditorId({defaultEditor: null,+ runningEditors: null,installedEditors: [{id: 'zed', name: 'Zed', nameWithType: 'Zed'},{id: 'cursor', name: 'Cursor', nameWithType: 'Cursor Editor'},@@ -62,6 +64,7 @@ test('prefers the configured default editor before the detected editor', () => {expect(getPreferredEditorId({defaultEditor: 'cursor',+ runningEditors: null,installedEditors: [{id: 'zed', name: 'Zed', nameWithType: 'Zed'},{id: 'cursor', name: 'Cursor', nameWithType: 'Cursor Editor'},@@ -76,6 +79,7 @@ test('returns null when no editor is installed', () => {expect(getPreferredEditorId({defaultEditor: null,+ runningEditors: null,installedEditors: [],}),).toBe(null);@@ -94,6 +98,7 @@ test('falls back to Zed, VS Code, Cursor, then alphabetical order', () => {expect(getPreferredEditorId({defaultEditor: null,+ runningEditors: null,installedEditors: [{id: 'cursor', name: 'Cursor', nameWithType: 'Cursor Editor'},{id: 'vscode', name: 'Code', nameWithType: 'Code'},@@ -105,6 +110,7 @@ test('falls back to Zed, VS Code, Cursor, then alphabetical order', () => {expect(getPreferredEditorId({defaultEditor: null,+ runningEditors: null,installedEditors: [{id: 'cursor', name: 'Cursor', nameWithType: 'Cursor Editor'},{id: 'vscode', name: 'Code', nameWithType: 'Code'},@@ -115,6 +121,7 @@ test('falls back to Zed, VS Code, Cursor, then alphabetical order', () => {expect(getPreferredEditorId({defaultEditor: null,+ runningEditors: null,installedEditors: [{id: 'webstorm', name: 'WebStorm', nameWithType: 'WebStorm'},{diff --git a/packages/studio/src/test/sequence-context-menu-items.test.ts b/packages/studio/src/test/sequence-context-menu-items.test.tsindex fdf7b12221..13a5739599 100644--- a/packages/studio/src/test/sequence-context-menu-items.test.ts+++ b/packages/studio/src/test/sequence-context-menu-items.test.ts@@ -236,6 +236,7 @@ test('sequence context menu shares alternate apps without repeating defaults', (canOpenInEditor: true,codingAgentInfo: {defaultCodingAgent: 'cursor',+ runningCodingAgents: null,installedCodingAgents: [{id: 'cursor',@@ -257,6 +258,7 @@ test('sequence context menu shares alternate apps without repeating defaults', (duplicateDisabled: false,editorInfo: {defaultEditor: 'cursor',+ runningEditors: null,installedEditors: [{id: 'cursor',