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

New changes to prod #566

Merged
merged 7 commits into from
Oct 3, 2023
Merged

New changes to prod #566

merged 7 commits into from
Oct 3, 2023

Conversation

fonstack
Copy link
Member

@fonstack fonstack commented Oct 3, 2023

Summary by CodeRabbit

  • New Feature: Updated the competition description in severities.ts to provide more detailed instructions for participants.
  • New Feature: Introduced a new PrivateAuditsIcon component in NavLinks.tsx, enhancing the visual representation of private audits.
  • Chore: Removed unnecessary console.log statements from various components and functions, improving code cleanliness and performance.
  • New Feature: Integrated the LogRocket library for better error tracking and user session management. This feature will enhance debugging capabilities and overall application stability.

@fonstack fonstack requested a review from shayzluf October 3, 2023 09:27
@github-actions
Copy link

github-actions bot commented Oct 3, 2023

Image description CodeRabbit

Walkthrough

This update brings enhanced clarity to competition guidelines, introduces a new SVG icon for private audits, removes unnecessary console.log statements, and integrates the LogRocket library for improved logging. The changes are well-structured, focusing on improving user experience, code cleanliness, and debugging capabilities.

Changes

Files Summary
packages/shared/src/severities.ts Updated the description of a competition, providing more detailed instructions for participants.
packages/web/src/components/Sidebar/NavLinks/NavLinks.tsx Replaced the AuditsIcon component with a new PrivateAuditsIcon component for better visual distinction.
packages/web/src/hooks/subgraph/vaults/useVaults.tsx, packages/web/src/pages/CommitteeTools/PayoutsTool/PayoutFormPage/PayoutFormPage.tsx, packages/web/src/pages/Honeypots/VaultDetailsPage/savedSubmissionsService.ts, packages/web/src/pages/Submissions/SubmissionFormPage/FormSteps/SubmissionDescriptions/SubmissionDescriptions.tsx Removed console.log statements from various components and functions, enhancing code cleanliness.
packages/web/src/index.tsx, packages/web/src/settings.ts Introduced a new dependency on the LogRocket library for better logging capabilities, initialized it with the provided LOGROCKET_APP_ID, and set the inputSanitizer option to true.

"In the land of code, where logic is king, 🤴
A rabbit hopped in, making updates sing. 🐇🎵
Guidelines made clear, icons shining bright, ✨
Console logs gone, cleaned out of sight. 👀
With LogRocket's power, we take flight, 🚀
Celebrating changes, oh what a sight! 🎉"


Uplevel your code reviews with CodeRabbit Pro

CodeRabbit Pro

If you like this project, please support us by purchasing the Pro version. The Pro version has advanced context, superior noise reduction and several proprietary improvements compared to the open source version. Moreover, CodeRabbit Pro is free for open source projects.

shayzluf
shayzluf previously approved these changes Oct 3, 2023
Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Image description CodeRabbit

Commits Files that changed from the base of the PR and between c46589b and a2f2088 commits.
Files selected (6)
  • packages/shared/src/severities.ts (1)
  • packages/web/src/components/Sidebar/NavLinks/NavLinks.tsx (2)
  • packages/web/src/hooks/subgraph/vaults/useVaults.tsx (1)
  • packages/web/src/pages/CommitteeTools/PayoutsTool/PayoutFormPage/PayoutFormPage.tsx (1)
  • packages/web/src/pages/Honeypots/VaultDetailsPage/savedSubmissionsService.ts (1)
  • packages/web/src/pages/Submissions/SubmissionFormPage/FormSteps/SubmissionDescriptions/SubmissionDescriptions.tsx (1)
Files ignored due to filter (2)
  • packages/shared/package.json
  • packages/web/src/assets/icons/custom/private-audits.svg
Files skipped from review due to trivial changes (5)
  • packages/web/src/components/Sidebar/NavLinks/NavLinks.tsx
  • packages/web/src/hooks/subgraph/vaults/useVaults.tsx
  • packages/web/src/pages/CommitteeTools/PayoutsTool/PayoutFormPage/PayoutFormPage.tsx
  • packages/web/src/pages/Honeypots/VaultDetailsPage/savedSubmissionsService.ts
  • packages/web/src/pages/Submissions/SubmissionFormPage/FormSteps/SubmissionDescriptions/SubmissionDescriptions.tsx
Review comments generated (1)
  • Review: 0
  • LGTM: 1

Tips

Chat with Image description CodeRabbit Bot (@coderabbitai)

  • Reply on review comments left by this bot to ask follow-up questions. A review comment is a comment on a diff or a file.
  • Invite the bot into a review comment chain by tagging @coderabbitai in a reply.

Code suggestions

  • The bot may make code suggestions, but please review them carefully before committing since the line number ranges may be misaligned.
  • You can edit the comment made by the bot and manually tweak the suggestion if it is slightly off.

Pausing incremental reviews

  • Add @coderabbitai: ignore anywhere in the PR description to pause further reviews from the bot.

@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Oct 3, 2023

Deploying with  Cloudflare Pages  Cloudflare Pages

Latest commit: cb8bd25
Status: ✅  Deploy successful!
Preview URL: https://20e5f713.dapp-a9y.pages.dev
Branch Preview URL: https://develop.dapp-a9y.pages.dev

View logs

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Image description CodeRabbit

Commits Files that changed from the base of the PR and between a2f2088 and cb8bd25 commits.
Files selected (2)
  • packages/web/src/index.tsx (1)
  • packages/web/src/settings.ts (2)
Files ignored due to filter (2)
  • packages/web/package.json
  • yarn.lock
Files skipped from review due to trivial changes (1)
  • packages/web/src/settings.ts
Review comments generated (2)
  • Review: 2
  • LGTM: 0

Tips

Chat with Image description CodeRabbit Bot (@coderabbitai)

  • Reply on review comments left by this bot to ask follow-up questions. A review comment is a comment on a diff or a file.
  • Invite the bot into a review comment chain by tagging @coderabbitai in a reply.

Code suggestions

  • The bot may make code suggestions, but please review them carefully before committing since the line number ranges may be misaligned.
  • You can edit the comment made by the bot and manually tweak the suggestion if it is slightly off.

Pausing incremental reviews

  • Add @coderabbitai: ignore anywhere in the PR description to pause further reviews from the bot.

Comment on lines +2 to +4
import LogRocket from "logrocket";
import { createRoot } from "react-dom/client";
import { LOGROCKET_APP_ID } from "settings";
Copy link

Choose a reason for hiding this comment

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

Image description CodeRabbit

The import of LogRocket and LOGROCKET_APP_ID should be done in a try-catch block to handle any potential errors that might occur during the import process. This is especially important if these modules are not guaranteed to exist or if they could potentially throw an error upon import.

+ try {
    import LogRocket from "logrocket";
    import { LOGROCKET_APP_ID } from "settings";
+ } catch (error) {
+   console.error("Error importing LogRocket or LOGROCKET_APP_ID: ", error);
+ }

Comment on lines +6 to +10
LogRocket.init(LOGROCKET_APP_ID, {
dom: {
inputSanitizer: true,
},
});
Copy link

Choose a reason for hiding this comment

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

Image description CodeRabbit

The initialization of LogRocket should also be wrapped in a try-catch block. If there's an issue with the LOGROCKET_APP_ID or the LogRocket library itself, it could cause the application to crash. By wrapping this in a try-catch block, we can prevent such crashes and log the error for debugging purposes.

+ try {
    LogRocket.init(LOGROCKET_APP_ID, {
      dom: {
        inputSanitizer: true,
      },
    });
+ } catch (error) {
+   console.error("Error initializing LogRocket: ", error);
+ }

@shayzluf shayzluf merged commit 770e671 into main Oct 3, 2023
5 checks passed
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