feat(core): add export to PDF for service pages#2345
Conversation
Add summary and documentation pack print views for services with: - Summary artifact: overview cards, sends/receives with type badges, version history - Documentation artifact: cover page, health scorecard, mermaid visualization, per-message detail pages with schemas/examples/producers/consumers - Sidebar navigation with page TOC, section dividers with message previews - Settings panel for toggling sections, print-optimized layouts - Fix z-index on CopyPage dropdown menu - Consolidate print color constants into shared utils Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
🦋 Changeset detectedLatest commit: f58b4d7 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f58b4d703c
ℹ️ 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".
| document.querySelectorAll('[data-print-section="specifications"]').forEach((section) => { | ||
| section.style.display = 'none'; |
There was a problem hiding this comment.
Allow specifications section to be re-enabled
The summary artifact script hides data-print-section="specifications" on load, but the settings panel only exposes a Documentation toggle and never re-shows specifications. For services that define specifications, this makes the entire Specifications section permanently invisible in the UI and exported PDF, so users cannot include spec files in the summary document.
Useful? React with 👍 / 👎.
What This PR Does
Adds PDF export functionality for service pages, building on the existing message PDF export. Services get two print artifacts: a Summary (quick overview) and a Documentation Pack (comprehensive multi-page document with health scorecard, visualization, per-message detail pages, and appendix).
Changes Overview
Key Changes
service.astro): Single-page overview with service header, overview cards, sends/receives as styled message cards with type badges, version history, and optional documentation/specifications sectionsservice-docs.astro): Multi-page document with cover page, table of contents, service health scorecard, mermaid visualization, section dividers for sends/receives with message previews (fade after 8), per-message detail pages with schemas/examples/producers/consumers, and appendixPrintServiceLayout.astro(summary) andPrintServiceDocsLayout.astro(docs) with sidebar navigation, artifact tab switching, settings panel for toggling sections, and print-optimized CSSPRINT_DOT_COLORSandPRINT_BADGE_COLORSconstants intoutils.tsz-50to CopyPage dropdown menu to fix z-index rendering issueHow It Works
Service pages get a new "Export to PDF" option in the CopyPage dropdown. Clicking it opens a print-friendly page with two views selectable via left sidebar tabs:
Both views have a Settings panel (top-right) to toggle section visibility, and an Export PDF button that triggers the browser's print dialog.
Breaking Changes
None
Test plan
🤖 Generated with Claude Code