Repository navigation
Nx monorepo - #9
Merged
Merged
Conversation
auxa-m45
referenced
this pull request
in auxa-m45/docmost
Apr 13, 2025
fuscodev
pushed a commit
to fuscodev/docmost
that referenced
this pull request
Jun 29, 2025
…Password Feat/fix email change without password
nulluserid
pushed a commit
to N2con-Inc/docmost
that referenced
this pull request
Dec 17, 2025
Nx monorepo
vvzvlad
pushed a commit
to vvzvlad/gitmost
that referenced
this pull request
Jun 20, 2026
…answer' (docmost#9) from feat/ai-chat-step-limit into develop
vvzvlad
pushed a commit
to vvzvlad/gitmost
that referenced
this pull request
Jun 27, 2026
…lock/definition, deep-strip nested lists, docs + cross-copy guard (docmost#228) Must-fix: - REAL BUG: insertInlineFootnote could splice a footnoteReference (inline atom) into a codeBlock or an existing footnoteDefinition, persisting a schema-invalid doc (insert_footnote skips validateDocStructure). Now the search is bounded to the BODY (before the first footnotesList) and the insertNodesAfterAnchor core refuses textblocks that can't hold the atom (codeBlock); when the only match is in such a place the insert returns inserted:false and the write aborts cleanly. Reachable via docmost_transform too. Added codeBlock / definition / fall-through tests. - Fixed the deepEqualJson doc comment in both copies: arrays are order-SENSITIVE (correctness depends on it), only object keys are order-insensitive. - README.ru.md MCP tool count 38 -> 39 (lines 36/47/63), matching README.md/AGENTS. - CHANGELOG [Unreleased] Added entry for insert_footnote + server-side footnote canonicalization on non-editor write paths (docmost#228). Suggestions: - canonicalize step 5/7 now strips footnotesList at ANY depth (both copies), so a schema-valid list nested in a callout/blockquote can't leave duplicate defs. - Exclude the test-only footnote-corpus.ts fixture from the editor-ext build (tsconfig), so it no longer ships in dist/. - Removed the duplicate manual canonicalize cases from the MCP unit test (the shared corpus covers them via full deepEqual); kept idempotence + immutability. - insertInlineFootnote dedup key now keys off the inline array directly (footnoteContentKey({ content: inline })) instead of a throwaway node. Tests / architecture: - New client-wrapper test (docmost#9): overrides a small mutatePage seam to assert the not-found path throws and persists NOTHING, and the success path shapes footnoteId/reused/message/verify and writes the right content. Fixed the misleading comment in footnote-write.test.mjs. - B: cross-copy corpus parity guard test (loads both corpora, asserts deep-equal) so a typo in one copy can't pass both suites green. - A: declined — the full-vs-fragment decision lives at the call site, so a prepareDocForPersist wrapper would be a bare alias for canonicalizeFootnotes; kept the existing per-call-site comments instead. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
vvzvlad
pushed a commit
to vvzvlad/gitmost
that referenced
this pull request
Jul 4, 2026
…ocmost#293 canon docmost#9) Move paragraph/heading textAlign off the HTML-wrapper form (<p style="text-align:…"> / <hN style=…>) onto a trailing attached HTML comment on the block line: `text <!--attrs {"textAlign":"center"}-->`. This keeps the readable markdown block form (plain `text` / `## Title`) while preserving alignment losslessly. "left"/null stay bare (no churn). Adds a reusable attached-comment primitive (attached-comment.ts) that docmost#4 (image) and docmost#8 (media) will reuse: - attachedCommentFor(name, json) -> `<!--name {compact-json}-->`, escaping any `--` pair inside the JSON as -- so the payload can never close the comment early; - parseAttachedComment(data) with grammar `^\s*([A-Za-z][\w-]*)(?:\s+({…}))?\s*$` whose name excludes `:`, so envelope comments (docmost:meta / docmost:comments) never match — fail-open on anything malformed. On import, applyAttachedComments runs AFTER marked.parse but BEFORE generateJSON (parse5 drops comments), re-expressing the attrs comment as an inline text-align style on the parent block, then removing the comment node. Guards: emit only when there is a visible element to attach to — paragraph requires non-empty text, heading requires non-empty headingText (symmetry: an empty aligned heading stays bare `##`, no orphan comment). Goldens in markdown-converter-golden/gaps updated deliberately to the attached-comment form (assertions stay strict: exact output + lossless round-trip). New textalign.test.ts (19 tests) covers center/right/justify on paragraph and heading, byte-stable re-export, and fail-open branches. Raw-HTML containers (columns/cells/callout via blockToHtml) keep the inline text-align form intentionally — comments are dropped inside raw HTML. package vitest: 462 passed | 1 expected-fail; tsc clean. git-sync: 268 passed. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
vvzvlad
pushed a commit
to vvzvlad/gitmost
that referenced
this pull request
Jul 4, 2026
…docmost#293 canon docmost#5) Move the two "invisible machinery" atoms off the <div data-type="..."> HTML form onto standalone HTML comments on their own line, keeping the markdown human-readable while still round-tripping: subpages -> <!--subpages--> / <!--subpages {"recursive":true}--> pageBreak -> <!--pagebreak--> Adds standaloneCommentFor(name, attrs?) to attached-comment.ts (emits `<!--name-->` when attrs are empty/absent, else `<!--name {compact-json}-->`). The `--`-escaping + compact-JSON logic is factored into a shared internal escapeCommentJson() so standaloneCommentFor and attachedCommentFor cannot drift (verified byte-identical output for attachedCommentFor — no docmost#9 regression). Position determines legality (canon docmost#5): subpages/pagebreak are honored ONLY standalone; the same comment attached after visible text is inert. The parser pass (applyAttachedComments renamed applyCommentDirectives) now also materializes these standalone comments into the schema `<div data-type=...>` element before generateJSON drops the comment node. A LEADING standalone comment is parsed at document level (outside <body>); the pass walks the whole document and re-inserts leading comments into <body> in document order, so block order is preserved. Raw-HTML path: blockToHtml gains explicit subpages/pageBreak cases emitting the `<div data-type=...>` form. Comments are dropped by the DOM parse stage inside columns/cells, so the div-form must stay there — this also fixes a latent default-fallthrough (`<div></div>`) that silently dropped these atoms inside a column. Tests: new machinery-comments.test.ts (primitive, subpages default/recursive exact strings + round-trip, pageBreak, subpages-inside-column div-form, fail-open for attached-position/malformed, and multi-node document-order regression locking the leading/mid/trailing comment ordering). Top-level goldens in markdown-converter-golden/gaps updated deliberately to the comment form; the columns/raw-HTML goldens keep the div-form. package vitest: 477 passed | 1 expected-fail; tsc clean. git-sync: 268 passed. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
vvzvlad
pushed a commit
to vvzvlad/gitmost
that referenced
this pull request
Jul 12, 2026
…r-refs (docmost#507 review) Review follow-up to the base64→entity-XML content= switch. The whole mxfile XML now lives in one content="..." attribute; XML attribute-value normalization collapses a LITERAL tab/newline/CR to a single space on DOM read (jsdom and the real draw.io editor alike), silently flattening multi-line labels and tab-bearing values that the old base64 form stored verbatim. Finding 1 (data-loss): both encode paths — buildDrawioSvg's xmlEscape (mcp) and the import service's escape — now append 	/
/
 after the four &<>" replaces (numeric char-refs survive normalization, as draw.io's own export does). The extractContentAttr regex fallback now decodes those char-refs (hex case-insensitive plus decimal &docmost#9;/&docmost#10;/&docmost#13;) so it agrees with the DOM path; & stays decoded last so an escaped &#x9; reads back as literal text. Finding 2 (dedup): the server's private xmlEscapeAttr is replaced by the shared htmlEscape helper (& < > " ' — a strict superset, the extra ' is harmless in a "-delimited value) wrapped in xmlEscapeContent, which adds the three control-char char-refs on top (htmlEscape does not escape them). Finding 3 (docs): narrow the CHANGELOG healing claim — only a diagram still holding its original correct-UTF-8 base64 (not yet opened/autosaved) is recoverable; one already opened in the editor persisted mojibake at rest and its text is lost. Tests: new mcp round-trip test with literal tab/newline/CR in a value (DOM path, byte-stable) plus a fallback-branch test forcing a malformed wrapper so both decode paths are proven to agree; new server spec asserting char-ref encoding. Mutation-checked: dropping the encode replaces reddens both new mcp tests; dropping only the fallback decode reddens just the fallback test. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
PMQ9
added a commit
to cccvu/docmost
that referenced
this pull request
Sep 2, 2026
…, roving stability, tests (docmost#135) Round-justifying (Priority Level 3+) findings from the 7-lens review of PR docmost#146 / docmost#9: - Frontend + Correctness (L3): the toolbar Link button on an empty caret inserted a literal "link" word that stayed behind if the panel was dismissed without a URL. `ensureLinkableSelection` now returns the placeholder range; `LinkGroup` removes it on a cancelled panel (no link mark applied), keeping applied-link behavior unchanged. - Architecture (L3): `scale.ts` hand-duplicated the size scale in `PX_BY_SIZE`; derive it from the single-source `ALLOWED_FONT_SIZES` + the Normal (16px) anchor, sorted ascending to preserve the tested round-toward-smaller tie-break. - Testing (L3 x3): added tests for `collectTextStyleAttr` (incl. the "mixed" multi-value branch), `ensureLinkableSelection`'s link-active branch (with a real Link mark), and a raw-attr render-gate bypass for fontFamily — symmetric with the existing fontSize gate test, on both client and server. Opportunistic (converged L2, same files): stabilize `useRovingToolbar`'s `onExit` via a ref so the effect no longer tears down listeners and resets the roving tab stop on every toolbar re-render; correct a stale "Mixed" docstring in `FontSizeGroup`. Client vitest 33/33, server editor-compat jest 10/10, client tsc clean. Co-Authored-By: Claude Opus 4.8 <[email protected]>
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.
No description provided.