Repository navigation
Rename the capture demo to follow the platform rename - #753
Conversation
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>
There was a problem hiding this comment.
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.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Lf7uC459jKR3SdpTShAbxJ
Staging Submissions PreviewThis PR's content is pushed to the staging submissions realm: https://realms-staging.stack.cards/submissions/ Changed folders:
Updated at 2026-10-01 02:25:35 UTC for commit |
habdelra
left a comment
There was a problem hiding this comment.
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; |
There was a problem hiding this comment.
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
Background and Goal
CS-13193. The host tool module moved from
@cardstack/boxel-host/commands/screenshot-cardtocommands/capture-cardin cardstack/boxel#6307. Both the demo card andcommands/listing-create.tsimport it, so they have to follow or they resolve to nothing.Where to start
screenshot-card-demo.gts→capture-card-demo.gts, classScreenshotCardDemo→CaptureCardDemo, and the instance'sadoptsFromrepointed at the new module.commands/listing-create.ts— the import path and theCaptureCardCommandsymbol only.Left alone on purpose
The catalog's own listing "screenshots" — the marketing images under each listing's
Screenshots/directory, thescreenshotsdisplay vocabulary inlisting.gts, andautoScreenshotExampleinlisting-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-cardorScreenshotCardCommand. TheScreenshots/asset directories are untouched.Must land together with cardstack/boxel#6307.
🤖 Generated with Claude Code