Repository navigation
fix: disconnect Redis health checker - #351
Merged
Merged
Conversation
I have both Docker and Uptime Kuma pinging the `/health` endpoint and after a few days my tiny VPS explodes with errors like: ``` docmost-1 | [ioredis] Unhandled error event: ReplyError: ERR max number of clients reached docmost-1 | at parseError (/app/node_modules/.pnpm/[email protected]/node_modules/redis-parser/lib/parser.js:179:12) docmost-1 | at parseType (/app/node_modules/.pnpm/[email protected]/node_modules/redis-parser/lib/parser.js:302:14) ``` Turns out that, if we don't disconnect the Redis client, they keep accumulating and don't timeout by default. To verify this in practice: ``` $ curl http://localhost:3000/api/health {"status":"ok","info":{"database":{"status":"up"},"redis":{"status":"up"}},"error":{},"details":{"database":{"status":"up"},"redis":{"status":"up"}}} $ docker exec -it docmost-redis-1 redis-cli CLIENT LIST | wc -l 10 $ curl http://localhost:3000/api/health {"status":"ok","info":{"database":{"status":"up"},"redis":{"status":"up"}},"error":{},"details":{"database":{"status":"up"},"redis":{"status":"up"}}} $ docker exec -it docmost-redis-1 redis-cli CLIENT LIST | wc -l 11 ... ``` Here we see that after each call to the `/health` endpoint, the number of clients connected to Redis increases. In this diff, we disconnect the Redis client after the `ping`, and the problem now goes away: ``` $ curl http://localhost:3000/api/health {"status":"ok","info":{"database":{"status":"up"},"redis":{"status":"up"}},"error":{},"details":{"database":{"status":"up"},"redis":{"status":"up"}}} $ docker exec -it docmost-redis-1 redis-cli CLIENT LIST | wc -l 8 $ curl http://localhost:3000/api/health {"status":"ok","info":{"database":{"status":"up"},"redis":{"status":"up"}},"error":{},"details":{"database":{"status":"up"},"redis":{"status":"up"}}} $ docker exec -it docmost-redis-1 redis-cli CLIENT LIST | wc -l 8 $ curl http://localhost:3000/api/health {"status":"ok","info":{"database":{"status":"up"},"redis":{"status":"up"}},"error":{},"details":{"database":{"status":"up"},"redis":{"status":"up"}}} $ docker exec -it docmost-redis-1 redis-cli CLIENT LIST | wc -l 8 ... ```
ceroma
force-pushed
the
fix-readis-health-checker
branch
from
September 28, 2024 11:30
6b3cc71 to
2583c54
Compare
auxa-m45
added a commit
to antiagingrecord/docmost
that referenced
this pull request
Aug 20, 2025
7e6f77a Merge commit '1615e0f4ad185a19db57094c94d1b3debdcc0cfd' into feat/aar_edition 1615e0f v0.22.2 1cb2535 fix trash in search (docmost#1439) 83bc273 cleanup c7beaa3 v0.22.1 4a228e5 fix comment replies edff375 sync 95016b2 sync ca83712 cleanup 39550fe fix: duplicate page position bug (docmost#1431) e74ecb2 v0.22.0 992fb23 update lock file d58a3bb update linkify 6ef47fc show button only if necessary 9e6765d fix ec0ed5c fix import 77b334e reorder migration 5da92a5 feat: add unaccent support for accent-insensitive search (docmost#1402) f90c5a6 cleanup comment 6db93ef upsell a3d0580 New Crowdin updates (docmost#1342) 4ab9261 sync ca9558b feat(EE): resolve comments (docmost#1420) ec12e80 feat: trash for deleted pages in space (docmost#325) 28fcb11 update passport-saml (docmost#1418) 6b627d2 fix xss in generic iframe embed (docmost#1419) 78bce0e fix: validate public avatar path (docmost#1416) 0bd7ecb feat: enhance table cells with rich content support (docmost#1409) 1f81588 Revert "feat: set mermaid theme based on computed color scheme (docmost#1397)" (docmost#1412) 37b9056 sync ad5cf1e feat: add resizable embed component │ (docmost#1401) 32c7ecd feat: set mermaid theme based on computed color scheme (docmost#1397) b30bf61 feat: home space list (docmost#1400) 6624602 feat(EE): MFA implementation (docmost#1381) 8522844 feat: duplicate page in same space (docmost#1394) f8dc984 fix page tree api atom (docmost#1391) 4dfed2b queue import attachments upload (docmost#1353) 44e5927 feat: quick theme toggle and Mantine 8 upgrade (docmost#1369) 90488a9 feat: table background color, cell header and align (docmost#1352) 9f39987 fix: nested ordered-list style (docmost#1351) 16ec218 fix: deactivated user check 608783b (cloud) billing copy 5f5f148 throw early f408217 feat: display user email below name in multi-member-select dropdown (docmost#1355) 6792a19 feat: Ctrl/Cmd+S: prevent 'Save As' dialog (docmost#1272) e51a932 more checks for collab auth token (docmost#1345) e856c8e (cloud) fix: updates to billing (docmost#1367) c2c1655 fix: seamlessly update editor collab token on expiration (docmost#1366) 9fa2b96 make sure editor is ready for editor search 2938863 feat: find and replace in editor (docmost#689) f800048 sync ac79a18 fix ctrl-a for codeblocks (docmost#1336) 27a9c0e sync 81ffa6f sync 5364702 fix: comments block on edge and older browser (docmost#1310) 232cea8 sync b9643d3 sync 9f144d3 posthog integration (cloud) (docmost#1304) e44c170 fix editor flickers on collab reconnection (docmost#1295) 1be39d4 sync 36d028e sync f5a36c6 feat: tiered billing (cloud) (docmost#1294) d5b84ae Only allow changing the email if the correct password is provided (docmost#1288) e775e4d fix(editor): prevent text color removal from other list items when setting color in lists (docmost#1289) 65b0103 v0.21.0 e07cb57 sync 2b53e0a fix: add import size limit to static window config b9b3406 Fix: Prevent premature focus change in TitleEditor when pressing Enter during IME composition (docmost#730) 728cac0 fix word counter (docmost#1269) d35e160 handle empty invitation 15791d4 sync 3318e13 fix: use JWT expiry time for cookie duration (docmost#1268) 0809006 cleanup d1dc697 feat: edit mode preference (docmost#666) 5f62448 less create workspace form fields in cloud (docmost#1265) 44445fb fix: enforce SSO in invitation signups (docmost#1258) 1c674ef fix: revert tiptap version (docmost#1255) ccf7e34 feat: ukrainian language support (docmost#1250) f39d48d New Crowdin updates (docmost#1063) f584ea8 chore: upgrade packages (docmost#1242) bc0c4d6 fix: make link popup work on safari (docmost#1243) d8da307 feat: enhance excalidraw (docmost#1240) 50b3f9d generic iframe embed (docmost#1234) 0029f84 feat: toggle table header row and column (docmost#1203) 6d024fc feat: bulk page imports (docmost#1219) ce1503a fix: sidebar list when changing workspace (docmost#1150) 69447fc Merge branch 'main' of https://github.com/docmost/docmost 858ff9d sync 343b297 docmost#1186/chore: add support language abap syntax highlight (docmost#1188) 7491224 hide shared page branding in EE (docmost#1193) 4a0b404 Add second plan (docmost#1187) e3ba817 feat: comment editor emoji picker and ctrl+enter action (docmost#1121) b0491d5 feat: create new page from mention (docmost#1153) 1c200db fix(table-hover): adjust row height to prevent unexpected scrollbar on hover (docmost#1124) fb7e4a7 fix: copy/move select (docmost#1174) 1413033 feat: realtime comments (docmost#1144) 00f4588 fix title update (docmost#1154) 3a75251 fix alignment in shared page (docmost#1123) c6bca6a fix deprecated kysely usage 55d1a2c Fix typo in enforce-sso.tsx (docmost#1145) bc3cb2d fix: increase random subdomain suffix 7adbf85 v0.20.4 de7982f feat: copy page to different space (docmost#1118) 0402f7e sync 8327251 fix typo e8847bd fix: handle unhandled exceptions (docmost#1116) 9bbd62e v0.20.3 0289c5c Reduce markdown checkbox space 7993532 fix page export (docmost#1081) 31e5c0c v0.20.2 33c314d remove clickoutside hook 08f2238 cloud trial refactor c528f7e v0.20.1 c26a851 feat: enhance public sharing (docmost#1057) de5f903 v0.20.0 0ec3ff2 Add empty placeholder text acffeac fix TOC 00d92a3 New Crowdin updates (docmost#1008) 3430f71 feat: remember and restore previous route when exiting settings (docmost#1046) 6c42201 feat: public page sharing (docmost#1012) 3e88244 update vite and axios 37a1804 Revert "switch to vite rolldown (docmost#1048)" (docmost#1050) 882f309 search space members by email (docmost#1049) 1a1b2c8 switch to vite rolldown (docmost#1048) 10b6792 Update README.md 5c957fd fix: nested tree open state 862f6d4 use non-esm nanoid version (docmost#1040) de57d05 0.10.2 89ec990 sync ee 49d0f1c Add click handler 268001a v0.10.1 27fa45a fix local attachment paths in exports (docmost#1013) f971191 fix comment editor padding 29bb52d v0.10.0 f2241db remove beta message 58d1855 fix hash check 7fe3c5f * time ago hook 5fd477d collapse by default in node-edit mode 4aa5d7e hide history action menu for can-view role (docmost#1001) 7f7f2bc fix toggle node in non-edit mode a9f3706 New Crowdin updates (docmost#1005) 117c704 fix cd10365 new translations ee30d9d New Crowdin updates (docmost#1003) 276ecec cleanup fa194a4 cleanup 1eaba6e fix: bug fixes (docmost#1000) 651e5f6 null check 7431804 feat: delete workspace member (docmost#987) 3559358 fix pagination issue where user is not part of any space 06270ff - fixes - allow mail from address override - queue cloud emails 2335363 feat: add Table of contents (docmost#981) 17ce3ba feat: move page between spaces (docmost#988) b27d170 queue trial ended job (docmost#992) 64f0531 feat: keep track of page contributors (docmost#959) 8aa6046 feat: nested toggle block (docmost#671) 7ca2b43 sync 595bd1d Fix editor connection loop (docmost#986) a74d3fe fix: make collab ready reliable on tab return e40faf9 v0.9.0 bbe4fe9 don't replace line breaks 8300c5b update env file 13039cf telemetry module (docmost#934) 593f41a adds missing command for down migration (docmost#908) f8ce160 feat: add version check (docmost#922) c824b5b fix collab token refresh which leads to collab editor reconnection loop (docmost#933) 37e760d * fix color check * update lock file 442fa23 Refetch space list on mount 2e5990d Move suspense above popover dropdown 15bdbf7 null check 3d9a7d8 Revert "feat: auto focus emoji-picker search when opened (docmost#894)" (docmost#900) f45bddd feat: billing sync (cloud) (docmost#899) 21c3ad0 feat: enhance editor uploads (docmost#895) 5734574 feat: auto focus emoji-picker search when opened (docmost#894) d021d0a fix 96dfe9f fix: page title editor bugs (docmost#892) 5983619 fix trial days 210d147 Add Dutch translation (docmost#877) 5f52068 prevent overflow 2a535de New Crowdin updates (docmost#840) f45d9dc feat: add page stats to page menu (docmost#876) f7a14e2 fix editor flickers (docmost#875) 1f40e9b fix drag handle visibility (docmost#868) fea6518 fix: VSCode markdown pasting (docmost#857) 061a02c Make codeblock comment more legible in light mode 2205ce0 prevent slider flickers a812cdc enable shouldRerenderOnTransaction 30acc66 exclude billing webhook endpoint 5c9e0a2 * prefetch sso providers in settings * hide sso enforcement in standard plan fd36076 feat: disconnect collab websocket on idle tabs (docmost#848) dd52eb1 fix: table header in exported markdown (docmost#769) 6776e07 feat: adding family 6 in uri to configure for both 4 and 6 (docmost#807) 7a47da9 Add emoji command to title editor e62bc6c feat: editor emoji picker (docmost#775) 4f9e588 sort workspace list 05a3dfa Option to log db queries in dev mode (docmost#827) 8826cca fix space translations (docmost#826) 1988feb exclude /health/live endpoint e9b7273 remove cloud env check 315afd6 fix cookie name 93ea31f sync 3b4e414 * configurable trial days * hide create sso provider in cloud d925c95 add pnpm to packageManager for consistency 4511db1 fix 56d9e46 * Upgrade Dockerfile to node 22 * Pin pnpm to [email protected] cdea149 * Update EE license fil * State license in Readme file 1625480 Add api prefix to attachment nodes a7dd9b9 Hide version in cloud b81c9ee feat: cloud and ee (docmost#805) 91596be fix: add missing awaits (docmost#814) 72f64e7 revert sentry (docmost#808) 3cfb17b fix sentry fe5066c v0.8.4 e13be90 cleanup fda5c7d push files left (docmost#360) (docmost#804) 7fc1a78 feat: add copy invite link to invitation action menu (docmost#360) 54d27af * Add SENTRY_DNS env variable * Commit lock file 0065f29 feat: sentry (docmost#802) 7d034e8 enable trustProxy 81b6c7e Merge remote-tracking branch 'refs/remotes/origin/main' 89f6b0a feat: add stats to standalone collab server (docmost#798) ad1571b Log APP_URL on startup 4b9ab4f feat: standalone collab server (docmost#767) 08829ea v0.8.3 6c502b4 pin react-email version (docmost#779) 6b41538 v0.8.2 496f5d7 pin s3 package to 3.701.0 32c7a16 fix: accept invitation password hashing (docmost#773) 64ecef0 upgrade to NestJS 11 (docmost#766) 3e5cb92 v0.8.1 fd5ad2f fix signup email 74a5360 v0.8.0 7580e8d fix pagination limit f92d632 Implement space member search (docmost#731) 4d51986 update dependences (docmost#729) e209aaa feat: internal page links and mentions (docmost#604) 0ef6b19 feat: UI pagination and members search (docmost#724) ae842f9 * fix: popover does not close when clicking outside in SwitchSpace. (docmost#720) 7121771 fix workspace setup 040d662 fix: enforce 32-character minimum length for APP_SECRET (docmost#702) 33ddd92 * fix codeblock tab-size (docmost#703) 54e8d60 New language options (es-ES, it-IT, ja-JP, ko-KR, ru-RU) (docmost#701) db98603 New Crowdin updates (docmost#659) de0b5f0 feat: add text alignment (docmost#667) 638b811 fix import d775a61 fix client side env variable refresh (docmost#695) 0f74f03 fix name extraction from email f8b93ce fix: switch space bug (docmost#692) 85d18b8 Set default language on invitation signup (docmost#691) 4d9fe6f Fix invitation signup redirect (docmost#690) 85159a2 * fix 401 redirect in auth routes (docmost#674) 9906127 refactor: switch to HttpOnly cookie (docmost#660) f2235fd update katex (docmost#658) 2044cbb fix translation * fix filesize formatting 3d52b82 v0.7.0 89a2dd6 fix punycode DeprecationWarning error (docmost#631) 3cb954d fix: editor improvements (docmost#583) 71cfe3c fix: add cancel button for editing comments (docmost#580) f7efb6c Fix: Ensure only one emoji list appears (docmost#572) 59b514f New Crowdin updates (docmost#630) 0c1f930 New Crowdin updates (docmost#627) e876214 fix: embed provider name in error message 5fece5f feat: google sheets embed (docmost#615) f3dbf7c feat: add new languages to selection (docmost#626) f7ac6bb New Crowdin updates (docmost#605) 1f5ffe7 Fix empty translation value 9571542 fix: move markdown clipboard extension to client app f5bc99b fix: link paste handler (docmost#609) 287b833 feat: support pasting markdown (docmost#606) 0cbbcb8 Update Crowdin configuration file 670ee64 Support I18n (docmost#243) 290b7d9 v0.6.2 2503bfd fix: prevent CDNs from caching attachments (docmost#562) f48d6dd fix: don't throw error while parsing auth tokens 1302b1b v0.6.1 89a3f4c v0.6.1 e48b1c0 fix: markdown math import (docmost#529) 4a2a5a7 fix: postgres and redis url validation (docmost#548) 532001f chore: fix linting (docmost#544) e6bf4cd fix: fix markdown import file button (docmost#542) a9a4a26 fix export controller reference in module ede5633 fix export fileName a25cf84 fix: add spaceId a37d558 v0.6.0 ddb0f92 fix: uuid7 for commentId (docmost#524) c717847 chore: update packages (docmost#507) fe83557 feat: space export (docmost#506) 9fa432d feat: support tab key in code block (docmost#523) c6aaefe fix: clear local cache on logout (docmost#519) 311d81b fix wrong tree sync bug (docmost#514) f178e66 fix: properly support redis db (docmost#517) ca186f3 fix: return direct embed urls if present (docmost#516) a16d5d1 feat: websocket rooms (docmost#515) d97baf5 add env variable (docmost#513) 8349d82 fix: allow space in inline math (docmost#508) 2e6d16d fix: full width bug on smaller screens (docmost#518) 4107793 fix: disable user-select a1b6ac7 fix: close space selection popover onClickOutside (docmost#485) dd0319a fix: index imported content (docmost#495) 8194c7d fix: focus editor on bottom click (docmost#484) d01ced0 * Reduce code block font-size * Make inline code more distinctive da9c971 fix breadcrumb clipping (docmost#457) 4e7af50 fix tree dnd f7426a0 fix: use clsx b85b34d feat: resizable sidebar (docmost#452) e064e58 Fix sidebar responsivity (docmost#453) 4f1a97c Revert "fix: prevent default browser save behavior (docmost#450)" (docmost#451) d073388 fix: prevent default browser save behavior (docmost#450) 9515962 v0.5.0 9e0fbae fix: save excalidraw diagram in light mode only a52c86a fix: add drawio dark mode support 31feb38 fix: sync color scheme with excalidraw ba32e42 fix: filter out redundant group a574d13 fix: email overflow ab70cee feat: third-party embeds (docmost#423) 978fadd fix: improve sidebar page tree syncing (docmost#407) b57be9c fix: rename edit -> save d4b219d add `COPY patches` to Dockerfile (docmost#400) 36e7209 fix: bug fixes (docmost#397) fa3c8a0 fix: remove space tree delete shortcut key (docmost#394) 46d92fb v0.4.1 e17b975 Revert "Add alignment styles for task list items (docmost#378)" (docmost#390) 038d21b v0.4.0 078361b add local editor-ext to client package.json * update vite 384f11f make file upload size limit configurable (docmost#386) e333eee fix: base64 encoded drawio image decoded to Latin-1 instead of UTF-8 (docmost#369) 7ec6a36 fix: removed font overwrite for KaTeX elements (docmost#377) 2721ab6 Add alignment styles for task list items (docmost#378) a2bc374 fix: horizontal scrollbar always shown on math block (docmost#353) eaa80a5 fix: disconnect Redis health checker (docmost#351) e9e668b fix: use environment service for refresh token's expiration (docmost#337) 9390b39 Implement nodemailer ignore tls property (docmost#299) 2ae3816 fix: send "invitation accepted" email to inviter (docmost#331) e96330a fix: text casing e56f793 fix: refactor forgot password system (docmost#329) b152c85 fix: add user tokens repo to database module e43ea66 add forgot-password ui (docmost#273) f348126 feat(backend): forgot password (docmost#250) 6a3a772 features and bug fixes (docmost#322) fb27282 feat: delete space and edit space slug (docmost#307) dea9f4c remove unnecessary log 0b6730c fix page export failure when title contains non-ASCII characters (docmost#309) be0d976 update README 4e2b23c v0.3.1 dc3ce27 fix collaboration websocket 8af2d4e file content-disposition 73ddec4 v0.3.0 2b9765f lazy load (docmost#237) 7fdd355 Reduce version text size 6c6b475 update dependencies 7e6a71f add HR divider to slash menu 1141796 Show version * Add default mermaid content 11dbc07 Add home link to logo 87b99f8 feat: draw.io (diagrams.net) integration (docmost#215) 38e9eef feat: excalidraw integration (docmost#214) 77b541e Fix mime attribute 7dc37b9 feat: editor file attachments (docmost#194) 7e80797 feat: mermaid diagram integration (docmost#202) 17475bf feat: code block language selection (docmost#198) 4433d51 Add Source Label to Dockerfile (docmost#157) c810d0b fix: added env variable for support for forcepathstyle on s3 (docmost#181) 463480a v0.2.10 (fix) 2449d69 v2.9.10 e0d74fc Fix: editor formatting (docmost#137) 4967849 add SMTP_SECURE 0a447e9 fix markdown import 48e76aa v0.2.8 2bd6422 Show new workspace role on change 407a1af only owner can assign owner role (docmost#108) b4bc184 prevent admin role from managing owner role (backend) 109dbdb cleanup log 2df7de5 fix table commands type error 373fc86 preserve details tag in markdown export 5052a9e Support math export in Markdown cd47c79 Make math node handling better 7874693 fix export format state 4d29366 fix: generate ydoc state during page import to prevent duplicate nodes on the editor d2ecd28 fix: localize attachment type * fixes docmost#86 bb92ca7 use logger 8f3e2ff fix editor placeholder bug 89f6311 * Make page import handling better e5a97d2 v0.2.7 7f0fd45 singular & plural count 078959d v0.2.6 937a070 feat: implement Markdown and HTML page imports (docmost#85) 227ac30 add STMP_SECURE and changed auth config (docmost#81) a2ae341 v0.2.5 3c70e40 add table header by default 14197d7 add cookie duration f388540 feat: Individual page export in Markdown and HTML formats (docmost#80) b43de81 cleanup 6659adc v0.2.4 24adff9 Merge pull request docmost#74 from docmost/remove-redundant-page-slug_id-index e960b8c create migration 1958067 Revert "remove redundant slug_id index" 3e519eb remove redundant slug_id index 07cd650 Merge pull request docmost#73 from docmost/fix/case-insensitive-email 949d782 make emails case-insensitive 295d432 update tiptap hocuspocus 40a40bb Merge pull request docmost#71 from docmost/aws_env_option bc1579b fix condition check 85b3073 Merge pull request docmost#57 from will2hew/will/url-setup 4af3a54 Allow AWS SDK use AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY c4c169b Merge pull request docmost#64 from docmost/feat/health a0536d8 cleanup indicators f12f93b increase startup db retry limit 35dcd5f refactor health module 9496ec9 prevent database error from crashing server 5ace761 cors setup and dev server proxy ce6a05a cr - add redis check and logging 7383673 v0.2.3 3e7b249 Merge pull request docmost#51 from docmost/private-attachments 0fc8ede Merge pull request docmost#55 from docmost/fix/bug-fixes bbf865b cleanup debug log 0c622a0 use sane font-weight f52cd01 remove unused imports a4d5346 fix tree state 66773df Add health check and dev script cc93abf make pages table responsive 13f26f9 make page attachments private a4ec2da v0.2.2 681d7c7 merge: fix/media-in-firefox 9f58317 fix media visibility in firefox 0563308 feat/fuzzy-match-menu 491fbad feat/full-width e824aec Add width option to page menu 8f056d1 add full page width preference 99cf6da added fuzzy matching logic for menu search d1ae117 v0.2.1 eea4e62 v0.2.1 d429384 client: fix APP_URL a0b3180 update docker compose file 80f9610 set version 681a21a Update readme * Rename storage volume 52017b6 change math node attribute name bc7cd03 more env validations a582d47 make env validation errors clear * modify mail smtp variable names 20c1a92 Update Dockerfile * Add volume to docker compose file e732938 move storage data directory to root aea37ee use uuid7 723928d fix setup page redirect 7373cbf Update custom avatar e476b89 update dependencies e2646b7 fixes and cleanups fde6c9a Editor link components * other minor fixes f2a193a Allow creation of space * other fixes and cleanups 562abb0 cleanups 81be99b fix profile image a3b690a update dependencies df1840c fix editor file handling 2aec5a3 fix maxParamLength 1f4bd12 editor improvements * add callout, youtube embed, image, video, table, detail, math * fix attachments module * other fixes c792573 render recent changes when spaceId is available d4eefa4 restructure directories * set log level based on env 2e61fb7 unify recent changes component 38ef610 fixes * integrate websocket redis adapter * use APP_SECRET for jwt signing * auto migrate database on startup in production * add updatedAt to update db operations * create enterprise ee package directory * fix comment editor focus * other fixes eef9081 dockerfile and docker-compose file 2afbede fix page history generation 9429170 fix type 4501a40 fix header and redirect home dfb34fd update dependencies 886d959 frontend permissions * rework backend workspace permissions b88e0b6 Merge pull request #13 from docmost/layout-refactor 8081b21 add space info 06d854a refactor layout * ui polishing * frontend and backend fixes 046dd6d fix space member count * fix space added_by_id * rename user role change endpoints ccf9d5d more work on attachments * fix frontend env usage b06a78b fix tree * fix tree root element ref * fix tree node toggle bug * fix tree node reparenting on the backend * highlight active home menu on the sidebar 6287f41 fixes 9c7c2f1 updates and fixes * seo friendly urls * custom client serve-static module * database fixes * fix recent pages * other fixes eefe63d implement new invitation system * fix comments on the frontend * move jwt token service to its own module * other fixes and updates 525990d remove unused imports a2768e7 collaboration module cleanup x2 8cfc42b collaboration module cleanup fece460 Implement password change endpoint * move email templates to server c1cd090 cleanups 7f933ad Implement BullMQ for background job processing * new REDIS_URL environment variable 19a1f5e cleanups beb6aa8 ws/socket.io rooms - WIP 4c573b9 email integration * Nest email module with smtp, postmark and console log drivers * react-email package 48be0c2 update dependencies f24c16e replace default title 1dcbcb9 clean up d68d035 account preferences 33456f1 database connection retry 7e78949 Merge pull request #12 from docmost/websocket 8cc7d39 websocket updates * sync page title on icon via websocket * sync on page tree too 390d587 fix collab user 4667d81 use api path f01b77d fixes * remove vite env for now * remove unnecessary comment e9a037b fix initial setup df4c26d editor css fixes f0fd1cf css fixes b91c3ed fixes * fix comments * fix page history * fix aside width on smaller screens 2af1fe3 Editor drag handle * add darkmode border to navbar 6a57e3e Make colloboration module not dependant on page module * add unloadImmediately to collab f65e5c8 validate 28ec542 server: page permissions 3462c7f Updates to sidebar tree * Maintain tree open state on route change and return * Load page tree ancestors and their children when a page is accessed directly * Show correct breadcrumb path * Add emoji to breadcrumbs * Backend api to get page breadcrumbs/ancestors 3e2c13a add 404 error page 9ae6ac4 export react-query from main * add bottom padding to treeItem * remove redundant tree scroll df91102 Rework sidebar pages * Move sidebar pages from workspace to space level * Replace array sorting with lexicographical fractional indexing * Fixes and updates f1bdce1 working page tree 912fe64 fix backend page ordering 90ae750 space updates * space UI * space management * space permissions * other fixes b02cfd0 fix active settings path 1a8cb9b fix e1bd8fd fix group 5ee74d4 fix tiptap editor types 1ea393b fixes ab6c584 update dependencies 1412f1d client: updates * work on groups ui * move settings to its own page * other fixes and refactoring cab5e67 fixes 409850b Fix comment 7d14a35 Work on groups * add batch group member insertion * allow adding members on group creation * fixes b583994 refactor directories 4913975 server: refactor pagination * fix transaction usgae in repos * other bug fixes ade3a5b fix search query b5d9f8b add info endpoint 6e55b1e Make ServeStatic dynamic b8e7298 client: update packages 34876da fix pg version 1ce6679 Move from TypeORM to Kysely (#11) 4ce7676 space slug b241523 * Fixes * use lower case db column names * fix signup workspaceId 82da4ff fix workspace setup c18c9ae Refactoring * replace TypeORM with Kysely query builder * refactor migrations * other changes and fixes cacb560 fix types df6b032 new migration file a4c129c lint b44795e update envPath code d855152 Kysely - WIP * create database migration files * kysely codegen * kysely migrate 7d56920 fix pages tsv column index f1d7ffb Fix env path for Nestjs a40ba4b Re-initialize database migrations (3rd try) 33f0a7a Re-initialize database migrations 2304abd Re-initialize database migrations 6136d30 client: spaces - wip 4657672 fix avatar 51baf30 Use polymorphic table for space membership 6398421 Replace space privacy with visibility * Make creatorId nullable 186c4f5 move environment module to integrations 51b9808 Implement Space membership by group * Add all users to default group * Fixes and updates a821e37 Refactoring * Refactor workspace membership system * Create setup endpoint * Use Passport.js * Several updates and fixes b42fe48 feat: role authorizations - WIP 3e174b3 fix groups 528b9d7 feat: groups 181bd78 feat: workspace invitation bfebfb2 move code to workspaceUser service 7afd893 implement custom typeorm naming strategy 3d90fc0 * fixes and cleanups * db transactions * add default space to workspace 41ecf2d pagination - wip 299f682 fix module dependency d1bf012 public endpoint decorator cdcb4e8 * Make JwtGuard better * Fix auth decorators 40251ae feat: spaces - WIP 1d620eb * Replace tsvector generated column with triggers. * reason: due to typeorm generated column metadata bug 4008e15 fix migrations b17abd6 fix search messages e03b1f9 migrations 9444281 Merge PR #10 docmost/search a0ec2f3 feat: search e0e5f7c add emoji removal 29b4c2b client: update packages e05caef page icon emoji picker 616da87 move .env to root 9a8b605 * add new tiptap editor extension monorepo package * move tiptap packages to main package.json * add tiptap extensions schema to collaborative backend * add basic README e5758f7 Merge pull request #9 from docmost/nx-monorepo 5a49e65 update .gitignore 093e634 switch to nx monorepo e1bb263 file attachments - WIP e594074 Server SPA from server * add /api prefix 544e344 fix 82b6a1b fix ca2881b rename editor atom 2a3db4e refactor page editor 21abde1 update packages aeb549a cleanups 8238f82 keep page title editor and page tree in sync 0ae6a81 merge: page-history 3f9b6e1 feat: page history 21347e6 reduce modal title size eb95a61 fix comments 7b91b6d LICENSE d33452a better page deletion handling fb057b7 refactor react-query usage dc65fba add recent changes tab to home f5cd140 delete unused utils cf65fa3 merge comments feature 4cb7a56 feat: comments * create comment * reply to comment thread * edit comment * delete comment * resolve comment dea2cad refactor page endpoints dd62d2b page controls - wip * page breadcrumb * other minor additions and fixes 730e925 fetch page without ydoc f16df90 fix cb3fc40 fix page arrows fd2ef3a work on editor 968b9c3 update collaboration 926d504 Fix websocket port issue c647769 Fix websocket port issue * Make 'ws' (collaboration) and socket.io work on same server port 739e24e vite 9b682c8 vite * replace next with vite * disable strictmode (it interferes with collaboration in dev mode) a86991e Update dependencies * add 'use client' to more components * install more tiptap extensions acaf7ba update dependencies d5b9a9d Fix drag index bug 2e9969d socket.io server init * Make Hocuspocus collaboration websocket server (wsAdapter) work with socket.io * Create database module for TypeOrm 60fcf99 feat: sidebar page tree b467328 remove unused code d93c825 cleanup 2689b26 sidebar page tree * frontend and backend implementation e4099ad page tree - wip cfb553d Search spotlight bea107d Add avatar and status to table 3a53a7e fix styling 4dc3d58 Migrate to Mantine UI framework d733b9a Migrate to Mantine UI framework 2de9f6d Merge Philipinho/storage 7f38d3b storage module 04dea6c Merge pull request #1 from Philipinho/collaboration 4382c5a collaborative editor - wip 0d648c1 update 89de5be Page module updates - WIP add9303 check for existing workspace user 60c6452 Settings - WIP * User account settings * Workspace settings * Workspace membership management * 03a9b81 add settings navigation 6af5c9a Add new user and workspace endpoints * add account update endpoint to user module * add membership management endpoints to workspace module f2cbd0c update ui components b8f6c17 fix type 1855e1e make sidebar mobile responsive 5b6dbcc Add sidebar 54a748c Implement frontend auth and user features - WIP 3e7c2de Return user and with current workspace * Create endpoint to return user and their workspace * Only return auth tokens on login/signup * Allow nullable workspace name da8ee06 update dark theme 0fd7538 theme toggle f11f9f6 Add new page module and services; refactor existing entities c0b2bc1 configurable port b7c3ef1 shadcn-ui init 6e9be6d replace deprecated plainToClass with plainToInstance 643b448 frontend init fe7c3ed workspace - wip 021a99e transform http response json 40a4592 write tests for UserService 6e3ba20 implement jwt auth cebad0e Setup TypeORM 11018ea switch to fastify 8c84bf8 init REVERT: 5adf5ab Adds migration codegen to Docker build git-subtree-dir: vendor/app git-subtree-split: 7e6f77a
nulluserid
pushed a commit
to N2con-Inc/docmost
that referenced
this pull request
Dec 17, 2025
vvzvlad
pushed a commit
to vvzvlad/gitmost
that referenced
this pull request
Jul 5, 2026
… level, flat docs (docmost#351 PR 1) Schema-derived, property-based (fast-check) round-trip tests over flat single-node ProseMirror documents. One test PR — src/ is untouched; the two real bugs found are pinned as loud it.fails counterexamples, not fixed here. - attr-arbitraries.ts: per-attribute four-state arbitraries (absent/default/ nonDefault/degenerate), attribute list sourced from schema.nodes[t].spec.attrs; a documented override table supplies legal domains for constrained attrs and distinguishes two frozen classes explicitly — ACCEPTED limitations (no md representation) vs PINNED bugs (representable but dropped, tracked as counterexamples). - text-arbitraries.ts: hostile text corpus (ported from the existing property test's supported-space guarantees). - node-generators.ts: flat single-node generators + a completeness contract — every one of the schema's 45 nodes / 12 marks is either generated or listed in KNOWN_UNCOVERED with a reason. - flat-roundtrip.property.test.ts: P1 (semantic round-trip via docsCanonicallyEqual), P2 (second-pass byte fixpoint — anti GS-EDIT-REVERT), P3 (totality), generator validity via schema.check(), and an explicit attribute-value-coverage snapshot so the not-fuzzed set can never grow silently. - counterexamples: column.width (% dropped on parseFloat -> P2 churn) and orderedList.start (non-1 start renders as '1.' -> P1 loss) pinned as it.fails. SEED=20250705, NUM_RUNS=300 per property; ~17s, no OOM (union arbitraries). Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
vvzvlad
pushed a commit
to vvzvlad/gitmost
that referenced
this pull request
Jul 5, 2026
…le spans (review round 1) F1 [WARNING] The 'no invisible coverage hole' guard enumerated only schema.nodes, so MARK attributes silently escaped the value-fuzz completeness check — link.internal/target/rel/class are never fuzzed and nothing flagged it, and a new attributed mark would slip through. Added allSchemaMarkAttrKeys() plus a MARK_ATTR_FUZZED / MARK_ATTR_ALLOWLIST registry and two tests: every schema mark attr must be in exactly one set (a new one turns it red), and neither set may hold a stale row. F2 [WARNING] The ACCEPTED annotation misclassified table colspan/rowspan as having 'no md representation'. They DO round-trip — a spanned cell makes the converter emit the whole table as a raw <table> with colspan/rowspan, which the tiptap parser reads back. They are frozen only because generating a geometrically-valid spanned table is deferred PR-2 structural work (the flat generator hardcodes span = 1), not a markdown limit. Reclassified them as DEFERRED-BUG (distinct from ACCEPTED) so a maintainer does not read them as an inherent limitation; colwidth / backgroundColor(Name) stay ACCEPTED (the raw-<table> fallback drops them). Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
vvzvlad
pushed a commit
to vvzvlad/gitmost
that referenced
this pull request
Jul 5, 2026
…естирование конвертера — атрибутный уровень' (docmost#373) from test/351-generative-converter into develop Reviewed-on: https://gitea.vvzvlad.xyz/vvzvlad/gitmost/pulls/373
vvzvlad
pushed a commit
to vvzvlad/gitmost
that referenced
this pull request
Jul 6, 2026
… найденных round-trip багов (docmost#351) Финальная ступень docmost#351: генератор ЦЕЛЫХ вложенных документов (random walk по ContentMatch схемы, min-depth fixpoint для терминирования, глубина/размер ограничены) + инвариант P4 (фазз парсера: для ЛЮБОЙ строки markdownToProseMirror не бросает и результат валиден по схеме). Инварианты P1 (семантический round-trip), P2 (байтовый fixpoint со 2-го прохода), P3 (тотальность) — строгие. Генератор сразу нашёл классы реальных багов конвертера; все починены (инварианты НЕ ослаблялись — чинился конвертер): - loose (много-блочные) контейнеры (listItem/taskItem/callout/detailsContent) склеивали блоки при реимпорте — ТИХАЯ ПОТЕРЯ ДАННЫХ; теперь blank-line разделитель между блок-детьми (по образцу blockquote). - соседние sibling-списки одного marker-family (task+bullet и т.п.) сливались в один список с ПОТЕРЕЙ чекбокса — теперь между ними эмитится инертный `<!-- -->` разделитель (byte-stable round-trip). - paragraph textAlign терялся во вложенных li/td/th. - вложенный codeBlock терял хвостовой перевод строки. - pageBreak/pageEmbed/subpages/transclusion дропались во вложении (blockquote/callout/details/li). - медиа в columns: number→string ширины/высоты и лишний data-align (churn). - callout `> [!type]`, вложенный в список/цитату, парсился неверно (prefix-aware regex). Golden-обновления (6) — прямые следствия loose-container фикса, каждое round-trip'ится. 2100+ сгенерированных документов (3 seed) — 0 падений P1/P2. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
vvzvlad
pushed a commit
to vvzvlad/gitmost
that referenced
this pull request
Jul 6, 2026
…r default (docmost#351 review) stabilize.test.ts used `data-align="center"` as proof the convergence pass materialized the drawio node. Since this PR correctly stops emitting the schema-default center align in the media builders, that marker is no longer a reliable convergence proof. Assert on the stable canonical markers instead — `data-type="drawio"` + `data-src="/d.drawio"` — which are always materialized regardless of the align default. The fixpoint assertion (file2 === file1) is unchanged; round-trip stays byte-stable. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
vvzvlad
pushed a commit
to vvzvlad/gitmost
that referenced
this pull request
Jul 6, 2026
…P4 + фикс всех round-trip багов (docmost#351)' (docmost#385) from test/351-nested-generator into develop Reviewed-on: https://gitea.vvzvlad.xyz/vvzvlad/gitmost/pulls/385
vvzvlad
pushed a commit
to vvzvlad/gitmost
that referenced
this pull request
Jul 6, 2026
…iner converter fix The docmost#351 converter fix (79a461f) made multi-block list items emit a blank-line separator between block children (loose list) to stop silent content merging on re-parse. The prosemirror-markdown goldens were updated in that PR, but the two mcp unit tests asserting the old tight output were missed — packages/mcp re-exports the shared converter, so they broke the develop CI run (test job, `pnpm -r test`, 2/480 failures). - expect "- Parent\n\n - A..." instead of "- Parent\n - A..." - expect "1. Parent\n\n - Child" instead of "1. Parent\n - Child" Full mcp suite: 480/480 green; editor-ext / prosemirror-markdown / client / git-sync suites green as well. Co-Authored-By: Claude Fable 5 <[email protected]>
vvzvlad
pushed a commit
to vvzvlad/gitmost
that referenced
this pull request
Jul 6, 2026
…ally (docmost#351) Item 3 of the docmost#351 remainder — resolve the two pinned converter counterexamples, fixtures-first. orderedList.start (genuine P1 loss): the converter always emitted "1." and dropped attrs.start. Now the markdown path emits `${start + index}.` (Number-coerced, guards a stray non-numeric start) and the raw-HTML path emits `<ol start="N">` when start>1; a default (start=1) list is byte-unchanged. tiptap StarterKit reads both forms back. Un-pinned as a passing regression test; orderedList.start is now value-fuzzed. column.width: the "50% churn" counterexample rested on a false premise — the canonical editor (editor-ext column.ts) stores width as a unitless flex-grow NUMBER (parseFloat, `flex:${width}`), never a "%" string, and docmost-schema.ts is a vendored mirror that MUST match it. The original parseFloat was correct parity and already byte-stable for numeric widths. Reverted the mirror to parseFloat, deleted the fabricated counterexample fixture, and now value-fuzz column.width as a number (real type). No src behaviour change for column.width — parity with editor-ext preserved. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
vvzvlad
pushed a commit
to vvzvlad/gitmost
that referenced
this pull request
Jul 6, 2026
Item 4 of the docmost#351 remainder — implement value-fuzz for the media dimension/family attributes previously parked in the flat property suite's ATTR_VALUE_FUZZ_ALLOWLIST as "round-trip candidates deferred to a later PR": width/height/align/aspectRatio/size/caption/title/alt across image, video, youtube, pdf, drawio, excalidraw, embed. Each gets a non-default-value arbitrary in attr-arbitraries.ts and is removed from the allowlist; the P1 (semantic) + P2 (byte-stability) property gate now exercises them. All round-trip green — the comment-JSON serialization (stable key order, String()-stringified) carries every one faithfully, so no new pins or accepted-limitations were needed. embed.width/height are fuzzed as numeric STRINGS (not numbers): a non-default embed dimension round-trips through the comment JSON as a string (the numeric 800/600 default is still omitted/re-materialized), so authoring a number diverged under P1. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
vvzvlad
pushed a commit
to vvzvlad/gitmost
that referenced
this pull request
Jul 6, 2026
…EADME (docmost#351) Items 1 & 2 of the docmost#351 remainder. Item 1 — the flat/nested generative property tests now read SEED and NUM_RUNS from PROPERTY_SEED / PROPERTY_NUM_RUNS (via an envInt helper that honors an explicit 0 and falls back to the current defaults — 20250705/300 flat, /100 nested — on unset/empty/non-numeric). New .github/workflows/nightly-property.yml runs the generative suite daily (and on workflow_dispatch) with a random seed and NUM_RUNS≈5000; on failure it files a Gitea issue containing fast-check's shrunk counterexample (jq-escaped, dedup'd by title). No build step — the suite imports the converter from src/, so a tsc error can't masquerade as a property failure. Item 2 — new packages/prosemirror-markdown/README.md documents the counterexample process (surface -> shrink -> permanent fixture in test/fixtures/counterexamples/ + counterexamples.test.ts -> fix the converter, never weaken a property; maintainer-approved ACCEPTED/allowlist entries carry a reason) plus the two golden layers, the coverage allowlist, and how to run with the env knobs. Linked from AGENTS.md. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
vvzvlad
pushed a commit
to vvzvlad/gitmost
that referenced
this pull request
Jul 6, 2026
… nightly hardening (docmost#351) DO-1 (regression): the orderedList start hardening `Number(x)||1` let a negative/fractional start through into the marker ("-3.", "2.5.") — marked can't tokenize it, so the whole list re-imported as a paragraph (structure corruption); start=0 churned. Both the markdown and raw-HTML export paths now use `Number.isInteger(raw) && raw > 1 ? raw : 1`, so any degenerate start collapses to the default "1." markers / bare <ol> (list always valid). New ordered-list-start-normalization test pins {0,-3,2.5} → valid start=1 list, byte-stable; the round-trip fuzz keeps to integers >=2 (num 2,3,5,42). DO-2 (nightly was non-functional): NUM_RUNS=5000 OOM'd the worker and the crash was misreported as a "counterexample" issue whose prefix-dedup then locked out all future issues. Reworked to shard 8 fresh vitest processes (600 runs each, distinct seeds, --max-old-space-size) so deep fuzzing never OOMs; a failing shard's output is preserved, and issue creation discriminates a real fast-check counterexample from an infra/OOM failure (distinct titles + scoped dedup). The two issue steps use `always() &&` so they actually run on the failure path. DO-3: envInt extracted to test/generative/env-int.ts + unit-tested. DO-4: nightly dispatch inputs go through env: (no ${{ }} in run:). DO-5: attr-arbitraries.ts docblock synced (column.width/orderedList.start are fixed+fuzzed, not pinned it.fails). Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
vvzvlad
pushed a commit
to vvzvlad/gitmost
that referenced
this pull request
Jul 6, 2026
…erty cron + README + запиненные баги + media-фазз' (docmost#391) from feat/351-remainder into develop Reviewed-on: https://gitea.vvzvlad.xyz/vvzvlad/gitmost/pulls/391
vvzvlad
pushed a commit
to vvzvlad/gitmost
that referenced
this pull request
Jul 10, 2026
…de/insertNode (docmost#413) Канонический конвертер (docmost#293/docmost#345/docmost#351) зрел для блочного уровня: markdown становится дефолтом чтения/записи ОДНОГО блока, PM JSON — опция «для тонких работ». Новых тулов нет, поверхность не растёт. Имена уже camelCase (стоит на docmost#412). - getNode(pageId, nodeId, format='markdown'): дефолт markdown — обёртка {type:doc,content:[node]} → convertProseMirrorToMarkdown, comment-якоря (ВКЛЮЧАЯ resolved) сохранены (это чтение под редактирование, не getPage). format:'json' — сырой сабтри. Авто-фолбэк не-топ-левел типов (tableRow/Cell/ Header по #<index>) в JSON через canBeDocChild = docmostSchema.nodes.doc. contentMatch.matchType (не рукописный список); поле format на каждом ответе. - patchNode/insertNode: XOR-вход {markdown?|node?} (оба optional в схеме, XOR на рантайме). markdown → импорт фрагмента → 1→N сплайс: первый блок наследует id цели, остальные свежие; dry replaceNodeById для docmost#159-ambiguity ДО сплайса; соседние блоки byte-identical. Guard findUnrepresentableTableAttrs: цель со span/colwidth/backgroundColor → отказ с указанием на table-тулы/node-JSON. insertNode — insertNodesRelative (N блоков по порядку); голый tableRow/Cell JSON-only. - Сноски: ^[...] во фрагменте → канон-импортёр; importMarkdownFragment делит блоки от footnotesList, РЕМАПИТ id сносок фрагмента в свежие uuid (fn-1 фрагмента не коллизит с fn-1 страницы), mergeFootnoteDefinitions добавляет через ту же машинерию appendDefinition→normalizeAndMergeFootnotes→ canonicalizeFootnotes, что insertFootnote. Сырые JSON-пути не тронуты. - node-ops: replaceNodeByIdWithMany/insertNodesRelative (сплайс массива) в prosemirror-markdown/node-ops (канон после docmost#414) + barrel. - ROUTING_PROSE (READ/EDIT), compile-time client-call contract, CHANGELOG (getNode default→markdown, breaking для внешних клиентов, в окне docmost#411/docmost#412). Тесты: сходимость (patchNode(markdown) блок docsCanonicallyEqual полному импорту — нет «второго канона»); id-нить 1→N (первый наследует, остальные свежие, соседи byte-identical); XOR; getNode markdown/json/non-top-level-fallback; сохранение comment-якорей (active+resolved); ^[...]→хвостовой список+перенумерация; guard. mcp node --test 697/697; pmd vitest 736; tsc чисто; server jest 273. Третий линк breaking-окна, стоит на docmost#412 (docmost#411→docmost#412→ЭТОТ→docmost#415). Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
vvzvlad
pushed a commit
to vvzvlad/gitmost
that referenced
this pull request
Jul 10, 2026
…тер канонический (docmost#415) Описания двух тулов устарели после docmost#345 (канонический конвертер, docmost#293/docmost#351): «LOSSY…approximated» у getPage и «lossless» у exportPageMarkdown искажали роутинг агентов и молчаливо скрывали реальную потерю данных. Четвёртый линк breaking-окна, стоит на docmost#413. - tool-specs.ts: getPage — вместо «LOSSY…approximated» точный закрытый список потерь (canonical for text; теряет лишь id блоков, resolved-якоря комментариев и фиксированный набор ACCEPTED-атрибутов без markdown- представления: спаны/colwidth/фон ячеек таблиц, indent, callout.icon, orderedList.type, link internal/target/rel/class). exportPageMarkdown — убрано «lossless»: round-trip перегенерирует id блоков и молча отбрасывает тот же набор (в первую очередь merge-спаны ячеек); держать в page-JSON, если нужны. Список выведен из источника истины (ATTR_VALUE_FUZZ_ALLOWLIST + MARK_ATTR_ALLOWLIST); opaque carried-verbatim токены (attachmentId, mime, slugId и пр.) намеренно НЕ в списке потерь — они round-trip'ятся. - server-instructions.ts: READ-строка ROUTING_PROSE приведена к тому же точному списку, без противоречия markdown-default роутингу docmost#413. - Исправлена вторая латентная неточность: getPage описывался как сохраняющий resolved-якоря — но client.ts передаёт dropResolvedCommentAnchors: true, resolved-якоря скрыты (getNode, наоборот, их сохраняет — другой тул). - README пакета (EN + RU-зеркало) приведены в соответствие passage-for-passage: убраны безоговорочные «lossless/lossy» для Markdown round-trip; genuinely- lossless ссылки на raw-JSON (getPageJson/getNode) оставлены. Логику не трогает. server-instructions.test.mjs удалён и заменён tool-inventory.test.mjs (без пинов на старую формулировку). mcp tsc чисто, node --test 702/702, tool-inventory 5/5. 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
…anon Issue docmost#503 reported a hardBreak sent via updatePageJson being «silently cut» — no error, no line break — forcing the agent to split lines into separate paragraphs. A faithful repro shows the bug does NOT reproduce against develop: hardBreak is fully representable in the markdown canon in BOTH directions and survives the real Yjs write path. - pm -> md: the serializer (now in @docmost/prosemirror-markdown after the docmost#293 STEP 5 consolidation) emits the CommonMark hard break ` \n`, not a bare `\n`. - md -> pm: marked tokenizes ` \n` to `<br>`, which generateJSON parses back to a hardBreak node in ONE paragraph (not split, not dropped). - updatePageJson (PM JSON -> applyDocToFragment = PMNode.fromJSON + updateYFragment, the real collab-session write encoder -> read back) keeps text + hardBreak + text in one paragraph. The issue's diagnosis points at packages/mcp/.../markdown-converter.ts as the serializer, but that file is a 15-line re-export shim since docmost#293 STEP 5 — the diagnosis predates the converter consolidation that already closed both sides. P1 (semantic round-trip) + P2 (byte-fixpoint) hold, and the node already has broad property/corpus/golden coverage in the package. No converter change is warranted (switching the break form to `\`+newline would churn the whole docmost#351 byte-fixpoint corpus against the established ` \n` repo convention for zero functional gain). This adds one integration guard at the MCP canon seam covering all three seams of the reported updatePageJson path. Mutation-verified: neutering the serializer arm or the importer `<br>` handling reddens seams 1-2; neutering the real applyDocToFragment write path reddens seam 3. Co-Authored-By: Claude Opus 4.8 (1M context) <[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.
I have both Docker and Uptime Kuma pinging the
/healthendpoint and after a few days my tiny VPS explodes with errors like:Turns out that, if we don't disconnect the Redis client, they keep accumulating and don't timeout by default. To verify this in practice:
Here we see that after each call to the
/healthendpoint, the number of clients connected to Redis increases.In this diff, we disconnect the Redis client after the
ping, and the problem now goes away: