Spell every catalog-app adoptsFrom with the @cardstack/catalog alias - #675
Conversation
Staging Submissions PreviewThis PR's content is pushed to the staging submissions realm: https://realms-staging.stack.cards/submissions/ Changed listings:
Changed folders:
Updated at 2026-07-29 10:23:16 UTC for commit |
4c60f98 to
30a3361
Compare
Listing instances moved to `@cardstack/catalog/catalog-app/listing/listing` in #640, but the instances they link to — Tag, Category, Sphere — kept realm-relative module refs. Inside the catalog realm both spellings resolve to the same file, so nothing broke. The staging submissions realm holds a second copy of catalog-app, left by the first version of push-to-submissions, which mirrored whole trees. There the two spellings diverge: a listing's `tags` field type comes from the catalog realm's tag.gts while `submissions/Tag/app` adopts the submissions copy. instanceOf compares code refs rather than prototypes, so every mirrored listing fails with field validation error: tried set Tag as field 'tags' but it is not an instance of Tag Alias every catalog-app adoptsFrom so the spelling is realm-independent. Three listings still hardcoding https://app.boxel.ai/catalog/... are folded in for the same reason — served from staging they bind to production modules. index.json keeps its relative ref: it is the realm's own index card, and the push to the submissions realm excludes it. Co-Authored-By: Claude <noreply@anthropic.com>
30a3361 to
f362464
Compare
There was a problem hiding this comment.
Pull request overview
This PR fixes module-identity mismatches in mirrored “submissions” realm cards by standardizing meta.adoptsFrom.module to always use the global @cardstack/catalog/… alias for catalog-app types (Category/Tag/Sphere and listing bases). This prevents duplicated class definitions across realms from failing instanceOf-style validation when referenced from listings.
Changes:
- Update
Tag/*,Category/*, andSphere/*instance cards to adopt from@cardstack/catalog/catalog-app/listing/{tag,category,sphere}. - Update one
FieldListingcard to adopt from@cardstack/catalog/catalog-app/listing/listing. - Replace hardcoded production URL
adoptsFrom.modulein 3CardListingcards with the@cardstack/catalogalias.
Reviewed changes
Copilot reviewed 93 out of 93 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| Tag/report.json | Switch adoptsFrom module ref to @cardstack/catalog alias (Tag) |
| Tag/skill.json | Switch adoptsFrom module ref to @cardstack/catalog alias (Tag) |
| Tag/field.json | Switch adoptsFrom module ref to @cardstack/catalog alias (Tag) |
| Tag/new.json | Switch adoptsFrom module ref to @cardstack/catalog alias (Tag) |
| Tag/general.json | Switch adoptsFrom module ref to @cardstack/catalog alias (Tag) |
| Tag/official.json | Switch adoptsFrom module ref to @cardstack/catalog alias (Tag) |
| Tag/bundled.json | Switch adoptsFrom module ref to @cardstack/catalog alias (Tag) |
| Tag/ai.json | Switch adoptsFrom module ref to @cardstack/catalog alias (Tag) |
| Tag/community.json | Switch adoptsFrom module ref to @cardstack/catalog alias (Tag) |
| Tag/user-contributed.json | Switch adoptsFrom module ref to @cardstack/catalog alias (Tag) |
| Tag/featured.json | Switch adoptsFrom module ref to @cardstack/catalog alias (Tag) |
| Tag/tracker.json | Switch adoptsFrom module ref to @cardstack/catalog alias (Tag) |
| Tag/app.json | Switch adoptsFrom module ref to @cardstack/catalog alias (Tag) |
| Tag/planner.json | Switch adoptsFrom module ref to @cardstack/catalog alias (Tag) |
| Tag/poster.json | Switch adoptsFrom module ref to @cardstack/catalog alias (Tag) |
| Tag/game.json | Switch adoptsFrom module ref to @cardstack/catalog alias (Tag) |
| Tag/dashboard.json | Switch adoptsFrom module ref to @cardstack/catalog alias (Tag) |
| Tag/card.json | Switch adoptsFrom module ref to @cardstack/catalog alias (Tag) |
| Tag/calculator.json | Switch adoptsFrom module ref to @cardstack/catalog alias (Tag) |
| Tag/form.json | Switch adoptsFrom module ref to @cardstack/catalog alias (Tag) |
| Tag/template.json | Switch adoptsFrom module ref to @cardstack/catalog alias (Tag) |
| Tag/theme.json | Switch adoptsFrom module ref to @cardstack/catalog alias (Tag) |
| Sphere/work.json | Switch adoptsFrom module ref to @cardstack/catalog alias (Sphere) |
| Sphere/learn.json | Switch adoptsFrom module ref to @cardstack/catalog alias (Sphere) |
| Sphere/play.json | Switch adoptsFrom module ref to @cardstack/catalog alias (Sphere) |
| Sphere/build.json | Switch adoptsFrom module ref to @cardstack/catalog alias (Sphere) |
| Sphere/life.json | Switch adoptsFrom module ref to @cardstack/catalog alias (Sphere) |
| Category/developer-tools-code.json | Switch adoptsFrom module ref to @cardstack/catalog alias (Category) |
| Category/family-relationships.json | Switch adoptsFrom module ref to @cardstack/catalog alias (Category) |
| Category/food-cooking.json | Switch adoptsFrom module ref to @cardstack/catalog alias (Category) |
| Category/product-catalogs.json | Switch adoptsFrom module ref to @cardstack/catalog alias (Category) |
| Category/real-estate-property.json | Switch adoptsFrom module ref to @cardstack/catalog alias (Category) |
| Category/video-games-interactive.json | Switch adoptsFrom module ref to @cardstack/catalog alias (Category) |
| Category/hobbies-crafts.json | Switch adoptsFrom module ref to @cardstack/catalog alias (Category) |
| Category/operations-supply-chain.json | Switch adoptsFrom module ref to @cardstack/catalog alias (Category) |
| Category/professional-services.json | Switch adoptsFrom module ref to @cardstack/catalog alias (Category) |
| Category/teaching-instruction.json | Switch adoptsFrom module ref to @cardstack/catalog alias (Category) |
| Category/technical-documentation.json | Switch adoptsFrom module ref to @cardstack/catalog alias (Category) |
| Category/data-engineering.json | Switch adoptsFrom module ref to @cardstack/catalog alias (Category) |
| Category/career-development.json | Switch adoptsFrom module ref to @cardstack/catalog alias (Category) |
| Category/knowledge-management.json | Switch adoptsFrom module ref to @cardstack/catalog alias (Category) |
| Category/science-discovery.json | Switch adoptsFrom module ref to @cardstack/catalog alias (Category) |
| Category/design-creative.json | Switch adoptsFrom module ref to @cardstack/catalog alias (Category) |
| Category/legal-compliance.json | Switch adoptsFrom module ref to @cardstack/catalog alias (Category) |
| Category/goals-habits.json | Switch adoptsFrom module ref to @cardstack/catalog alias (Category) |
| Category/data-management.json | Switch adoptsFrom module ref to @cardstack/catalog alias (Category) |
| Category/social-networking.json | Switch adoptsFrom module ref to @cardstack/catalog alias (Category) |
| Category/hr-people-management.json | Switch adoptsFrom module ref to @cardstack/catalog alias (Category) |
| Category/business-development.json | Switch adoptsFrom module ref to @cardstack/catalog alias (Category) |
| Category/ui-components-design.json | Switch adoptsFrom module ref to @cardstack/catalog alias (Category) |
| Category/quality-assurance.json | Switch adoptsFrom module ref to @cardstack/catalog alias (Category) |
| Category/personal-finance.json | Switch adoptsFrom module ref to @cardstack/catalog alias (Category) |
| Category/data-analytics.json | Switch adoptsFrom module ref to @cardstack/catalog alias (Category) |
| Category/software-development.json | Switch adoptsFrom module ref to @cardstack/catalog alias (Category) |
| Category/creative-projects.json | Switch adoptsFrom module ref to @cardstack/catalog alias (Category) |
| Category/web-development.json | Switch adoptsFrom module ref to @cardstack/catalog alias (Category) |
| Category/home-living.json | Switch adoptsFrom module ref to @cardstack/catalog alias (Category) |
| Category/events-celebrations.json | Switch adoptsFrom module ref to @cardstack/catalog alias (Category) |
| Category/shopping-consumer.json | Switch adoptsFrom module ref to @cardstack/catalog alias (Category) |
| Category/prototyping-experiments.json | Switch adoptsFrom module ref to @cardstack/catalog alias (Category) |
| Category/language-learning.json | Switch adoptsFrom module ref to @cardstack/catalog alias (Category) |
| Category/travel-experiences.json | Switch adoptsFrom module ref to @cardstack/catalog alias (Category) |
| Category/content-creation.json | Switch adoptsFrom module ref to @cardstack/catalog alias (Category) |
| Category/analytics-reporting.json | Switch adoptsFrom module ref to @cardstack/catalog alias (Category) |
| Category/health-wellness.json | Switch adoptsFrom module ref to @cardstack/catalog alias (Category) |
| Category/marketing-growth.json | Switch adoptsFrom module ref to @cardstack/catalog alias (Category) |
| Category/skills-training.json | Switch adoptsFrom module ref to @cardstack/catalog alias (Category) |
| Category/accounting-finance.json | Switch adoptsFrom module ref to @cardstack/catalog alias (Category) |
| Category/communication.json | Switch adoptsFrom module ref to @cardstack/catalog alias (Category) |
| Category/e-commerce-online-sales.json | Switch adoptsFrom module ref to @cardstack/catalog alias (Category) |
| Category/sports-fitness.json | Switch adoptsFrom module ref to @cardstack/catalog alias (Category) |
| Category/news-media.json | Switch adoptsFrom module ref to @cardstack/catalog alias (Category) |
| Category/devops-infrastructure.json | Switch adoptsFrom module ref to @cardstack/catalog alias (Category) |
| Category/reading-literature.json | Switch adoptsFrom module ref to @cardstack/catalog alias (Category) |
| Category/adventure-outdoor-activities.json | Switch adoptsFrom module ref to @cardstack/catalog alias (Category) |
| Category/maps-navigation.json | Switch adoptsFrom module ref to @cardstack/catalog alias (Category) |
| Category/hardware-iot.json | Switch adoptsFrom module ref to @cardstack/catalog alias (Category) |
| Category/api-integration.json | Switch adoptsFrom module ref to @cardstack/catalog alias (Category) |
| Category/research-knowledge.json | Switch adoptsFrom module ref to @cardstack/catalog alias (Category) |
| Category/security-privacy.json | Switch adoptsFrom module ref to @cardstack/catalog alias (Category) |
| Category/travel-lifestyle.json | Switch adoptsFrom module ref to @cardstack/catalog alias (Category) |
| Category/ai-automation.json | Switch adoptsFrom module ref to @cardstack/catalog alias (Category) |
| Category/customer-support.json | Switch adoptsFrom module ref to @cardstack/catalog alias (Category) |
| Category/education-courses.json | Switch adoptsFrom module ref to @cardstack/catalog alias (Category) |
| Category/entertainment-media.json | Switch adoptsFrom module ref to @cardstack/catalog alias (Category) |
| Category/project-management.json | Switch adoptsFrom module ref to @cardstack/catalog alias (Category) |
| Category/gaming.json | Switch adoptsFrom module ref to @cardstack/catalog alias (Category) |
| Category/parties-celebrations.json | Switch adoptsFrom module ref to @cardstack/catalog alias (Category) |
| Category/certifications-training.json | Switch adoptsFrom module ref to @cardstack/catalog alias (Category) |
| fields/contact-link/FieldListing/a5045646-6938-45da-8138-f11ed34df2b9.json | Switch FieldListing base adoptsFrom to @cardstack/catalog alias |
| d29736-tier-list/CardListing/e442113f-570a-4053-be33-2756371f88bb.json | Replace hardcoded production listing module URL with @cardstack/catalog alias |
| b6ac3a-survey/CardListing/9ca941bc-fc90-4ac9-8dda-2558713269e8.json | Replace hardcoded production listing module URL with @cardstack/catalog alias |
| 19dee3-virtual-try-on-application/CardListing/d0e745d6-9ff4-441d-a3d9-177f1e785efd.json | Replace hardcoded production listing module URL with @cardstack/catalog alias |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Why
Every listing mirrored into the staging submissions realm renders as a card error:
The
../../Tag/applink is fine — it resolves, and the realm indexes it without errors. The mismatch is module identity:CardListing.tagsfield type@cardstack/catalog/…/listing/listing→ global alias → catalog realm'scatalog-app/listing/tag.gtssubmissions/Tag/appinstance../catalog-app/listing/tag→ realm-relative → submissions copy oftag.gts@cardstack/catalog/is a single global mapping to the catalog realm (boxelpackages/host/app/services/network.ts); it never means "the realm I am in". AndinstanceOf(boxelpackages/base/card-api.gts) compares code refs up the ancestor chain rather than JS prototypes, so two copies of the same file are two unrelated classes.How it got here:
@cardstack/catalog/alias but left the instances they link to —Tag/,Category/,Sphere/— on realm-relative refs. Latent: inside the catalog realm both spellings name the same file.526e57d, the first version ofpush-to-submissions, mirrored whole trees, depositing a second copy ofcatalog-app/at the submissions realm root. Timestamps confirm one run wrote all of it (Category/maps-navigation15:47:51Z,Tag/app15:47:56Z,…/CardListing/b24c0bbf…15:48:04Z on 2026-07-14). That is where the two spellings stopped meaning the same file.691c24fand has no cleanup, so those relative-ref copies are frozen in the mirror and every listing pushed since inherits the break — even PRs that never touchTag/.What
93 instance files,
adoptsFrom.moduleonly:Category/(62),Tag/(22),Sphere/(5) —../catalog-app/listing/{category,tag,sphere}→ aliasfields/contact-link/FieldListing(1) —../../../catalog-app/listing/listing→ aliashttps://app.boxel.ai/catalog/catalog-app/listing/listing→ alias; served from staging those bind to production modules, the same defect in worse formindex.jsonkeeps./catalog-app/catalog— it is the realm's own index card and the push excludes it.Verifying
Draft, to exercise
push-to-submissions. The PR touches exactly the stale mirror files, so its own push run overwrites them; after that,https://realms-staging.stack.cards/submissions/c7eda3-travel-itinerary-planner/CardListing/b24c0bbf-7339-4a9f-b5f6-e346a36f6bd1should render instead of erroring. The listing itself is unchanged and does not need re-pushing — it already uses the alias.Follow-up, not in this PR: a lint check rejecting any
catalog-app/module ref not spelled as the alias, so it cannot drift back.