-
Notifications
You must be signed in to change notification settings - Fork 916
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: add visible completed fields #1109
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
WalkthroughThe updates across the system focus on enhancing document and signing functionalities by integrating new components and refining data interactions. Key changes include managing completed fields for documents and tokens, rendering read-only fields based on document status, and improving UI components like popovers. Additionally, database schema adjustments ensure data integrity by making certain fields mandatory. Changes
Recent Review DetailsConfiguration used: CodeRabbit UI Files selected for processing (1)
Files skipped from review as they are similar to previous changes (1)
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: 2
const [document, fields, recipient, completedFields] = await Promise.all([ | ||
getDocumentAndSenderByToken({ | ||
token, | ||
userId: user?.id, | ||
requireAccessAuth: false, | ||
}).catch(() => null), | ||
getFieldsForToken({ token }), | ||
getRecipientByToken({ token }).catch(() => null), | ||
getCompletedFieldsForToken({ token }), |
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.
Tip
Codebase Verification
Several files in the codebase still use the old function signature.
- The
getCompletedFieldsForToken
function is used in thePromise.all
array without explicit error handling attached directly to its call. This might be an oversight or a deliberate choice depending on the error handling strategy of the application. It is recommended to ensure consistency in error handling across all asynchronous operations.
Analysis chain
Added completedFields
to the array of promises to fetch document-related data concurrently. Ensure that error handling is in place for this asynchronous operation.
Scripts Executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Verify error handling for fetching completed fields.
rg --type ts --context 5 "getCompletedFieldsForToken" apps/web/src/app/(signing)/sign/[token]/page.tsx
Length of output: 239
Script:
#!/bin/bash
# Verify error handling for fetching completed fields.
rg --type ts --context 5 "getCompletedFieldsForToken" 'apps/web/src/app/(signing)/sign/[token]/page.tsx'
Length of output: 1454
Thank you for following the naming conventions for pull request titles! 💚🚀 |
@dguyen should we keep the recipientless fields a bit (or at least download them) if we need the data later for debugging? |
We can't run the migration without them gone I don't think the data is really useful, but I'll try to get a copy anyway |
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.
im trustin ya on this one but we should revisit it later
Description
Added the ability for recipients to see fields from other recipients who have completed the document when they are signing the document
Added the ability for the document owner to see fields from recipients who have completed the field on the document page view (only visible when the document is pending)
🚨🚨 Migrations🚨🚨
Fields
that do not have aRecipient
set (not sure how it was possible in the first place)Recipient
field onField
which doesn't make senseSummary by CodeRabbit
Summary by CodeRabbit
New Features
Bug Fixes
recipientId
a required field in the database to ensure data consistency.Refactor
Documentation