Create-listing modal: supporting cards row (CS-12116)#5536
Create-listing modal: supporting cards row (CS-12116)#5536richardhjtan wants to merge 3 commits into
Conversation
Adds supportingCardIds to ListingCreateInput and a second picker row to the create-listing modal for cards that install with the listing but are not shown on the listing detail page (e.g. data cards a query-based example depends on). The examples picker stays filtered to the listed type; the supporting picker accepts any card. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Changes in packages/base/Skill/catalog-listing.jsonInstructions Changes--- /tmp/skill-diffs/old_instructions.txt 2026-07-17 10:53:30.611938090 +0000
+++ /tmp/skill-diffs/new_instructions.txt 2026-07-17 10:53:30.611938090 +0000
@@ -18,6 +18,7 @@
If actionType === "create" → run create with following payload(s):
- Open card id: [attached instance URL]
+ - Supporting card ids (optional): attached cards that should install with the listing but not appear on the listing detail page (e.g. data cards a query-based example depends on). Attached cards that are not instances of the listed type are treated as supporting cards automatically.
Else, use the following inputs to run the command:
- Realm URL: [user input]
@@ -27,4 +28,4 @@
- After running remix, also run remix code to generate two example prompts.
- Respond with:
1. A confirmation message summarizing the remix operation.
- 2. A follow-up message with two listing-related remix prompts.If specific prompts can't be generated, provide two general suggestions (e.g., "Change to dark theme", "Convert to minimalist layout).
+ 2. A follow-up message with two listing-related remix prompts. If specific prompts can't be generated, provide two general suggestions (e.g., "Change to dark theme", "Convert to minimalist layout"). |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 5daf662871
ℹ️ 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".
| private get selectedSupportingCardURLs(): string[] { | ||
| return this._selectedSupportingCardURLs ?? []; | ||
| } |
There was a problem hiding this comment.
Preserve preselected supporting card ids
When a caller provides the newly added ListingCreateInput.supportingCardIds to the create-listing modal flow, those IDs are accepted by the input schema but never seed this selection; OpenCreateListingModalTool.run still only forwards openCardIds into createListingModalPayload, and the create action reads this getter before submitting to catalog. In AI/tool-driven create flows that attach data cards as supporting cards, the modal therefore submits supportingCardIds: [] unless the user manually reselects them, so the dependent cards are omitted from the listing install set.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
[Claude Code 🤖] Fixed in 38fa58f — OpenCreateListingModalTool now forwards supportingCardIds into the modal payload, and the modal seeds its selection from it (same pattern as openCardIds). Added a tool test for the payload pass-through and a modal test that a seeded supporting card renders with its remove button.
Tool-driven create flows can pass supportingCardIds; previously the open-create-listing-modal tool dropped them, so the modal submitted an empty list unless the user reselected the cards manually. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
This PR extends the create-listing flow to support “supporting cards” that get installed with a listing but are not rendered on the listing detail page, enabling query-based examples to ship their dependent data cards without showing them as Examples.
Changes:
- Adds
supportingCardIdstoListingCreateInput(base) and plumbs it through the host tool/modal payload. - Updates the create-listing modal UI to include a “Supporting Cards” row with multi-select picker (unfiltered by listed type).
- Adds/updates host integration tests to cover the new payload and UI behavior, and updates the catalog-listing skill instructions to mention the new input.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| packages/base/command.gts | Adds supportingCardIds field to ListingCreateInput. |
| packages/host/app/tools/open-create-listing-modal.ts | Passes supportingCardIds through to the operator-mode modal payload. |
| packages/host/app/services/operator-mode-state-service.ts | Extends modal payload type to include supportingCardIds. |
| packages/host/app/components/operator-mode/create-listing-modal.gts | Adds supporting-cards picker row; sends supportingCardIds to listing-create. |
| packages/host/tests/integration/tools/open-create-listing-modal-test.gts | Verifies supportingCardIds is stored in modal payload. |
| packages/host/tests/integration/components/create-listing-modal-test.gts | Adds render tests for supporting-cards row visibility and seeding. |
| packages/base/Skill/catalog-listing.json | Updates skill instructions to mention supportingCardIds. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| "type": "card", | ||
| "attributes": { | ||
| "instructions": "Before running the operation, ensure the following conditions are met:\n\n1. The create, use, install, and remix commands must exist and be callable.\n2. Except create, the user must provide all of the following:\n- A valid Realm URL\n- A Listing Card\n- An Action Type: \"use\", \"install\", or \"remix\"\n\n3. To create, user must attach at least one card instance to create the listing.\n\nIf any value is missing, prompt the user to provide the missing input(s). If all inputs are available, proceed automatically without asking for confirmation.\n\nBased on the action type:\n- If actionType === \"create\" → run the create command\n- If actionType === \"use\" → run the use command\n- If actionType === \"install\" → run the install command\n- If actionType === \"remix\" → run the remix command\n\nIf actionType === \"create\" → run create with following payload(s):\n - Open card id: [attached instance URL]\n\n Else, use the following inputs to run the command:\n- Realm URL: [user input]\n- Listing: [user input]\n\nIf actionType is remix:\n- After running remix, also run remix code to generate two example prompts.\n- Respond with:\n 1. A confirmation message summarizing the remix operation.\n 2. A follow-up message with two listing-related remix prompts.If specific prompts can't be generated, provide two general suggestions (e.g., \"Change to dark theme\", \"Convert to minimalist layout).", | ||
| "instructions": "Before running the operation, ensure the following conditions are met:\n\n1. The create, use, install, and remix commands must exist and be callable.\n2. Except create, the user must provide all of the following:\n- A valid Realm URL\n- A Listing Card\n- An Action Type: \"use\", \"install\", or \"remix\"\n\n3. To create, user must attach at least one card instance to create the listing.\n\nIf any value is missing, prompt the user to provide the missing input(s). If all inputs are available, proceed automatically without asking for confirmation.\n\nBased on the action type:\n- If actionType === \"create\" → run the create command\n- If actionType === \"use\" → run the use command\n- If actionType === \"install\" → run the install command\n- If actionType === \"remix\" → run the remix command\n\nIf actionType === \"create\" → run create with following payload(s):\n - Open card id: [attached instance URL]\n - Supporting card ids (optional): attached cards that should install with the listing but not appear on the listing detail page (e.g. data cards a query-based example depends on). Attached cards that are not instances of the listed type are treated as supporting cards automatically.\n\n Else, use the following inputs to run the command:\n- Realm URL: [user input]\n- Listing: [user input]\n\nIf actionType is remix:\n- After running remix, also run remix code to generate two example prompts.\n- Respond with:\n 1. A confirmation message summarizing the remix operation.\n 2. A follow-up message with two listing-related remix prompts.If specific prompts can't be generated, provide two general suggestions (e.g., \"Change to dark theme\", \"Convert to minimalist layout).", |
There was a problem hiding this comment.
[Claude Code 🤖] Fixed in 5cecbd0 — added the missing space, and also the missing closing quote in the example suggestion right after it ("Convert to minimalist layout").
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
What
ListingCreateInput(base) gainssupportingCardIds— cards that install with the listing but are not rendered on the listing detail page.baseCardReffilter).Why
Query-based examples find their data by query rather than
linksTo, so those data cards must ship with the listing — but they aren't showcases and shouldn't appear in the Examples tab. The catalog side (cardstack/boxel-catalog#664) adds thesupportingCardsfield on Listing and honorssupportingCardIdsinlisting-create; this PR gives users a way to attach them.Compatibility
Independently deployable in either order with boxel-catalog#664: an older catalog command ignores the extra input field, and the modal row simply goes unused until the catalog side lands.
Screens/behavior
Testing
create-listing-modalintegration tests: 2 new render tests (supporting row for card types, hidden for field listings); all 13 in the module pass.lint:typesand ESLint pass.CS-12116
🤖 Generated with Claude Code