Reduce notebook plugin release size by externalizing heavy runtime assets #300
Labels
No labels
abandoned
active
audit
blocked
data-safety
difficulty:easy
difficulty:hard
difficulty:high
difficulty:medium
docs
done
duplicate
notebook-v0
open
priority:high
ready
release-critical
safe-mode
spec
spec-backlog
subsystem:api
subsystem:backlog
subsystem:bases
subsystem:ci
subsystem:command
subsystem:configuration
subsystem:consolidate
subsystem:dependencies
subsystem:desktop-electron
subsystem:diffmerge
subsystem:docker
subsystem:docs
subsystem:fuzzy
subsystem:graph
subsystem:hotkeys
subsystem:lapis
subsystem:maint
subsystem:maintenance
subsystem:markdown
subsystem:markdown-lint
subsystem:md018
subsystem:notebook
subsystem:notifications
subsystem:opfs
subsystem:package
subsystem:plugin-markdown
subsystem:plugin-tasks
subsystem:plugins
subsystem:registry
subsystem:release
subsystem:renovate
subsystem:restore
subsystem:scripts
subsystem:search
subsystem:settings
subsystem:spec
subsystem:tasks
subsystem:testing
subsystem:ui
subsystem:web
subsystem:workspace
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
lapis-notes/lapis#300
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Notebook official release artifacts are currently oversized (about 600MB zip), dominated by duplicated generated bundles and inlined DuckDB worker/WASM payloads that are embedded as base64 data URLs across multiple output variants. This makes release publishing heavy and slows install/update paths for the official notebook plugin.
Problem
The current notebook packaging path stages the full plugin dist output and publishes all generated files. For notebook, this includes very large chunks where DuckDB binaries/workers are inlined and repeated across UMD/ES/CJS outputs. The result is a release payload far larger than expected for an on-demand plugin.
Goal
Reduce notebook official release payload substantially by eliminating duplicate heavy blobs from the default package and moving heavyweight runtime assets to verified on-demand downloads, while keeping notebook behavior reliable on both web/PWA and desktop Electron.
Scope
Non-goals
Acceptance Criteria
Implementation Notes
release-artifacts/official-plugin-assets/forgejo-assets/lapis-notebook-2026.6.1-artifact.jsonreports a 633331962-byte notebook zip.lapis-notebook-2026.6.1-release.jsonincludes very large files such asmain.umd.js,notebook-duckdb-service-*.{js,cjs}, and duplicated notebook runtime workers.scripts/publish-official-plugin-assets.mjs(stageReleaseInput)scripts/plugin-release.mjs(release file enumeration/signing)@lapis-notes/notebook-duckdb-assetsand should keep that boundary while changing payload source strategy.Suggested Files or Specs To Inspect
packages/notebook/vite.config.tspackages/notebook/duckdb-assets/src/assets.tspackages/notebook/src/lib/runtime/duckdb/notebook-duckdb-service.tsscripts/publish-official-plugin-assets.mjsscripts/plugin-release.mjspackages/api/src/lib/plugin-distribution/installer.tspackages/api/src/lib/plugin-asset-server.tsspec/src/20-packages/plugins/notebook/index.mdspec/src/20-packages/notebook-duckdb-assets/index.mdspec/src/30-cross-package-contracts/plugin-registry.mdValidation Commands
pnpm --filter @lapis-notes/notebook check:allpnpm --filter @lapis-notes/api check:all(if API/plugin-distribution paths change)pnpm check:all(final cross-package handoff)pnpm registry-assets:publish -- --plugins lapis-notebook --dry-run(size/regression check)Related Issues
Follow-up Tasks
Implementation Summary
Externalized notebook DuckDB wasm/workers to dist/duckdb/, dropped UMD output, marked heavy runtime files optional in signed releases, skip optional files on install, added ensureReleaseFiles() for verified on-demand download before first SQL execution, and wired notebook worker/host lazy asset loading. Dry-run publish: required install payload ~45MB (max chunk ~22MB) vs prior 100MB+ required chunks; optional lazy assets ~734MB fetched on demand. Validated notebook/api check:all+tests and registry-assets dry-run.