:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.
Python ab-testingai-analyticsanalyticscdpdata-warehouseexperimentsfeature-flagsjavascriptproduct-analyticspythonreactsession-replaysurveystypescriptweb-analytics
fix(storybook): stop the webkit-only slack picker story failure (#95630)
posthog[bot]01c60ff28013
diff --git a/.github/workflows/ci-storybook.yml b/.github/workflows/ci-storybook.ymlindex ef3fdcad53bf..2aaa69e94193 100644--- a/.github/workflows/ci-storybook.yml+++ b/.github/workflows/ci-storybook.yml@@ -175,12 +175,21 @@ jobs:filters: ${{ runner.temp }}/frontend-exclude.yml# Build the visual-regression matrix.- # On PRs, only run chromium shards — no story opts into webkit snapshots- # (see common/storybook/.storybook/test-runner.ts), so webkit shards consume CI- # minutes without producing snapshot diffs. WebKit render-error coverage is- # preserved on master pushes.+ # WebKit runs wherever a break can still be stopped: on master pushes, and on the+ # merge-queue run that gates the merge. No story opts into webkit snapshots (see+ # common/storybook/.storybook/test-runner.ts), so webkit adds render-error coverage+ # only. That coverage is worth a batched queue run, because a webkit-only break then+ # fails the queue instead of master. It is not worth every push of every frontend PR,+ # so author PRs stay chromium-only.- name: Build matrixid: matrix+ env:+ MERGE_QUEUE: >-+ ${{+ github.event_name == 'pull_request'+ && github.event.pull_request.head.repo.full_name == github.repository+ && startsWith(github.head_ref, 'trunk-merge/')+ }}run: |# Shard counts — change here to resize the matrix.CHROMIUM_SHARDS=16@@ -192,7 +201,7 @@ jobs:}CHROMIUM=$(shards chromium "$CHROMIUM_SHARDS")- if [ "${{ github.event_name }}" = "pull_request" ]; then+ if [ "${{ github.event_name }}" = "pull_request" ] && [ "$MERGE_QUEUE" != "true" ]; thenMATRIX=$(jq -cn --argjson c "$CHROMIUM" '{include: $c}')elseWEBKIT=$(shards webkit "$WEBKIT_SHARDS")@@ -443,7 +452,7 @@ jobs:# are tuned for runner CPU — consult #team-devex before changing.# PRs may use chromium shards running only affected story files.# Forced-full PRs fall back to changes.outputs.matrix (full chromium),- # while master pushes run chromium + webkit.+ # while master pushes and merge-queue runs add webkit.matrix: ${{ fromJson(needs.select-stories.outputs.matrix || needs.changes.outputs.matrix) }}env:NODE_OPTIONS: --max-old-space-size=16384diff --git a/frontend/src/lib/integrations/SlackChannelPicker.stories.tsx b/frontend/src/lib/integrations/SlackChannelPicker.stories.tsxindex ce1f2a601d25..8670b6b4ebe8 100644--- a/frontend/src/lib/integrations/SlackChannelPicker.stories.tsx+++ b/frontend/src/lib/integrations/SlackChannelPicker.stories.tsx@@ -1,5 +1,5 @@import { Meta, StoryObj } from '@storybook/react'-import { within } from '@testing-library/dom'+import { waitFor, within } from '@testing-library/dom'import userEvent from '@testing-library/user-event'import { useActions, useValues } from 'kea'import { useEffect } from 'react'@@ -116,7 +116,15 @@ export const SearchDroppedOnBlur: Story = {</div>),play: async ({ canvasElement }) => {- const input = canvasElement.querySelector<HTMLInputElement>('input[data-attr="select-slack-channel"]')!+ // WebKit can start the play phase before React commits the first render, so wait for+ // the input instead of reading it straight out of the canvas.+ const input = await waitFor(() => {+ const element = canvasElement.querySelector<HTMLInputElement>('input[data-attr="select-slack-channel"]')+ if (!element) {+ throw new Error('Channel input not yet rendered')+ }+ return element+ })await userEvent.type(input, 'general')await userEvent.click(canvasElement)await within(canvasElement).findByText('No channel selected. Pick one from the list.')