Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Onboard extention #547

Merged
merged 6 commits into from
Feb 23, 2025
Merged

Onboard extention #547

merged 6 commits into from
Feb 23, 2025

Conversation

swoopertr
Copy link
Contributor

adding extention in develop branch line

Copy link
Contributor

coderabbitai bot commented Feb 18, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

This pull request introduces modifications to both the backend and the Chrome extension. In the backend, the .env file has been updated to include a new environment variable NODE_ENV, set to development. In the extension, new functions and constants have been added to facilitate element highlighting and selector copying. The background script now includes a setup() function to initialize these features, and a new manifest file has been created to register the extension with the necessary permissions and configurations.

Changes

File(s) Change Summary
backend/.env Added NODE_ENV=development.
extention/app.js & extention/background.js Introduced functionality for element highlighting, selector generation, and event handling via multiple new functions such as createStickyDiv(), terminate(), and setup().
extention/manifest.json Created a new manifest file for the "Bluewave Element Selector" Chrome extension with manifest v3, activeTab & scripting permissions, and command shortcuts.

Possibly related PRs

Suggested reviewers

  • swoopertr

📜 Recent review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between fb4e144 and 0ed8c21.

📒 Files selected for processing (1)
  • extention/app.js (1 hunks)
✨ Finishing Touches
  • 📝 Generate Docstrings (Beta)

Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

‼️ IMPORTANT
Auto-reply has been disabled for this repository in the CodeRabbit settings. The CodeRabbit bot will not respond to your replies unless it is explicitly tagged.

  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR. (Beta)
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

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: 3

🔭 Outside diff range comments (1)
backend/.env (1)

10-10: ⚠️ Potential issue

Yo, we got some sensitive info exposed here! 🚨

The email password should not be committed to version control, even if it's a development environment.

Consider using environment-specific .env files and add .env to .gitignore.

🧹 Nitpick comments (1)
extention/app.js (1)

205-213: Clean up that unnecessary this alias, fam! 💯

The this alias is unnecessary in the throttle function since arrow functions inherit this from their enclosing scope.

-		const context = this
-		if (!inThrottle) {
-			inThrottle = true;
-			setTimeout(() => (inThrottle = false), limit);
-			lastResult = func.apply(context, args);
+		if (!inThrottle) {
+			inThrottle = true;
+			setTimeout(() => (inThrottle = false), limit);
+			lastResult = func.apply(this, args);
🧰 Tools
🪛 Biome (1.9.4)

[error] 207-207: This aliasing of this is unnecessary.

Arrow functions inherits this from their enclosing scope.
Safe fix: Use this instead of an alias.

(lint/complexity/noUselessThisAlias)

📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 14e2bbc and 576b2a3.

⛔ Files ignored due to path filters (1)
  • extention/icon.png is excluded by !**/*.png
📒 Files selected for processing (4)
  • backend/.env (2 hunks)
  • extention/app.js (1 hunks)
  • extention/background.js (1 hunks)
  • extention/manifest.json (1 hunks)
🧰 Additional context used
🪛 Biome (1.9.4)
extention/app.js

[error] 21-21: This is an unexpected use of the debugger statement.

Unsafe fix: Remove debugger statement

(lint/suspicious/noDebugger)


[error] 207-207: This aliasing of this is unnecessary.

Arrow functions inherits this from their enclosing scope.
Safe fix: Use this instead of an alias.

(lint/complexity/noUselessThisAlias)

⏰ Context from checks skipped due to timeout of 90000ms (1)
  • GitHub Check: build (22.x)
🔇 Additional comments (2)
extention/background.js (1)

1-7: Yo, this event listener setup is straight fire! 🔥

The implementation correctly uses the Chrome extension APIs to execute the setup function in the tab context.

extention/manifest.json (1)

1-28: This manifest is looking clean, no cap! ✨

The manifest.json is well-structured with appropriate permissions and configurations. The keyboard shortcuts are a nice touch!


function createStickyDiv() {
// Create the container div
debugger;
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

Yo dawg, that debugger statement's gotta bounce! 🚫

Remove the debugger statement as it shouldn't be in production code.

-	debugger;
📝 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
debugger;
🧰 Tools
🪛 Biome (1.9.4)

[error] 21-21: This is an unexpected use of the debugger statement.

Unsafe fix: Remove debugger statement

(lint/suspicious/noDebugger)

@erenfn erenfn changed the base branch from master to develop February 23, 2025 22:59
@erenfn erenfn self-requested a review February 23, 2025 23:00
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
@erenfn erenfn merged commit 2982976 into develop Feb 23, 2025
1 of 2 checks passed
@coderabbitai coderabbitai bot mentioned this pull request Feb 24, 2025
9 tasks
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