-
Notifications
You must be signed in to change notification settings - Fork 57
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(service-portal): Update get for documents #15112
Conversation
WalkthroughThe changes primarily involve the removal of the Changes
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? TipsChatThere are 3 ways to chat with CodeRabbit:
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)
Additionally, you can add CodeRabbit Configration File (
|
There was a problem hiding this 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
Outside diff range and nitpick comments (2)
libs/service-portal/documents/src/hooks/useDocumentList.ts (2)
Line range hint
56-56
: Specify all dependencies in the useEffect hook to avoid potential bugs.- }, [loading, data, sendersAvailable, categoriesAvailable]) + }, [loading, data, sendersAvailable, categoriesAvailable, setSendersAvailable, setCategoriesAvailable])
Line range hint
75-75
: Update useEffect dependencies and remove unnecessary ones.- }, [pageSize, totalCount, loading]) + }, [totalCount, loading, totalPages, setTotalPages])
Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Files selected for processing (3)
- libs/api/domains/documents/src/lib/documentV2.service.ts (1 hunks)
- libs/api/domains/documents/src/lib/models/v2/documents.input.ts (1 hunks)
- libs/service-portal/documents/src/hooks/useDocumentList.ts (1 hunks)
Files skipped from review due to trivial changes (1)
- libs/api/domains/documents/src/lib/models/v2/documents.input.ts
Additional context used
Path-based instructions (2)
libs/service-portal/documents/src/hooks/useDocumentList.ts (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."
libs/api/domains/documents/src/lib/documentV2.service.ts (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."
Biome
libs/service-portal/documents/src/hooks/useDocumentList.ts
[error] 56-56: This hook does not specify all of its dependencies: setCategoriesAvailable (lint/correctness/useExhaustiveDependencies)
This dependency is not specified in the hook dependency list.
[error] 56-56: This hook does not specify all of its dependencies: setSendersAvailable (lint/correctness/useExhaustiveDependencies)
This dependency is not specified in the hook dependency list.
[error] 75-75: This hook does not specify all of its dependencies: setTotalPages (lint/correctness/useExhaustiveDependencies)
This dependency is not specified in the hook dependency list.
[error] 75-75: This hook does not specify all of its dependencies: totalPages (lint/correctness/useExhaustiveDependencies)
This dependency is not specified in the hook dependency list.
[error] 75-75: This hook specifies more dependencies than necessary: pageSize (lint/correctness/useExhaustiveDependencies)
Outer scope values aren't valid dependencies because mutating them doesn't re-render the component.
libs/api/domains/documents/src/lib/documentV2.service.ts
[error] 27-27: Decorators are not valid here. (parse)
Decorators are only valid on class declarations, class expressions, and class methods.
You can enable parameter decorators by setting theunsafeParameterDecoratorsEnabled
option totrue
in your configuration file.
[error] 28-28: Decorators are not valid here. (parse)
Decorators are only valid on class declarations, class expressions, and class methods.
You can enable parameter decorators by setting theunsafeParameterDecoratorsEnabled
option totrue
in your configuration file.
Additional comments not posted (1)
libs/api/domains/documents/src/lib/documentV2.service.ts (1)
111-111
: Ensure the addition ofnationalId
aligns with the intended API changes and check for any potential security implications.Verification successful
The addition of
nationalId
to thegetDocumentList
method indocumentV2.service.ts
appears to be consistent with its usage across the codebase. The relevant lines show thatnationalId
is being passed correctly in the method calls.
libs/clients/documents/src/lib/documentClient.ts
:nationalId
is a parameter ingetDocumentList
.libs/api/domains/documents/src/lib/documentV1.service.ts
:nationalId
is passed togetDocumentList
.libs/api/domains/documents/src/lib/documentV2.service.ts
:nationalId
is included in the input object forgetDocumentList
.No security implications or inconsistencies were found in the usage of
nationalId
.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the usage of `nationalId` in the `getDocumentList` method across the codebase. # Test: Search for the method usage. Expect: Only occurances with the new parameter. rg --type typescript $'getDocumentList'Length of output: 73
Script:
#!/bin/bash # Description: Verify the usage of `nationalId` in the `getDocumentList` method across the codebase. # Test: Search for the method usage. Expect: Only occurrences with the new parameter. rg --type ts 'getDocumentList'Length of output: 910
Script:
#!/bin/bash # Description: Extract lines around the usage of `getDocumentList` to verify the inclusion of `nationalId`. # Extract lines from relevant files rg --type ts -A 3 -B 3 'getDocumentList' libs/clients/documents/src/lib/documentClient.ts rg --type ts -A 3 -B 3 'getDocumentList' libs/clients/documents-v2/src/lib/documentsClientV2.service.ts rg --type ts -A 3 -B 3 'getDocumentList' libs/api/domains/finance/src/lib/api-domains-finance.resolver.ts rg --type ts -A 3 -B 3 'getDocumentList' libs/api/domains/documents/src/lib/documentV1.service.ts rg --type ts -A 3 -B 3 'getDocumentList' libs/api/domains/documents/src/lib/documentV2.service.tsLength of output: 2027
Datadog ReportAll test runs ✅ 21 Total Test Services: 0 Failed, 21 Passed Test ServicesThis report shows up to 10 services
🔻 Code Coverage Decreases vs Default Branch (2) |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #15112 +/- ##
==========================================
+ Coverage 37.05% 37.10% +0.05%
==========================================
Files 6422 6415 -7
Lines 130847 130610 -237
Branches 37374 37295 -79
==========================================
- Hits 48488 48467 -21
+ Misses 82359 82143 -216
Flags with carried forward coverage won't be shown. Click here to find out more. see 36 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚀
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
What
Update document list get
Why
No need for sending id
Checklist:
Summary by CodeRabbit
nationalId
parameter from various components and services. This change streamlines the handling of document lists and enhances data processing efficiency.