Skip to content

refactor: plugin libs#12395

Merged
tiensonqin merged 56 commits intomasterfrom
refactor/libs
Apr 14, 2026
Merged

refactor: plugin libs#12395
tiensonqin merged 56 commits intomasterfrom
refactor/libs

Conversation

@xyhp915
Copy link
Copy Markdown
Collaborator

@xyhp915 xyhp915 commented Feb 16, 2026

No description provided.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request refactors the plugin library infrastructure and adds new experimental features for hosted/sidebar renderers. The main changes include:

Purpose: Refactor plugin communication library (Postmate) to support MessageChannel for improved performance, add support for hosted/sidebar renderers in plugins, add new debug APIs, and consolidate helper functions.

Changes:

  • Added MessageChannel support to Postmate for optimized plugin-host communication with backward compatibility
  • Introduced hosted renderer and sidebar renderer APIs for plugins to register custom UI components
  • Added new app APIs: get_current_route, export_debug_log_db, reset_debug_log_db
  • Refactored helper functions from helpers.ts to common.ts and updated all import paths
  • Extended block property APIs to include class properties with default values
  • Added comprehensive documentation for experiments APIs and plugin development
  • Added E2E test for plugin marketplace installation
  • Version bump from 0.2.12 to 0.3.1

Reviewed changes

Copilot reviewed 22 out of 22 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
libs/src/postmate/index.ts Major refactor adding MessageChannel support for efficient parent-child communication, timeout handling, and TypeScript improvements
libs/src/modules/LSPlugin.Experiments.ts Added registerHostedRenderer and registerSidebarRenderer APIs for custom plugin UI
libs/src/common.ts Renamed from helpers, removed unused setupIframeSandbox function, added type annotations
libs/src/LSPlugin.caller.ts Updated imports, added _syncGCTimer management, enabled MessageChannel by default, improved cleanup
libs/package.json Version bump to 0.3.1 reflecting new features and MessageChannel optimization
src/main/logseq/api/editor.cljs Enhanced block property retrieval to include class default properties; contains typo in namespace alias
src/main/logseq/api/app.cljs Added three new API functions for route access and debug logging
src/main/frontend/handler/plugin.cljs Added hosted renderer registration and resolution, sidebar renderer support
src/main/frontend/components/right_sidebar.cljs Added :plugin case for rendering plugin-provided sidebar content
src/main/frontend/components/plugins.cljs Added renderer-container and renderer-resolver components for hosted renderers
src/main/frontend/components/page.cljs Added is-today-page class for today's journal page
libs/development-notes/*.md Added comprehensive documentation for starter guide and experiments API
clj-e2e/test/logseq/e2e/plugins_marketplace_test.clj New E2E test for marketplace plugin installation flow

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/main/logseq/api/editor.cljs Outdated
Comment thread src/main/logseq/api/editor.cljs Outdated
Comment thread clj-e2e/test/logseq/e2e/plugins_marketplace_test.clj
@tiensonqin tiensonqin merged commit a954836 into master Apr 14, 2026
8 of 9 checks passed
@tiensonqin tiensonqin deleted the refactor/libs branch April 14, 2026 06:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants