Skip to content

fix: Add plugin document rendering and MCP preview support#938

Open
ved015 wants to merge 7 commits into
mainfrom
fix/documentrender
Open

fix: Add plugin document rendering and MCP preview support#938
ved015 wants to merge 7 commits into
mainfrom
fix/documentrender

Conversation

@ved015
Copy link
Copy Markdown
Member

@ved015 ved015 commented May 12, 2026

Implement comprehensive plugin document rendering support including MCP previews and plugin specific content handling.



Screenshot 2026-05-12 at 8 24 49 PM

Screenshot 2026-05-12 at 8 28 25 PM

@cloudflare-workers-and-pages
Copy link
Copy Markdown

cloudflare-workers-and-pages Bot commented May 12, 2026

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
supermemory-mcp b687fd4 May 14 2026, 10:11 AM

@claude
Copy link
Copy Markdown

claude Bot commented May 12, 2026

Claude finished @ved015's task in 55s —— View job


Review Complete

  • Fetch and analyze PR diff
  • Check existing review comments
  • Review for bugs, security issues, and logic errors
  • Provide review summary

Overview: Adds plugin document rendering support with dedicated parsers for Codex sessions/saves, Amp threads, and OpenClaw conversations, plus UI components for previews and modal content.

Issues found: The previous review identified a logic bug where pluginDocument was checked after the early return on contentType. This has been fixed in the latest commit (2493b36) — the conditional order is now correct:

if (!document) return null
if (pluginDocument) {
    return <PluginContent parsed={pluginDocument} />
}
if (!contentType) return null

No additional bugs, security issues, or logic errors found. The regex patterns are safe from ReDoS (non-greedy quantifiers with clear boundaries), React's auto-escaping handles XSS concerns, and null/undefined handling is thorough throughout.

Score: 9/10

Clean implementation with good separation between parsing logic and UI components. The only improvement opportunity would be adding unit tests for the parser edge cases, but that's not a blocker for shipping.

@cloudflare-workers-and-pages
Copy link
Copy Markdown

cloudflare-workers-and-pages Bot commented May 12, 2026

Deploying with  Cloudflare Workers  Cloudflare Workers

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

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
supermemory-app b687fd4 Commit Preview URL

Branch Preview URL
May 14 2026, 10:13 AM

Copy link
Copy Markdown

@claude claude Bot left a comment

Choose a reason for hiding this comment

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

Overview: Adds plugin document rendering support with dedicated parsers for Codex sessions/saves, Amp threads, and OpenClaw conversations, plus UI components for previews and modal content.

Issues found:

  • One logic bug in DocumentContent where plugin documents with unrecognized base types won't render (see inline comment with fix)

Score: 8/10

The implementation is well-structured with clean separation between parsing logic and UI components. The regex patterns are efficient and non-vulnerable to ReDoS. React's auto-escaping handles XSS concerns for user content. The one issue is a straightforward fix to the conditional order.

Comment thread apps/web/components/document-modal/content/index.tsx
ved015 and others added 4 commits May 12, 2026 21:28
Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com>
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Fix missing closing brace and remove duplicate code in DocumentContent
- Add type assertion for summary prop to satisfy TypeScript

Co-Authored-By: Vedant Mahajan <undefined@users.noreply.github.com>
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Refactor summary prop formatting for DocumentSummary component.
@graphite-app graphite-app Bot requested a review from Dhravya May 13, 2026 11:06
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.

3 participants