Merged
Conversation
50111df to
b45d343
Compare
Signed-off-by: Émile Ré <emile@getprobo.com>
Signed-off-by: Émile Ré <emile@getprobo.com>
Signed-off-by: Émile Ré <emile@getprobo.com>
Signed-off-by: Émile Ré <emile@getprobo.com>
Signed-off-by: Émile Ré <emile@getprobo.com>
…ctrl or cmd Signed-off-by: Émile Ré <emile@getprobo.com>
Signed-off-by: Émile Ré <emile@getprobo.com>
Signed-off-by: Émile Ré <emile@getprobo.com>
Signed-off-by: Émile Ré <emile@getprobo.com>
Signed-off-by: Émile Ré <emile@getprobo.com>
Signed-off-by: Émile Ré <emile@getprobo.com>
Signed-off-by: Émile Ré <emile@getprobo.com>
Signed-off-by: Émile Ré <emile@getprobo.com>
Signed-off-by: Émile Ré <emile@getprobo.com>
Signed-off-by: Émile Ré <emile@getprobo.com>
Signed-off-by: Émile Ré <emile@getprobo.com>
Signed-off-by: Émile Ré <emile@getprobo.com>
Signed-off-by: Émile Ré <emile@getprobo.com>
Signed-off-by: Émile Ré <emile@getprobo.com>
Signed-off-by: Émile Ré <emile@getprobo.com>
Signed-off-by: Émile Ré <emile@getprobo.com>
Signed-off-by: Émile Ré <emile@getprobo.com>
Signed-off-by: Émile Ré <emile@getprobo.com>
Signed-off-by: Émile Ré <emile@getprobo.com>
Signed-off-by: Émile Ré <emile@getprobo.com>
Signed-off-by: Émile Ré <emile@getprobo.com>
Signed-off-by: Émile Ré <emile@getprobo.com>
Signed-off-by: Émile Ré <emile@getprobo.com>
Signed-off-by: Émile Ré <emile@getprobo.com>
Signed-off-by: Émile Ré <emile@getprobo.com>
Signed-off-by: Émile Ré <emile@getprobo.com>
Signed-off-by: Émile Ré <emile@getprobo.com>
Signed-off-by: Émile Ré <emile@getprobo.com>
Signed-off-by: Émile Ré <emile@getprobo.com>
Signed-off-by: Émile Ré <emile@getprobo.com>
…rgets Signed-off-by: Émile Ré <emile@getprobo.com>
Signed-off-by: Émile Ré <emile@getprobo.com>
71b3bc5 to
a03a2de
Compare
Signed-off-by: Émile Ré <emile@getprobo.com>
Signed-off-by: Émile Ré <emile@getprobo.com>
Signed-off-by: Émile Ré <emile@getprobo.com>
Signed-off-by: Émile Ré <emile@getprobo.com>
Signed-off-by: Émile Ré <emile@getprobo.com>
Signed-off-by: Émile Ré <emile@getprobo.com>
Signed-off-by: Émile Ré <emile@getprobo.com>
Signed-off-by: Émile Ré <emile@getprobo.com>
Contributor
@codenem I have started the AI code review. It will take a few minutes to complete. |
Signed-off-by: Émile Ré <emile@getprobo.com>
Contributor
There was a problem hiding this comment.
14 issues found across 84 files
Note: This PR contains a large number of files. cubic only reviews up to 75 files per PR, so some files may not have been reviewed.
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="pkg/prosemirror/markdown.go">
<violation number="1" location="pkg/prosemirror/markdown.go:63">
P2: Image alt text extraction ignores nested inline nodes, so formatted alt text is partially dropped.</violation>
</file>
<file name="packages/ui/src/RichEditor/RichEditor.tsx">
<violation number="1" location="packages/ui/src/RichEditor/RichEditor.tsx:100">
P2: `JSON.parse(content)` is unguarded and can crash the editor on invalid content. Parse defensively and fall back to empty content.</violation>
</file>
<file name="packages/ui/src/RichEditor/LinkExtension.ts">
<violation number="1" location="packages/ui/src/RichEditor/LinkExtension.ts:19">
P2: `pointer-on-hovered-link` can get stuck because cleanup only happens on editor `keyup`. Add blur cleanup so focus loss always removes the class.</violation>
</file>
<file name="packages/ui/src/RichEditor/TableRowMenu/TableRowMenuContent.tsx">
<violation number="1" location="packages/ui/src/RichEditor/TableRowMenu/TableRowMenuContent.tsx:215">
P2: This dispatches two separate transactions (set selection, then delete), creating two undo-history entries for a single "clear contents" action. Use `editor.chain().focus().command(...)` to batch both into one transaction, consistent with the other handlers in this file.</violation>
</file>
<file name="pkg/validator/validator_prosemirror.go">
<violation number="1" location="pkg/validator/validator_prosemirror.go:28">
P2: Handle nil values before type assertion so optional fields don’t fail with an invalid-format error.</violation>
</file>
<file name="packages/ui/src/RichEditor/TableColumnMenu/TableColumnMenu.tsx">
<violation number="1" location="packages/ui/src/RichEditor/TableColumnMenu/TableColumnMenu.tsx:77">
P2: Validate `fromCol`/`toCol` bounds before splicing; otherwise an out-of-range index can insert `undefined` and crash table reconstruction.</violation>
<violation number="2" location="packages/ui/src/RichEditor/TableColumnMenu/TableColumnMenu.tsx:77">
P1: Column reordering is index-based per row and does not account for merged cells, so moving columns can corrupt or misorder tables with colspan/rowspan.</violation>
</file>
<file name="apps/console/src/pages/organizations/documents/_components/CreateDocumentDialog.tsx">
<violation number="1" location="apps/console/src/pages/organizations/documents/_components/CreateDocumentDialog.tsx:69">
P1: `approverIds` is required in the new form schema, but this dialog has no `approverIds` input, so submit validation will fail and block document creation.</violation>
</file>
<file name="packages/ui/src/RichEditor/TableColumnMenu/TableColumnMenuContent.tsx">
<violation number="1" location="packages/ui/src/RichEditor/TableColumnMenu/TableColumnMenuContent.tsx:132">
P2: Merged/spanning cells are duplicated multiple times. `TableMap.map` reuses the same cell position for every row a merged cell spans, so iterating all rows inserts that cell once per spanned row. Track seen offsets to skip duplicates.</violation>
<violation number="2" location="packages/ui/src/RichEditor/TableColumnMenu/TableColumnMenuContent.tsx:217">
P2: Two separate dispatches create two undo steps. Combine the selection-set and delete into a single transaction so Ctrl+Z undoes the clear in one step.</violation>
</file>
<file name="packages/ui/src/RichEditor/TableRowMenu/TableRowMenu.tsx">
<violation number="1" location="packages/ui/src/RichEditor/TableRowMenu/TableRowMenu.tsx:75">
P1: Validate `fromRow`/`toRow` before splicing to prevent inserting an undefined row and creating an invalid ProseMirror table.</violation>
</file>
<file name="pkg/prosemirror/html.go">
<violation number="1" location="pkg/prosemirror/html.go:103">
P1: Image `src` is emitted without URL-scheme sanitization, allowing untrusted document JSON to force external fetches during PDF rendering.</violation>
<violation number="2" location="pkg/prosemirror/html.go:282">
P2: `target="_blank"` links can still omit `noopener` when a custom `rel` is present, leaving opener protection bypassed.</violation>
</file>
<file name="pkg/probo/document_service.go">
<violation number="1" location="pkg/probo/document_service.go:156">
P2: `UpdateVersion` now enforces `content` as required, but GraphQL/MCP inputs still define it as optional, causing classification-only updates to fail with validation errors.</violation>
</file>
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.
Signed-off-by: Émile Ré <emile@getprobo.com>
dfe034f to
821f66c
Compare
Signed-off-by: Émile Ré <emile@getprobo.com>
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.
Closes ENG-208
Summary by cubic
Adds a TipTap-based rich text editor and moves document content to ProseMirror JSON end‑to‑end, with autosave and PDF rendering. Adds a migration CLI and fixes dry‑run behavior.
New Features
RichEditorin@probo/uiusing@tiptap/react,@floating-ui/react, and@phosphor-icons/react: slash “/” menu; side block and options menus; link bubble with URL input and Cmd/Ctrl+click; full‑height layout with caret/scroll fixes and no focus outline; bubble menu improvements.RichEditor; removed Update Version dialog; versions menu uses Relay connections; draft create/delete flow fixed.updateDocumentVersionContentGraphQL mutation;pkg/prosemirroradds JSON→HTML and Markdown/HTML→ProseMirror (sanitized);docgenrenders PDFs from sanitized ProseMirror HTML;migrate-document-versions-markdownCLI for data migration (dry‑run fixed).Migration
updateDocumentVersionContent(input)to save drafts.CreateDocumentInput.contentis now optional; when provided, send ProseMirror JSON.migrate-document-versions-markdowncommand; supports dry‑run.Written for commit 3008eec. Summary will update on new commits.