Skip to content

feat(web): export structured artifact preview as PNG/PDF#68

Merged
cocofhu merged 2 commits into
mainfrom
feature/structured-artifact-export-png-pdf
Jul 26, 2026
Merged

feat(web): export structured artifact preview as PNG/PDF#68
cocofhu merged 2 commits into
mainfrom
feature/structured-artifact-export-png-pdf

Conversation

@cocofhu

@cocofhu cocofhu commented Jul 26, 2026

Copy link
Copy Markdown
Owner

Summary

  • Add html-to-image + jspdf helper to capture StructuredArtifactView (full scroll size, theme --c-base background, A4 PDF slices).
  • Wire ArtifactPreview inline/Zoom text buttons「下载图片」「下载 PDF」for previewBranch.kind === 'structured' only; keep copy + raw JSON download (tooltip clarifies original JSON).
  • Cover test_result screenshot wait (5s timeout + incomplete toast), zh-CN/en i18n, and Vitest for visibility/filename/trigger/toast.

Test plan

  • npm test in web/ (1084 passed)
  • vue-tsc --noEmit
  • Manual: Zoom/Inline export PNG/PDF for clarified_requirement / research / proposals / test_result (with screenshots) under light/dark themes
  • Manual: non-structured JSON/MD/HTML/image previews do not show new buttons; raw download still works

Made with Cursor

AgentBot and others added 2 commits July 26, 2026 01:55
Allow ArtifactPreview to download styled PNG/PDF from the visible
StructuredArtifactView DOM while keeping original JSON download.

Co-authored-by: Cursor <cursoragent@cursor.com>
Cover ArtifactPreview export buttons, filename downloads, and non-structured non-exposure in a headless Chromium harness.

Co-authored-by: Cursor <cursoragent@cursor.com>
@cocofhu
cocofhu merged commit 53ab832 into main Jul 26, 2026
10 checks passed
@cocofhu
cocofhu deleted the feature/structured-artifact-export-png-pdf branch July 26, 2026 10:14
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.

1 participant