Fix #350: [Enhancement]: When some fields in UserProfile are NULL, th...#902
Merged
Teingi merged 1 commit intoApr 16, 2026
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #350
Before
UserProfile.created_atandupdated_atwere typed as requiredstringfields indashboard/src/lib/api.ts. When the backend returnedNULLfor these fields,formatDate()indashboard/src/routes/user-profile.tsxreceivedundefinedand passed it directly tonew Date(), producing"Invalid Date"in some cells while other parts of the dashboard rendered nothing — causing visible inconsistency across the UI.After
created_atandupdated_atare now typed asstring | undefined(created_at?: string,updated_at?: string), accurately reflecting that these fields can beNULL.formatDate()now acceptsstring | undefinedand returns thenullDisplaysentinel value early when the input is falsy, ensuring a consistent, intentional display for missing timestamps throughout the dashboard.Changes
dashboard/src/lib/api.ts— Markedcreated_atandupdated_atas optional (?) in theUserProfileinterface to match actual backend behavior.dashboard/src/routes/user-profile.tsx— Updated theformatDatesignature from(dateString: string)to(dateString: string | undefined)and added an early-return guard (if (!dateString) return nullDisplay;) before thenew Date()call.Testing
UserProfilerecord withNULLvalues forcreated_atand/orupdated_at.—) instead of"Invalid Date"or a blank.toLocaleString().This PR was created with AI assistance (Claude). The changes were reviewed by quality gates and a critic model before submission.