Skip to content

Conversation

@yujonglee
Copy link
Contributor

@yujonglee yujonglee commented Nov 30, 2025

Summary

This PR migrates Argos CI visual regression testing from apps/web to apps/storybook.

Removed from apps/web:

  • @argos-ci/playwright dependency
  • Argos reporter configuration from playwright.config.ts
  • visual.spec.ts test file
  • ARGOS_TOKEN and Playwright test steps from web_ci.yaml

Added to apps/storybook:

  • @argos-ci/cli, @argos-ci/storybook, @storybook/test-runner, @playwright/test, playwright dependencies
  • .storybook/test-runner.ts with Argos screenshot integration
  • test-storybook npm script
  • New storybook_ci.yaml workflow for visual testing
  • screenshots added to .gitignore

CI Workflow approach:

  1. Builds UI package first (pnpm -F ui build) to generate processed Tailwind CSS
  2. Builds Storybook static (pnpm -F storybook build)
  3. Serves static build with npx http-server in background
  4. Waits for server using curl loop (up to 60s)
  5. Runs pnpm exec test-storybook --url http://127.0.0.1:6006 --ci
  6. Uploads screenshots to Argos

Note: The Storybook Test Runner approach was used instead of @storybook/addon-vitest because the addon-vitest package only supports Storybook 9+/10+, while this project uses Storybook 8.6.14.

Updates since last revision

  • Removed NODE_NO_WARNINGS=1 from storybook_ci.yaml (per CodeRabbit review - this flag suppresses critical warnings including security alerts)
  • Removed /product/opensource from apps/web/src/utils/sitemap.ts to fix the TypeScript error causing macOS CI to fail (the route doesn't exist in the route types)
  • Fixed CSS loading in Argos screenshots: Changed Storybook preview to import built CSS (packages/ui/dist/globals.css) instead of source CSS (packages/ui/src/styles/globals.css). The source file contains unprocessed @tailwind directives that weren't being compiled in the static build.
  • Updated Netlify Storybook build: Added pnpm -F ui build step before Storybook build in netlify.toml to ensure the UI package's CSS is built first.

Review & Testing Checklist for Human

  • Verify ARGOS_TOKEN secret is configured in GitHub repository settings
  • Review the Argos screenshots in Argos dashboard - confirm components now show proper Tailwind CSS styling (buttons with colored backgrounds, badges with colors, tiptap editor rendering correctly)
  • Approve the 25 baseline screenshots once styling is confirmed correct
  • Confirm /product/opensource route removal from sitemap is intentional (the route appears to not exist based on TypeScript types)
  • Optionally: Make a small visual change to a component in a follow-up PR to verify Argos detects the diff

Recommended test plan:

  1. Check the Storybook Netlify preview to verify components are styled correctly
  2. Review and approve the baseline screenshots in Argos dashboard
  3. Merge this PR
  4. In a follow-up PR, make a minor visual change to verify Argos detects diffs correctly

Notes

  • The test-storybook command requires NODE_OPTIONS=--experimental-vm-modules for the Storybook test runner
  • Storybook now depends on the UI package being built first (handled in both CI workflow and Netlify config)
  • Both macOS and Ubuntu CI are passing

Requested by: yujonglee (@yujonglee)
Devin Session: https://app.devin.ai/sessions/cb3d3716c0614d119e7704ea65f55cec

- Remove @argos-ci/playwright from apps/web
- Remove Argos reporter from apps/web/playwright.config.ts
- Remove apps/web/tests/visual.spec.ts
- Remove Argos-related steps from .github/workflows/web_ci.yaml
- Add @argos-ci/storybook, @storybook/addon-vitest, vitest, and related packages to apps/storybook
- Create vitest.config.ts with storybookTest and argosVitestPlugin
- Create .storybook/vitest.setup.ts
- Add @storybook/addon-vitest to .storybook/main.ts
- Add screenshots to apps/storybook/.gitignore
- Create .github/workflows/storybook_ci.yaml for visual testing

Co-Authored-By: yujonglee <yujonglee.dev@gmail.com>
@devin-ai-integration
Copy link
Contributor

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR that start with 'DevinAI' or '@devin'.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

@netlify
Copy link

netlify bot commented Nov 30, 2025

Deploy Preview for hyprnote ready!

Name Link
🔨 Latest commit 8ced48c
🔍 Latest deploy log https://app.netlify.com/projects/hyprnote/deploys/692be0e69e82020008d8124c
😎 Deploy Preview https://deploy-preview-1999--hyprnote.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@netlify
Copy link

netlify bot commented Nov 30, 2025

Deploy Preview for hyprnote-storybook ready!

Name Link
🔨 Latest commit 8ced48c
🔍 Latest deploy log https://app.netlify.com/projects/hyprnote-storybook/deploys/692be0e6d023350008995c1c
😎 Deploy Preview https://deploy-preview-1999--hyprnote-storybook.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 30, 2025

📝 Walkthrough

Walkthrough

Adds a Storybook CI workflow and Storybook test-runner that capture Argos screenshots; removes Argos-driven visual tests and reporter from the web app and web CI; updates Storybook devDependencies and .gitignore; removes a sitemap route.

Changes

Cohort / File(s) Summary
New Storybook CI workflow
/.github/workflows/storybook_ci.yaml
Adds a GitHub Actions workflow to run Storybook CI (triggers: workflow_dispatch, pushes to main for specific paths, PRs to main). Job checks out code, runs pnpm install (local action), builds ui and storybook, installs Playwright/Chromium for apps/storybook, starts a static server, polls readiness, runs the Storybook test runner in CI mode, captures exit code, terminates the server, and uploads screenshots to Argos using ARGOS_TOKEN from secrets.
Modified web CI workflow
/.github/workflows/web_ci.yaml
Removes ARGOS_TOKEN env var and deletes steps related to waiting for Netlify preview, conditional BASE_URL setting, Playwright install, and running web visual tests.
Storybook package & test-runner
apps/storybook/package.json, apps/storybook/.gitignore, apps/storybook/.storybook/test-runner.ts
Adds test-storybook script and devDependencies (@argos-ci/cli, @argos-ci/storybook, @playwright/test, @storybook/test-runner, playwright), adds screenshots to .gitignore, and adds a Storybook test-runner exporting postVisit(page, context) that calls argosScreenshot.
Web app test/config cleanup
apps/web/package.json, apps/web/playwright.config.ts, apps/web/tests/visual.spec.ts
Removes @argos-ci/playwright devDependency, removes Argos reporter configuration from Playwright config (reporter reduced to CLI reporter), and deletes the visual regression test suite apps/web/tests/visual.spec.ts.
Sitemap change
apps/web/src/utils/sitemap.ts
Removes the /product/opensource entry from the sitemap routes.

Sequence Diagram

sequenceDiagram
    participant GH as GitHub Actions
    participant Repo as Repository
    participant Runner as CI Runner
    participant PW as Playwright/Chromium
    participant TR as Storybook Test Runner
    participant Argos as Argos Service

    GH->>Repo: trigger (push/PR/workflow_dispatch)
    GH->>Runner: start Storybook job
    Runner->>Repo: checkout code
    Runner->>Runner: pnpm install (local action)
    Runner->>Runner: pnpm -F ui build
    Runner->>Runner: pnpm -F storybook build
    Runner->>PW: install Playwright + Chromium (apps/storybook)
    Runner->>Runner: start static server for Storybook
    Runner->>Runner: poll server until ready
    Runner->>TR: run Storybook test runner (CI mode) against local URL
    loop per story
        TR->>PW: render story page
        TR->>Argos: argosScreenshot(page, context)
        Argos-->>Argos: store/compare screenshot
    end
    Argos-->>Runner: return upload/report result (via ARGOS_TOKEN)
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

  • Review focus:
    • apps/storybook/.storybook/test-runner.ts — verify exported TestRunnerConfig and argosScreenshot usage/signature.
    • .github/workflows/storybook_ci.yaml — validate server start/poll, timeouts, ARGOS_TOKEN usage and secret handling.
    • apps/web/playwright.config.ts — ensure reporter change is correct for CI.
    • apps/storybook/package.json — confirm devDependencies and test-storybook script support CI installs.

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main objective: migrating Argos CI from apps/web to apps/storybook, which is the core change in this PR.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Description check ✅ Passed The pull request description is comprehensive and directly related to the changeset, detailing the migration of Argos CI from apps/web to apps/storybook.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch devin/1764478970-remove-argos-web-add-storybook

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (1)
apps/web/playwright.config.ts (1)

9-9: Reporter config is valid but can be simplified now that Argos is removed

reporter: [[process.env.CI ? "dot" : "list"]] is type‑correct (one reporter tuple in an array), but with only a single reporter left you can simplify it for readability to either of these:

reporter: process.env.CI ? "dot" : "list",

or, if you prefer the tuple form while still supporting future additional reporters:

reporter: [[process.env.CI ? "dot" : "list"]],
// becomes, if you add more later:
// reporter: [[process.env.CI ? "dot" : "list"], ["some-other-reporter", { ... }]]

Given the current setup, the first form is the clearest and avoids the extra array nesting.

📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between fedec7f and 28827de.

📒 Files selected for processing (10)
  • .github/workflows/storybook_ci.yaml (1 hunks)
  • .github/workflows/web_ci.yaml (0 hunks)
  • apps/storybook/.gitignore (1 hunks)
  • apps/storybook/.storybook/main.ts (1 hunks)
  • apps/storybook/.storybook/vitest.setup.ts (1 hunks)
  • apps/storybook/package.json (2 hunks)
  • apps/storybook/vitest.config.ts (1 hunks)
  • apps/web/package.json (0 hunks)
  • apps/web/playwright.config.ts (1 hunks)
  • apps/web/tests/visual.spec.ts (0 hunks)
💤 Files with no reviewable changes (3)
  • apps/web/tests/visual.spec.ts
  • apps/web/package.json
  • .github/workflows/web_ci.yaml
🧰 Additional context used
📓 Path-based instructions (3)
**/*.ts

📄 CodeRabbit inference engine (CLAUDE.md)

**/*.ts: Agent implementations should use TypeScript and follow the established architectural patterns defined in the agent framework
Agent communication should use defined message protocols and interfaces

Files:

  • apps/storybook/vitest.config.ts
  • apps/web/playwright.config.ts
**/*.config.{ts,json}

📄 CodeRabbit inference engine (CLAUDE.md)

Agent configuration should be centralized and externalized from implementation logic

Files:

  • apps/storybook/vitest.config.ts
  • apps/web/playwright.config.ts
**/*.{ts,tsx}

📄 CodeRabbit inference engine (AGENTS.md)

**/*.{ts,tsx}: Avoid creating a bunch of types/interfaces if they are not shared. Especially for function props, just inline them instead.
Never do manual state management for form/mutation. Use useForm (from tanstack-form) and useQuery/useMutation (from tanstack-query) instead for 99% of cases. Avoid patterns like setError.
If there are many classNames with conditional logic, use cn (import from @hypr/utils). It is similar to clsx. Always pass an array and split by logical grouping.
Use motion/react instead of framer-motion.

Files:

  • apps/storybook/vitest.config.ts
  • apps/web/playwright.config.ts
🧠 Learnings (2)
📚 Learning: 2025-11-24T16:32:29.314Z
Learnt from: CR
Repo: fastrepl/hyprnote PR: 0
File: apps/web/content/changelog/AGENTS.md:0-0
Timestamp: 2025-11-24T16:32:29.314Z
Learning: Applies to apps/web/content/changelog/** : Only keep desktop-related changes when maintaining changelog entries from commits and diffs

Applied to files:

  • apps/storybook/.gitignore
📚 Learning: 2025-11-24T16:32:24.348Z
Learnt from: CR
Repo: fastrepl/hyprnote PR: 0
File: apps/desktop-e2e/AGENTS.md:0-0
Timestamp: 2025-11-24T16:32:24.348Z
Learning: Applies to apps/desktop-e2e/**/*.{test,spec}.{js,ts,tsx} : Refer to `scripts/setup-desktop-e2e.sh` for end-to-end test environment setup if setup is missing

Applied to files:

  • apps/storybook/package.json
🧬 Code graph analysis (1)
apps/storybook/vitest.config.ts (1)
apps/web/scripts/gen-agents.js (1)
  • __dirname (7-7)
🪛 actionlint (1.7.9)
.github/workflows/storybook_ci.yaml

30-30: description is required in metadata of "" action at "/home/jailuser/git/.github/actions/pnpm_install/action.yaml"

(action)


30-30: name is required in action metadata "/home/jailuser/git/.github/actions/pnpm_install/action.yaml"

(action)

🔇 Additional comments (8)
apps/storybook/.gitignore (1)

3-3: LGTM!

Adding "screenshots" to .gitignore is appropriate for excluding Playwright test artifacts from version control.

.github/workflows/storybook_ci.yaml (1)

1-34: Well-structured CI workflow.

The workflow properly:

  • Filters paths to relevant packages
  • Securely references ARGOS_TOKEN from secrets
  • Builds dependencies before running tests
  • Installs Playwright with Chromium browser

Note: Static analysis flagged that the local pnpm_install action is missing description and name in its metadata (Line 30). This is a pre-existing issue with the action definition at .github/actions/pnpm_install/action.yaml, not introduced by this PR.

apps/storybook/.storybook/main.ts (1)

9-9: LGTM!

Correctly adds the Vitest addon to enable Storybook-Vitest integration, which aligns with the new test infrastructure added in this PR.

apps/storybook/vitest.config.ts (2)

7-10: Good ESM compatibility pattern.

The __dirname fallback correctly handles both CommonJS and ES module environments.


12-44: Well-structured Vitest configuration.

The configuration properly:

  • Aliases workspace packages for test resolution
  • Integrates Storybook via storybookTest plugin
  • Conditionally uploads to Argos based on CI environment
  • Configures headless Chromium browser testing
  • References the setup file for Storybook initialization
apps/storybook/package.json (2)

8-9: LGTM!

The test script correctly invokes Vitest, and the trailing comma addition follows consistent JSON formatting.


18-31: Dependencies properly added.

All testing-related dependencies are correctly placed in devDependencies with appropriate versions:

  • Vitest ecosystem packages for browser testing
  • Playwright for browser automation
  • Argos integration for visual regression testing
  • Storybook Vitest addon

The versions are consistent and recent.

apps/storybook/.storybook/vitest.setup.ts (1)

1-8: Preview file exists and exports correct Storybook annotations.

The preview file (./preview.ts) is properly configured in the .storybook directory and exports a valid Preview type object with parameters and controls configuration. The Vitest setup correctly wires these annotations through setProjectAnnotations() and the beforeAll hook.

devin-ai-integration bot and others added 4 commits November 30, 2025 05:19
The @storybook/addon-vitest package only supports Storybook 9+/10+,
but this project uses Storybook 8.6.14. Switched to the Storybook
Test Runner approach which is compatible with Storybook v8+.

Changes:
- Replace @storybook/addon-vitest with @storybook/test-runner
- Replace vitest.config.ts and vitest.setup.ts with test-runner.ts
- Update package.json with correct dependencies and test script
- Update CI workflow to build Storybook, run test-runner, and upload to Argos
- Update pnpm-lock.yaml with new dependencies

Co-Authored-By: yujonglee <yujonglee.dev@gmail.com>
- Add @playwright/test and playwright to devDependencies
- Use pnpm exec playwright install instead of npx
- Add working-directory for CI steps to run in apps/storybook

Co-Authored-By: yujonglee <yujonglee.dev@gmail.com>
Co-Authored-By: yujonglee <yujonglee.dev@gmail.com>
- Build Storybook static before running tests
- Use curl loop to wait for http-server instead of wait-on package
- Properly handle server lifecycle with background process and cleanup
- This avoids the 'wait-on: not found' error from previous approach

Co-Authored-By: yujonglee <yujonglee.dev@gmail.com>
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (1)
.github/workflows/storybook_ci.yaml (1)

28-28: Remove redundant ARGOS_TOKEN environment variable definition.

ARGOS_TOKEN is already set at the job level (line 28), so redefining it in the upload step's environment block (lines 70–71) is unnecessary. The job-level env is inherited by all steps.

Apply this diff to remove the redundant definition:

      - name: Upload screenshots to Argos
        working-directory: apps/storybook
-       env:
-         ARGOS_TOKEN: ${{ secrets.ARGOS_TOKEN }}
        run: pnpm exec argos upload --token "$ARGOS_TOKEN" ./screenshots

Also applies to: 71-71

📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 48c9f20 and a0d0a30.

📒 Files selected for processing (1)
  • .github/workflows/storybook_ci.yaml (1 hunks)
🧰 Additional context used
🪛 actionlint (1.7.9)
.github/workflows/storybook_ci.yaml

31-31: description is required in metadata of "" action at "/home/jailuser/git/.github/actions/pnpm_install/action.yaml"

(action)


31-31: name is required in action metadata "/home/jailuser/git/.github/actions/pnpm_install/action.yaml"

(action)

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (5)
  • GitHub Check: Redirect rules - hyprnote
  • GitHub Check: Header rules - hyprnote
  • GitHub Check: Pages changed - hyprnote
  • GitHub Check: fmt
  • GitHub Check: ci (macos, macos-14)
🔇 Additional comments (3)
.github/workflows/storybook_ci.yaml (3)

31-31: Verify pnpm_install action metadata.

Static analysis flagged that the pnpm_install action at .github/actions/pnpm_install/action.yaml is missing required metadata fields (name and description). This should be addressed in that action's definition to comply with GitHub Actions best practices.


28-28: Verify ARGOS_TOKEN secret is configured in the repository.

The workflow relies on secrets.ARGOS_TOKEN being available. Ensure this secret is set in the repository settings and contains a valid Argos CI token. This should be part of the PR testing checklist mentioned in the PR objectives.

Also applies to: 71-71


38-67: HTTP server lifecycle management is robust.

The test runner step handles server startup, readiness checks, test execution, and cleanup well:

  • Starts http-server in the background with PID capture.
  • Waits up to 60 seconds with explicit curl health checks.
  • Handles startup failures by logging and exiting early.
  • Ensures the server is killed on both success and failure paths.

- Changed from 'pnpm test-storybook -- --url' to 'pnpm exec test-storybook --url'
- The -- separator was causing --url to be passed to Jest instead of test-storybook
- Added NODE_NO_WARNINGS and NODE_OPTIONS directly in the command
- Verified locally: all 25 tests pass and screenshots are generated

Co-Authored-By: yujonglee <yujonglee.dev@gmail.com>
@argos-ci
Copy link

argos-ci bot commented Nov 30, 2025

The latest updates on your projects. Learn more about Argos notifications ↗︎

Build Status Details Updated (UTC)
default (Inspect) 🔵 Orphan build 25 added Nov 30, 2025, 6:16 AM

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (1)
.github/workflows/storybook_ci.yaml (1)

27-28: Remove redundant ARGOS_TOKEN environment variable declaration.

The ARGOS_TOKEN is declared at the job level (line 28) and then re-declared at the step level (line 71). The step-level declaration is redundant since it will inherit from the job-level env. Simplify by removing the duplicate.

  - name: Upload screenshots to Argos
    working-directory: apps/storybook
-   env:
-     ARGOS_TOKEN: ${{ secrets.ARGOS_TOKEN }}
    run: pnpm exec argos upload --token "$ARGOS_TOKEN" ./screenshots

Also applies to: 70-72

📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between a0d0a30 and f9d2df2.

📒 Files selected for processing (1)
  • .github/workflows/storybook_ci.yaml (1 hunks)
🧰 Additional context used
🪛 actionlint (1.7.9)
.github/workflows/storybook_ci.yaml

31-31: description is required in metadata of "" action at "/home/jailuser/git/.github/actions/pnpm_install/action.yaml"

(action)


31-31: name is required in action metadata "/home/jailuser/git/.github/actions/pnpm_install/action.yaml"

(action)

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (7)
  • GitHub Check: Header rules - hyprnote
  • GitHub Check: Pages changed - hyprnote
  • GitHub Check: Redirect rules - hyprnote-storybook
  • GitHub Check: Header rules - hyprnote-storybook
  • GitHub Check: Pages changed - hyprnote-storybook
  • GitHub Check: ci (macos, macos-14)
  • GitHub Check: fmt
🔇 Additional comments (3)
.github/workflows/storybook_ci.yaml (3)

1-16: Trigger configuration is appropriate.

The workflow correctly filters for changes in storybook, ui, and tiptap packages and includes manual trigger via workflow_dispatch for ad-hoc runs.


38-67: Server startup and polling logic is solid.

The bash script correctly captures the server PID, implements a reasonable polling loop (~60s total timeout with 2s intervals), defensively handles cleanup with ||true, and properly propagates the test runner exit code. The explicit kill $SERVER_PID || true in the cleanup ensures the server is terminated regardless of test success or failure.


68-72: The upload path is correct and matches the @argos-ci/storybook default behavior.

The ./screenshots path referenced in the CI workflow is the standard output directory created by the argosScreenshot function from @argos-ci/storybook, which is used in .storybook/test-runner.ts. While there's no explicit local configuration of the output directory, the path is correctly aligned with the library's default behavior, and the .gitignore entry confirms this is the expected generated artifact location.

- Remove NODE_NO_WARNINGS=1 from storybook_ci.yaml (CodeRabbit review)
- Remove /product/opensource from sitemap.ts (fixes typecheck error)

Co-Authored-By: yujonglee <yujonglee.dev@gmail.com>
@devin-ai-integration
Copy link
Contributor

Devin is archived and cannot be woken up. Please unarchive Devin if you want to continue using it.

2 similar comments
@devin-ai-integration
Copy link
Contributor

Devin is archived and cannot be woken up. Please unarchive Devin if you want to continue using it.

@devin-ai-integration
Copy link
Contributor

Devin is archived and cannot be woken up. Please unarchive Devin if you want to continue using it.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (1)
.github/workflows/storybook_ci.yaml (1)

27-28: Remove redundant ARGOS_TOKEN env var declaration at step level.

ARGOS_TOKEN is already defined at the job level (line 28), so the redeclaration at line 71 is unnecessary. GitHub Actions automatically makes job-level env vars available to all steps.

Apply this diff to remove the redundancy:

      - name: Upload screenshots to Argos
        working-directory: apps/storybook
-       env:
-         ARGOS_TOKEN: ${{ secrets.ARGOS_TOKEN }}
        run: pnpm exec argos upload --token "$ARGOS_TOKEN" ./screenshots

Also applies to: 68-72

📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between f9d2df2 and a7906ad.

📒 Files selected for processing (2)
  • .github/workflows/storybook_ci.yaml (1 hunks)
  • apps/web/src/utils/sitemap.ts (0 hunks)
💤 Files with no reviewable changes (1)
  • apps/web/src/utils/sitemap.ts
🧰 Additional context used
🪛 actionlint (1.7.9)
.github/workflows/storybook_ci.yaml

31-31: description is required in metadata of "" action at "/home/jailuser/git/.github/actions/pnpm_install/action.yaml"

(action)


31-31: name is required in action metadata "/home/jailuser/git/.github/actions/pnpm_install/action.yaml"

(action)

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (8)
  • GitHub Check: Redirect rules - hyprnote-storybook
  • GitHub Check: Header rules - hyprnote-storybook
  • GitHub Check: Pages changed - hyprnote-storybook
  • GitHub Check: fmt
  • GitHub Check: Redirect rules - hyprnote
  • GitHub Check: Header rules - hyprnote
  • GitHub Check: ci (macos, macos-14)
  • GitHub Check: Pages changed - hyprnote
🔇 Additional comments (1)
.github/workflows/storybook_ci.yaml (1)

1-72: Workflow structure is solid and aligns with PR objectives.

The workflow correctly builds Storybook statically, serves it locally, runs the test-runner with Argos screenshot capture, and uploads results. The server readiness polling (up to 60s), exit code preservation, and cleanup (killing the http-server process) are all properly implemented. The NODE_OPTIONS=--experimental-vm-modules flag at line 63 is correctly set for ESM/Jest compatibility required by the test-runner.

- Change UI CSS import from source file (src/styles/globals.css) to built file (dist/globals.css)
- This ensures Tailwind CSS is properly processed and included in Storybook static build
- Fixes Argos screenshots showing unstyled components

Co-Authored-By: yujonglee <yujonglee.dev@gmail.com>
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (1)
apps/storybook/.storybook/preview.tsx (1)

3-4: Confirm dist/globals.css availability in Storybook builds and CI

Switching from src/styles/globals.css to dist/globals.css is fine as long as the packages/ui/dist artifacts exist before pnpm -F storybook build runs (locally and in CI). If dist is only produced by a separate build step and not committed, this import will break the Storybook build.

Two follow-ups to consider:

  • Ensure your CI pipeline (and local workflow) always builds or ships packages/ui/dist/globals.css before Storybook runs.
  • Optionally, if @hypr/ui exposes this stylesheet as a public entry (e.g. @hypr/ui/dist/globals.css or similar), prefer a package-level import over a deep relative path for better encapsulation.
📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between a7906ad and ab01f2a.

📒 Files selected for processing (1)
  • apps/storybook/.storybook/preview.tsx (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (5)
  • GitHub Check: Redirect rules - hyprnote
  • GitHub Check: Header rules - hyprnote
  • GitHub Check: Pages changed - hyprnote
  • GitHub Check: fmt
  • GitHub Check: ci (macos, macos-14)

The Storybook preview imports built CSS from packages/ui/dist/globals.css,
which requires the UI package to be built first. This updates the Netlify
build command to run 'pnpm -F ui build' before building Storybook.

Co-Authored-By: yujonglee <yujonglee.dev@gmail.com>
@yujonglee yujonglee closed this Dec 1, 2025
@yujonglee yujonglee deleted the devin/1764478970-remove-argos-web-add-storybook branch December 1, 2025 04:31
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.

2 participants