-
Notifications
You must be signed in to change notification settings - Fork 60
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
feat(native-app): log confirm actions of subpoena to backend #16862
Conversation
WalkthroughThis pull request introduces a new GraphQL query named Changes
Possibly related PRs
Suggested labels
Suggested reviewers
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 using PR comments)
Other keywords and placeholders
Documentation and Community
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #16862 +/- ##
=======================================
Coverage 36.44% 36.44%
=======================================
Files 6852 6852
Lines 143559 143579 +20
Branches 40972 40980 +8
=======================================
+ Hits 52326 52334 +8
- Misses 91233 91245 +12
Flags with carried forward coverage won't be shown. Click here to find out more. see 16 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.
Actionable comments posted: 3
🧹 Outside diff range and nitpick comments (2)
apps/native/app/src/graphql/queries/inbox.graphql (1)
51-57
: Add documentation for the new query and its input type.The query structure looks good, but please add documentation comments to describe:
- The purpose of the query
- The structure of DocumentConfirmActionsInput
- The meaning of the returned fields
Consider adding documentation like this:
""" Logs confirmation actions for documents with platform differentiation. """ query DocumentConfirmActions($input: DocumentConfirmActionsInput!) { documentV2ConfirmActions(input: $input) { id # Document identifier confirmed # Confirmation status } }apps/native/app/src/screens/document-detail/document-detail.tsx (1)
257-260
: Consider a more robust platform identification strategyThe current approach of appending '_app' to the document ID is a temporary solution. Consider proposing a more maintainable approach by:
- Adding a
platform
field to theDocumentConfirmActionsInput
type in the GraphQL schema- Using an enum to represent different platforms (APP, SERVICE_PORTAL, etc.)
This would provide better type safety and eliminate the need for string manipulation.
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
📒 Files selected for processing (2)
apps/native/app/src/graphql/queries/inbox.graphql
(1 hunks)apps/native/app/src/screens/document-detail/document-detail.tsx
(3 hunks)
🧰 Additional context used
📓 Path-based instructions (2)
apps/native/app/src/graphql/queries/inbox.graphql (1)
Pattern apps/**/*
: "Confirm that the code adheres to the following:
- NextJS best practices, including file structure, API routes, and static generation methods.
- Efficient state management and server-side rendering techniques.
- Optimal use of TypeScript for component and utility type safety."
apps/native/app/src/screens/document-detail/document-detail.tsx (1)
Pattern apps/**/*
: "Confirm that the code adheres to the following:
- NextJS best practices, including file structure, API routes, and static generation methods.
- Efficient state management and server-side rendering techniques.
- Optimal use of TypeScript for component and utility type safety."
🔇 Additional comments (1)
apps/native/app/src/screens/document-detail/document-detail.tsx (1)
30-30
: LGTM: Import follows GraphQL query hook conventions
The import is correctly placed and follows the established naming pattern for GraphQL query hooks.
apps/native/app/src/screens/document-detail/document-detail.tsx
Outdated
Show resolved
Hide resolved
apps/native/app/src/screens/document-detail/document-detail.tsx
Outdated
Show resolved
Hide resolved
Datadog ReportAll test runs ✅ 2 Total Test Services: 0 Failed, 2 Passed Test Services
🔻 Code Coverage Decreases vs Default Branch (1)
|
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 (1)
apps/native/app/src/screens/document-detail/document-detail.tsx (1)
252-261
: Add TypeScript type annotations for better type safetyThe implementation aligns with the PR objectives, but could benefit from explicit type annotations.
- const confirmAction = async (confirmed: boolean) => { + const confirmAction = async (confirmed: boolean): Promise<void> => { // Adding a suffix '_app' to the id since the backend is currently not distinguishing between the app and the web await logConfirmedAction({ variables: { input: { id: `${docId}_app`, confirmed: confirmed } }, }) }
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
📒 Files selected for processing (1)
apps/native/app/src/screens/document-detail/document-detail.tsx
(3 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
apps/native/app/src/screens/document-detail/document-detail.tsx (1)
Pattern apps/**/*
: "Confirm that the code adheres to the following:
- NextJS best practices, including file structure, API routes, and static generation methods.
- Efficient state management and server-side rendering techniques.
- Optimal use of TypeScript for component and utility type safety."
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.
Good job
* feat: log confirm actions of subpoena to backend * fix: better comment * fix: confirm action can not be null * feat: make sure to await actions --------- Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
What
Logging when users either confirm or not confirm supoena in the app. Currently the backend does not support categories, i.e. service portal vs app so me and Dísa from Hugsmiðjan decided that I would add
_app
as a suffix to the id of the document so that can be used to differentiate at first.Why
To be able to track what happens in the frontend like is done in the service portal.
Checklist:
Summary by CodeRabbit
New Features
Bug Fixes