Skip to content

Conversation

@kylecarbs
Copy link
Member

No description provided.

@kylecarbs kylecarbs self-assigned this Nov 16, 2025
Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines 412 to 416
} as unknown as IPCApi;

// @ts-expect-error - mockApi is not typed correctly
// eslint-disable-next-line no-restricted-syntax
window.api = mockApi;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Avoid clobbering global window.api in stories

The story builds a mock with only workspace.executeBash and then assigns it directly to window.api, permanently replacing whatever API Storybook configured. Because that global is shared across all stories, any story visited after this one that expects other IPC methods (config, dialogs, etc.) will now find them missing and fail until the page reloads. Merging the mock with the existing object and restoring it on unmount would prevent cross‑story breakage.

Useful? React with 👍 / 👎.

@kylecarbs kylecarbs merged commit 13c3c91 into main Nov 16, 2025
12 of 13 checks passed
@kylecarbs kylecarbs deleted the review-panel branch November 16, 2025 17:06
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