Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
c65a783
Try out NX agents
kasperpeulen Nov 18, 2025
45e6f41
Use --startFrom task in nx
kasperpeulen Nov 24, 2025
b96d8b6
Fix
kasperpeulen Nov 24, 2025
4815dd0
Fix
kasperpeulen Nov 25, 2025
0812f33
Fix
kasperpeulen Nov 25, 2025
5889731
Use latest node 22
kasperpeulen Nov 25, 2025
1644680
Cleanup build script
kasperpeulen Nov 25, 2025
9c09531
Run everything
kasperpeulen Nov 25, 2025
36db0b3
Fix
kasperpeulen Nov 25, 2025
2f45799
Fix check
kasperpeulen Nov 25, 2025
c10cca9
Fix
kasperpeulen Nov 25, 2025
11da1a4
Fix
kasperpeulen Nov 25, 2025
4694e9d
Fix
kasperpeulen Nov 25, 2025
908eefb
Fix
kasperpeulen Nov 25, 2025
c9f56bf
Fix
kasperpeulen Nov 25, 2025
4622396
Fix
kasperpeulen Nov 25, 2025
a8c6d41
Fix
kasperpeulen Nov 26, 2025
1b72107
Add cloud access token
kasperpeulen Nov 26, 2025
3d7f007
Fix
kasperpeulen Nov 26, 2025
5caad09
Fix
kasperpeulen Nov 26, 2025
b68e98e
Fix
kasperpeulen Nov 26, 2025
8b63ec2
Verify
kasperpeulen Nov 26, 2025
ffc7857
Fix
kasperpeulen Nov 26, 2025
0f2c997
Fix
kasperpeulen Nov 26, 2025
c2e3773
Run chromatic in cache location
kasperpeulen Nov 26, 2025
b1ba7b2
Fix
kasperpeulen Nov 26, 2025
32bb4b0
Fix
kasperpeulen Nov 26, 2025
40f2c1d
Fix
kasperpeulen Nov 26, 2025
3cd7a0f
Fix
kasperpeulen Nov 26, 2025
bf2a3d9
Fix
kasperpeulen Nov 26, 2025
2483221
Fix
kasperpeulen Nov 26, 2025
82f6baf
Remove yarn lock file
kasperpeulen Nov 26, 2025
0779ef3
Ignore yarn lock files in test-storybooks
kasperpeulen Nov 26, 2025
4916d39
Fix
kasperpeulen Nov 26, 2025
bf04639
Fix
kasperpeulen Nov 26, 2025
a102952
Fix
kasperpeulen Nov 26, 2025
035dfa3
Fix
kasperpeulen Nov 26, 2025
1d8048b
Fix
kasperpeulen Nov 26, 2025
d370e3b
Fix
kasperpeulen Nov 26, 2025
975b14f
Fix
kasperpeulen Nov 26, 2025
a706f5f
Fix
kasperpeulen Nov 26, 2025
4703f2a
Fix
kasperpeulen Nov 26, 2025
3b25ae5
Merge remote-tracking branch 'origin/next' into kasper/nx-agents
kasperpeulen Nov 26, 2025
497caa6
Fix
kasperpeulen Nov 26, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 29 additions & 27 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ jobs:
- run:
command: |
TEMPLATE=$(yarn get-template --cadence << pipeline.parameters.workflow >> --task bench)
cd sandbox/$(yarn get-sandbox-dir --template $TEMPLATE) && yarn
yarn workspace @storybook/scripts prepare-sandbox --template $TEMPLATE --no-link
name: Install sandbox dependencies
- run:
command: yarn task --task bench --template $(yarn get-template --cadence << pipeline.parameters.workflow >> --task bench) --no-link --start-from=never --junit
Expand All @@ -199,10 +199,11 @@ jobs:
clone_options: --depth 1 --verbose
- restore_cache:
keys:
- build-yarn-2-cache-v5--{{ checksum "code/yarn.lock" }}--{{ checksum "scripts/yarn.lock" }}
- build-yarn-2-cache-v5--{{ checksum "yarn.lock" }}
name: Restore Yarn cache
- run:
command: |
yarn
yarn task --task compile --start-from=auto --no-link --debug
git diff --exit-code
yarn dedupe --check
Expand All @@ -216,12 +217,13 @@ jobs:
- store_artifacts:
path: code/bench/esbuild-metafiles
- save_cache:
key: build-yarn-2-cache-v5--{{ checksum "code/yarn.lock" }}--{{ checksum "scripts/yarn.lock" }}
key: build-yarn-2-cache-v5--{{ checksum "yarn.lock" }}
name: Save Yarn cache
paths:
- ~/.yarn/berry/cache
- persist_to_workspace:
paths:
- node_modules
- code/node_modules
- code/addons
- scripts/node_modules
Expand All @@ -247,10 +249,11 @@ jobs:
workflow-name: << pipeline.parameters.workflow >>
- restore_cache:
keys:
- build-yarn-2-cache-v5--{{ checksum "code/yarn.lock" }}--{{ checksum "scripts/yarn.lock" }}
- build-yarn-2-cache-v5--{{ checksum "yarn.lock" }}
name: Restore Yarn cache
- run:
command: |
yarn
yarn task --task compile --start-from=auto --no-link --debug
name: Compile
- run:
Expand Down Expand Up @@ -279,7 +282,7 @@ jobs:
- run:
command: |
TEMPLATE=$(yarn get-template --cadence << pipeline.parameters.workflow >> --task check-sandbox)
cd sandbox/$(yarn get-sandbox-dir --template $TEMPLATE) && yarn
yarn workspace @storybook/scripts prepare-sandbox --template $TEMPLATE --no-link
name: Install sandbox dependencies
- run:
command: yarn task --task check-sandbox --template $(yarn get-template --cadence << pipeline.parameters.workflow >> --task check-sandbox) --no-link --start-from=never --junit
Expand Down Expand Up @@ -307,7 +310,7 @@ jobs:
path: test-results
chromatic-sandboxes:
executor:
class: medium
class: medium+
name: sb_node_22_browsers
parallelism: << parameters.parallelism >>
parameters:
Expand All @@ -317,13 +320,19 @@ jobs:
- checkout
- attach_workspace:
at: .
- run:
background: true
command: |
cd code
yarn local-registry --open
name: Verdaccio
- run:
command: |
TEMPLATE=$(yarn get-template --cadence << pipeline.parameters.workflow >> --task chromatic)
cd sandbox/$(yarn get-sandbox-dir --template $TEMPLATE) && yarn
SANDBOX_ROOT=./sandbox yarn workspace @storybook/scripts prepare-sandbox --template $TEMPLATE --no-link
name: Install sandbox dependencies
- run:
command: yarn task --task chromatic --template $(yarn get-template --cadence << pipeline.parameters.workflow >> --task chromatic) --no-link --start-from=never --junit
command: SANDBOX_ROOT=./sandbox yarn task --task chromatic --template $(yarn get-template --cadence << pipeline.parameters.workflow >> --task chromatic) --no-link --start-from=never --junit
name: Running Chromatic
- report-workflow-on-failure:
template: $(yarn get-template --cadence << pipeline.parameters.workflow >> --task chromatic)
Expand Down Expand Up @@ -370,7 +379,7 @@ jobs:
if [[ $TEMPLATE != bench/* ]]; then
yarn --cwd scripts jiti ./event-log-checker.ts build $TEMPLATE
fi
cd sandbox/$(yarn get-sandbox-dir --template $TEMPLATE) && rm -rf node_modules
cd $(yarn get-sandbox-dir --template $TEMPLATE) && rm -rf node_modules
environment:
STORYBOOK_TELEMETRY_DEBUG: 1
STORYBOOK_TELEMETRY_URL: http://localhost:6007/event-log
Expand Down Expand Up @@ -399,7 +408,7 @@ jobs:
- run:
command: |
TEMPLATE=$(yarn get-template --cadence << pipeline.parameters.workflow >> --task e2e-tests-dev)
cd sandbox/$(yarn get-sandbox-dir --template $TEMPLATE) && yarn
yarn workspace @storybook/scripts prepare-sandbox --template $TEMPLATE --no-link
name: Install sandbox dependencies
- run:
command: |
Expand Down Expand Up @@ -429,7 +438,7 @@ jobs:
- run:
command: |
TEMPLATE=$(yarn get-template --cadence << pipeline.parameters.workflow >> --task e2e-tests)
cd sandbox/$(yarn get-sandbox-dir --template $TEMPLATE) && yarn
yarn workspace @storybook/scripts prepare-sandbox --template $TEMPLATE --no-link
name: Install sandbox dependencies
- run:
command: |
Expand Down Expand Up @@ -527,22 +536,21 @@ jobs:
- cancel-workflow-on-failure
pretty-docs:
executor:
class: medium
class: medium+
name: sb_node_22_classic
steps:
- git-shallow-clone/checkout_advanced:
clone_options: --depth 1 --verbose
- restore_cache:
keys:
- prettydocs-yarn-2-cache-v8--{{ checksum "code/yarn.lock" }}--{{ checksum "scripts/yarn.lock" }}
- prettydocs-yarn-2-cache-v8--{{ checksum "yarn.lock" }}
name: Restore Yarn cache
- run:
command: |
cd scripts
yarn install
name: Install
command: |
yarn install
name: Install
- save_cache:
key: prettydocs-yarn-2-cache-v8--{{ checksum "code/yarn.lock" }}--{{ checksum "scripts/yarn.lock" }}
key: prettydocs-yarn-2-cache-v8--{{ checksum "yarn.lock" }}
name: Save Yarn cache
paths:
- ~/.yarn/berry/cache
Expand Down Expand Up @@ -779,12 +787,6 @@ jobs:
command: yarn install
name: Install code dependencies
shell: bash.exe
working_directory: code
- run:
command: yarn install
name: Install script dependencies
shell: bash.exe
working_directory: scripts
- when:
condition:
equal:
Expand Down Expand Up @@ -959,7 +961,7 @@ jobs:
name: Storybook init for features
test-portable-stories:
executor:
class: medium
class: medium+
name: sb_playwright
parameters:
directory:
Expand Down Expand Up @@ -1028,7 +1030,7 @@ jobs:
- run:
command: |
TEMPLATE=$(yarn get-template --cadence << pipeline.parameters.workflow >> --task test-runner)
cd sandbox/$(yarn get-sandbox-dir --template $TEMPLATE) && yarn
yarn workspace @storybook/scripts prepare-sandbox --template $TEMPLATE --no-link
name: Install sandbox dependencies
- start-event-collector
- run:
Expand Down Expand Up @@ -1100,7 +1102,7 @@ jobs:
- run:
command: |
TEMPLATE=$(yarn get-template --cadence << pipeline.parameters.workflow >> --task vitest-integration)
cd sandbox/$(yarn get-sandbox-dir --template $TEMPLATE) && yarn
yarn workspace @storybook/scripts prepare-sandbox --template $TEMPLATE --no-link
name: Install sandbox dependencies
- start-event-collector
- run:
Expand Down
2 changes: 1 addition & 1 deletion .circleci/src/jobs/bench-sandboxes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ steps:
name: Install sandbox dependencies
command: |
TEMPLATE=$(yarn get-template --cadence << pipeline.parameters.workflow >> --task bench)
cd sandbox/$(yarn get-sandbox-dir --template $TEMPLATE) && yarn
cd $(yarn get-sandbox-dir --template $TEMPLATE) && yarn
- run:
name: Running Bench
command: yarn task --task bench --template $(yarn get-template --cadence << pipeline.parameters.workflow >> --task bench) --no-link --start-from=never --junit
Expand Down
4 changes: 2 additions & 2 deletions .circleci/src/jobs/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ steps:
- restore_cache:
name: Restore Yarn cache
keys:
- build-yarn-2-cache-v5--{{ checksum "code/yarn.lock" }}--{{ checksum "scripts/yarn.lock" }}
- build-yarn-2-cache-v5--{{ checksum "yarn.lock" }}
- run:
name: Compile
command: |
Expand All @@ -25,7 +25,7 @@ steps:
path: code/bench/esbuild-metafiles
- save_cache:
name: Save Yarn cache
key: build-yarn-2-cache-v5--{{ checksum "code/yarn.lock" }}--{{ checksum "scripts/yarn.lock" }}
key: build-yarn-2-cache-v5--{{ checksum "yarn.lock" }}
paths:
- ~/.yarn/berry/cache
- persist_to_workspace:
Expand Down
2 changes: 1 addition & 1 deletion .circleci/src/jobs/check-sandboxes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ steps:
name: Install sandbox dependencies
command: |
TEMPLATE=$(yarn get-template --cadence << pipeline.parameters.workflow >> --task check-sandbox)
cd sandbox/$(yarn get-sandbox-dir --template $TEMPLATE) && yarn
cd $(yarn get-sandbox-dir --template $TEMPLATE) && yarn
- run:
name: Type check Sandboxes
command: yarn task --task check-sandbox --template $(yarn get-template --cadence << pipeline.parameters.workflow >> --task check-sandbox) --no-link --start-from=never --junit
Expand Down
2 changes: 1 addition & 1 deletion .circleci/src/jobs/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ steps:
- restore_cache:
name: Restore Yarn cache
keys:
- build-yarn-2-cache-v5--{{ checksum "code/yarn.lock" }}--{{ checksum "scripts/yarn.lock" }}
- build-yarn-2-cache-v5--{{ checksum "yarn.lock" }}
- run:
name: Compile
command: |
Expand Down
2 changes: 1 addition & 1 deletion .circleci/src/jobs/chromatic-sandboxes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ steps:
name: Install sandbox dependencies
command: |
TEMPLATE=$(yarn get-template --cadence << pipeline.parameters.workflow >> --task chromatic)
cd sandbox/$(yarn get-sandbox-dir --template $TEMPLATE) && yarn
cd $(yarn get-sandbox-dir --template $TEMPLATE) && yarn
- run:
name: Running Chromatic
command: yarn task --task chromatic --template $(yarn get-template --cadence << pipeline.parameters.workflow >> --task chromatic) --no-link --start-from=never --junit
Expand Down
2 changes: 1 addition & 1 deletion .circleci/src/jobs/create-sandboxes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ steps:
if [[ $TEMPLATE != bench/* ]]; then
yarn --cwd scripts jiti ./event-log-checker.ts build $TEMPLATE
fi
cd sandbox/$(yarn get-sandbox-dir --template $TEMPLATE) && rm -rf node_modules
cd $(yarn get-sandbox-dir --template $TEMPLATE) && rm -rf node_modules
environment:
STORYBOOK_TELEMETRY_DEBUG: 1
STORYBOOK_TELEMETRY_URL: 'http://localhost:6007/event-log'
Expand Down
2 changes: 1 addition & 1 deletion .circleci/src/jobs/e2e-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ steps:
name: Install sandbox dependencies
command: |
TEMPLATE=$(yarn get-template --cadence << pipeline.parameters.workflow >> --task e2e-tests-dev)
cd sandbox/$(yarn get-sandbox-dir --template $TEMPLATE) && yarn
cd $(yarn get-sandbox-dir --template $TEMPLATE) && yarn
- run:
name: Running E2E Tests
# TEST_FILES should include all relevant test files, in this case we use the default playwright pattern
Expand Down
2 changes: 1 addition & 1 deletion .circleci/src/jobs/e2e-production.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ steps:
name: Install sandbox dependencies
command: |
TEMPLATE=$(yarn get-template --cadence << pipeline.parameters.workflow >> --task e2e-tests)
cd sandbox/$(yarn get-sandbox-dir --template $TEMPLATE) && yarn
cd $(yarn get-sandbox-dir --template $TEMPLATE) && yarn
- run:
name: Running E2E Tests
# TEST_FILES should include all relevant test files, in this case we use the default playwright pattern
Expand Down
4 changes: 2 additions & 2 deletions .circleci/src/jobs/pretty-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@ steps:
- restore_cache:
name: Restore Yarn cache
keys:
- prettydocs-yarn-2-cache-v8--{{ checksum "code/yarn.lock" }}--{{ checksum "scripts/yarn.lock" }}
- prettydocs-yarn-2-cache-v8--{{ checksum "yarn.lock" }}
- run:
name: Install
command: |
cd scripts
yarn install
- save_cache:
name: Save Yarn cache
key: prettydocs-yarn-2-cache-v8--{{ checksum "code/yarn.lock" }}--{{ checksum "scripts/yarn.lock" }}
key: prettydocs-yarn-2-cache-v8--{{ checksum "yarn.lock" }}
paths:
- ~/.yarn/berry/cache
- run:
Expand Down
2 changes: 1 addition & 1 deletion .circleci/src/jobs/test-runner-production.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ steps:
name: Install sandbox dependencies
command: |
TEMPLATE=$(yarn get-template --cadence << pipeline.parameters.workflow >> --task test-runner)
cd sandbox/$(yarn get-sandbox-dir --template $TEMPLATE) && yarn
cd $(yarn get-sandbox-dir --template $TEMPLATE) && yarn
- start-event-collector
- run:
name: Running Test Runner
Expand Down
2 changes: 1 addition & 1 deletion .circleci/src/jobs/vitest-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ steps:
name: Install sandbox dependencies
command: |
TEMPLATE=$(yarn get-template --cadence << pipeline.parameters.workflow >> --task vitest-integration)
cd sandbox/$(yarn get-sandbox-dir --template $TEMPLATE) && yarn
cd $(yarn get-sandbox-dir --template $TEMPLATE) && yarn
- start-event-collector
- run:
name: Running story tests in Vitest
Expand Down
2 changes: 1 addition & 1 deletion .cursor/environment.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"snapshot": "snapshot-20250521-0222c8bd-0a11-48ab-a2a8-380203843e05",
"install": "cd /workspace/scripts && yarn && cd ../code && yarn && yarn task --task=compile --start-from=compile",
"install": "yarn && yarn task --task=compile --start-from=compile",
"start": "cd /workspace/code && yarn test",
"terminals": []
}
3 changes: 3 additions & 0 deletions .env
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
STORYBOOK_DISABLE_TELEMETRY=true
IN_STORYBOOK_SANDBOX=true
SANDBOX_ROOT=../storybook-sandboxes
Comment on lines +1 to +3
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

🧩 Analysis chain

Script executed:

#!/bin/bash

# Check if .env file exists and display its contents with line numbers
echo "=== Checking .env file ===" 
if [ -f .env ]; then
  cat -n .env
  echo "File size: $(wc -l < .env) lines"
  echo "Hex dump (to check for trailing newline):"
  tail -c 20 .env | od -c
else
  echo ".env file not found"
fi

# Check .gitignore to see if .env is tracked
echo -e "\n=== Checking .gitignore ===" 
if [ -f .gitignore ]; then
  rg -n "\.env" .gitignore || echo "No .env patterns found in .gitignore"
fi

# Look for .env.example or similar template files
echo -e "\n=== Looking for .env template files ===" 
fd -e example -e template -e sample | grep -i env || echo "No .env template files found"
fd "\.env\." || echo "No .env variant files found"

# Check git status for .env
echo -e "\n=== Git status for .env ===" 
git status .env 2>/dev/null || echo "Not a git repo or file not tracked"

# Look for any dotenv or .env configuration documentation
echo -e "\n=== Checking for .env documentation ===" 
fd -type f \( -name "*.md" -o -name "*.txt" \) | xargs grep -l "\.env" 2>/dev/null | head -5 || echo "No .env documentation found"

Repository: storybookjs/storybook


<shell_result>
Repository: storybookjs/storybook
Exit code: 0

stdout:

=== Checking .env file ===
     1	STORYBOOK_DISABLE_TELEMETRY=true
     2	IN_STORYBOOK_SANDBOX=true
     3	SANDBOX_ROOT=../storybook-sandboxesFile size: 2 lines
Hex dump (to check for trailing newline):

=== Checking .gitignore ===
21:.env.local

=== Looking for .env template files ===
No .env template files found

=== Git status for .env ===
HEAD detached at FETCH_HEAD
nothing to commit, working tree clean

=== Checking for .env documentation ===

stderr:

/bin/bash: line 9: od: command not found
error: 'ype' isn't a valid value for '--type <filetype>'
  [possible values: file, directory, symlink, executable, empty, socket, pipe]

For more information try '--help'

</shell_result>


Script executed:

#!/bin/bash

# Search for references to these environment variables
echo "=== Searching for SANDBOX_ROOT usage ===" 
rg "SANDBOX_ROOT" -A 2 -B 2 | head -20

echo -e "\n=== Searching for IN_STORYBOOK_SANDBOX usage ===" 
rg "IN_STORYBOOK_SANDBOX" -A 2 -B 2 | head -20

echo -e "\n=== Searching for STORYBOOK_DISABLE_TELEMETRY usage ===" 
rg "STORYBOOK_DISABLE_TELEMETRY" -A 2 -B 2 | head -20

# Check if there's a dotenv-linter config
echo -e "\n=== Looking for dotenv-linter config ===" 
fd -name ".dotenv*" -o -name "dotenv*" 2>/dev/null | head -10

# Check NX agents.yaml mentioned in review
echo -e "\n=== Checking .nx/workflows/agents.yaml ===" 
if [ -f .nx/workflows/agents.yaml ]; then
  rg "SANDBOX_ROOT" .nx/workflows/agents.yaml
else
  echo "agents.yaml not found"
fi

# Look for any CI/CD or config files that reference .env
echo -e "\n=== Checking for .env usage in config files ===" 
find . -maxdepth 2 -type f \( -name "*.json" -o -name "*.yml" -o -name "*.yaml" \) | xargs grep -l "\.env" 2>/dev/null | head -5

Repository: storybookjs/storybook


<shell_result>
Repository: storybookjs/storybook
Exit code: 0

stdout:

=== Searching for SANDBOX_ROOT usage ===
scripts/utils/constants.ts-
scripts/utils/constants.ts-export const SANDBOX_DIRECTORY =
scripts/utils/constants.ts:  process.env.SANDBOX_ROOT && path.isAbsolute(process.env.SANDBOX_ROOT)
scripts/utils/constants.ts:    ? process.env.SANDBOX_ROOT
scripts/utils/constants.ts:    : join(ROOT_DIRECTORY, process.env.SANDBOX_ROOT || '../storybook-sandboxes');
scripts/utils/constants.ts-
scripts/utils/constants.ts-export const JUNIT_DIRECTORY = join(ROOT_DIRECTORY, 'test-results');

=== Searching for IN_STORYBOOK_SANDBOX usage ===
scripts/task.ts-async function run() {
scripts/task.ts-  // useful for other scripts to know whether they're running in the creation of a sandbox in the monorepo
scripts/task.ts:  process.env.IN_STORYBOOK_SANDBOX = 'true';
scripts/task.ts-
scripts/task.ts-  const allOptionValues = await getOptionsOrPrompt('yarn task', options);
--
code/lib/create-storybook/src/bin/run.ts-  .action(async (options) => {
code/lib/create-storybook/src/bin/run.ts-    const isNeitherCiNorSandbox =
code/lib/create-storybook/src/bin/run.ts:      !isCI() && !optionalEnvToBoolean(process.env.IN_STORYBOOK_SANDBOX);
code/lib/create-storybook/src/bin/run.ts-    options.debug = options.debug ?? false;
code/lib/create-storybook/src/bin/run.ts-    options.dev = options.dev ?? isNeitherCiNorSandbox;
--
code/lib/create-storybook/src/generators/baseGenerator.ts-  // See: https://github.com/storybookjs/storybook/pull/28607#issuecomment-2467903327
code/lib/create-storybook/src/generators/baseGenerator.ts-  if (framework === 'nuxt') {
code/lib/create-storybook/src/generators/baseGenerator.ts:    return !optionalEnvToBoolean(process.env.IN_STORYBOOK_SANDBOX);
code/lib/create-storybook/src/generators/baseGenerator.ts-  }
code/lib/create-storybook/src/generators/baseGenerator.ts-
--
code/lib/cli-storybook/src/codemod/csf-factories.ts-  try {
code/lib/cli-storybook/src/codemod/csf-factories.ts-    let globString = '{stories,src}/**/{Button,Header,Page}.stories.*';

=== Searching for STORYBOOK_DISABLE_TELEMETRY usage ===
scripts/utils/cli-step.ts-      cwd: options.cwd,
scripts/utils/cli-step.ts-      env: {
scripts/utils/cli-step.ts:        STORYBOOK_DISABLE_TELEMETRY: 'true',
scripts/utils/cli-step.ts-        STORYBOOK_PROJECT_ROOT: options.cwd,
scripts/utils/cli-step.ts-        ...options.env,
--
scripts/sandbox/generate.ts-  const sbCliBinaryPath = join(__dirname, `../../code/lib/create-storybook/dist/bin/index.js`);
scripts/sandbox/generate.ts-  console.log(`🎁 Installing Storybook`);
scripts/sandbox/generate.ts:  const env = { STORYBOOK_DISABLE_TELEMETRY: 'true', ...envVars, CI: 'true' };
scripts/sandbox/generate.ts-  const fullFlags = ['--yes', ...(flags || [])];
scripts/sandbox/generate.ts-  await runCommand(`${sbCliBinaryPath} ${fullFlags.join(' ')}`, { cwd, env }, debug);
--
docs/_snippets/storybook-disable-telemetry-env.md-```shell renderer="common" language="js"
docs/_snippets/storybook-disable-telemetry-env.md:STORYBOOK_DISABLE_TELEMETRY=true yarn storybook
docs/_snippets/storybook-disable-telemetry-env.md-```
--
docs/configure/telemetry.mdx-{/* prettier-ignore-end */}
docs/configure/telemetry.mdx-
docs/configure/telemetry.mdx:Or via the `STORYBOOK_DISABLE_TELEMETRY` environment variable.
docs/configure/telemetry.mdx-

=== Looking for dotenv-linter config ===

=== Checking .nx/workflows/agents.yaml ===
  SANDBOX_ROOT: ../storybook-sandboxes

=== Checking for .env usage in config files ===

</shell_result>


Script executed:

#!/bin/bash

# Search for any dotenv-linter configuration or references
echo "=== Checking for dotenv-linter references ===" 
rg "dotenv.linter\|dotenv-linter" --type json --type yaml --type toml 2>/dev/null | head -20

# Check package.json or similar for dotenv-linter
echo -e "\n=== Checking for linter configuration in package.json ===" 
if [ -f package.json ]; then
  cat package.json | grep -A 10 -B 2 "dotenv\|linter" || echo "No dotenv-linter config in package.json"
fi

# Check if there's a .dotenv-lintrc or similar
echo -e "\n=== Looking for dotenv config files ===" 
find . -maxdepth 3 -type f \( -name ".dotenv-lintrc*" -o -name "dotenv-lint*" \) 2>/dev/null

# Check PR or issue context for the linter mention
echo -e "\n=== Checking git log for dotenv-linter references ===" 
git log --all --oneline --grep="dotenv" 2>/dev/null | head -10

echo -e "\n=== Checking if .env is explicitly listed in git ===" 
git ls-files .env 2>/dev/null && echo ".env is tracked in git" || echo ".env is not tracked"

Repository: storybookjs/storybook


<shell_result>
Repository: storybookjs/storybook
Exit code: 0

stdout:

=== Checking for dotenv-linter references ===

=== Checking for linter configuration in package.json ===
No dotenv-linter config in package.json

=== Looking for dotenv config files ===

=== Checking git log for dotenv-linter references ===

=== Checking if .env is explicitly listed in git ===
.env
.env is tracked in git

</shell_result>


Fix alphabetical ordering and add trailing newline to .env file.

The environment variables should be ordered alphabetically, and the file is missing a trailing newline. The .env file is intentionally tracked in the repository, so no renaming is necessary.

Apply this diff:

-STORYBOOK_DISABLE_TELEMETRY=true
-IN_STORYBOOK_SANDBOX=true
+IN_STORYBOOK_SANDBOX=true
 SANDBOX_ROOT=../storybook-sandboxes
+STORYBOOK_DISABLE_TELEMETRY=true
+
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
STORYBOOK_DISABLE_TELEMETRY=true
IN_STORYBOOK_SANDBOX=true
SANDBOX_ROOT=../storybook-sandboxes
IN_STORYBOOK_SANDBOX=true
SANDBOX_ROOT=../storybook-sandboxes
STORYBOOK_DISABLE_TELEMETRY=true
🧰 Tools
🪛 dotenv-linter (4.0.0)

[warning] 2-2: [UnorderedKey] The IN_STORYBOOK_SANDBOX key should go before the STORYBOOK_DISABLE_TELEMETRY key

(UnorderedKey)


[warning] 3-3: [EndingBlankLine] No blank line at the end of the file

(EndingBlankLine)


[warning] 3-3: [UnorderedKey] The SANDBOX_ROOT key should go before the STORYBOOK_DISABLE_TELEMETRY key

(UnorderedKey)

🤖 Prompt for AI Agents
In .env around lines 1 to 3, the environment variables are not alphabetically
ordered and the file lacks a trailing newline; reorder the entries
alphabetically (IN_STORYBOOK_SANDBOX, SANDBOX_ROOT, STORYBOOK_DISABLE_TELEMETRY)
and ensure the file ends with a single trailing newline character.

5 changes: 2 additions & 3 deletions .github/actions/setup-node-and-install/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,9 @@ runs:
with:
path: |
~/.yarn/berry/cache
key: yarn-v1-${{ hashFiles('scripts/yarn.lock') }}-${{ hashFiles('code/yarn.lock') }}
key: yarn-v1-${{ hashFiles('yarn.lock') }}
restore-keys: |
yarn-v1-${{ hashFiles('scripts/yarn.lock') }}-${{ hashFiles('code/yarn.lock') }}
yarn-v1-${{ hashFiles('scripts/yarn.lock') }}
yarn-v1-${{ hashFiles('yarn.lock') }}
yarn-v1

- name: Install script dependencies
Expand Down
10 changes: 5 additions & 5 deletions .github/copilot-instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Storybook is a large monorepo built with TypeScript, React, and various other fr
```
storybook/
├── .github/ # GitHub configurations and workflows
├── code/ # Main monorepo codebase
├── code/ # Main codebase
│ ├── .storybook/ # Configuration for internal UI Storybook
│ ├── core/ # Core Storybook package
│ ├── lib/ # Core supporting libraries
Expand All @@ -30,15 +30,15 @@ storybook/
├── sandbox/ # Generated sandbox environments (created by yarn task --task sandbox)
├── scripts/ # Build and development scripts
├── docs/ # Documentation
└── test-storybooks/ # Test configurations
└── test-storybooks/ # Test repos
```

## Essential Commands and Build Times

### Installation & Setup
```bash
# Install all dependencies (run from repository root)
yarn i
yarn
# Time: ~2.5 minutes
# Timeout: Use 300+ seconds for bash commands
```
Expand Down Expand Up @@ -148,7 +148,7 @@ The repository includes 20 task scripts in `scripts/tasks/`:
## Recommended Development Workflow

### For Code Changes
1. Install dependencies: `yarn i` (if needed)
1. Install dependencies: `yarn` (if needed)
2. Compile packages: `yarn task --task compile`
3. Make your changes
4. Compile packages with `cd code && yarn task --task compile`
Expand Down Expand Up @@ -285,7 +285,7 @@ cd code && yarn storybook:vitest
## Troubleshooting

### Common Issues
1. **Build Failures**: Often resolved by running `yarn i` followed by `yarn task --task compile`
1. **Build Failures**: Often resolved by running `yarn` followed by `yarn task --task compile`
2. **Port Conflicts**: Storybook UI uses port 6006 by default
3. **Memory Issues**: Large compilation tasks may require increased Node.js memory limits
4. **Environment-Specific Issues**: Sandbox generation may occasionally fail due to dependency conflicts - use Storybook UI for testing as fallback
Expand Down
Loading
Loading