Skip to content

Change base realm to @cardstack/base#4278

Draft
backspace wants to merge 34 commits intomainfrom
@cardstack/base-redux-cs-10286
Draft

Change base realm to @cardstack/base#4278
backspace wants to merge 34 commits intomainfrom
@cardstack/base-redux-cs-10286

Conversation

@backspace
Copy link
Copy Markdown
Contributor

No description provided.

backspace and others added 2 commits March 30, 2026 10:33
Phase 1 - Infrastructure:
- Change baseRealm.url constant to '@cardstack/base/'
- Switch network.ts from addURLMapping to addImportMap + registerCardReferencePrefix
- Update all mise-tasks and shell scripts --fromUrl flags
- Fix baseRealm.inRealm() call sites
- Update test helpers to use import map pattern

Phase 2 - Bulk replacement:
- Replace all https://cardstack.com/base/ references in .ts/.gts/.json/.js files

Phase 3 - Edge cases (WIP):
- Fix new URL('@cardstack/base/') calls that would throw
- Fix catalog.ts baseRealmPath to use string prefix check

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@backspace backspace self-assigned this Mar 30, 2026
@github-actions
Copy link
Copy Markdown

github-actions bot commented Mar 30, 2026

@github-actions
Copy link
Copy Markdown

github-actions bot commented Mar 30, 2026

Host Test Results

    1 files  ±  0    1 suites  ±0   5h 15m 0s ⏱️ + 2h 57m 27s
1 641 tests  - 449  920 ✅  - 1 155  12 💤  - 3    7 ❌ +  7  702 🔥 +702 
1 641 runs   - 449  218 ✅  - 1 857  12 💤  - 3  709 ❌ +709  702 🔥 +702 

For more details on these failures and errors, see this check.

Results for commit f280ade. ± Comparison against base commit f998dcb.

This pull request removes 461 and adds 12 tests. Note that renamed tests count towards both.
Chrome ‑ Acceptance | code submode tests > single realm: Clicking card in search panel opens card JSON in editor
Chrome ‑ Acceptance | code submode tests > single realm: Open in Interact and Edit Template buttons work correctly
Chrome ‑ Acceptance | code submode tests > single realm: card preview live updates when index changes
Chrome ‑ Acceptance | code submode tests > single realm: card preview live updates when there is a change in module
Chrome ‑ Acceptance | code submode tests > single realm: card preview live updates with error
Chrome ‑ Acceptance | code submode tests > single realm: card-catalog does not offer to "create new card" when editing linked fields in code mode
Chrome ‑ Acceptance | code submode tests > single realm: changes cursor position when selected module declaration is changed
Chrome ‑ Acceptance | code submode tests > single realm: changes selected module declaration when cursor position is changed
Chrome ‑ Acceptance | code submode tests > single realm: clicking a linksTo field in card renderer panel opens the linked card JSON
Chrome ‑ Acceptance | code submode tests > single realm: clicking a linksTo field in playground panel opens the linked card JSON
…
Chrome ‑ Acceptance | markdown BFM card references: code mode restores embedded markdown card references after navigating away and back
Chrome ‑ Acceptance | markdown BFM card references: code mode shows overlays for markdown card references and clicking navigates
Chrome ‑ Acceptance | markdown BFM card references: interact mode shows overlays for markdown card references and clicking navigates
Chrome ‑ Acceptance | markdown BFM card references: renders inline card reference in atom format and block card reference in embedded format
Chrome ‑ Acceptance | markdown BFM card references: shows fallback text for unresolvable card references
Chrome ‑ Global error: Uncaught Error: `initialFocus` as selector refers to no known node at http://localhost:7357/assets/chunk.55f8026b8011c4d41b10.js, line 250163  While executing test: Acceptance | code submode | create-file tests > when the user lacks write permissions in remote realm: read only realm is not present in realm drop down when inheriting card definition 
Chrome ‑ Global error: Uncaught Error: `initialFocus` as selector refers to no known node at http://localhost:7357/assets/chunk.55f8026b8011c4d41b10.js, line 250163  While executing test: Acceptance | interact submode creation & permissions > 1 stack, when the user lacks write permissions: the delete item is not present in "..." menu of stack item 
Chrome ‑ Global error: Uncaught TypeError: Failed to construct 'URL': Invalid URL at http://localhost:7357/assets/chunk.55f8026b8011c4d41b10.js, line 155983  While executing test: Integration | ai-assistant-panel | binary upload dedupe: binary file upload preserves content integrity 
Chrome ‑ Global error: Uncaught TypeError: Failed to construct 'URL': Invalid URL at http://localhost:7357/assets/chunk.55f8026b8011c4d41b10.js, line 155983  While executing test: Integration | ai-assistant-panel | file-attachment: can send a message with only file attachments and no text 
Chrome ‑ Global error: Uncaught TypeError: Failed to construct 'URL': Invalid URL at http://localhost:7357/assets/chunk.55f8026b8011c4d41b10.js, line 667732  While executing test: Acceptance | code submode tests > single realm: Clicking card in search panel opens card JSON in editor 
…

♻️ This comment has been updated with latest results.

@github-actions
Copy link
Copy Markdown

github-actions bot commented Mar 31, 2026

Realm Server Test Results

  1 files  ±  0    1 suites  ±0   13m 35s ⏱️ +35s
499 tests  - 335  435 ✅  - 398  0 💤 ±0  64 ❌ +63 
536 runs   - 369  464 ✅  - 440  0 💤 ±0  72 ❌ +71 

For more details on these failures, see this check.

Results for commit f280ade. ± Comparison against base commit f998dcb.

This pull request removes 336 and adds 1 tests. Note that renamed tests count towards both.
default ‑ 204 with permission for binary upload
default ‑ 401 without a JWT for binary upload
default ‑ 403 without permission for binary upload
default ‑ DELETE /_delete-realm rejects an invalid realm URL
default ‑ DELETE /_delete-realm rejects deleting a realm outside the current user namespace
default ‑ DELETE /_delete-realm removes a created realm, its published copies, and related domain claims
default ‑ DELETE /_delete-realm still deletes a realm when a published copy is no longer mounted
default ‑ GET /_federated-search-prerendered returns 400 for unsupported method
default ‑ HTML response does not include boxel-ready class on body
default ‑ HTML response includes exactly one favicon and one apple-touch-icon
…
default ‑ file meta for markdown with card references stores cardReferenceUrls

♻️ This comment has been updated with latest results.

backspace and others added 16 commits March 30, 2026 20:27
- Merge latest main (picks up new files with https://cardstack.com/base/)
- All references already converted to @cardstack/base/ by merge
- Remove wrong DB migration (permissions use resolved URLs, not prefixes)
- Add PATH fix for mise dev task

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Card and module IDs can now be in prefix form (e.g. @cardstack/base/card-api)
which is not a valid URL. Replace new URL(id) with cardIdToURL(id) from
runtime-common in all host app code that handles card/module identifiers.

Also fix RealmResource to resolve prefix-form realm URLs before making
HTTP requests (_info, _config, _permissions, _publishability endpoints).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Systematic replacement of new URL(id) with cardIdToURL(id) in host app
code that handles module references, code refs, spec IDs, dependency
URLs, and card IDs — all of which can now be in @cardstack/base/ prefix
form.

Files updated: check-correctness, listing-create, listing-install,
listing-update-specs, show-card, room, card-schema-editor, edit-field-modal,
playground-panel, spec-preview, create-file-modal, module route,
operator-mode-state-service, store.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
backspace and others added 8 commits April 1, 2026 15:37
…-cs-10286

# Conflicts:
#	packages/eslint-plugin-boxel/lib/recommended-rules.js
#	packages/host/app/commands/open-create-listing-modal.ts
#	packages/host/app/components/operator-mode/create-listing-modal.gts
#	packages/realm-server/tests/realm-endpoints-test.ts
…tion-fixed to recommended

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…-cs-10286

# Conflicts:
#	packages/eslint-plugin-boxel/lib/recommended-rules.js
#	packages/host/app/commands/listing-create.ts
#	packages/host/app/services/card-type-service.ts
#	packages/software-factory/tests/factory-tool-executor.spec.ts
…-cs-10286

# Conflicts:
#	packages/ai-bot/tsconfig.json
#	packages/billing/tsconfig.json
#	packages/bot-runner/tsconfig.json
#	packages/boxel-ui/addon/tsconfig.json
#	packages/catalog-realm/SubmissionCardPortal/b535d5fb-8eef-44a6-8114-4bce6929b95a.json
#	packages/catalog-realm/commands/collect-submission-files.ts
#	packages/catalog-realm/commands/create-pr-card.ts
#	packages/catalog-realm/pr-card/pr-card.gts
#	packages/catalog-realm/tsconfig.json
#	packages/experiments-realm/tsconfig.json
#	packages/host/app/commands/bot-requests/create-listing-pr-request.ts
#	packages/host/app/commands/create-and-open-submission-workflow-card.ts
#	packages/host/app/commands/listing-create.ts
#	packages/host/app/commands/listing-install.ts
#	packages/host/app/commands/listing-remix.ts
#	packages/host/app/commands/listing-use.ts
#	packages/host/app/commands/search-and-choose.ts
#	packages/host/tsconfig.json
#	packages/matrix/tsconfig.json
#	packages/postgres/tsconfig.json
#	packages/realm-server/tsconfig.json
#	packages/runtime-common/tsconfig.json
#	packages/software-factory/experiment_1/.agents/skills/boxel-development/references/dev-command-development.md
#	packages/software-factory/experiment_1/.agents/skills/boxel-development/references/dev-core-patterns.md
#	packages/software-factory/experiment_1/.agents/skills/boxel-development/references/dev-data-management.md
#	packages/software-factory/experiment_1/.agents/skills/boxel-development/references/dev-enumerations.md
#	packages/software-factory/experiment_1/.agents/skills/boxel-development/references/dev-external-libraries.md
#	packages/software-factory/experiment_1/.agents/skills/boxel-development/references/dev-file-def.md
#	packages/software-factory/experiment_1/.agents/skills/boxel-development/references/dev-file-editing.md
#	packages/software-factory/experiment_1/.agents/skills/boxel-development/references/dev-quick-reference.md
#	packages/software-factory/experiment_1/.agents/skills/boxel-development/references/dev-replicate-ai.md
#	packages/software-factory/experiment_1/.agents/skills/boxel-development/references/dev-spec-usage.md
#	packages/software-factory/experiment_1/.agents/skills/boxel-development/references/dev-template-patterns.md
#	packages/software-factory/experiment_1/.agents/skills/boxel-development/references/dev-theme-design-system.md
#	packages/software-factory/experiment_1/.agents/skills/boxel-file-structure/SKILL.md
#	packages/software-factory/experiment_1/realms/guidance-tasks/KnowledgeArticle/agent-onboarding.json
#	packages/software-factory/experiment_1/realms/guidance-tasks/Project/demo-project.json
#	packages/software-factory/experiment_1/realms/guidance-tasks/Ticket/ticket-001.json
#	packages/software-factory/experiment_1/realms/guidance-tasks/darkfactory-schema.gts
#	packages/software-factory/experiment_1/realms/guidance-tasks/darkfactory-ui.gts
#	packages/software-factory/experiment_1/realms/guidance-tasks/index.json
#	packages/software-factory/prompts/examples/create-card.md
#	packages/software-factory/prompts/examples/iterate-fix.md
#	packages/vscode-boxel-tools/tsconfig.json
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant