Commit b99d9bd
feat(studio): package-scope the metadata editor read (ADR-0048) (#1711)
Two installed packages may ship metadata with the same type/name; the Studio
editor now resolves the right one instead of first-match.
- MetadataClient: layered()/getDraft() accept { packageId }; get() emits the
`package` query param (server prefer-local).
- ResourceListPage: each row's edit link carries its owning package
(?package=<row._packageId>) so even the unscoped list disambiguates.
- ResourceEditPage: reads ?package= and scopes the layered + draft read. The
route's :appName is the Studio app, not the edited item's owner, so the scope
comes from the URL.
Verified live: /apps/com.objectstack.studio/metadata/doc/showcase_index loads
each package's own item per ?package= (showcase vs studio); no console errors.
Co-authored-by: Jack Zhuang <277994282+os-zhuang@users.noreply.github.com>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>1 parent 2fd68be commit b99d9bd
4 files changed
Lines changed: 58 additions & 8 deletions
File tree
- .changeset
- packages
- app-shell/src/views/metadata-admin
- data-objectstack/src
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
Lines changed: 10 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
222 | 222 | | |
223 | 223 | | |
224 | 224 | | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
225 | 231 | | |
226 | 232 | | |
227 | 233 | | |
| |||
511 | 517 | | |
512 | 518 | | |
513 | 519 | | |
| 520 | + | |
514 | 521 | | |
515 | | - | |
| 522 | + | |
516 | 523 | | |
517 | 524 | | |
518 | 525 | | |
519 | | - | |
| 526 | + | |
520 | 527 | | |
521 | 528 | | |
522 | 529 | | |
| |||
564 | 571 | | |
565 | 572 | | |
566 | 573 | | |
567 | | - | |
| 574 | + | |
568 | 575 | | |
569 | 576 | | |
570 | 577 | | |
| |||
Lines changed: 10 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
431 | 431 | | |
432 | 432 | | |
433 | 433 | | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
434 | 443 | | |
435 | 444 | | |
436 | 445 | | |
| |||
486 | 495 | | |
487 | 496 | | |
488 | 497 | | |
489 | | - | |
| 498 | + | |
490 | 499 | | |
491 | 500 | | |
492 | 501 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
113 | 113 | | |
114 | 114 | | |
115 | 115 | | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
116 | 123 | | |
117 | 124 | | |
118 | 125 | | |
| |||
451 | 458 | | |
452 | 459 | | |
453 | 460 | | |
| 461 | + | |
454 | 462 | | |
455 | 463 | | |
456 | 464 | | |
| |||
471 | 479 | | |
472 | 480 | | |
473 | 481 | | |
474 | | - | |
475 | | - | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
| 485 | + | |
| 486 | + | |
| 487 | + | |
476 | 488 | | |
477 | 489 | | |
478 | 490 | | |
| |||
545 | 557 | | |
546 | 558 | | |
547 | 559 | | |
548 | | - | |
549 | | - | |
| 560 | + | |
| 561 | + | |
| 562 | + | |
| 563 | + | |
| 564 | + | |
| 565 | + | |
| 566 | + | |
550 | 567 | | |
551 | 568 | | |
552 | 569 | | |
| |||
0 commit comments