-
Notifications
You must be signed in to change notification settings - Fork 1.5k
feat: deep-research on user profile and tiptap integration #672
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
How to use the Graphite Merge QueueAdd the label Main to this PR to add it to the merge queue. You must have a Graphite account in order to use the merge queue. Sign up using this link. An organization admin has enabled the Graphite Merge Queue in this repository. Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue. This stack of pull requests is managed by Graphite. Learn more about stacking. |
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| 🔵 In progress View logs |
supermemory-app | 9aa85c5 | Jan 15 2026, 08:51 PM |
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ❌ Deployment failed View logs |
supermemory-app | 59c294b | Jan 16 2026, 04:36 AM |
Pull Request Review: Deep Research & TipTap 3.x IntegrationOverviewThis PR adds significant new functionality including deep research capabilities for user onboarding and TipTap 3.x text editor integration for notes. The implementation is generally solid, but there are several areas that need attention. 🔴 Critical Issues1. Missing API Key Validation (apps/web/app/api/onboarding/research/route.ts)The research endpoint uses Issue: If the key is missing, the error will only surface at runtime with a generic 500 error. Recommendation: export async function POST(req: Request) {
try {
if (!process.env.XAI_API_KEY) {
return Response.json(
{ error: "AI service is not configured" },
{ status: 503 }
)
}
// ... rest of the code2. URL Validation Vulnerability (apps/web/app/api/onboarding/research/route.ts:38-43)The URL validation is too permissive. It uses Issue: if (!lowerUrl.includes("x.com") && !lowerUrl.includes("twitter.com"))This allows URLs like: Recommendation: const urlPattern = /^https?:\/\/(www\.)?(x\.com|twitter\.com)\//i
if (!urlPattern.test(lowerUrl)) {
return Response.json(
{ error: "URL must be an X/Twitter profile link" },
{ status: 400 }
)
}3. Handle Extraction Logic Issue (apps/web/app/api/onboarding/research/route.ts:67)The handle extraction uses simple string replacement which can fail with complex URLs. Issue: includedXHandles: [lowerUrl.replace("https://x.com/", "").replace("https://twitter.com/", "")]This doesn't handle URLs like Recommendation: Use the existing
|
Merge activity
|
deep-research on user profile add novel integration tiptap 3.x integration
6d68754 to
59c294b
Compare
| const debouncedUpdates = useDebouncedCallback((editor: Editor) => { | ||
| if (!hasUserEditedRef.current) return | ||
| const json = editor.getJSON() | ||
| const markdown = editor.storage.markdown?.manager?.serialize(json) ?? "" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bug: The markdown serialization uses an incorrect TipTap API path, editor.storage.markdown?.manager?.serialize(json). This will silently fail and cause data loss when editing documents.
Severity: CRITICAL
Suggested Fix
Replace the incorrect API call editor.storage.markdown?.manager?.serialize(json) with the correct method for the installed TipTap version, which is editor.markdown.serialize(json) or editor.getMarkdown().
Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent.
Verify if this is a real issue. If it is, propose a fix; if not, explain why it's not
valid.
Location: apps/web/components/new/text-editor/index.tsx#L37
Potential issue: The component uses an incorrect API path to serialize editor content to
Markdown. It calls `editor.storage.markdown?.manager?.serialize(json)`, but the official
TipTap v3 documentation specifies using `editor.markdown.serialize(json)` or
`editor.getMarkdown()`. Due to optional chaining (`?.`) and a nullish coalescing
operator (`?? ""`), this error fails silently. On every editor update, the `markdown`
variable becomes an empty string, causing the `onContentChange` callback to report empty
content. This results in user edits being lost upon saving the document.
Did we get this right? 👍 / 👎 to inform future reviews.

deep-research on user profile
add novel integration
tiptap 3.x integration