feat: render immutable Markdown documents - #6
Conversation
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ✅ Deployment successful! View logs |
vitehub-drop | fe32344 | Aug 30 2026, 03:57 PM |
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ✅ Deployment successful! View logs |
vitehub-drop-preview | fe32344 | Aug 30 2026, 03:57 PM |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ef89eb2e79
ℹ️ 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".
| const content = String(attrs.content ?? "") | ||
|
|
||
| try { | ||
| const svg = renderMermaidSVG(content, { |
There was a problem hiding this comment.
Bound Mermaid rendering before processing uploaded diagrams
A Markdown upload may contain up to 4 MiB, and this synchronously lays out every Mermaid fence without limiting its size or graph complexity. Since every unauthenticated GET—and even HEAD—rerenders the document, a sufficiently large graph can make its immutable URL consistently exceed Worker CPU/memory limits; repeated requests with distinct non-raw query strings can also bypass the 60-second cache key. Reject or truncate oversized diagrams, or render them once under a tightly bounded execution path.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: bd82c0b2a2
ℹ️ 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".
| handler: "./server/handlers/markdown-documents.ts", | ||
| lazy: true, | ||
| middleware: true, | ||
| route: "/i/*.(md|markdown)", |
There was a problem hiding this comment.
Register the handler with a supported route pattern
Nitro handler routes use URL parameters and wildcard segments rather than filesystem-style extension patterns, so *.(md|markdown) is treated as a literal segment and does not match an uploaded path such as /i/<uuid>.md. Consequently the request falls through to the Blob serving route and returns Markdown source instead of the new rendered HTML; register a supported wildcard route such as /i/** and retain the extension/path check inside the handler.
Useful? React with 👍 / 👎.
Drop now renders
.mdand.markdownuploads as secure, compact HTML at their existing/i/URLs, while?rawpreserves the exact source. Image uploads keep the existing fast path: Blob stores the original immediately, Queue optimizes it through Sandbox, and Drop replaces the bytes at the same URL only when the result is smaller.The bundled Drop skill teaches agents to produce concise Comark plans, use Mermaid and callouts deliberately, and publish a new URL for each document revision. Optional
supersedesfrontmatter creates a visible link chain without auth or server-side history.Test plan
pnpm testpnpm typecheckpython3 /home/maxi/.codex/skills/.system/skill-creator/scripts/quick_validate.py skills/vitehub-drop?rawpassed502; this path is unchanged by the PR