Skip to content

chore: integrate lighthouse#8

Merged
prdai merged 5 commits intomainfrom
CROW-105-lighthouse-integrate-for-rogue-store
Dec 21, 2025
Merged

chore: integrate lighthouse#8
prdai merged 5 commits intomainfrom
CROW-105-lighthouse-integrate-for-rogue-store

Conversation

@prdai
Copy link
Copy Markdown
Member

@prdai prdai commented Dec 2, 2025

Summary by CodeRabbit

  • Chores

    • Added a Lighthouse performance audit script to the project.
    • Updated version control settings to exclude generated audit output from commits.
  • Style

    • Minor code formatting changes with no behavioral impact.

✏️ Tip: You can customize this high-level summary in your review settings.

@prdai prdai requested a review from Methika1234 December 2, 2025 09:34
@gemini-code-assist
Copy link
Copy Markdown

Summary of Changes

Hello @prdai, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request introduces Lighthouse integration into the project's development workflow. The primary goal is to provide a straightforward way to run performance audits, helping developers monitor and improve the application's performance. This is achieved by adding a dedicated script for Lighthouse and ensuring its output files are properly ignored by version control.

Highlights

  • Lighthouse Integration: A new script, lighthouse:performance, has been added to package.json to enable running Lighthouse performance audits against the local development server.
  • Git Ignore Update: The .gitignore file has been updated to exclude the .lighthouse/ directory, ensuring that Lighthouse reports and related files are not committed to the repository.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Dec 2, 2025

Important

Review skipped

Review was skipped due to path filters

⛔ Files ignored due to path filters (1)
  • bun.lock is excluded by !**/*.lock

CodeRabbit blocks several paths by default. You can override this behavior by explicitly including those paths in the path filters. For example, including **/dist/** will override the default block on the dist directory, by removing the pattern from both the lists.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Note

Other AI code review bot(s) detected

CodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review.

Walkthrough

Adds a Lighthouse performance audit script and dependency to package.json, adds a gitignore entry for a lighthouse output directory, and applies a non-functional formatting change to components/ui/button.tsx.

Changes

Cohort / File(s) Summary
Git ignore update
​.gitignore
Adds an entry to ignore the Lighthouse output directory (lighthouse/).
Package manifest
package.json
Adds lighthouse to dependencies and a new script lighthouse:performance that runs Lighthouse and outputs JSON to ./.lighthouse/lighthouse-performance.json.
UI component formatting
components/ui/button.tsx
Non-functional formatting change: the ButtonProps type extends clause was reflowed across lines; no signature or behavior changes.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

  • Check package.json script quoting/escaping and that the bunx invocation is intentional.
  • Confirm whether lighthouse should be a dependency or devDependency per project policy.
  • Verify the .gitignore entry matches the script output path (lighthouse/ vs /.lighthouse/).
  • Glance at components/ui/button.tsx to confirm the change is purely formatting.

Poem

🐇 I nudged the terminal, gave a tiny hop,
Metrics danced like fireflies—click, blink, and bop.
Reports tucked neatly where commits can't peep,
A hush in the repo, a dream-rabbit's leap,
Cheers for builds that hum and never stop.

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The pull request title 'chore: integrate lighthouse' accurately describes the main change: integrating Lighthouse into the project through configuration files, scripts, and dependencies.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request integrates Lighthouse for performance analysis by adding a new script to package.json and ignoring the report output directory in .gitignore. The changes are logical and well-contained. I have one suggestion for the new script in package.json to improve consistency with the project's tooling and to make CI logs cleaner.

"prepare": "husky",
"lint-staged": "lint-staged"
"lint-staged": "lint-staged",
"lighthouse:performance": "bunx lighthouse http://localhost:3000 --only-categories=performance --output=json --verbose --chrome-flags=\"--headless\" --output-path ./.lighthouse/lighthouse-performance.json"
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

For consistency with the project's tooling, which appears to be pnpm (based on pnpm run dev in playwright.config.ts and .pnpm-store in .gitignore), it would be better to use pnpm dlx instead of bunx. This avoids introducing a dependency on the bun runtime if it's not the project's standard.

Additionally, the --verbose flag can create a lot of noise in the logs, especially in a CI environment. It's generally better to remove it for cleaner output, and only add it back when debugging is needed.

Suggested change
"lighthouse:performance": "bunx lighthouse http://localhost:3000 --only-categories=performance --output=json --verbose --chrome-flags=\"--headless\" --output-path ./.lighthouse/lighthouse-performance.json"
"lighthouse:performance": "pnpm dlx lighthouse http://localhost:3000 --only-categories=performance --output=json --chrome-flags=\"--headless\" --output-path ./.lighthouse/lighthouse-performance.json"

@cloudflare-workers-and-pages
Copy link
Copy Markdown
Contributor

cloudflare-workers-and-pages bot commented Dec 2, 2025

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
crow-rogue-store-dev 24c3601 Commit Preview URL

Branch Preview URL
Dec 21 2025, 03:45 PM

Copy link
Copy Markdown
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: 2

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between e1d8b8c and 3e215b6.

📒 Files selected for processing (2)
  • .gitignore (1 hunks)
  • package.json (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). (3)
  • GitHub Check: test
  • GitHub Check: build-and-push
  • GitHub Check: Workers Builds: rouge-store
🔇 Additional comments (1)
.gitignore (1)

47-47: The .lighthouse/ directory entry is properly configured.

This aligns with the output path specified in the Lighthouse script and follows existing .gitignore conventions.

"prepare": "husky",
"lint-staged": "lint-staged"
"lint-staged": "lint-staged",
"lighthouse:performance": "bunx lighthouse http://localhost:3000 --only-categories=performance --output=json --verbose --chrome-flags=\"--headless\" --output-path ./.lighthouse/lighthouse-performance.json"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical

Add Lighthouse to devDependencies.

The script references lighthouse, but it is not declared in devDependencies. The command will fail at runtime with a "not found" error when developers attempt to run it.

Add lighthouse to the devDependencies section:

  "devDependencies": {
    "@eslint/eslintrc": "^3",
    "@playwright/test": "^1.56.1",
    "@tailwindcss/postcss": "^4",
    "@types/node": "^20.19.24",
    "@types/react": "^19",
    "@types/react-dom": "^19",
    "eslint": "^9",
    "eslint-config-next": "15.5.6",
    "husky": "^9.1.7",
    "lint-staged": "^16.2.6",
+   "lighthouse": "^12",
    "prettier": "^3.6.2",
    "tailwindcss": "^4",
    "typescript": "^5",
    "wrangler": "^4.45.3"
  }

Then update the script to use pnpm exec for consistency with other scripts:

-    "lighthouse:performance": "bunx lighthouse http://localhost:3000 --only-categories=performance --output=json --verbose --chrome-flags=\"--headless\" --output-path ./.lighthouse/lighthouse-performance.json"
+    "lighthouse:performance": "pnpm exec lighthouse http://localhost:3000 --only-categories=performance --output=json --verbose --chrome-flags=\"--headless\" --output-path ./.lighthouse/lighthouse-performance.json"

Committable suggestion skipped: line range outside the PR's diff.

🤖 Prompt for AI Agents
package.json around line 24: the "lighthouse:performance" script calls an
uninstalled CLI and uses bunx; add "lighthouse" to devDependencies (pick a
semver pinned or caret version consistent with repo policy) and update the
script to run via "pnpm exec lighthouse ..." instead of "bunx lighthouse ..." so
the command resolves reliably for all developers; keep the same flags and output
path but ensure package.json devDependencies includes the new "lighthouse"
entry.

⚠️ Potential issue | 🟡 Minor

🧩 Analysis chain

🏁 Script executed:

cat -n package.json

Repository: CROW-B3/rogue-store

Length of output: 2776


🏁 Script executed:

# Check for lockfile patterns and package manager configuration
ls -la | grep -E "(package-lock\.json|yarn\.lock|pnpm-lock\.yaml|bun\.lockb|\.npmrc|\.pnpmrc|\.bunfig)"

# Also check for package manager hints in CI/config files
find . -maxdepth 2 -type f \( -name ".node-version" -o -name ".nvmrc" -o -name ".npmrc" -o -name ".pnpmrc" \) 2>/dev/null | head -20

# Check if lighthouse is listed as a dependency
grep -i "lighthouse" package.json

Repository: CROW-B3/rogue-store

Length of output: 339


Standardize package runner: use pnpm exec instead of bunx.

The script uses bunx while the project uses pnpm (confirmed by pnpm-lock.yaml). The format script (line 12) uses pnpm exec, indicating inconsistent execution patterns. Update to pnpm exec for consistency with the project's package manager.

-    "lighthouse:performance": "bunx lighthouse http://localhost:3000 --only-categories=performance --output=json --verbose --chrome-flags=\"--headless\" --output-path ./.lighthouse/lighthouse-performance.json"
+    "lighthouse:performance": "pnpm exec lighthouse http://localhost:3000 --only-categories=performance --output=json --verbose --chrome-flags=\"--headless\" --output-path ./.lighthouse/lighthouse-performance.json"
📝 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
"lighthouse:performance": "bunx lighthouse http://localhost:3000 --only-categories=performance --output=json --verbose --chrome-flags=\"--headless\" --output-path ./.lighthouse/lighthouse-performance.json"
"lighthouse:performance": "pnpm exec lighthouse http://localhost:3000 --only-categories=performance --output=json --verbose --chrome-flags=\"--headless\" --output-path ./.lighthouse/lighthouse-performance.json"
🤖 Prompt for AI Agents
In package.json around line 24, the "lighthouse:performance" script uses "bunx"
but the repo standard is pnpm; update the command to use "pnpm exec" in place of
"bunx" (preserve the rest of the arguments and flags exactly, ensuring the
--chrome-flags quoting stays valid for package.json shell execution).

@prdai prdai force-pushed the CROW-105-lighthouse-integrate-for-rogue-store branch from 525334e to b9dbdfd Compare December 21, 2025 15:37
@prdai prdai merged commit a798cba into main Dec 21, 2025
4 checks passed
prdai added a commit that referenced this pull request Mar 16, 2026
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