Compare commits

..
Author SHA1 Message Date
Philipinho 525da6f98a fix: searchTerm type error 2026-07-20 20:29:58 +01:00
Philipinho ab53255adf Merge branch 'main' into hocuspocus4 2026-07-20 20:05:26 +01:00
Philipinho d9a19b5a48 fix: survive hocuspocus v4 message timeout 2026-07-20 20:03:23 +01:00
Philipinho f1f1bb2f41 feat: multiplexing 2026-07-18 18:30:32 +01:00
Philipinho a8a7cac2c2 add flushDelay 2026-07-18 01:19:40 +01:00
Philipinho 9fb0ab3ad6 complete v4 migration 2026-07-18 01:18:51 +01:00
Philipinho f008e536a2 WIP 1 2026-07-18 00:57:11 +01:00
9 changed files with 39 additions and 90 deletions
+1 -1
View File
@@ -1,7 +1,7 @@
FROM node:26-slim AS base
LABEL org.opencontainers.image.source="https://github.com/docmost/docmost"
RUN npm install -g pnpm@11.15.1
RUN npm install -g pnpm@11.13.0
FROM base AS builder
+1 -1
View File
@@ -36,7 +36,7 @@
"@tanstack/react-table": "8.21.3",
"@tanstack/react-virtual": "3.14.3",
"alfaaz": "1.1.0",
"axios": "1.18.1",
"axios": "1.16.0",
"blueimp-load-image": "5.16.0",
"clsx": "2.1.1",
"file-saver": "2.0.5",
@@ -6,7 +6,6 @@
z-index: 99;
display: flex;
align-items: center;
min-height: 45px;
background: var(--mantine-color-body);
border-bottom: 1px solid
light-dark(var(--mantine-color-gray-2), var(--mantine-color-dark-4));
@@ -31,6 +31,8 @@ export const FixedToolbar: FC<FixedToolbarProps> = ({
const workspace = useAtomValue(workspaceAtom);
const isGenerativeAiEnabled = workspace?.settings?.ai?.generative === true;
if (!editor || !state) return null;
return (
<>
<div
@@ -47,26 +49,22 @@ export const FixedToolbar: FC<FixedToolbarProps> = ({
<div className={classes.divider} />
</>
)} */}
{editor && state && (
<>
<BlockTypeGroup editor={editor} />
<div className={classes.divider} />
<InlineMarksGroup editor={editor} state={state} />
<div className={classes.divider} />
<ColorGroup editor={editor} />
<div className={classes.divider} />
<ListsGroup editor={editor} state={state} />
<div className={classes.divider} />
<AlignmentGroup editor={editor} />
<div className={classes.divider} />
<MediaGroup editor={editor} templateMode={templateMode} />
<div className={classes.divider} />
<QuickInsertsGroup editor={editor} />
<MoreInsertsGroup editor={editor} templateMode={templateMode} />
<div className={classes.divider} />
<HistoryGroup editor={editor} state={state} />
</>
)}
<BlockTypeGroup editor={editor} />
<div className={classes.divider} />
<InlineMarksGroup editor={editor} state={state} />
<div className={classes.divider} />
<ColorGroup editor={editor} />
<div className={classes.divider} />
<ListsGroup editor={editor} state={state} />
<div className={classes.divider} />
<AlignmentGroup editor={editor} />
<div className={classes.divider} />
<MediaGroup editor={editor} templateMode={templateMode} />
<div className={classes.divider} />
<QuickInsertsGroup editor={editor} />
<MoreInsertsGroup editor={editor} templateMode={templateMode} />
<div className={classes.divider} />
<HistoryGroup editor={editor} state={state} />
</div>
</div>
<div className={classes.spacer} aria-hidden />
@@ -2,7 +2,6 @@ import "@/features/editor/styles/index.css";
import React, {
useCallback,
useEffect,
useLayoutEffect,
useMemo,
useRef,
useState,
@@ -101,13 +100,11 @@ export default function PageEditor({
const { pageSlug } = useParams();
const slugId = extractPageSlugId(pageSlug);
const [socket] = useState(getCollabSocket);
const hasCollabToken = !!collabQuery?.token;
useEffect(() => {
if (!hasCollabToken) return;
acquireCollabSocket();
return () => releaseCollabSocket();
}, [hasCollabToken]);
}, []);
const handleStateless = ({ payload }: onStatelessParameters) => {
try {
@@ -325,16 +322,6 @@ function CollabPageEditor({
[pageId, editable, extensions],
);
useLayoutEffect(() => {
if (editor && !editor.isDestroyed) {
// @ts-ignore
setEditor(editor);
// @ts-ignore
editor.storage.pageId = pageId;
editorRef.current = editor;
}
}, [editor, pageId, setEditor]);
const editorIsEditable = useEditorState({
editor,
selector: (ctx) => {
@@ -15,21 +15,13 @@ import { getMimeType } from '../../../common/helpers';
import { Upload } from '@aws-sdk/lib-storage';
import { Logger } from '@nestjs/common';
const S3_MAX_SOCKETS = 200;
export class S3Driver implements StorageDriver {
private readonly s3Client: S3Client;
private readonly config: S3StorageConfig;
constructor(config: S3StorageConfig) {
this.config = {
...config,
requestHandler: {
httpAgent: { maxSockets: S3_MAX_SOCKETS },
httpsAgent: { maxSockets: S3_MAX_SOCKETS },
},
};
this.s3Client = new S3Client(this.config as any);
this.config = config;
this.s3Client = new S3Client(config as any);
}
async upload(filePath: string, file: Buffer | Readable): Promise<void> {
+1 -1
View File
@@ -95,5 +95,5 @@
"packages/*"
]
},
"packageManager": "pnpm@11.15.1"
"packageManager": "pnpm@11.13.0"
}
+14 -41
View File
@@ -37,7 +37,7 @@ overrides:
brace-expansion@^5: 5.0.6
'@xmldom/xmldom': 0.8.13
handlebars: 4.7.9
axios: 1.18.1
axios: 1.16.0
langsmith: 0.7.0
follow-redirects: 1.16.0
protobufjs: 7.5.8
@@ -340,8 +340,8 @@ importers:
specifier: 1.1.0
version: 1.1.0
axios:
specifier: 1.18.1
version: 1.18.1
specifier: 1.16.0
version: 1.16.0
blueimp-load-image:
specifier: 5.16.0
version: 5.16.0
@@ -5240,10 +5240,6 @@ packages:
resolution: {integrity: sha512-4B/qKCfeE/ODUaAUpSwfzazo5x29WD4r3vXiWsB7I2mSDAihwEqKO+g8GELZUQSSAo5e1XTYh3ZVfLyxBc12nA==}
engines: {node: '>= 10.0.0'}
agent-base@6.0.2:
resolution: {integrity: sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==}
engines: {node: '>= 6.0.0'}
agent-base@7.1.4:
resolution: {integrity: sha512-MnA+YT8fwfJPgBx3m60MNqakm30XOkyIoH1y6huTQvC0PwZG7ki8NacLBcrPbNoo8vEZy7Jpuk7+jMO+CUovTQ==}
engines: {node: '>= 14'}
@@ -5407,8 +5403,8 @@ packages:
avvio@9.1.0:
resolution: {integrity: sha512-fYASnYi600CsH/j9EQov7lECAniYiBFiiAtBNuZYLA2leLe9qOvZzqYHFjtIj6gD2VMoMLP14834LFWvr4IfDw==}
axios@1.18.1:
resolution: {integrity: sha512-3nTvFlvpn9Zu/RkHUqtc7/+al4UpRW5az71ap5zccp6e8RAYEzhMTecX8Dz1wWDYrPpUoB1HAQEGEAEvUr7S9g==}
axios@1.16.0:
resolution: {integrity: sha512-6hp5CwvTPlN2A31g5dxnwAX0orzM7pmCRDLnZSX772mv8WDqICwFjowHuPs04Mc8deIld1+ejhtaMn5vp6b+1w==}
babel-jest@30.3.0:
resolution: {integrity: sha512-gRpauEU2KRrCox5Z296aeVHR4jQ98BCnu0IO332D/xpHNOsIH/bgSRk9k6GbKIbBw8vFeN6ctuu6tV8WOyVfYQ==}
@@ -6981,10 +6977,6 @@ packages:
resolution: {integrity: sha512-T1gkAiYYDWYx3V5Bmyu7HcfcvL7mUrTWiM6yOfa3PIphViJ/gFPbvidQ+veqSOHci/PxBcDabeUNCzpOODJZig==}
engines: {node: '>= 14'}
https-proxy-agent@5.0.1:
resolution: {integrity: sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==}
engines: {node: '>= 6'}
https-proxy-agent@7.0.6:
resolution: {integrity: sha512-vK9P5/iUfdl95AI+JVyUuIcVtd4ofvtrOr3HNtM2yxC9bnMbEdp3x01OhQNnjb8IJYi38VlTE3mBXwcfvywuSw==}
engines: {node: '>= 14'}
@@ -11197,7 +11189,7 @@ snapshots:
'@babel/plugin-syntax-bigint@7.8.3(@babel/core@7.29.7)':
dependencies:
'@babel/core': 7.29.7
'@babel/helper-plugin-utils': 7.29.7
'@babel/helper-plugin-utils': 7.28.6
'@babel/plugin-syntax-class-properties@7.12.13(@babel/core@7.29.7)':
dependencies:
@@ -13221,7 +13213,6 @@ snapshots:
- '@swc-node/register'
- '@swc/core'
- debug
- supports-color
'@opentelemetry/api@1.9.0': {}
@@ -15411,12 +15402,6 @@ snapshots:
address@1.2.2: {}
agent-base@6.0.2:
dependencies:
debug: 4.4.3
transitivePeerDependencies:
- supports-color
agent-base@7.1.4: {}
ai-sdk-ollama@3.8.1(ai@6.0.134(zod@4.3.6))(zod@4.3.6):
@@ -15598,15 +15583,13 @@ snapshots:
'@fastify/error': 4.0.0
fastq: 1.17.1
axios@1.18.1:
axios@1.16.0:
dependencies:
follow-redirects: 1.16.0
form-data: 4.0.6
https-proxy-agent: 5.0.1
proxy-from-env: 2.1.0
transitivePeerDependencies:
- debug
- supports-color
babel-jest@30.3.0(@babel/core@7.29.7):
dependencies:
@@ -15632,7 +15615,7 @@ snapshots:
babel-plugin-istanbul@7.0.1:
dependencies:
'@babel/helper-plugin-utils': 7.29.7
'@babel/helper-plugin-utils': 7.28.6
'@istanbuljs/load-nyc-config': 1.1.0
'@istanbuljs/schema': 0.1.3
istanbul-lib-instrument: 6.0.2
@@ -16731,7 +16714,7 @@ snapshots:
es-errors: 1.3.0
get-intrinsic: 1.3.0
has-tostringtag: 1.0.2
hasown: 2.0.4
hasown: 2.0.2
es-shim-unscopables@1.0.2:
dependencies:
@@ -17267,7 +17250,7 @@ snapshots:
call-bound: 1.0.4
define-properties: 1.2.1
functions-have-names: 1.2.3
hasown: 2.0.4
hasown: 2.0.2
is-callable: 1.2.7
functions-have-names@1.2.3: {}
@@ -17470,13 +17453,6 @@ snapshots:
transitivePeerDependencies:
- supports-color
https-proxy-agent@5.0.1:
dependencies:
agent-base: 6.0.2
debug: 4.4.3
transitivePeerDependencies:
- supports-color
https-proxy-agent@7.0.6:
dependencies:
agent-base: 7.1.4
@@ -17659,7 +17635,7 @@ snapshots:
call-bound: 1.0.4
gopd: 1.2.0
has-tostringtag: 1.0.2
hasown: 2.0.4
hasown: 2.0.2
is-set@2.0.3: {}
@@ -18833,7 +18809,7 @@ snapshots:
'@yarnpkg/lockfile': 1.1.0
'@yarnpkg/parsers': 3.0.2
'@zkochan/js-yaml': 0.0.7
axios: 1.18.1
axios: 1.16.0
cli-cursor: 3.1.0
cli-spinners: 2.6.1
cliui: 8.0.1
@@ -18877,7 +18853,6 @@ snapshots:
'@nx/nx-win32-x64-msvc': 22.6.1
transitivePeerDependencies:
- debug
- supports-color
nypm@0.6.6:
dependencies:
@@ -19371,10 +19346,9 @@ snapshots:
postmark@4.0.7:
dependencies:
axios: 1.18.1
axios: 1.16.0
transitivePeerDependencies:
- debug
- supports-color
preact@10.29.2: {}
@@ -20650,12 +20624,11 @@ snapshots:
typesense@3.0.5(@babel/runtime@7.29.2):
dependencies:
'@babel/runtime': 7.29.2
axios: 1.18.1
axios: 1.16.0
loglevel: 1.9.2
tslib: 2.8.1
transitivePeerDependencies:
- debug
- supports-color
ufo@1.6.1: {}
+1 -1
View File
@@ -36,7 +36,7 @@ overrides:
brace-expansion@^5: 5.0.6
'@xmldom/xmldom': 0.8.13
handlebars: 4.7.9
axios: 1.18.1
axios: 1.16.0
langsmith: 0.7.0
follow-redirects: 1.16.0
protobufjs: 7.5.8