Repository navigation
Add native Markdown previews to Review - #79
Open
williamhrs wants to merge 1 commit into
Open
williamhrs wants to merge 1 commit into
williamhrs wants to merge 1 commit into
Conversation
williamhrs
marked this pull request as ready for review
October 6, 2026 14:42
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.
Uploaded
text/markdownfiles currently show “Preview not supported.” This adds a formatted Preview and original Source view for the selected immutable file, with exact-version download and existing review comments. Original bytes and storage APIs remain unchanged.Related scope proposal: #78
The product spec currently excludes Markdown rendering and syntax highlighting, so this explicitly proposes a scope change under SCP-002 rather than a bug fix. This PR remains a draft for maintainers to review that direction.
The implementation adds GFM formatting, a finite lazy Shiki language set, version-pinned bundled resources, and bounded Mermaid rendering. Diagrams run in a separate opaque frame with network-denying CSP and a validated message boundary; completed HTML/SVG is sanitized before entering the existing review sandbox. Source remains readable after preview lease failure, and abandoned work is cancelled.
Affected requirements: MDV-001, MDV-002, MDV-003. No backend processing, database migration, document editing, or MDX execution is introduced.
Validation completed so far:
pnpm verify:iterationpassed its lint, typecheck, build, and documentation stages, then encountered MCP discovery and CLI authentication/publishing test failures. That run was stopped after failures; the full gate has not passed. Browser qualification and the full gate remain required before this draft can be marked ready. The diagram bundle is about 3.7 MB minified and loads only for diagram fences; maintainers may prefer to split that optional support into a follow-up.