Fixing the intermixing of user and shop profiles and ensuring persistance of user-profile data#322
Merged
calvadev merged 1 commit intoshopstr-eng:mainfrom Apr 6, 2026
Merged
Conversation
|
@Abhishek-Punhani is attempting to deploy a commit to the shopstr-eng Team on Vercel. A member of the Team first needs to authorize it. |
arnavkirti
reviewed
Apr 4, 2026
Contributor
arnavkirti
left a comment
There was a problem hiding this comment.
Nice fix, this makes the profile data flow much clearer.
A few minor suggestions (non-blocking):
- In
ProfileWithDropdown, the.catch(() => {})silently swallows errors.
Suggestion: at leastconsole.erroror integrate with existing toast/error reporting so failures to load profile don’t fail silently. - You already use
data?.profile?.content, which is good, but the subsequent logic assumescontentshape is valid.
Suggestion: guardcontent.nameandcontent.picturewith defaults (e.g., fallback avatar) so unusual data doesn’t break the dropdown. - The new
useEffectdepends on[pubkey, npub]but only really needspubkeyfor the fetch;npubis only used in the setter.
Suggestion: either removenpubfrom the dependency array or ensure it is stable to avoid redundant fetches. - If the project uses TypeScript types for profile content, it would be good to type the
datareturned from/api/db/fetch-profileand thecontentinfetch-service.tsto avoid magic property access. - Similarly, consider documenting the expected response shape of
fetch-profile(e.g.,{ profile: { content: { name, picture, about, ... }}}) in the handler file.
Contributor
|
LGTM Now! |
calvadev
approved these changes
Apr 6, 2026
…ence and initial data fetching from db Signed-off-by: Abhishek-Punhani <punhani.manavabhi@gmail.com>
0688b48 to
a9a01de
Compare
Contributor
Author
|
@calvadev I have rebased my branch, it can be merged now |
calvadev
approved these changes
Apr 6, 2026
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.
Fixing the intermixing of user and shop profiles and ensuring persistance of user-profile data
Description
When users saved their profile, the display name and about section would mysteriously change to their shop profile data. Additionally, repeated passphrase prompts (2-3 times) occurred on save, and profile data would vanish on page refresh.
Fixed this implementing kind filtering and ensuring saving to db for faster access and ultimately showing relay data.
Resolved or fixed issue
#284
Affirmation