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

Merge Develop to Staging v24.51.0 #9380

Merged
merged 26 commits into from
Dec 11, 2024
Merged

Merge Develop to Staging v24.51.0 #9380

merged 26 commits into from
Dec 11, 2024

Conversation

nihal467
Copy link
Member

Proposed Changes

  • Fixes #issue_number
  • Change 1
  • Change 2
  • More?

@ohcnetwork/care-fe-code-reviewers

Merge Checklist

  • Add specs that demonstrate bug / test a new feature.
  • Update product documentation.
  • Ensure that UI text is kept in I18n files.
  • Prep screenshot or demo video for changelog entry, and attach it to issue.
  • Request for Peer Reviews
  • Completion of QA

nihal467 and others added 23 commits December 5, 2024 10:24
#9094)

* Add update button in log details page

* using translation for button text

* fixed layout of button.

* Using shadcn button in update-log-details.

* Changed button color.

* Added primary button variant.

* Corrected implementation of link as child of button.

* fix outline variant button having no text color applied

* improve buttons

* remove unrelated changes

* use similar button in brief log update details page too

* fix cypress

---------

Co-authored-by: rithviknishad <mail@rithviknishad.dev>
Bumps [cypress](https://github.com/cypress-io/cypress) from 13.16.0 to 13.16.1.
- [Release notes](https://github.com/cypress-io/cypress/releases)
- [Changelog](https://github.com/cypress-io/cypress/blob/develop/CHANGELOG.md)
- [Commits](cypress-io/cypress@v13.16.0...v13.16.1)

---
updated-dependencies:
- dependency-name: cypress
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Bodhish Thomas <bodhish@gmail.com>
Co-authored-by: Shivank Kacker <kacker.shivank@gmail.com>
Bumps [class-variance-authority](https://github.com/joe-bell/cva) from 0.7.0 to 0.7.1.
- [Release notes](https://github.com/joe-bell/cva/releases)
- [Commits](joe-bell/cva@v0.7.0...v0.7.1)

---
updated-dependencies:
- dependency-name: class-variance-authority
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [react-i18next](https://github.com/i18next/react-i18next) from 15.1.1 to 15.1.3.
- [Changelog](https://github.com/i18next/react-i18next/blob/master/CHANGELOG.md)
- [Commits](i18next/react-i18next@v15.1.1...v15.1.3)

---
updated-dependencies:
- dependency-name: react-i18next
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [cross-spawn](https://github.com/moxystudio/node-cross-spawn) from 7.0.3 to 7.0.6.
- [Changelog](https://github.com/moxystudio/node-cross-spawn/blob/master/CHANGELOG.md)
- [Commits](moxystudio/node-cross-spawn@v7.0.3...v7.0.6)

---
updated-dependencies:
- dependency-name: cross-spawn
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [i18next-http-backend](https://github.com/i18next/i18next-http-backend) from 2.6.2 to 3.0.1.
- [Changelog](https://github.com/i18next/i18next-http-backend/blob/master/CHANGELOG.md)
- [Commits](i18next/i18next-http-backend@v2.6.2...v3.0.1)

---
updated-dependencies:
- dependency-name: i18next-http-backend
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [cmdk](https://github.com/pacocoursey/cmdk/tree/HEAD/cmdk) from 1.0.0 to 1.0.4.
- [Release notes](https://github.com/pacocoursey/cmdk/releases)
- [Commits](https://github.com/pacocoursey/cmdk/commits/v1.0.4/cmdk)

---
updated-dependencies:
- dependency-name: cmdk
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [nanoid](https://github.com/ai/nanoid) from 3.3.7 to 3.3.8.
- [Release notes](https://github.com/ai/nanoid/releases)
- [Changelog](https://github.com/ai/nanoid/blob/main/CHANGELOG.md)
- [Commits](ai/nanoid@3.3.7...3.3.8)

---
updated-dependencies:
- dependency-name: nanoid
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
@nihal467 nihal467 requested a review from a team as a code owner December 11, 2024 12:47
current = current[key];
}

current[keys[keys.length - 1]] = value;

Check warning

Code scanning / CodeQL

Prototype-polluting function Medium

The property chain
here
is recursively assigned to
current
without guarding against prototype pollution.

Copilot Autofix AI about 1 month ago

To fix the problem, we need to ensure that the deep assignment only occurs for own properties of the destination object. This can be achieved by adding a check to ensure that the current object has the property before assigning to it. Additionally, we should continue to block the __proto__, constructor, and prototype properties.

  • Modify the handleValueChange function to include a check that ensures only own properties of the destination object are assigned.
  • Add a check to ensure that the current object has the property before assigning to it.
  • Ensure that the existing validation for dangerous keys remains in place.
Suggested changeset 1
src/components/Facility/Investigations/ShowInvestigation.tsx

Autofix patch

Autofix patch
Run the following command in your local git repository to apply this patch
cat << 'EOF' | git apply
diff --git a/src/components/Facility/Investigations/ShowInvestigation.tsx b/src/components/Facility/Investigations/ShowInvestigation.tsx
--- a/src/components/Facility/Investigations/ShowInvestigation.tsx
+++ b/src/components/Facility/Investigations/ShowInvestigation.tsx
@@ -108,3 +108,3 @@
       const key = keys[i];
-      if (!current[key]) current[key] = {};
+      if (!current.hasOwnProperty(key)) current[key] = {};
       current = current[key];
EOF
@@ -108,3 +108,3 @@
const key = keys[i];
if (!current[key]) current[key] = {};
if (!current.hasOwnProperty(key)) current[key] = {};
current = current[key];
Copilot is powered by AI and may make mistakes. Always verify output.
Unable to commit as this autofix suggestion is now outdated
Positive Feedback
Negative Feedback

Provide additional feedback

Please help us improve GitHub Copilot by sharing more details about this comment.

Please select one or more of the options
if (!current[key]) current[key] = {};
current = current[key];
}
current[keys[keys.length - 1]] = value;

Check warning

Code scanning / CodeQL

Prototype-polluting function Medium

The property chain
here
is recursively assigned to
current
without guarding against prototype pollution.

Copilot Autofix AI about 1 month ago

To fix the problem, we need to ensure that each key in the chain is validated before it is used to assign a value to the object. This can be done by adding a check within the loop that iterates over the keys. Specifically, we should skip any key that matches __proto__, constructor, or prototype to prevent prototype pollution.

  • Modify the loop that iterates over the keys to include a check for dangerous keys.
  • If a dangerous key is encountered, skip the assignment for that key.
  • This change should be made in the handleValueChange function in the file src/components/Facility/Investigations/Table.tsx.
Suggested changeset 1
src/components/Facility/Investigations/Table.tsx

Autofix patch

Autofix patch
Run the following command in your local git repository to apply this patch
cat << 'EOF' | git apply
diff --git a/src/components/Facility/Investigations/Table.tsx b/src/components/Facility/Investigations/Table.tsx
--- a/src/components/Facility/Investigations/Table.tsx
+++ b/src/components/Facility/Investigations/Table.tsx
@@ -75,2 +75,5 @@
       const key = keys[i];
+      if (["__proto__", "constructor", "prototype"].includes(key)) {
+        return;
+      }
       if (!current[key]) current[key] = {};
@@ -78,3 +81,7 @@
     }
-    current[keys[keys.length - 1]] = value;
+    const lastKey = keys[keys.length - 1];
+    if (["__proto__", "constructor", "prototype"].includes(lastKey)) {
+      return;
+    }
+    current[lastKey] = value;
     dispatch({ type: "set_form", form });
EOF
@@ -75,2 +75,5 @@
const key = keys[i];
if (["__proto__", "constructor", "prototype"].includes(key)) {
return;
}
if (!current[key]) current[key] = {};
@@ -78,3 +81,7 @@
}
current[keys[keys.length - 1]] = value;
const lastKey = keys[keys.length - 1];
if (["__proto__", "constructor", "prototype"].includes(lastKey)) {
return;
}
current[lastKey] = value;
dispatch({ type: "set_form", form });
Copilot is powered by AI and may make mistakes. Always verify output.
Unable to commit as this autofix suggestion is now outdated
Positive Feedback
Negative Feedback

Provide additional feedback

Please help us improve GitHub Copilot by sharing more details about this comment.

Please select one or more of the options
Copy link
Contributor

coderabbitai bot commented Dec 11, 2024

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

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


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:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • 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. (Experiment)
  • @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.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

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

netlify bot commented Dec 11, 2024

Deploy Preview for care-ohc ready!

Name Link
🔨 Latest commit f70b3ad
🔍 Latest deploy log https://app.netlify.com/sites/care-ohc/deploys/6759c3d574d18b00077a538b
😎 Deploy Preview https://deploy-preview-9380--care-ohc.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 site configuration.

Copy link

cypress bot commented Dec 11, 2024

CARE    Run #4016

Run Properties:  status check passed Passed #4016  •  git commit f70b3ad0fe: Merge Develop to Staging v24.51.0
Project CARE
Branch Review develop
Run status status check passed Passed #4016
Run duration 05m 18s
Commit git commit f70b3ad0fe: Merge Develop to Staging v24.51.0
Committer Mohammed Nihal
View all properties for this run ↗︎

Test results
Tests that failed  Failures 0
Tests that were flaky  Flaky 0
Tests that did not run due to a developer annotating a test with .skip  Pending 0
Tests that did not run due to a failure in a mocha hook  Skipped 0
Tests that passed  Passing 153
View all changes introduced in this branch ↗︎

Copy link

cloudflare-workers-and-pages bot commented Dec 11, 2024

Deploying care-fe with  Cloudflare Pages  Cloudflare Pages

Latest commit: f70b3ad
Status: ✅  Deploy successful!
Preview URL: https://0f3f79d3.care-fe.pages.dev

View logs

@rithviknishad rithviknishad merged commit 732ccd6 into staging Dec 11, 2024
68 of 69 checks passed
Copy link

@nihal467 Your efforts have helped advance digital healthcare and TeleICU systems. 🚀 Thank you for taking the time out to make CARE better. We hope you continue to innovate and contribute; your impact is immense! 🙌

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.