Change CardDef.id to be RRI#4845
Draft
backspace wants to merge 3 commits into
Draft
Conversation
…tifier
Brands the live runtime card identifier type and the consumer-side
identifier strings that flow from it. Picks up where CS-10750 stopped:
that ticket branded the wire-shape types (CardResource.id,
ResolvedCodeRef.module); this one brands CardDef.id and the host- and
matrix-side fields and parameters that hold the same values.
Branded:
- CardDef.id, FileDef.id (via explicit field annotation + cast over
contains(ReadOnlyField))
- setId(), SaveCardFn
- OperatorModeStateService.{openCardIds, getOpenCardIds,
codePathString, getSummaryForAIBot, makeRemoteIdsList}
- PlaygroundSelection.cardId
- BoxelContext.{openCardIds, previewPanelSelection.cardId}
- extractRelationshipIds() return
Call-site fixes propagate the brand through the host command/component
graph (10 sites) and remove a redundant id: string redeclaration on
three TaskCard interfaces.
Deferred to follow-ups:
- ~42 test-fixture sites still pass raw strings into PlaygroundSelection
literals
- @field openCardIds = containsMany(StringField) in base/command.gts
still produces string[] (cast at the open-create-listing-modal
boundary)
- autoAttachedCardIds is TrackedSet<string> in several components
(cast at the room.gts boundary)
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
With CardDef.id and getOpenCardIds() now branded RealmResourceIdentifier (prior commit), the explicit rri() casts in search.ts and workspace.gts are redundant. Removing them is one of the goals called out by the ticket. Test fixtures still construct PlaygroundSelection-shaped literals and card.id assignments with raw strings. Wrap those with rri(...) so the fixtures satisfy the brand. Verified clean: - pnpm --filter @cardstack/host run lint:types - pnpm --filter @cardstack/runtime-common run lint:types - pnpm --filter @cardstack/realm-server run lint:types (all show zero cascade-related errors; remaining noise is pre-existing TS2307 module-resolution and CssVariableFieldEntry issues unrelated to this work.) Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
# Conflicts: # packages/host/tests/integration/components/ask-ai-test.gts
Contributor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Another step toward
@cardstack/base