Remove field-spec instances from packages/base#4724
Remove field-spec instances from packages/base#4724richardhjtan wants to merge 1 commit intomainfrom
Conversation
Preview deploymentsHost Test Results 1 files 1 suites 2h 3m 30s ⏱️ Results for commit 1a42cd3. Realm Server Test Results 1 files ± 0 1 suites ±0 16m 48s ⏱️ + 11m 43s Results for commit 1a42cd3. ± Comparison against earlier commit 4eb2ed9. |
1a9f85c to
3715b19
Compare
There was a problem hiding this comment.
Pull request overview
This PR removes the field-spec JSON instances from packages/base/fields/ (they’re moving to boxel-catalog) and updates host UI/tests to stop relying on the old https://cardstack.com/base/fields/* URLs by using inline fixtures and a configurable default field spec ID.
Changes:
- Removed field-spec instance JSON files from
packages/base/fields/. - Updated host runtime config to expose
defaultFieldSpecId, and updated the “Create File” modal to use it for Field Definition defaults. - Updated integration/acceptance tests to use inline field-spec fixtures in their test realms and updated selectors to use
testRealmURL.
Reviewed changes
Copilot reviewed 30 out of 30 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/host/tests/integration/components/operator-mode/setup.gts | Adds an inline fields/biginteger-field.json fixture to the integration test realm. |
| packages/host/tests/integration/components/operator-mode-links-test.gts | Updates card-catalog selectors to use the test realm URL for the field spec. |
| packages/host/tests/acceptance/code-submode/schema-editor-test.ts | Adds inline field-spec fixtures (BigInteger/Date) and updates selectors to use the test realm URL. |
| packages/host/tests/acceptance/code-submode/create-file-test.gts | Adds inline fixtures for fields/biginteger-field.json and fields/field.json; updates selectors to use the test realm URL. |
| packages/host/config/environment.js | Introduces ENV.defaultFieldSpecId (test hardcode; computed from catalog realm when available). |
| packages/host/app/config/environment.ts | Extends the typed config shape with defaultFieldSpecId?: string. |
| packages/host/app/components/operator-mode/create-file-modal.gts | Uses config.defaultFieldSpecId as the default spec for Field Definition creation. |
| packages/base/fields/website-field.json | Removed base field spec instance JSON (moved to catalog). |
| packages/base/fields/url-field.json | Removed base field spec instance JSON (moved to catalog). |
| packages/base/fields/text-area-field.json | Removed base field spec instance JSON (moved to catalog). |
| packages/base/fields/string-field.json | Removed base field spec instance JSON (moved to catalog). |
| packages/base/fields/realm-field.json | Removed base field spec instance JSON (moved to catalog). |
| packages/base/fields/phone-number.json | Removed base field spec instance JSON (moved to catalog). |
| packages/base/fields/percentage-field.json | Removed base field spec instance JSON (moved to catalog). |
| packages/base/fields/number-field.json | Removed base field spec instance JSON (moved to catalog). |
| packages/base/fields/markdown-field.json | Removed base field spec instance JSON (moved to catalog). |
| packages/base/fields/field.json | Removed base field spec instance JSON (moved to catalog). |
| packages/base/fields/ethereum-address-field.json | Removed base field spec instance JSON (moved to catalog). |
| packages/base/fields/email-field.json | Removed base field spec instance JSON (moved to catalog). |
| packages/base/fields/datetime-field.json | Removed base field spec instance JSON (moved to catalog). |
| packages/base/fields/date-range-field.json | Removed base field spec instance JSON (moved to catalog). |
| packages/base/fields/date-field.json | Removed base field spec instance JSON (moved to catalog). |
| packages/base/fields/country-field.json | Removed base field spec instance JSON (moved to catalog). |
| packages/base/fields/command-field.json | Removed base field spec instance JSON (moved to catalog). |
| packages/base/fields/color-field.json | Removed base field spec instance JSON (moved to catalog). |
| packages/base/fields/code-ref-field.json | Removed base field spec instance JSON (moved to catalog). |
| packages/base/fields/boolean-field.json | Removed base field spec instance JSON (moved to catalog). |
| packages/base/fields/biginteger-field.json | Removed base field spec instance JSON (moved to catalog). |
| packages/base/fields/base64-image.json | Removed base field spec instance JSON (moved to catalog). |
| packages/base/fields/address-field.json | Removed base field spec instance JSON (moved to catalog). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
3715b19 to
21283a5
Compare
31e26c1 to
4eb2ed9
Compare
The field-spec JSON files under packages/base/fields/ are moving to boxel-catalog Three host tests had hard-coded selectors pointing at the old base field-spec URLs. They now use inline fixtures in their test realms, making them self-contained.
4eb2ed9 to
1a42cd3
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1a42cd3eee
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| withTrailingSlash(ENV.resolvedCatalogRealmURL), | ||
| ).href; | ||
| ENV.defaultFieldSpecId = new URL( | ||
| 'Spec/fields/field', |
There was a problem hiding this comment.
Point default field spec ID at the moved fields path
The new production default uses Spec/fields/field, but the moved field-spec fixtures and updated tests in this change consistently use fields/field (for example http://test-realm/test/fields/field). When CreateFileModal opens a field-definition flow, it waits for defaultSpecResource.isLoaded; if this URL 404s in catalog, the modal stays in loading state and users cannot create field definitions without manual recovery. This should use the actual moved field-spec path under fields/.
Useful? React with 👍 / 👎.
|
Probably you want to link this to the PR that adds them in catalog. the merge for this which does the staging deploy and the production deploy for this absolutely need to be coordinated with their addition to the catalog realm in each environment, or it will be a very chaotic transition. cardstack/boxel-catalog#557 |
The field-spec JSON files under packages/base/fields/ are moving to
boxel-catalog.Three host tests had hard-coded selectors pointing at the old base field-spec URLs. They now use inline fixtures in their test realms, making them self-contained.
There is a test to verify that the base specs exist in
boxel-catalog: cardstack/boxel-catalog#557