Commit b02c072
fix(studio): refresh builder top-bar name after a package rename (#2554)
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: Jack Zhuang <277994282+os-zhuang@users.noreply.github.com>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>1 parent a56c596 commit b02c072
1 file changed
Lines changed: 16 additions & 7 deletions
Lines changed: 16 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
256 | 256 | | |
257 | 257 | | |
258 | 258 | | |
259 | | - | |
260 | | - | |
261 | | - | |
262 | | - | |
263 | | - | |
264 | | - | |
265 | | - | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
266 | 274 | | |
267 | 275 | | |
| 276 | + | |
268 | 277 | | |
269 | 278 | | |
270 | 279 | | |
| |||
0 commit comments