Skip to content

Rename the capture demo to follow the platform rename - #753

Merged
habdelra merged 3 commits into
mainfrom
cs-13193-rename-captures
Oct 1, 2026
Merged

habdelra merged 3 commits into
mainfrom
cs-13193-rename-captures

Conversation

@lukemelia

Copy link
Copy Markdown
Contributor

Background and Goal

CS-13193. The host tool module moved from @cardstack/boxel-host/commands/screenshot-card to commands/capture-card in cardstack/boxel#6307. Both the demo card and commands/listing-create.ts import it, so they have to follow or they resolve to nothing.

Where to start

  • screenshot-card-demo.gts → capture-card-demo.gts, class ScreenshotCardDemo → CaptureCardDemo, and the instance's adoptsFrom repointed at the new module.
  • commands/listing-create.ts — the import path and the CaptureCardCommand symbol only.

Left alone on purpose

The catalog's own listing "screenshots" — the marketing images under each listing's Screenshots/ directory, the screenshots display vocabulary in listing.gts, and autoScreenshotExample in listing-create.ts — are a different concept that happens to share the word. Only the platform API references changed.

Testing

No remaining references to ScreenshotCardDemo, screenshot-card-demo, commands/screenshot-card or ScreenshotCardCommand. The Screenshots/ asset directories are untouched.

Must land together with cardstack/boxel#6307.

🤖 Generated with Claude Code

The host tool module moved from `@cardstack/boxel-host/commands/screenshot-card`
to `commands/capture-card`, so the demo card and listing-create's import
have to follow or they resolve to nothing.

screenshot-card-demo.gts becomes capture-card-demo.gts, its class becomes
CaptureCardDemo, and the instance's adoptsFrom points at the new module.

The catalog's own listing "screenshots" — the marketing images under each
listing's Screenshots/ directory, and the vocabulary around them — are a
different concept and are left alone.

Co-Authored-By: Claude Opus 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.

Copilot review overview

🔵 Needs a closer look

Update commands/listing-create.ts to consume the new command’s capture URL output.

Review effort: Lite
Findings: None

What changed in this PR

Renames the screenshot capture demo and updates host command references to the platform’s capture terminology.

Changes:

  • Renames the demo class, module, metadata, and UI terminology.
  • Updates imports and usage to CaptureCardCommand.
  • Preserves catalog listing screenshot terminology.

A required fix remains in commands/listing-create.ts: it still reads result.imageDefUrl, but the new command returns capture URLs.

File Summary
commands/​listing-create.ts Updated capture command import and usage; output handling still requires correction.
CaptureCardDemo/​515e9c39-9f33-4597-99f4-6763f105d70e.json Updated card metadata for the renamed demo.
capture-card-demo.gts Renamed demo implementation and capture terminology.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@lukemelia
lukemelia marked this pull request as ready for review October 1, 2026 00:09
@lukemelia
lukemelia requested review from a team and FadhlanR October 1, 2026 00:09
@habdelra
habdelra merged commit e5a6c1d into main Oct 1, 2026
4 of 5 checks passed
@github-actions

github-actions Bot commented Oct 1, 2026

Copy link
Copy Markdown

Staging Submissions Preview

This PR's content is pushed to the staging submissions realm: https://realms-staging.stack.cards/submissions/

Changed folders:

  • CaptureCardDemo/
  • commands/

Updated at 2026-10-01 02:25:35 UTC for commit 524d172. Shared realm: only this PR's changed files are pushed; files touched by multiple PRs reflect whichever pushed last, and deleted files are not removed.

@habdelra habdelra 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.

Code review: one bug found (inline). The rename is correct and needed, because boxel main provides @cardstack/boxel-host/commands/capture-card and no longer has screenshot-card. But listing-create.ts still reads the old result shape, so auto-captured listing images silently stop working.

None of the changed files are in boxel's packages/catalog/test-subset.json, so the paired-branch and re-pin steps in AGENTS.md don't apply.


Generated by Claude Code

card: firstExample,
format: 'isolated',
});
imageDefUrl = (result as any)?.imageDefUrl;

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.

Bug: listings never get an auto-captured image. On boxel main, capture-card returns { captures: [{ name, url, width, height }] }. It has no imageDefUrl field. So imageDefUrl is always undefined here and autoScreenshotExample returns early without any error. Every listing created with an example card runs a full capture and then throws the result away. The as any cast hides the mismatch from the type checker.

The demo in this PR already reads result.captures[0]?.url, so swapping the import alone isn't enough. That URL points at boxel's media cache, not an image file in the realm. The code below that links the image into the listing's images field (linksTo(ImageDef)) needs rework as well: either save the capture into the realm as an image file, or change how the listing refers to the image.


Generated by Claude Code

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.

3 participants