Affected Apps / Packages
Studio (apps/studio)
Description
When a user updates their name in the Profile page, the update is successfully persisted to the backend database via updateAccountName(). However, the client-side useUserStore Zustand state is never updated with the new name. Because the main layout apps/studio/app/(main)/layout.tsx is a persistent Next.js Server Component layout, it does not re-fetch the user data or re-run AuthInitializer on router.refresh(). Consequently, the Zustand state remains stale. Components subscribing to useUserStore (such as the sidebar AccountMenu and the dashboard OverviewHomeHeader) continue to display the old name until the user manually triggers a hard browser reload.
- Branch Name:
fix/studio-profile-name-sync
- PR Title:
[Fix] [Studio]: update user store display name reactively on change
Steps to Reproduce
- Log into the studio and go to the Profile page (
/profile).
- Click the edit button next to your Display Name.
- Enter a new name and click "Save Changes".
- The toast message shows success, and the Profile page updates to show the new name.
- Look at the sidebar
AccountMenu at the bottom and the dashboard Overview header. They still display your old name.
- Perform a hard browser refresh (F5), and only then will the correct name appear.
Expected Behavior
Updating the display name should immediately propagate to the AccountMenu, OverviewHomeHeader, and any other components subscribing to useUserStore without requiring a hard browser refresh.
Environment Information
- App:
@veriworkly/studio
- OS: Windows / macOS / Linux
- Browser: Chrome / Firefox / Safari / Edge
- Node.js: 20.x
Relevant Logs
No response
Proposed Fix / Suggestions
Update EditProfileNameModal.tsx to import and call useUserStore to update the store state on success.
Affected Apps / Packages
Studio (apps/studio)
Description
When a user updates their name in the Profile page, the update is successfully persisted to the backend database via
updateAccountName(). However, the client-sideuseUserStoreZustand state is never updated with the new name. Because the main layoutapps/studio/app/(main)/layout.tsxis a persistent Next.js Server Component layout, it does not re-fetch the user data or re-runAuthInitializeronrouter.refresh(). Consequently, the Zustand state remains stale. Components subscribing touseUserStore(such as the sidebarAccountMenuand the dashboardOverviewHomeHeader) continue to display the old name until the user manually triggers a hard browser reload.fix/studio-profile-name-sync[Fix] [Studio]: update user store display name reactively on changeSteps to Reproduce
/profile).AccountMenuat the bottom and the dashboardOverviewheader. They still display your old name.Expected Behavior
Updating the display name should immediately propagate to the
AccountMenu,OverviewHomeHeader, and any other components subscribing touseUserStorewithout requiring a hard browser refresh.Environment Information
@veriworkly/studioRelevant Logs
No response
Proposed Fix / Suggestions
Update
EditProfileNameModal.tsxto import and calluseUserStoreto update the store state on success.