[xwiki/xwiki-platform] 2c14c4: XWIKI-24372: Implement auto-save for BlockNote rea...
Branch: refs/heads/stable-18.8.x Home: https://github.com/xwiki/xwiki-platform Commit: 2c14c4dec9eca4bc68c01def1c7057406802d72a https://github.com/xwiki/xwiki-platform/commit/2c14c4dec9eca4bc68c01def1c705... Author: Marius Dumitru Florea <[email protected]> Date: 2026-09-16 (Wed, 16 Sep 2026) Changed paths: M pnpm-workspace.yaml M xwiki-platform-core/xwiki-platform-flamingo/xwiki-platform-flamingo-skin/xwiki-platform-flamingo-skin-resources/pom.xml M xwiki-platform-core/xwiki-platform-flamingo/xwiki-platform-flamingo-skin/xwiki-platform-flamingo-skin-resources/src/main/resources/flamingo/javascript.vm A xwiki-platform-core/xwiki-platform-node/src/main/node/core/model/model-reference/model-reference-xwiki/api-extractor.json A xwiki-platform-core/xwiki-platform-node/src/main/node/core/model/model-reference/model-reference-xwiki/etc/platform-model-reference-xwiki.api.md A xwiki-platform-core/xwiki-platform-node/src/main/node/core/model/model-reference/model-reference-xwiki/package.json A xwiki-platform-core/xwiki-platform-node/src/main/node/core/model/model-reference/model-reference-xwiki/src/__tests__/entityReference.test.ts A xwiki-platform-core/xwiki-platform-node/src/main/node/core/model/model-reference/model-reference-xwiki/src/__tests__/entityReferenceTree.test.ts A xwiki-platform-core/xwiki-platform-node/src/main/node/core/model/model-reference/model-reference-xwiki/src/__tests__/entityType.test.ts A xwiki-platform-core/xwiki-platform-node/src/main/node/core/model/model-reference/model-reference-xwiki/src/index.ts A xwiki-platform-core/xwiki-platform-node/src/main/node/core/model/model-reference/model-reference-xwiki/tsconfig.json A xwiki-platform-core/xwiki-platform-node/src/main/node/core/model/model-reference/model-reference-xwiki/tsdoc.json A xwiki-platform-core/xwiki-platform-node/src/main/node/core/model/model-reference/model-reference-xwiki/vite.config.ts A xwiki-platform-core/xwiki-platform-node/src/main/node/core/model/model-reference/model-reference-xwiki/vitest.config.ts M xwiki-platform-core/xwiki-platform-web/pom.xml M xwiki-platform-core/xwiki-platform-web/xwiki-platform-web-war/pom.xml R xwiki-platform-core/xwiki-platform-web/xwiki-platform-web-war/src/main/webapp/resources/uicomponents/model/entityReference.js R xwiki-platform-core/xwiki-platform-web/xwiki-platform-web-war/src/test/javascript/uicomponents/model/entityReference.js M xwiki-platform-core/xwiki-platform-web/xwiki-platform-web-war/src/test/resources/jasmine-require-config.txt A xwiki-platform-core/xwiki-platform-web/xwiki-platform-web-webjar/pom.xml A xwiki-platform-core/xwiki-platform-web/xwiki-platform-web-webjar/src/main/node/eslint.config.ts A xwiki-platform-core/xwiki-platform-web/xwiki-platform-web-webjar/src/main/node/package.json A xwiki-platform-core/xwiki-platform-web/xwiki-platform-web-webjar/src/main/node/src/entityReference.ts A xwiki-platform-core/xwiki-platform-web/xwiki-platform-web-webjar/src/main/node/src/globals.d.ts A xwiki-platform-core/xwiki-platform-web/xwiki-platform-web-webjar/src/main/node/tsconfig.app.json A xwiki-platform-core/xwiki-platform-web/xwiki-platform-web-webjar/src/main/node/tsconfig.json A xwiki-platform-core/xwiki-platform-web/xwiki-platform-web-webjar/src/main/node/tsconfig.node.json A xwiki-platform-core/xwiki-platform-web/xwiki-platform-web-webjar/src/main/node/vite.config.ts Log Message: ----------- XWIKI-24372: Implement auto-save for BlockNote realtime collaboration sessions * Move the XWiki entity reference JavaScript API to a new @xwiki/platform-model-reference-xwiki node package, rewritten in TypeScript with its Jasmine tests ported to vitest * Publish it as a classic script from the new xwiki-platform-web-webjar module, which keeps exposing the classes on the global XWiki object and registers the xwiki-entityReference RequireJS module * Escape every backslash when serializing a wiki name, instead of only the first one * Drop the dependency on Prototype.js in EntityReferenceTreeNode Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> (cherry picked from commit dc4ed28d1005b871bee92696d329b400f3d2f6e1) Commit: 9d0dbc4fe6bff8b1b0337bc4b74fb8ace9536dc8 https://github.com/xwiki/xwiki-platform/commit/9d0dbc4fe6bff8b1b0337bc4b74fb... Author: Marius Dumitru Florea <[email protected]> Date: 2026-09-16 (Wed, 16 Sep 2026) Changed paths: M pnpm-workspace.yaml R xwiki-platform-core/xwiki-platform-node/src/main/node/core/model/model-reference/model-reference-xwiki/api-extractor.json R xwiki-platform-core/xwiki-platform-node/src/main/node/core/model/model-reference/model-reference-xwiki/etc/platform-model-reference-xwiki.api.md R xwiki-platform-core/xwiki-platform-node/src/main/node/core/model/model-reference/model-reference-xwiki/package.json R xwiki-platform-core/xwiki-platform-node/src/main/node/core/model/model-reference/model-reference-xwiki/src/__tests__/entityReference.test.ts R xwiki-platform-core/xwiki-platform-node/src/main/node/core/model/model-reference/model-reference-xwiki/src/__tests__/entityReferenceTree.test.ts R xwiki-platform-core/xwiki-platform-node/src/main/node/core/model/model-reference/model-reference-xwiki/src/__tests__/entityType.test.ts R xwiki-platform-core/xwiki-platform-node/src/main/node/core/model/model-reference/model-reference-xwiki/src/index.ts R xwiki-platform-core/xwiki-platform-node/src/main/node/core/model/model-reference/model-reference-xwiki/tsconfig.json R xwiki-platform-core/xwiki-platform-node/src/main/node/core/model/model-reference/model-reference-xwiki/tsdoc.json R xwiki-platform-core/xwiki-platform-node/src/main/node/core/model/model-reference/model-reference-xwiki/vite.config.ts R xwiki-platform-core/xwiki-platform-node/src/main/node/core/model/model-reference/model-reference-xwiki/vitest.config.ts A xwiki-platform-core/xwiki-platform-node/src/main/node/core/xwiki/xwiki-model-api/api-extractor.json A xwiki-platform-core/xwiki-platform-node/src/main/node/core/xwiki/xwiki-model-api/etc/platform-xwiki-model-api.api.md A xwiki-platform-core/xwiki-platform-node/src/main/node/core/xwiki/xwiki-model-api/package.json A xwiki-platform-core/xwiki-platform-node/src/main/node/core/xwiki/xwiki-model-api/src/__tests__/entityReference.test.ts A xwiki-platform-core/xwiki-platform-node/src/main/node/core/xwiki/xwiki-model-api/src/__tests__/entityReferenceTree.test.ts A xwiki-platform-core/xwiki-platform-node/src/main/node/core/xwiki/xwiki-model-api/src/__tests__/entityType.test.ts A xwiki-platform-core/xwiki-platform-node/src/main/node/core/xwiki/xwiki-model-api/src/index.ts A xwiki-platform-core/xwiki-platform-node/src/main/node/core/xwiki/xwiki-model-api/tsconfig.json A xwiki-platform-core/xwiki-platform-node/src/main/node/core/xwiki/xwiki-model-api/tsdoc.json A xwiki-platform-core/xwiki-platform-node/src/main/node/core/xwiki/xwiki-model-api/vite.config.ts A xwiki-platform-core/xwiki-platform-node/src/main/node/core/xwiki/xwiki-model-api/vitest.config.ts M xwiki-platform-core/xwiki-platform-web/xwiki-platform-web-webjar/src/main/node/package.json M xwiki-platform-core/xwiki-platform-web/xwiki-platform-web-webjar/src/main/node/src/entityReference.ts Log Message: ----------- XWIKI-24372: Implement auto-save for BlockNote realtime collaboration sessions * Move the XWiki entity reference model from model-reference-xwiki to a dedicated xwiki-model-api module, the client side counterpart of the xwiki-platform-model-api Java module. * This frees the model-reference-xwiki name for the XWiki implementation of the model reference roles, and lets both xwiki-utils and that implementation depend on the entity reference model without a cycle. * The module is a plain rename: its sources and tests are unchanged, and it keeps having no dependency, since it is bundled in the entityReference.js script loaded by every XWiki page. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> (cherry picked from commit 3cd10e23a117e6c9e676d8b68bc86928cb9eda6d) Commit: 75127f16f5616e4c9a01d4b5bfc510edcbfd0ef9 https://github.com/xwiki/xwiki-platform/commit/75127f16f5616e4c9a01d4b5bfc51... Author: Marius Dumitru Florea <[email protected]> Date: 2026-09-16 (Wed, 16 Sep 2026) Changed paths: M pnpm-lock.yaml M pnpm-workspace.yaml A xwiki-platform-core/xwiki-platform-node/src/main/node/core/model/model-xwiki/api-extractor.json A xwiki-platform-core/xwiki-platform-node/src/main/node/core/model/model-xwiki/etc/platform-model-xwiki.api.md A xwiki-platform-core/xwiki-platform-node/src/main/node/core/model/model-xwiki/package.json A xwiki-platform-core/xwiki-platform-node/src/main/node/core/model/model-xwiki/src/__tests__/entityReferenceConverter.test.ts A xwiki-platform-core/xwiki-platform-node/src/main/node/core/model/model-xwiki/src/entityReferenceConverter.ts A xwiki-platform-core/xwiki-platform-node/src/main/node/core/model/model-xwiki/src/index.ts A xwiki-platform-core/xwiki-platform-node/src/main/node/core/model/model-xwiki/tsconfig.json A xwiki-platform-core/xwiki-platform-node/src/main/node/core/model/model-xwiki/tsdoc.json A xwiki-platform-core/xwiki-platform-node/src/main/node/core/model/model-xwiki/vite.config.ts A xwiki-platform-core/xwiki-platform-node/src/main/node/core/model/model-xwiki/vitest.config.ts Log Message: ----------- XWIKI-24372: Implement auto-save for BlockNote realtime collaboration sessions * Add a model-xwiki module holding the converters between the backend agnostic entity references of model-api and the XWiki entity references of xwiki-model-api, extracted from the BlockNote WebJar. * The absolute* converters now take the reference to resolve against as a mandatory baseReference parameter, instead of reading the current document from the global XWiki object. The converters no longer depend on that global at all, which is what makes them unit testable. * Add the unit tests these converters never had. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> (cherry picked from commit ed51e43f1d4a99fa4179661b53e60cea9c0c4575) Commit: 9f9581c2b64f63e93a77c6d0fd3c3c39d949feba https://github.com/xwiki/xwiki-platform/commit/9f9581c2b64f63e93a77c6d0fd3c3... Author: Marius Dumitru Florea <[email protected]> Date: 2026-09-16 (Wed, 16 Sep 2026) Changed paths: M pnpm-lock.yaml A xwiki-platform-core/xwiki-platform-blocknote/xwiki-platform-blocknote-webjar/src/main/node/global.d.ts M xwiki-platform-core/xwiki-platform-blocknote/xwiki-platform-blocknote-webjar/src/main/node/package.json M xwiki-platform-core/xwiki-platform-blocknote/xwiki-platform-blocknote-webjar/src/main/node/src/components/XWikiBlockNote.vue M xwiki-platform-core/xwiki-platform-blocknote/xwiki-platform-blocknote-webjar/src/main/node/src/services/authentication/XWikiAuthenticationManager.ts M xwiki-platform-core/xwiki-platform-blocknote/xwiki-platform-blocknote-webjar/src/main/node/src/services/document/DefaultDocumentService.ts M xwiki-platform-core/xwiki-platform-blocknote/xwiki-platform-blocknote-webjar/src/main/node/src/services/image/DefaultImageWizard.ts M xwiki-platform-core/xwiki-platform-blocknote/xwiki-platform-blocknote-webjar/src/main/node/src/services/macros/MacroWizard.ts R xwiki-platform-core/xwiki-platform-blocknote/xwiki-platform-blocknote-webjar/src/main/node/src/services/meta/XWikiMeta.ts R xwiki-platform-core/xwiki-platform-blocknote/xwiki-platform-blocknote-webjar/src/main/node/src/services/model/reference/XWikiEntityReference.ts M xwiki-platform-core/xwiki-platform-blocknote/xwiki-platform-blocknote-webjar/src/main/node/src/services/model/reference/XWikiModelReferenceHandler.ts M xwiki-platform-core/xwiki-platform-blocknote/xwiki-platform-blocknote-webjar/src/main/node/src/services/model/reference/XWikiModelReferenceParser.ts M xwiki-platform-core/xwiki-platform-blocknote/xwiki-platform-blocknote-webjar/src/main/node/src/services/model/reference/XWikiModelReferenceSerializer.ts M xwiki-platform-core/xwiki-platform-blocknote/xwiki-platform-blocknote-webjar/src/main/node/src/services/model/url/XWikiRemoteURLParser.ts M xwiki-platform-core/xwiki-platform-blocknote/xwiki-platform-blocknote-webjar/src/main/node/src/services/model/url/XWikiRemoteURLSerializer.ts M xwiki-platform-core/xwiki-platform-blocknote/xwiki-platform-blocknote-webjar/src/main/node/src/services/storage/XWikiStorage.ts M xwiki-platform-core/xwiki-platform-blocknote/xwiki-platform-blocknote-webjar/src/main/node/tsconfig.json M xwiki-platform-core/xwiki-platform-node/src/main/node/core/xwiki/xwiki-utils/etc/platform-xwiki-utils.api.md M xwiki-platform-core/xwiki-platform-node/src/main/node/core/xwiki/xwiki-utils/package.json M xwiki-platform-core/xwiki-platform-node/src/main/node/core/xwiki/xwiki-utils/src/index.ts A xwiki-platform-core/xwiki-platform-node/src/main/node/core/xwiki/xwiki-utils/src/xwikiGlobal.ts A xwiki-platform-core/xwiki-platform-node/src/main/node/core/xwiki/xwiki-utils/src/xwikiMeta.ts Log Message: ----------- XWIKI-24372: Implement auto-save for BlockNote realtime collaboration sessions * Move the XWikiMeta type and the typing of the global XWiki object from the BlockNote WebJar to xwiki-utils, so that the XWiki implementations of the node component roles can be moved out of the WebJar next. * Type the global XWiki object with the entity reference classes of xwiki-model-api, which the web WebJar assigns onto it, rather than with a hand written structural type that duplicated them. * Expose it as an XWikiGlobal interface that each module declares the global from, in an unpublished global.d.ts, instead of an ambient declaration crossing the package boundary. The web WebJar declares the global differently, as a writable var, and must keep being able to do so. * Adapt the call sites to Model.resolve and to the absolute* converters now returning a nullable reference, which the structural type used to hide. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> (cherry picked from commit 6823205c4dc67d58067f8044c1e886b62fb83135) Commit: b87ff6cd0e1d4f66e4327936baca122c2f7a99c4 https://github.com/xwiki/xwiki-platform/commit/b87ff6cd0e1d4f66e4327936baca1... Author: Marius Dumitru Florea <[email protected]> Date: 2026-09-16 (Wed, 16 Sep 2026) Changed paths: M pnpm-lock.yaml M pnpm-workspace.yaml M xwiki-platform-core/xwiki-platform-blocknote/xwiki-platform-blocknote-webjar/src/main/node/package.json M xwiki-platform-core/xwiki-platform-blocknote/xwiki-platform-blocknote-webjar/src/main/node/src/services/container.ts R xwiki-platform-core/xwiki-platform-blocknote/xwiki-platform-blocknote-webjar/src/main/node/src/services/model/reference/XWikiModelReferenceHandler.ts R xwiki-platform-core/xwiki-platform-blocknote/xwiki-platform-blocknote-webjar/src/main/node/src/services/model/reference/XWikiModelReferenceParser.ts R xwiki-platform-core/xwiki-platform-blocknote/xwiki-platform-blocknote-webjar/src/main/node/src/services/model/reference/XWikiModelReferenceSerializer.ts R xwiki-platform-core/xwiki-platform-blocknote/xwiki-platform-blocknote-webjar/src/main/node/src/services/model/url/XWikiRemoteURLParser.ts R xwiki-platform-core/xwiki-platform-blocknote/xwiki-platform-blocknote-webjar/src/main/node/src/services/model/url/XWikiRemoteURLSerializer.ts A xwiki-platform-core/xwiki-platform-node/src/main/node/core/model/model-reference/model-reference-xwiki/api-extractor.json A xwiki-platform-core/xwiki-platform-node/src/main/node/core/model/model-reference/model-reference-xwiki/etc/platform-model-reference-xwiki.api.md A xwiki-platform-core/xwiki-platform-node/src/main/node/core/model/model-reference/model-reference-xwiki/global.d.ts A xwiki-platform-core/xwiki-platform-node/src/main/node/core/model/model-reference/model-reference-xwiki/package.json A xwiki-platform-core/xwiki-platform-node/src/main/node/core/model/model-reference/model-reference-xwiki/src/components/XWikiModelReferenceHandler.ts A xwiki-platform-core/xwiki-platform-node/src/main/node/core/model/model-reference/model-reference-xwiki/src/components/XWikiModelReferenceParser.ts A xwiki-platform-core/xwiki-platform-node/src/main/node/core/model/model-reference/model-reference-xwiki/src/components/XWikiModelReferenceSerializer.ts A xwiki-platform-core/xwiki-platform-node/src/main/node/core/model/model-reference/model-reference-xwiki/src/components/componentsInit.ts A xwiki-platform-core/xwiki-platform-node/src/main/node/core/model/model-reference/model-reference-xwiki/src/index.ts A xwiki-platform-core/xwiki-platform-node/src/main/node/core/model/model-reference/model-reference-xwiki/tsconfig.json A xwiki-platform-core/xwiki-platform-node/src/main/node/core/model/model-reference/model-reference-xwiki/tsdoc.json A xwiki-platform-core/xwiki-platform-node/src/main/node/core/model/model-reference/model-reference-xwiki/vite.config.ts A xwiki-platform-core/xwiki-platform-node/src/main/node/core/model/model-reference/model-reference-xwiki/vitest.config.ts A xwiki-platform-core/xwiki-platform-node/src/main/node/core/model/model-remote-url/model-remote-url-xwiki/api-extractor.json A xwiki-platform-core/xwiki-platform-node/src/main/node/core/model/model-remote-url/model-remote-url-xwiki/etc/platform-model-remote-url-xwiki.api.md A xwiki-platform-core/xwiki-platform-node/src/main/node/core/model/model-remote-url/model-remote-url-xwiki/global.d.ts A xwiki-platform-core/xwiki-platform-node/src/main/node/core/model/model-remote-url/model-remote-url-xwiki/package.json A xwiki-platform-core/xwiki-platform-node/src/main/node/core/model/model-remote-url/model-remote-url-xwiki/src/components/XWikiRemoteURLParser.ts A xwiki-platform-core/xwiki-platform-node/src/main/node/core/model/model-remote-url/model-remote-url-xwiki/src/components/XWikiRemoteURLSerializer.ts A xwiki-platform-core/xwiki-platform-node/src/main/node/core/model/model-remote-url/model-remote-url-xwiki/src/components/componentsInit.ts A xwiki-platform-core/xwiki-platform-node/src/main/node/core/model/model-remote-url/model-remote-url-xwiki/src/index.ts A xwiki-platform-core/xwiki-platform-node/src/main/node/core/model/model-remote-url/model-remote-url-xwiki/tsconfig.json A xwiki-platform-core/xwiki-platform-node/src/main/node/core/model/model-remote-url/model-remote-url-xwiki/tsdoc.json A xwiki-platform-core/xwiki-platform-node/src/main/node/core/model/model-remote-url/model-remote-url-xwiki/vite.config.ts A xwiki-platform-core/xwiki-platform-node/src/main/node/core/model/model-remote-url/model-remote-url-xwiki/vitest.config.ts Log Message: ----------- XWIKI-24372: Implement auto-save for BlockNote realtime collaboration sessions * Move the XWiki implementations of the model reference and remote URL roles out of the BlockNote WebJar into model-reference-xwiki and model-remote-url-xwiki, next to the API modules defining those roles. * Register them through a ComponentInit, like the other XWiki implementation modules do, keeping the binding names and the XWiki qualifier unchanged. The implementation classes are no longer exported, so each module only exposes that ComponentInit. * Each module declares the global XWiki object from the XWikiGlobal type of xwiki-utils, in an unpublished global.d.ts. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> (cherry picked from commit a2b83eb063bce31e463fb0959aa79433be65f1ab) Commit: 5cf30d7b491cf60c86e1fdfed150c708dadf328d https://github.com/xwiki/xwiki-platform/commit/5cf30d7b491cf60c86e1fdfed150c... Author: Marius Dumitru Florea <[email protected]> Date: 2026-09-16 (Wed, 16 Sep 2026) Changed paths: M pnpm-lock.yaml M pnpm-workspace.yaml M xwiki-platform-core/xwiki-platform-blocknote/xwiki-platform-blocknote-webjar/src/main/node/package.json M xwiki-platform-core/xwiki-platform-blocknote/xwiki-platform-blocknote-webjar/src/main/node/src/services/container.ts R xwiki-platform-core/xwiki-platform-blocknote/xwiki-platform-blocknote-webjar/src/main/node/src/services/storage/XWikiStorage.ts A xwiki-platform-core/xwiki-platform-node/src/main/node/core/backends/backend-xwiki/api-extractor.json A xwiki-platform-core/xwiki-platform-node/src/main/node/core/backends/backend-xwiki/etc/platform-backend-xwiki.api.md A xwiki-platform-core/xwiki-platform-node/src/main/node/core/backends/backend-xwiki/global.d.ts A xwiki-platform-core/xwiki-platform-node/src/main/node/core/backends/backend-xwiki/package.json A xwiki-platform-core/xwiki-platform-node/src/main/node/core/backends/backend-xwiki/src/components/XWikiStorage.ts A xwiki-platform-core/xwiki-platform-node/src/main/node/core/backends/backend-xwiki/src/components/componentsInit.ts A xwiki-platform-core/xwiki-platform-node/src/main/node/core/backends/backend-xwiki/src/index.ts A xwiki-platform-core/xwiki-platform-node/src/main/node/core/backends/backend-xwiki/tsconfig.json A xwiki-platform-core/xwiki-platform-node/src/main/node/core/backends/backend-xwiki/tsdoc.json A xwiki-platform-core/xwiki-platform-node/src/main/node/core/backends/backend-xwiki/vite.config.ts A xwiki-platform-core/xwiki-platform-node/src/main/node/core/backends/backend-xwiki/vitest.config.ts Log Message: ----------- XWIKI-24372: Implement auto-save for BlockNote realtime collaboration sessions * Move the XWiki implementation of the storage role out of the BlockNote WebJar into a backend-xwiki module, next to the backend-api module defining that role. * Register it through a ComponentInit, keeping the Storage binding name and the XWiki qualifier unchanged. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> (cherry picked from commit fb7660539fb4de93addb15245f921c713ffe5510) Commit: 44a18585beabd5026d4da4f3bf6105373a440bfc https://github.com/xwiki/xwiki-platform/commit/44a18585beabd5026d4da4f3bf610... Author: Marius Dumitru Florea <[email protected]> Date: 2026-09-16 (Wed, 16 Sep 2026) Changed paths: M pnpm-lock.yaml M pnpm-workspace.yaml M xwiki-platform-core/xwiki-platform-blocknote/xwiki-platform-blocknote-webjar/src/main/node/package.json R xwiki-platform-core/xwiki-platform-blocknote/xwiki-platform-blocknote-webjar/src/main/node/src/services/authentication/XWikiAuthenticationManager.ts M xwiki-platform-core/xwiki-platform-blocknote/xwiki-platform-blocknote-webjar/src/main/node/src/services/container.ts A xwiki-platform-core/xwiki-platform-node/src/main/node/core/authentication/authentication-xwiki/api-extractor.json A xwiki-platform-core/xwiki-platform-node/src/main/node/core/authentication/authentication-xwiki/etc/platform-authentication-xwiki.api.md A xwiki-platform-core/xwiki-platform-node/src/main/node/core/authentication/authentication-xwiki/global.d.ts A xwiki-platform-core/xwiki-platform-node/src/main/node/core/authentication/authentication-xwiki/package.json A xwiki-platform-core/xwiki-platform-node/src/main/node/core/authentication/authentication-xwiki/src/components/XWikiAuthenticationManager.ts A xwiki-platform-core/xwiki-platform-node/src/main/node/core/authentication/authentication-xwiki/src/components/componentsInit.ts A xwiki-platform-core/xwiki-platform-node/src/main/node/core/authentication/authentication-xwiki/src/index.ts A xwiki-platform-core/xwiki-platform-node/src/main/node/core/authentication/authentication-xwiki/tsconfig.json A xwiki-platform-core/xwiki-platform-node/src/main/node/core/authentication/authentication-xwiki/tsdoc.json A xwiki-platform-core/xwiki-platform-node/src/main/node/core/authentication/authentication-xwiki/vite.config.ts A xwiki-platform-core/xwiki-platform-node/src/main/node/core/authentication/authentication-xwiki/vitest.config.ts Log Message: ----------- XWIKI-24372: Implement auto-save for BlockNote realtime collaboration sessions * Move the XWiki implementation of the authentication manager role out of the BlockNote WebJar into an authentication-xwiki module, next to the authentication-api module defining that role. * Register it through a ComponentInit, keeping the AuthenticationManager binding name and the XWiki qualifier unchanged. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> (cherry picked from commit 17498fbc7eb249343ce5bdc3bc52c083d8b2035e) Commit: 9803874831f2ef9e8b6e2b90b36770ef9e36e394 https://github.com/xwiki/xwiki-platform/commit/9803874831f2ef9e8b6e2b90b3677... Author: Marius Dumitru Florea <[email protected]> Date: 2026-09-16 (Wed, 16 Sep 2026) Changed paths: M pnpm-lock.yaml M pnpm-workspace.yaml M xwiki-platform-core/xwiki-platform-blocknote/xwiki-platform-blocknote-webjar/src/main/node/package.json M xwiki-platform-core/xwiki-platform-blocknote/xwiki-platform-blocknote-webjar/src/main/node/src/services/container.ts R xwiki-platform-core/xwiki-platform-blocknote/xwiki-platform-blocknote-webjar/src/main/node/src/services/document/DefaultDocumentService.ts A xwiki-platform-core/xwiki-platform-node/src/main/node/core/document/document-xwiki/api-extractor.json A xwiki-platform-core/xwiki-platform-node/src/main/node/core/document/document-xwiki/etc/platform-document-xwiki.api.md A xwiki-platform-core/xwiki-platform-node/src/main/node/core/document/document-xwiki/global.d.ts A xwiki-platform-core/xwiki-platform-node/src/main/node/core/document/document-xwiki/package.json A xwiki-platform-core/xwiki-platform-node/src/main/node/core/document/document-xwiki/src/components/XWikiDocumentService.ts A xwiki-platform-core/xwiki-platform-node/src/main/node/core/document/document-xwiki/src/components/componentsInit.ts A xwiki-platform-core/xwiki-platform-node/src/main/node/core/document/document-xwiki/src/index.ts A xwiki-platform-core/xwiki-platform-node/src/main/node/core/document/document-xwiki/tsconfig.json A xwiki-platform-core/xwiki-platform-node/src/main/node/core/document/document-xwiki/tsdoc.json A xwiki-platform-core/xwiki-platform-node/src/main/node/core/document/document-xwiki/vite.config.ts A xwiki-platform-core/xwiki-platform-node/src/main/node/core/document/document-xwiki/vitest.config.ts Log Message: ----------- XWIKI-24372: Implement auto-save for BlockNote realtime collaboration sessions * Move the XWiki implementation of the document service role out of the BlockNote WebJar into a document-xwiki module, next to the document-api module defining that role. * Rename it from DefaultDocumentService to XWikiDocumentService, since it reads the current document from the global XWiki object and is therefore specific to that backend. * Keep binding it without a qualifier: document-api has no provider dispatching that role on a backend name, and its consumers resolve it unqualified. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> (cherry picked from commit 41202449cb6990a6de8d61955574c51ebb8c08f7) Commit: 61ee79c3a76d6c8dd394d23831577f35a4d43c97 https://github.com/xwiki/xwiki-platform/commit/61ee79c3a76d6c8dd394d23831577... Author: Marius Dumitru Florea <[email protected]> Date: 2026-09-16 (Wed, 16 Sep 2026) Changed paths: M pnpm-lock.yaml M pnpm-workspace.yaml M xwiki-platform-core/xwiki-platform-blocknote/xwiki-platform-blocknote-webjar/src/main/node/package.json R xwiki-platform-core/xwiki-platform-blocknote/xwiki-platform-blocknote-webjar/src/main/node/src/services/authentication/DefaultAuthenticationManagerProvider.ts M xwiki-platform-core/xwiki-platform-blocknote/xwiki-platform-blocknote-webjar/src/main/node/src/services/container.ts M xwiki-platform-core/xwiki-platform-blocknote/xwiki-platform-blocknote-webjar/src/main/node/src/services/cristal/MinimalApp.ts R xwiki-platform-core/xwiki-platform-blocknote/xwiki-platform-blocknote-webjar/src/main/node/src/services/link/DefaultLinkSuggestServiceProvider.ts R xwiki-platform-core/xwiki-platform-blocknote/xwiki-platform-blocknote-webjar/src/main/node/src/services/model/reference/DefaultModelReferenceHandlerProvider.ts R xwiki-platform-core/xwiki-platform-blocknote/xwiki-platform-blocknote-webjar/src/main/node/src/services/model/reference/DefaultModelReferenceParserProvider.ts R xwiki-platform-core/xwiki-platform-blocknote/xwiki-platform-blocknote-webjar/src/main/node/src/services/model/reference/DefaultModelReferenceSerializerProvider.ts R xwiki-platform-core/xwiki-platform-blocknote/xwiki-platform-blocknote-webjar/src/main/node/src/services/model/url/DefaultRemoteURLParserProvider.ts R xwiki-platform-core/xwiki-platform-blocknote/xwiki-platform-blocknote-webjar/src/main/node/src/services/model/url/DefaultRemoteURLSerializerProvider.ts R xwiki-platform-core/xwiki-platform-blocknote/xwiki-platform-blocknote-webjar/src/main/node/src/services/storage/DefaultStorageProvider.ts A xwiki-platform-core/xwiki-platform-node/src/main/node/core/authentication/authentication-default/api-extractor.json A xwiki-platform-core/xwiki-platform-node/src/main/node/core/authentication/authentication-default/etc/platform-authentication-default.api.md A xwiki-platform-core/xwiki-platform-node/src/main/node/core/authentication/authentication-default/package.json A xwiki-platform-core/xwiki-platform-node/src/main/node/core/authentication/authentication-default/src/componentInit.ts A xwiki-platform-core/xwiki-platform-node/src/main/node/core/authentication/authentication-default/src/defaultAuthenticationManagerProvider.ts A xwiki-platform-core/xwiki-platform-node/src/main/node/core/authentication/authentication-default/src/index.ts A xwiki-platform-core/xwiki-platform-node/src/main/node/core/authentication/authentication-default/tsconfig.json A xwiki-platform-core/xwiki-platform-node/src/main/node/core/authentication/authentication-default/tsdoc.json A xwiki-platform-core/xwiki-platform-node/src/main/node/core/authentication/authentication-default/vite.config.ts A xwiki-platform-core/xwiki-platform-node/src/main/node/core/authentication/authentication-default/vitest.config.ts Log Message: ----------- XWIKI-24372: Implement auto-save for BlockNote realtime collaboration sessions * Drop the copies of the default providers the BlockNote WebJar had for the model reference, remote URL, storage, authentication and link suggest roles, and register the ones of the API modules instead. They resolve the same implementations, since the wiki configuration of the WebJar reports the XWiki type, and they log and return undefined rather than throwing when there is none. * Add the default authentication manager provider that was missing, in a new authentication-default module. It cannot go in authentication-api, which has to stay free of dependencies because platform-api depends on it, while the provider needs the CristalApp from platform-api. * Give the partial Cristal application of the WebJar the logger and the storage those providers read. The storage is resolved on access, since it is registered after the configuration is built. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> (cherry picked from commit 6cd9faf9a3aaf44accdb0f9b1a5e16de90b60f29) Commit: 3d6fdf1697aa0e506c4a47502e7fffe2fb20f182 https://github.com/xwiki/xwiki-platform/commit/3d6fdf1697aa0e506c4a47502e7ff... Author: Marius Dumitru Florea <[email protected]> Date: 2026-09-16 (Wed, 16 Sep 2026) Changed paths: M xwiki-platform-core/xwiki-platform-flamingo/xwiki-platform-flamingo-skin/xwiki-platform-flamingo-skin-resources/src/main/resources/flamingo/javascript.vm M xwiki-platform-core/xwiki-platform-node/src/main/node/core/document/document-xwiki/etc/platform-document-xwiki.api.md M xwiki-platform-core/xwiki-platform-node/src/main/node/core/document/document-xwiki/package.json A xwiki-platform-core/xwiki-platform-node/src/main/node/core/document/document-xwiki/src/XWikiDocument.ts A xwiki-platform-core/xwiki-platform-node/src/main/node/core/document/document-xwiki/src/__tests__/XWikiDocument.test.ts M xwiki-platform-core/xwiki-platform-node/src/main/node/core/document/document-xwiki/src/components/XWikiDocumentService.ts M xwiki-platform-core/xwiki-platform-node/src/main/node/core/document/document-xwiki/src/index.ts M xwiki-platform-core/xwiki-platform-node/src/main/node/core/xwiki/xwiki-utils/etc/platform-xwiki-utils.api.md M xwiki-platform-core/xwiki-platform-node/src/main/node/core/xwiki/xwiki-utils/src/index.ts M xwiki-platform-core/xwiki-platform-node/src/main/node/core/xwiki/xwiki-utils/src/xwikiGlobal.ts M xwiki-platform-core/xwiki-platform-node/src/main/node/core/xwiki/xwiki-utils/src/xwikiMeta.ts M xwiki-platform-core/xwiki-platform-realtime/xwiki-platform-realtime-webjar/src/main/webjar/document.js M xwiki-platform-core/xwiki-platform-realtime/xwiki-platform-realtime-webjar/src/main/webjar/loader.js M xwiki-platform-core/xwiki-platform-realtime/xwiki-platform-realtime-webjar/src/main/webjar/toolbar.js M xwiki-platform-core/xwiki-platform-realtime/xwiki-platform-realtime-wysiwyg/xwiki-platform-realtime-wysiwyg-webjar/src/main/webjar/wysiwygEditor.js M xwiki-platform-core/xwiki-platform-web/xwiki-platform-web-webjar/pom.xml M xwiki-platform-core/xwiki-platform-web/xwiki-platform-web-webjar/src/main/node/package.json A xwiki-platform-core/xwiki-platform-web/xwiki-platform-web-webjar/src/main/node/src/document.ts M xwiki-platform-core/xwiki-platform-web/xwiki-platform-web-webjar/src/main/node/vite.config.ts Log Message: ----------- XWIKI-24372: Implement auto-save for BlockNote realtime collaboration sessions * Move the generic XWiki document API out of the real-time WebJar into the document-xwiki module, rewritten in TypeScript with the unit tests it never had, leaving only the Netflux channels API behind. The saver, which is the next one to move, depends on it. * Pass the xwiki-meta module to the currentDocument() factory instead of reading it from the module scope, so that the class doesn't have to load it itself, and keep it on the instance so that a document built for another page than the current one leaves the page state alone. * Publish it as the xwiki-document RequireJS module from the web WebJar, declared in the RequireJS paths rather than loaded by a blocking script like the entity reference API, since nothing needs it before the page is parsed. It is imported through a new subpath export of document-xwiki, because the inversify decorator of XWikiDocumentService is a side effect that keeps the bundler from dropping it, and with it vue and inversify. * Take the query string parameters as a URLSearchParams rather than a plain object, which removes the toQueryString() helper and makes the repeated 'path' parameter of the channels request explicit at the call site. * Turn the getJSON() and getFieldValue() helpers into protected members, the former an instance method and the latter a static one, since that is how the real-time subclass reaches them: a module private function would stay trapped in the bundle. They are called on XWikiDocument rather than through "this" in the static factory, which is the construct the Closure Compiler mishandled. * Rename the XWikiDocument and XWikiAttachment types of xwiki-utils to LegacyXWikiDocument and LegacyXWikiAttachment, freeing the name for the class forwarding its URL computation to them, and add the getRestURL() method and the realLocale field they were missing. * Reimplement XWikiDocumentService on top of XWikiDocument, now that both live in the document-xwiki module. Verified with RealtimeWYSIWYGEditorIT (28 tests) and the BlockNote AllIT suite (39 tests, including the collaboration ones), both against a built instance so that the minified code is the one exercised. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> (cherry picked from commit fbb8b5f11d0900dbe998f155d2e6613d67aa986a) Commit: 23f9643f2f0a93246a975889a3ffc127f13d0c0d https://github.com/xwiki/xwiki-platform/commit/23f9643f2f0a93246a975889a3ffc... Author: Marius Dumitru Florea <[email protected]> Date: 2026-09-16 (Wed, 16 Sep 2026) Changed paths: M pnpm-lock.yaml M xwiki-platform-core/xwiki-platform-node/src/main/node/core/authentication/authentication-xwiki/package.json M xwiki-platform-core/xwiki-platform-node/src/main/node/core/authentication/authentication-xwiki/src/components/XWikiAuthenticationManager.ts M xwiki-platform-core/xwiki-platform-node/src/main/node/core/backends/backend-xwiki/src/components/XWikiStorage.ts M xwiki-platform-core/xwiki-platform-node/src/main/node/core/document/document-xwiki/src/components/XWikiDocumentService.ts M xwiki-platform-core/xwiki-platform-node/src/main/node/core/model/model-reference/model-reference-xwiki/package.json M xwiki-platform-core/xwiki-platform-node/src/main/node/core/model/model-reference/model-reference-xwiki/src/components/XWikiModelReferenceParser.ts M xwiki-platform-core/xwiki-platform-node/src/main/node/core/model/model-reference/model-reference-xwiki/src/components/XWikiModelReferenceSerializer.ts M xwiki-platform-core/xwiki-platform-node/src/main/node/core/model/model-remote-url/model-remote-url-xwiki/src/components/XWikiRemoteURLParser.ts M xwiki-platform-core/xwiki-platform-node/src/main/node/core/xwiki/xwiki-utils/etc/platform-xwiki-utils.api.md M xwiki-platform-core/xwiki-platform-node/src/main/node/core/xwiki/xwiki-utils/src/index.ts M xwiki-platform-core/xwiki-platform-node/src/main/node/core/xwiki/xwiki-utils/src/xwikiGlobal.ts Log Message: ----------- XWIKI-24372: Implement auto-save for BlockNote realtime collaboration sessions * Remove the entity reference API from the XWikiGlobal type definition, so that the compiler forces the node packages to import EntityReference, EntityType and Model from xwiki-model-api rather than reading them off the global XWiki object. It is the same code, since the web WebJar only assigns those very objects onto the global, but without the page load ordering dependency and without a global to stub in the unit tests. The change is type only: the global keeps every member it had at runtime, so the legacy scripts and the xwiki-entityReference RequireJS module are untouched. * Migrate the six call sites this uncovers, in document-xwiki, model-reference-xwiki, model-remote-url-xwiki, backend-xwiki and authentication-xwiki, aliasing the imports as XWikiEntityReference and XWikiEntityType where the backend agnostic types of model-api are already in scope. The XWiki.Document, XWiki.Attachment, XWiki.currentDocument, XWiki.currentWiki, XWiki.contextPath and XWiki.docsyntax uses stay: those come from the legacy xwiki.js and have no node counterpart. * Declare the save button behaviour of actionbuttons.js on the global object instead, as an optional actionButtons member typed by a new LegacyAjaxSaveAndContinue interface holding just the reloadEditor() and maybeRedirect() methods that the saver overrides. It is optional because it only exists in edit mode. The saver needs it once it moves out of the real-time WebJar. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> (cherry picked from commit c38c7bc8e3a962a0bfcc6aa50aa68e867667372d) Commit: 4e12233777d924eab7fd28175f48b5efb50f34bd https://github.com/xwiki/xwiki-platform/commit/4e12233777d924eab7fd28175f48b... Author: Marius Dumitru Florea <[email protected]> Date: 2026-09-16 (Wed, 16 Sep 2026) Changed paths: M pnpm-workspace.yaml M xwiki-platform-core/xwiki-platform-flamingo/xwiki-platform-flamingo-skin/xwiki-platform-flamingo-skin-resources/src/main/resources/flamingo/javascript.vm A xwiki-platform-core/xwiki-platform-node/src/main/node/core/autosave/autosave-api/api-extractor.json A xwiki-platform-core/xwiki-platform-node/src/main/node/core/autosave/autosave-api/etc/platform-autosave-api.api.md A xwiki-platform-core/xwiki-platform-node/src/main/node/core/autosave/autosave-api/package.json A xwiki-platform-core/xwiki-platform-node/src/main/node/core/autosave/autosave-api/src/__tests__/saver.test.ts A xwiki-platform-core/xwiki-platform-node/src/main/node/core/autosave/autosave-api/src/constants.ts A xwiki-platform-core/xwiki-platform-node/src/main/node/core/autosave/autosave-api/src/index.ts A xwiki-platform-core/xwiki-platform-node/src/main/node/core/autosave/autosave-api/src/log.ts A xwiki-platform-core/xwiki-platform-node/src/main/node/core/autosave/autosave-api/src/saveStatus.ts A xwiki-platform-core/xwiki-platform-node/src/main/node/core/autosave/autosave-api/src/saveTarget.ts A xwiki-platform-core/xwiki-platform-node/src/main/node/core/autosave/autosave-api/src/saveTransport.ts A xwiki-platform-core/xwiki-platform-node/src/main/node/core/autosave/autosave-api/src/saver.ts A xwiki-platform-core/xwiki-platform-node/src/main/node/core/autosave/autosave-api/src/saverState.ts A xwiki-platform-core/xwiki-platform-node/src/main/node/core/autosave/autosave-api/tsconfig.json A xwiki-platform-core/xwiki-platform-node/src/main/node/core/autosave/autosave-api/tsdoc.json A xwiki-platform-core/xwiki-platform-node/src/main/node/core/autosave/autosave-api/vite.config.ts A xwiki-platform-core/xwiki-platform-node/src/main/node/core/autosave/autosave-api/vitest.config.ts M xwiki-platform-core/xwiki-platform-realtime/xwiki-platform-realtime-webjar/src/main/webjar/saver.js M xwiki-platform-core/xwiki-platform-web/xwiki-platform-web-webjar/src/main/node/package.json A xwiki-platform-core/xwiki-platform-web/xwiki-platform-web-webjar/src/main/node/src/autosave.ts Log Message: ----------- XWIKI-24372: Implement auto-save for BlockNote realtime collaboration sessions * Move the generic auto-save engine out of the real-time WebJar into a new autosave-api module, rewritten in TypeScript with the unit tests it never had: the Saver that counts the local changes, elects which client saves and schedules the saves, and the SaveTransport and SaveTarget contracts it delegates to. BlockNote needs it, and it is the half of saver.js that knows about neither ChainPad nor XWiki. * Keep the module free of dependencies, which is what makes the RequireJS bundle 4 KB minified and spares it the inversify and vue side effects that forced a subpath export when the document API moved. The save status codes the editors and the toolbar compare against become a SaveStatus enum that keeps their numeric values. * Give the transport and the target a generic parameter for the save context, so that a target types the context it defines, and drop getSaveButton() from the saver: it is the edit form target that knows which button performs a given save, so the facade now asks the target for it rather than going through the engine. * Publish it as the xwiki-autosave RequireJS module from the web WebJar, declared in the RequireJS paths next to xwiki-document, since only the editors that are not bundled with it need it. * Leave the ChainPad transport in the real-time WebJar, because chainpad, chainpad-netflux, json.sortify and the crypto shim are Maven WebJars with no counterpart in the pnpm workspace. Rename the facade that composes it with the edit form target from XWikiSaver to ChainPadXWikiFormSaver, now that the composed halves are what tells the savers apart; the xwiki-realtime-saver module id and the class API are unchanged, so the editors using it are untouched. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> (cherry picked from commit bf2a93c532d2af14f836cf8b0d2ebfc3409aa1bc) Commit: b0540c07057fe3f5d09dd3711de1212a124ef4e0 https://github.com/xwiki/xwiki-platform/commit/b0540c07057fe3f5d09dd3711de12... Author: Marius Dumitru Florea <[email protected]> Date: 2026-09-16 (Wed, 16 Sep 2026) Changed paths: M pnpm-workspace.yaml M xwiki-platform-core/xwiki-platform-node/src/main/node/core/autosave/autosave-api/etc/platform-autosave-api.api.md A xwiki-platform-core/xwiki-platform-node/src/main/node/core/autosave/autosave-xwiki/api-extractor.json A xwiki-platform-core/xwiki-platform-node/src/main/node/core/autosave/autosave-xwiki/etc/platform-autosave-xwiki.api.md A xwiki-platform-core/xwiki-platform-node/src/main/node/core/autosave/autosave-xwiki/global.d.ts A xwiki-platform-core/xwiki-platform-node/src/main/node/core/autosave/autosave-xwiki/package.json A xwiki-platform-core/xwiki-platform-node/src/main/node/core/autosave/autosave-xwiki/src/XWikiFormSaveTarget.ts A xwiki-platform-core/xwiki-platform-node/src/main/node/core/autosave/autosave-xwiki/src/__tests__/XWikiFormSaveTarget.test.ts A xwiki-platform-core/xwiki-platform-node/src/main/node/core/autosave/autosave-xwiki/src/index.ts A xwiki-platform-core/xwiki-platform-node/src/main/node/core/autosave/autosave-xwiki/src/log.ts A xwiki-platform-core/xwiki-platform-node/src/main/node/core/autosave/autosave-xwiki/src/types.ts A xwiki-platform-core/xwiki-platform-node/src/main/node/core/autosave/autosave-xwiki/tsconfig.json A xwiki-platform-core/xwiki-platform-node/src/main/node/core/autosave/autosave-xwiki/tsdoc.json A xwiki-platform-core/xwiki-platform-node/src/main/node/core/autosave/autosave-xwiki/vite.config.ts A xwiki-platform-core/xwiki-platform-node/src/main/node/core/autosave/autosave-xwiki/vitest.config.ts M xwiki-platform-core/xwiki-platform-realtime/xwiki-platform-realtime-webjar/src/main/webjar/saver.js M xwiki-platform-core/xwiki-platform-web/xwiki-platform-web-webjar/src/main/node/package.json M xwiki-platform-core/xwiki-platform-web/xwiki-platform-web-webjar/src/main/node/src/autosave.ts M xwiki-platform-core/xwiki-platform-web/xwiki-platform-web-webjar/src/main/node/vite.config.ts Log Message: ----------- XWIKI-24372: Implement auto-save for BlockNote realtime collaboration sessions * Move the XWiki edit form save target out of the real-time WebJar into a new autosave-xwiki module, rewritten in TypeScript with unit tests, so that BlockNote reuses it rather than growing a second copy: its standalone and in-place editing go through the same edit form and the same xwiki:actions:beforeSave event. It works with any transport, so the same target serves a ChainPad and a Yjs session. * Take the edited document as a constructor argument instead of reading the real-time document singleton, and take the auto-save version summary as an already translated string, which keeps the module free of any localization dependency. The caller passes what it already has. * Load jQuery through loadById() of xwiki-utils, still on demand, and reach the model API by importing Model and EntityType rather than through the global XWiki object, which is what makes the target unit-testable without a stubbed global. * Externalize the model API in the web WebJar bundles, mapping it to the XWiki global that entityReference.js publishes on every page, instead of shipping a second copy of the resolver and the serializer in every bundle built there. The xwiki-autosave module declares xwiki-entityReference as a RequireJS dependency accordingly. The rule is written once in the Vite configuration, since it applies to every entry point added next to these. * Reduce saver.js to the ChainPad transport and the facade composing it, 1035 lines down to 253. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> (cherry picked from commit 92d9ce4b61b4f188014cfbf79a5ed4aaf5699edf) Commit: e17810534b76ee7aae2d6bba4cd1098dc45511d7 https://github.com/xwiki/xwiki-platform/commit/e17810534b76ee7aae2d6bba4cd10... Author: Marius Dumitru Florea <[email protected]> Date: 2026-09-16 (Wed, 16 Sep 2026) Changed paths: M xwiki-platform-core/xwiki-platform-blocknote/xwiki-platform-blocknote-webjar/src/main/node/src/components/XWikiBlockNote.vue M xwiki-platform-core/xwiki-platform-blocknote/xwiki-platform-blocknote-webjar/src/main/node/src/services/Logic.test.js M xwiki-platform-core/xwiki-platform-blocknote/xwiki-platform-blocknote-webjar/src/main/node/src/services/image/DefaultImageWizard.ts Log Message: ----------- XWIKI-24372: Implement auto-save for BlockNote realtime collaboration sessions * Migrate the three call sites of the BlockNote WebJar that were still reading the entity reference API off the global XWiki object, which the tightened XWikiGlobal type no longer declares. They were missed because the node packages of the WebJars live outside the xwiki-platform-node monorepo and are type checked by their own Maven build rather than by its typecheck target. * Give the Logic unit test a real document reference, since the code under test now serializes it with the real model API rather than with the stub the test installed on the global object. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> (cherry picked from commit 643b8a49283fe782d134c87e06f1749d78ac76b7) Commit: 44acb0341ac75f155634cdaccf108ff1ccf339bc https://github.com/xwiki/xwiki-platform/commit/44acb0341ac75f155634cdaccf108... Author: Marius Dumitru Florea <[email protected]> Date: 2026-09-16 (Wed, 16 Sep 2026) Changed paths: M xwiki-platform-core/xwiki-platform-node/src/main/node/core/autosave/autosave-api/etc/platform-autosave-api.api.md M xwiki-platform-core/xwiki-platform-node/src/main/node/core/autosave/autosave-api/package.json R xwiki-platform-core/xwiki-platform-node/src/main/node/core/autosave/autosave-api/src/log.ts M xwiki-platform-core/xwiki-platform-node/src/main/node/core/autosave/autosave-api/src/saver.ts M xwiki-platform-core/xwiki-platform-node/src/main/node/core/autosave/autosave-xwiki/etc/platform-autosave-xwiki.api.md M xwiki-platform-core/xwiki-platform-node/src/main/node/core/autosave/autosave-xwiki/package.json M xwiki-platform-core/xwiki-platform-node/src/main/node/core/autosave/autosave-xwiki/src/XWikiFormSaveTarget.ts R xwiki-platform-core/xwiki-platform-node/src/main/node/core/autosave/autosave-xwiki/src/log.ts M xwiki-platform-core/xwiki-platform-node/src/main/node/core/xwiki/xwiki-utils/src/xwikiGlobal.ts M xwiki-platform-core/xwiki-platform-realtime/xwiki-platform-realtime-webjar/src/main/webjar/saver.js Log Message: ----------- XWIKI-24372: Implement auto-save for BlockNote realtime collaboration sessions * Report what the saver and the edit form target do through the Logger role of the component API rather than through a logging helper of their own, taking it from their configuration so that the caller passes the logger it resolved from the component manager, with the module name it wants the messages attributed to. * Import the role as a type only, and keep it optional. Importing DefaultLogger instead would pull inversify into the xwiki-autosave RequireJS bundle through the platform-api barrel, taking it from 9.7 to 110.7 KB minified, and a subpath export would not help since inversify is the bulk of it. The built ESM has no platform-api import and the bundle is unchanged in size. * Pass a console backed implementation of the role from the real-time WebJar, which has no component container to resolve the default one from. It replaces the logging helpers that file already had. * Say what reloadEditor() is really for in the XWikiGlobal type: the merge of concurrent changes happens server side, so after a save that resolved a merge conflict the editor has no way of knowing the merged content and has to fetch it back. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> (cherry picked from commit 3b5717097a87ff55e286601c9ac6a2bedc7b0430) Commit: 3da5bf66a9ee16cde452919a8079e405fbe802f6 https://github.com/xwiki/xwiki-platform/commit/3da5bf66a9ee16cde452919a8079e... Author: Marius Dumitru Florea <[email protected]> Date: 2026-09-16 (Wed, 16 Sep 2026) Changed paths: M pnpm-lock.yaml M xwiki-platform-core/xwiki-platform-blocknote/xwiki-platform-blocknote-test/xwiki-platform-blocknote-test-docker/src/test/it/org/xwiki/blocknote/test/ui/AllIT.java A xwiki-platform-core/xwiki-platform-blocknote/xwiki-platform-blocknote-test/xwiki-platform-blocknote-test-docker/src/test/it/org/xwiki/blocknote/test/ui/AutoSaveIT.java M xwiki-platform-core/xwiki-platform-blocknote/xwiki-platform-blocknote-webjar/src/main/node/package.json M xwiki-platform-core/xwiki-platform-blocknote/xwiki-platform-blocknote-webjar/src/main/node/src/components/XWikiBlockNote.vue A xwiki-platform-core/xwiki-platform-blocknote/xwiki-platform-blocknote-webjar/src/main/node/src/services/autosave.ts M xwiki-platform-core/xwiki-platform-blocknote/xwiki-platform-blocknote-webjar/src/main/node/src/services/i18nResolver.ts M xwiki-platform-core/xwiki-platform-blocknote/xwiki-platform-blocknote-webjar/src/main/resources/ApplicationResources.properties M xwiki-platform-core/xwiki-platform-node/src/main/node/core/collaboration/collaboration-api/etc/platform-collaboration-api.api.md M xwiki-platform-core/xwiki-platform-node/src/main/node/core/collaboration/collaboration-api/package.json A xwiki-platform-core/xwiki-platform-node/src/main/node/core/collaboration/collaboration-api/src/__tests__/yjsAwarenessSaveTransport.test.ts M xwiki-platform-core/xwiki-platform-node/src/main/node/core/collaboration/collaboration-api/src/abstractCollaborationManager.ts M xwiki-platform-core/xwiki-platform-node/src/main/node/core/collaboration/collaboration-api/src/collaboration.ts M xwiki-platform-core/xwiki-platform-node/src/main/node/core/collaboration/collaboration-api/src/index.ts A xwiki-platform-core/xwiki-platform-node/src/main/node/core/collaboration/collaboration-api/src/yjsAwarenessSaveTransport.ts M xwiki-platform-core/xwiki-platform-node/src/main/node/core/collaboration/collaboration-xwiki/package.json M xwiki-platform-core/xwiki-platform-node/src/main/node/core/collaboration/collaboration-xwiki/src/xwikiProviderWebSocket.ts M xwiki-platform-core/xwiki-platform-node/src/main/node/editors/blocknote-headless/etc/platform-editors-blocknote-headless.api.md M xwiki-platform-core/xwiki-platform-node/src/main/node/editors/blocknote-headless/src/vue/c-blocknote-view.vue Log Message: ----------- XWIKI-24372: Implement auto-save for BlockNote realtime collaboration sessions * Add the Yjs transport that was the missing half of this issue, replicating the saver states over the awareness of the collaboration session rather than over the shared document. The Yjs WebSocket end-point treats every document update as a content change by its sender and makes that sender the effective script author of the room, so publishing a save status through the document would silently rewrite the effective author. Awareness also drops the state of a client as soon as it disconnects, which is exactly the notion of "still taking part in the editing session" that the saver needs, so the connection check is left to the default one. * Carry the auto-saver on the collaboration session itself, so that the editors of a form share the one saver the form needs, and let the collaboration manager stop it when the last of them leaves. The manager already counts the joins and the leaves, so it is the only one that knows when the session is really over, and stopping the saver there happens while the connection is still up, which is what lets it tell the other collaborators what it leaves unsaved. * Take the local changes from the editor rather than from the shared document. The first client joining a session loads the initial content into that document, which is a local Yjs change just like typing is, so counting the document updates auto-saved a document that nobody had edited. The editor can tell the two apart, because the initial content reaches it through the Yjs synchronization plugin, so the headless component publishes the subset of instant-change caused by the local user as local-instant-change. Fix the comment of instant-change accordingly: it never was local only, and it must stay that way because it is what invalidates the serialized content that a save submits. * Notify the awareness listeners when the server reports that a client left the room, by going through the awareness protocol instead of dropping the entry from the map, which also keeps the awareness meta data consistent. * Compose the saver with the edit form save target in the BlockNote WebJar, giving it a logger of its own rather than the one bound in the container, which is a singleton whose module name would otherwise be rewritten for every other component. * Rename the translation keys to drop the platform prefix, which the localization query of this module doesn't use, so that they can be resolved at all, and declare them in that query rather than fetching one of them apart. Drop the key syntax header, which was copied from another module, still described icon localization, and documented a convention this bundle doesn't follow. * Cover the transport with unit tests and the auto-save with functional tests, one of which joins a session, types nothing and waits out the save interval: the tests that type would not have caught the initial content load being counted as an edit. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> (cherry picked from commit 4d8af8f4f90e277cdcd5bd41f6901d310107eea4) Commit: 92fd2fb6906808c8217b974f6c416c750c137e9b https://github.com/xwiki/xwiki-platform/commit/92fd2fb6906808c8217b974f6c416... Author: Marius Dumitru Florea <[email protected]> Date: 2026-09-16 (Wed, 16 Sep 2026) Changed paths: M xwiki-platform-core/xwiki-platform-blocknote/xwiki-platform-blocknote-test/xwiki-platform-blocknote-test-docker/src/test/it/org/xwiki/blocknote/test/ui/AutoSaveIT.java M xwiki-platform-core/xwiki-platform-blocknote/xwiki-platform-blocknote-test/xwiki-platform-blocknote-test-pageobjects/src/main/java/org/xwiki/blocknote/test/po/BlockNoteEditor.java M xwiki-platform-core/xwiki-platform-node/src/main/node/core/autosave/autosave-api/etc/platform-autosave-api.api.md M xwiki-platform-core/xwiki-platform-node/src/main/node/core/autosave/autosave-api/src/__tests__/saver.test.ts M xwiki-platform-core/xwiki-platform-node/src/main/node/core/autosave/autosave-api/src/constants.ts M xwiki-platform-core/xwiki-platform-node/src/main/node/core/autosave/autosave-api/src/saveTarget.ts M xwiki-platform-core/xwiki-platform-node/src/main/node/core/autosave/autosave-api/src/saver.ts M xwiki-platform-core/xwiki-platform-node/src/main/node/core/autosave/autosave-xwiki/etc/platform-autosave-xwiki.api.md M xwiki-platform-core/xwiki-platform-node/src/main/node/core/autosave/autosave-xwiki/src/XWikiFormSaveTarget.ts M xwiki-platform-core/xwiki-platform-node/src/main/node/core/autosave/autosave-xwiki/src/__tests__/XWikiFormSaveTarget.test.ts Log Message: ----------- XWIKI-24372: Implement auto-save for BlockNote realtime collaboration sessions * Allow the save target to specify the interval between two consecutive auto-saves, through a new SaveTarget getSaveInterval() hook, falling back on the default when it doesn't. * Read that interval in XWikiFormSaveTarget from the data-auto-save-interval attribute of the edit form, expressed in seconds. The value is read each time a save is scheduled, so it can be set after the editor has loaded. * Compute the random amount added to the save interval as a fraction of it, rather than as a fixed number of milliseconds, so that it stays proportionate when the interval is shortened. * Add a setAutoSaveInterval() method to the BlockNoteEditor page object, resolving the edit form through the value input, which is nested in it when editing standalone and associated with it when editing in-place. * Make AutoSaveIT use a five second interval instead of the default minute, and derive its timeouts from it. * Check that a single version is created in AutoSaveIT by watching the document rather than the save notification: the client that becomes dirty first is the one that wins the save election, so the notification of the legitimate save was still displayed in the tab the assertion was watching. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> (cherry picked from commit 4e309a2b7e08e52e4f96a5b2d486212009c9e441) Commit: e3a8187f90665049305c5d6deed0605423f0738d https://github.com/xwiki/xwiki-platform/commit/e3a8187f90665049305c5d6deed06... Author: Marius Dumitru Florea <[email protected]> Date: 2026-09-16 (Wed, 16 Sep 2026) Changed paths: M pnpm-lock.yaml Log Message: ----------- XWIKI-24372: Implement auto-save for BlockNote realtime collaboration sessions * Regenerate pnpm-lock.yaml for the modules added by this backport, against the dependency catalog of this branch. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Compare: https://github.com/xwiki/xwiki-platform/compare/43ec798756f9...e3a8187f9066 To unsubscribe from these emails, change your notification settings at https://github.com/xwiki/xwiki-platform/settings/notifications
participants (1)
-
XWiki Notifications