Skip to content

feat: render immutable Markdown documents - #6

Open
onmax wants to merge 15 commits into
mainfrom
t3code/review-postplan-portal-issues
Open

feat: render immutable Markdown documents#6
onmax wants to merge 15 commits into
mainfrom
t3code/review-postplan-portal-issues

Conversation

@onmax

@onmax onmax commented Aug 30, 2026

Copy link
Copy Markdown
Contributor

Drop now renders .md and .markdown uploads as secure, compact HTML at their existing /i/ URLs, while ?raw preserves 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 supersedes frontmatter creates a visible link chain without auth or server-side history.

Test plan

  • pnpm test
  • pnpm typecheck
  • python3 /home/maxi/.codex/skills/.system/skill-creator/scripts/quick_validate.py skills/vitehub-drop
  • Generated Wrangler config contains the image-optimization Queue producer and consumer
  • Current preview: image upload and retrieval, Markdown HTML rendering, and byte-identical ?raw passed
  • Cloudflare production and preview builds passed
  • Current preview code-image smoke step returned 502; this path is unchanged by the PR

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Aug 30, 2026

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Updated (UTC)
✅ Deployment successful!
View logs
vitehub-drop fe32344 Aug 30 2026, 03:57 PM

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Aug 30, 2026

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Updated (UTC)
✅ Deployment successful!
View logs
vitehub-drop-preview fe32344 Aug 30 2026, 03:57 PM

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Aug 30, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-08-30T15:59:45.201765Z fe32344 New commits
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread server/utils/markdown-document.ts Outdated
const content = String(attrs.content ?? "")

try {
const svg = renderMermaidSVG(content, {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge 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 👍 / 👎.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread vite.config.ts Outdated
handler: "./server/handlers/markdown-documents.ts",
lazy: true,
middleware: true,
route: "/i/*.(md|markdown)",

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge 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 👍 / 👎.

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