fix: render research PDFs from canonical Markdown - #164
Merged
Conversation
Render validated report Markdown directly into PDF. Chat and deliverable retain the same structure, citations, and ordering. Add print-safe GFM styles and exclude internal provenance from the user-facing artifact.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Architecture
The research synthesis remains the single content source. The Worker parses that bounded Markdown with a pinned GFM parser, stages the Markdown and its semantic tokens in the existing hidden artifact-input path, and the sandbox's existing React PDF runtime renders those tokens into a durable workspace/R2 PDF.
No database, storage, sandbox snapshot, or deployment-topology change is required.
Decisions Made
report.reportverbatimmarkedinagent-coreEdge Cases Handled
How to Review
research-report-document-support.tsandresearch-tools.tsfor the one-source data flow.execute.tsandscripts.tsfor parsing, staging, and semantic PDF rendering.Verification
pnpm lintpnpm typecheckpnpm turbo build --forcepnpm deadcodepnpm architecture:checkpnpm turbo skills:build