Skip to content

Create-listing modal: supporting cards row (CS-12116)#5536

Draft
richardhjtan wants to merge 3 commits into
mainfrom
cs-12116-create-listing-supporting-cards
Draft

Create-listing modal: supporting cards row (CS-12116)#5536
richardhjtan wants to merge 3 commits into
mainfrom
cs-12116-create-listing-supporting-cards

Conversation

@richardhjtan

Copy link
Copy Markdown
Contributor

What

  • ListingCreateInput (base) gains supportingCardIds — cards that install with the listing but are not rendered on the listing detail page.
  • The create-listing modal gains a second row, "Supporting Cards", with its own picker. The Examples picker stays filtered to the listed type; the supporting picker accepts any card (baseCardRef filter).
  • The catalog-listing skill instructions mention the new payload so the AI-driven create flow can pass supporting cards too.

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 the supportingCards field on Listing and honors supportingCardIds in listing-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

  • Supporting Cards row shows a hint ("Installed with the listing but not shown on the listing page"), an empty state, chips with remove buttons, and an Add Supporting Cards button.
  • Row is hidden for field listings, same as Examples.
  • Chip-list CSS is shared between the two rows (classes generalized from example-specific names; data-test hooks unchanged for examples).

Testing

  • create-listing-modal integration tests: 2 new render tests (supporting row for card types, hidden for field listings); all 13 in the module pass.
  • Host lint:types and ESLint pass.

CS-12116

🤖 Generated with Claude Code

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>
@github-actions

github-actions Bot commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

Changes in packages/base/Skill/catalog-listing.json

Instructions 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").

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment on lines +96 to +98
private get selectedSupportingCardURLs(): string[] {
return this._selectedSupportingCardURLs ?? [];
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[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.

@github-actions

github-actions Bot commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

Preview deployments

Host Test Results

    1 files      1 suites   2h 40m 56s ⏱️
3 551 tests 3 536 ✅ 15 💤 0 ❌
3 570 runs  3 555 ✅ 15 💤 0 ❌

Results for commit 5cecbd0.

Realm Server Test Results

    1 files      1 suites   18m 2s ⏱️
1 875 tests 1 875 ✅ 0 💤 0 ❌
1 954 runs  1 954 ✅ 0 💤 0 ❌

Results for commit 5cecbd0.

@richardhjtan
richardhjtan marked this pull request as draft July 17, 2026 10:30
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>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 supportingCardIds to ListingCreateInput (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).",

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[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>
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.

2 participants