Repository navigation
Conversation
|
I hesitate because I am unsure if |
I have changed the code based on your advise and used tiptap-text-direction extension. But in title editor and page titles, unfortunately, I can't adjust perfectly with this extension, in these two places, I use the unicode-bidi: plaintext for direction: auto. Can you review the code again please? |
|
@Philipinho I change the code. Can you review it please? |
|
Hi @ATofighi, thank you for your work. I will find some time to test it soon. |
|
Are you able to use the forward slash "/"? |
|
Sorry. I mean when the keyboard is set a RTL language like Arabic. |
My main language is Persian and it has "/" in the keyboard layout (exactly on the key which "/" placed on English"), I asked chatgpt and it says that Arabic's keyboard layout also has "/" character, but its position may be differ from English. |
My OS is Ubuntu, Shift + L is slash for me in Arabic keyboad |
|
Got it for Mac. It's |
|
Here: |
|
Not yet merged due to a reported bug in the text-direction extension amirhhashemi/tiptap-text-direction#18 which may affect Japanese users. |
- TextDirection extendion in editor - text-align: start in styles - unicode-bidi: plaintext in page tree
Are you sure that you test the code of this branch? I test "שורה עם כמה מילים בעברית" and it become RTL! |
Thanks, I suggest a fix to the tiptap-text-direction author for this issue. |
|
I also add an temporary commit that move the code of plugin to the project and do my fix on it to have a bug free version. |
|
@Philipinho It seems that maintainer of https://github.com/amirhhashemi/tiptap-text-direction isn't available. May I copy the fixed version of plugin to docmost repository and create a fully functional PR without dependency on https://github.com/amirhhashemi/tiptap-text-direction ? |
|
I hope that this pull request will be merged soon. |
@Philipinho ? 😁 |
|
Any chance this gets merged? Thanks. |
|
Any chance this gets merged? Thanks. |
|
at end, I migrated to https://github.com/outline/outline due to this issue and other features that are enterprise or not available in docmost. |
…icate (docmost#206) attach-1: when the same attachmentId was referenced by more than one page in a duplicated subtree, the per-attachmentId map held only a single copy entry, so the last page processed clobbered the others. The downstream ownership guard (`attachment.pageId !== oldPageId`) then matched at most one page and skipped the lone DB row entirely: no blob copied, no new row, every copy's image 404'd. Key the map to a list of entries and copy one blob/row per referencing page; drop the now-incorrect ownership guard. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
…op subtrees (docmost#206) ui-state-races-1: the server-authoritative move path (placeByPosition, via applyMoveTreeNode) lacked the isDescendant cycle guard that drag-drop `move` has. When move events arrive out of order so the destination parent is still nested inside the moved node's own subtree, remove(source) dropped the whole subtree (incl. the future parent) and insertByPosition could not re-place it — the node and all descendants silently vanished with no error/refetch. Add the isDescendant guard to placeByPosition (returns same ref, like its other no-op cases) and short-circuit applyMoveTreeNode on the same condition BEFORE the placed===prev remove-fallback (which would otherwise still drop the subtree). Leave the tree untouched so a later corrective event / reconnect reconcile fixes it. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
…lost (docmost#206) persist-1: onStoreDocument wrapped the page write in a try/catch that only logged and swallowed the error, then resolved "successfully". hocuspocus destroys/unloads the in-memory Y.Doc right after the hook resolves (the only copy of the latest edit), so a transient DB error (deadlock, serialization failure, dropped connection) silently lost the edit. Worse, the post-store branch ran on the partially-assigned `page`, broadcasting a phantom "page.updated" and enqueueing a history snapshot for content never written. Wrap the write in a small bounded retry (3 attempts) so the save is re-attempted while we still hold the doc, and clear `page` on failure so the success-only side effects never report a save that didn't happen. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
…most#206) editor-pm-7: addUniqueIdsToDoc only FILLED missing ids and never deduplicated existing ones, so a copy/paste or bulk-JSON duplicate that kept its attrs.id produced two nodes sharing an id. MCP addressed edits (patch_node / delete_node "before/after id") then hit the wrong node or both. Walk the configured-type nodes in document order: the first occurrence of an id keeps it (stable anchor), later duplicates are reassigned a fresh id. transclusionSource ids are cross-reference keys (references resolve a source by this id), so they are only filled-when-missing, never reassigned, to avoid orphaning their references. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
…the bug-fix batch (docmost#161 docmost#190 docmost#207 docmost#206 docmost#159) Document the new per-workspace rolling-day token-budget env var in .env.example alongside the existing share-assistant cost knobs, and add [Unreleased] Fixed entries for docmost#161/docmost#190/docmost#207/docmost#206 plus a Security entry for the docmost#159 token budget. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
…id dedupe (docmost#206) A colliding transclusionSource id is deliberately NOT reassigned (its id is a cross-reference key), while a missing id is still filled. Add coverage for both: two sources sharing an id keep it (red if the NO_REASSIGN guard is removed), and a source with no id gets a fresh one. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
docmost#159 + docmost#206 findings' (docmost#212) from fix/mainline-bugs-2026-06-26 into develop Reviewed-on: https://gitea.vvzvlad.xyz/vvzvlad/gitmost/pulls/212
, docmost#204 Additive test coverage across server, editor-ext, client and mcp. docmost#192 — AiChatService.stream integration (Section 3, against real Postgres): - new apps/server/test/integration/ai-chat-stream.int-spec.ts drives the real streamText through a seeded ai/test MockLanguageModelV3 and a real Node ServerResponse, covering: onError persists an assistant error record (status 'error' + partial answer + provider cause in metadata); external MCP client closed exactly once on BOTH onFinish and onError; anti-tamper — history is rebuilt from the DB transcript, not from body.messages. docmost#206 — red-team findings (most already fixed+tested in docmost#212): - mdrt-2 (UNFIXED, data loss): turndown.dataloss.test.ts documents that pageBreak / transclusionReference / mention are silently dropped on Markdown export (characterization + it.fails for the desired survive-export contract). - persist-6 (UNFIXED, data loss): persistence-store.spec.ts adds an it.failing documenting that a momentarily-empty live doc overwrites non-empty content (left unfixed — a store-side empty-guard is a behaviour change). docmost#204 — test-strategy plan, highest-priority subset: - Phase 1: mcp-clients.lease.spec.ts covers the external MCP client lease/refcount/eviction lifecycle (leak / premature-close / double-close). - Phase 2 data-integrity pure functions: editor-ext table-utils (transpose/moveRow/convert round-trip) and math tokenizer false-positive guard; client emoji-menu (+ it.fails for the unguarded localStorage JSON.parse bug), sort-cells, normalizeTableColumnWidths; mcp htmlEmbed/ pageBreak markdown data-loss + footnote-diff; server export getInternalLinkPageName extensionless-path bug — FIXED (small/clear) + tested. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
… helper, tests Review follow-ups for the combined QA-UI fixes (docmost#216/docmost#206/docmost#204/docmost#218/docmost#192): - export/utils: correct the misleading getInternalLinkPageName comment — a bare `v1.2` loses its last dot-segment (`v1`); dots survive only in multi-segment names like `v1.2.md` -> `v1.2`. - share: extract toPublicSharePayload(page, share): PublicSharePayload, an explicit allowlist type+mapper replacing the inline literal in the /shares/page-info anonymous path (docmost#218). Add share.controller.spec.ts that stubs getSharedPage returning internal fields and asserts the response key set EXACTLY equals the whitelist (page + share), so any `...shareData` regression or new leaking field fails. Also key-tests the extracted mapper. - breadcrumb: extract pure resolveBreadcrumbNodes(treeData, ancestors, pageId) (tree-hit -> tree; tree-miss -> map ancestors via canonical pageToTreeNode, dropping the as-any casts; else null) and unit-test all three branches. - share-modal: RTL test asserting enabling a share calls mutateAsync with includeSubPages: false (docmost#216 security default). - share.service: one-line note at getSharedPage on the deferred consolidation of the ancestor-aware match into resolveReadableSharePage. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
…wed error, i18n, docs Approve-with-comments follow-ups: - breadcrumb: fix the reverse regression where navigating A->B to a page absent from the lazily-built tree (before its ancestors load) left the previous page's clickable chain on screen. New pure computeBreadcrumbState clears a stale chain that doesn't end at the current page, while keeping one that does (no blank flash for an already-resolved page); unit-tested for the navigated-to-absent-page case. - share.service: getShareAncestorPage no longer swallows DB errors silently — now a live public-share path (isPageReachableThroughShare), so a transient error is logged with ancestor/child ids and still fails closed (caller 404s) instead of becoming a traceless misleading "not found". - i18n: register the new "Connecting… (read-only)" key (U+2026 ellipsis) in en-US (source of truth) and ru-RU (Подключение… (только чтение)). - share.service: correct the FUTURE note — 3 callers pass no shareId (share-alias.controller/.service, share-seo.controller); the two ai-chat callers already pass a real shareId. - CHANGELOG: add Unreleased Changed/Fixed/Security entries for docmost#216 opt-in sub-pages default, docmost#218 trimmed page-info payload + forged-shareId 404, docmost#204 export internal-link name, docmost#206/docmost#218 breadcrumb, docmost#192 callout paste, docmost#218 editor pre-sync read-only gate. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
… + test coverage (docmost#206 docmost#204 docmost#192)' (docmost#230) from fix/qa-ui-bugs-216-218 into develop Reviewed-on: https://gitea.vvzvlad.xyz/vvzvlad/gitmost/pulls/230
|
See #2389. |








With this change, the browser detect the direction of each element of editor, so If we write in RTL language in a paragraph, the direction change automatically to RTL for that paragraph.
I test it only using inspect element and add this style.
The result is here, paragraphs with RTL text automatically aligned from right and the direction is correct for both LTR and RTL texts.