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

fix(SGS): Fixing bug in FindVehicleFormField for Order-Plate #14904

Merged
merged 3 commits into from
May 23, 2024

Conversation

davidkef
Copy link
Member

@davidkef davidkef commented May 23, 2024

...

Attach a link to issue if relevant

What

Specify what you're trying to achieve

Why

Specify why you need to achieve this

Screenshots / Gifs

Attach Screenshots / Gifs to help reviewers understand the scope of the pull request

Checklist:

  • I have performed a self-review of my own code
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • Formatting passes locally with my changes
  • I have rebased against main before asking for a review

Summary by CodeRabbit

  • New Features
    • Enhanced vehicle detail extraction to include debt status and validation error messages. This provides more comprehensive information when finding a vehicle.

@davidkef davidkef requested a review from a team as a code owner May 23, 2024 09:57
Copy link
Contributor

coderabbitai bot commented May 23, 2024

Walkthrough

The recent update to the FindVehicleFormField.tsx file enhances the extractDetails function by adding two new properties to the returned object: isDebtLess, set to true, and validationErrorMessages, which captures validation error messages from the response. These changes refine the handling of vehicle detail extraction, ensuring more comprehensive data retrieval and validation feedback.

Changes

Files Change Summary
.../FindVehicleFormField/FindVehicleFormField.tsx Updated extractDetails to include isDebtLess: true and validationErrorMessages: response?.validationErrorMessages ?? [].

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>.
    • 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 generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @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.

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 as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger a review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configration 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
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

Review Details

Configuration used: .coderabbit.yaml
Review profile: CHILL

Commits Files that changed from the base of the PR and between 31cd2cf and e0f3e51.
Files selected for processing (1)
  • libs/application/ui-fields/src/lib/FindVehicleFormField/FindVehicleFormField.tsx (1 hunks)
Additional Context Used
Path-based Instructions (1)
libs/application/ui-fields/src/lib/FindVehicleFormField/FindVehicleFormField.tsx (1)

Pattern libs/**/*: "Confirm that the code adheres to the following:

  • Reusability of components and hooks across different NextJS apps.
  • TypeScript usage for defining props and exporting types.
  • Effective tree-shaking and bundling practices."
Additional comments not posted (2)
libs/application/ui-fields/src/lib/FindVehicleFormField/FindVehicleFormField.tsx (2)

Line range hint 1-1: The main component FindVehicleFormField is well-structured and handles various states and contexts effectively. Good use of React hooks and context for managing form state and localization.


Line range hint 1-1: The helper functions extractCommonVehicleInfo and isVehicleType are correctly implemented and efficiently handle their respective tasks. Good use of TypeScript for type safety and error handling.

Copy link

codecov bot commented May 23, 2024

Codecov Report

Attention: Patch coverage is 0% with 1 lines in your changes are missing coverage. Please review.

Project coverage is 37.06%. Comparing base (162b3a3) to head (044cf48).

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main   #14904      +/-   ##
==========================================
- Coverage   37.07%   37.06%   -0.01%     
==========================================
  Files        6350     6350              
  Lines      129270   129314      +44     
  Branches    36918    36937      +19     
==========================================
+ Hits        47929    47934       +5     
- Misses      81341    81380      +39     
Flag Coverage Δ
application-template-api-modules 24.36% <ø> (-0.04%) ⬇️
application-templates-accident-notification 19.67% <ø> (ø)
application-templates-car-recycling 4.23% <ø> (ø)
application-templates-driving-license 16.52% <ø> (ø)
application-templates-inheritance-report 3.96% <ø> (ø)
application-ui-shell 21.72% <0.00%> (-0.01%) ⬇️
auth-admin-web 2.43% <ø> (ø)
auth-api-lib 9.67% <ø> (ø)
auth-nest-tools 29.94% <ø> (ø)
clients-license-client 1.84% <ø> (ø)
clients-middlewares 73.45% <ø> (-0.09%) ⬇️
clients-rsk-company-registry 29.46% <ø> (ø)
clients-rsk-personal-tax-return 38.00% <ø> (ø)
contentful-apps 6.24% <ø> (ø)
email-service 61.42% <ø> (ø)
infra-nest-server 48.33% <ø> (ø)
infra-tracing 43.24% <ø> (ø)
judicial-system-api 17.61% <ø> (ø)
judicial-system-audit-trail 67.31% <ø> (ø)
judicial-system-backend 56.12% <ø> (ø)
judicial-system-formatters 82.08% <ø> (ø)
license-api 43.22% <ø> (ø)
portals-admin-regulations-admin 2.08% <ø> (ø)
portals-core 16.14% <ø> (ø)
reference-backend 50.31% <ø> (ø)
regulations 16.90% <ø> (ø)
residence-history 85.00% <ø> (ø)
services-auth-admin-api 51.76% <ø> (ø)
services-auth-delegation-api 61.63% <ø> (ø)
services-auth-ids-api 54.13% <ø> (ø)
services-auth-personal-representative 49.49% <ø> (+0.04%) ⬆️
services-auth-personal-representative-public 45.09% <ø> (-0.06%) ⬇️
services-auth-public-api 49.72% <ø> (ø)
services-documents 60.91% <ø> (ø)
services-endorsements-api 55.43% <ø> (ø)
services-sessions 65.42% <ø> (ø)
services-user-profile 62.90% <ø> (ø)
shared-problem 87.50% <ø> (ø)
shared-utils 26.14% <ø> (ø)
web 1.91% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
.../lib/FindVehicleFormField/FindVehicleFormField.tsx 2.31% <0.00%> (-0.02%) ⬇️

... and 3 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 162b3a3...044cf48. Read the comment docs.

@datadog-island-is
Copy link

datadog-island-is bot commented May 23, 2024

Datadog Report

All test runs b9e412a 🔗

101 Total Test Services: 0 Failed, 99 Passed
🔻 Test Sessions change in coverage: 4 decreased, 196 no change

Test Services
This report shows up to 10 services
Service Name Failed Known Flaky New Flaky Passed Skipped Total Time Code Coverage Change Test Service View
air-discount-scheme-backend 0 0 0 81 0 33.87s N/A Link
air-discount-scheme-web 0 0 0 2 0 10.47s N/A Link
api 0 0 0 4 0 4.58s N/A Link
api-catalogue-services 0 0 0 23 0 15.98s N/A Link
api-domains-air-discount-scheme 0 0 0 6 0 37.38s N/A Link
api-domains-assets 0 0 0 3 0 24.68s N/A Link
api-domains-auth-admin 0 0 0 18 0 12.67s N/A Link
api-domains-communications 0 0 0 5 0 46.49s N/A Link
api-domains-criminal-record 0 0 0 5 0 16.39s N/A Link
api-domains-driving-license 0 0 0 23 0 57.55s N/A Link

🔻 Code Coverage Decreases vs Default Branch (4)

  • services-university-gateway - jest 44.65% (-0.03%) - Details
  • services-auth-personal-representative-public - jest 46.98% (-0.02%) - Details
  • auth-api-lib - jest 10.86% (-0.02%) - Details
  • application-template-api-modules - jest 26.24% (-0.01%) - Details

…hicleFormField.tsx

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.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

Review Details

Configuration used: .coderabbit.yaml
Review profile: CHILL

Commits Files that changed from the base of the PR and between e0f3e51 and 4e31db9.
Files selected for processing (1)
  • libs/application/ui-fields/src/lib/FindVehicleFormField/FindVehicleFormField.tsx (1 hunks)
Files skipped from review as they are similar to previous changes (1)
  • libs/application/ui-fields/src/lib/FindVehicleFormField/FindVehicleFormField.tsx

@davidkef davidkef added the deprecated:automerge (Disabled) Merge this PR as soon as all checks pass label May 23, 2024
@kodiakhq kodiakhq bot merged commit 8963db8 into main May 23, 2024
237 checks passed
@kodiakhq kodiakhq bot deleted the db/fix/sgs-order-plate-no-errormessage branch May 23, 2024 11:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
deprecated:automerge (Disabled) Merge this PR as soon as all checks pass
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants