fix(studio): refresh builder top-bar name after a package rename#2554
Merged
Conversation
The PackageSwitcher loaded the package list once (keyed on packageId) and derived the top-bar name from it, but never listened for `objectui:packages-changed` — which PackageFormDialog dispatches on create/edit. So after renaming the current package via "edit", the header kept showing the OLD name until a full page reload. Re-fetch the switcher list on `objectui:packages-changed` so the top-bar name reflects the rename immediately. Verified: dispatching the event triggers a GET /api/v1/packages refetch, re-deriving the displayed name. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Contributor
✅ Console Performance Budget
📦 Bundle Size Report
Size Limits
|
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.
Problem (dogfood Finding 3)
In the Studio builder,
PackageSwitcherloads the package list once (keyed onpackageId) and derives the top-bar package name from it, but never listens forobjectui:packages-changed— the eventPackageFormDialogdispatches on create/edit. So after renaming the current package via edit, the header keeps showing the old name until a full page reload.Fix
Re-fetch the switcher list on
objectui:packages-changed(add/remove the listener in the existing effect), so the top-bar name reflects a rename immediately.Verified
Dispatching
objectui:packages-changedin the running builder triggers aGET /api/v1/packagesrefetch (confirmed via a fetch counter), which re-derives the displayedcurrent.name.🤖 Generated with Claude Code