Skip to content

V2#11

Closed
fiws wants to merge 20 commits intomainfrom
v2
Closed

V2#11
fiws wants to merge 20 commits intomainfrom
v2

Conversation

@fiws
Copy link
Owner

@fiws fiws commented Mar 14, 2026

No description provided.

@fiws fiws self-assigned this Mar 14, 2026
@gemini-code-assist
Copy link

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request represents a significant architectural overhaul, transitioning the effect-libreoffice library to a self-contained, WebAssembly-powered document conversion solution. This change dramatically simplifies deployment by removing external LibreOffice dependencies and introduces a new microservice for robust API-driven conversions. The project structure has been modernized into a monorepo, enhancing organization and scalability for future development.

Highlights

  • Core Conversion Engine Shift: The primary document conversion mechanism has been fundamentally changed from relying on external LibreOffice CLI commands or Uno servers to an embedded WebAssembly (WASM) based solution using @matbee/libreoffice-converter. This eliminates the need for local LibreOffice installations or external server dependencies.
  • Project Structure Refactor: The repository has been reorganized into a pnpm monorepo workspace, introducing dedicated packages/ for reusable libraries and apps/ for applications like the new conversion microservice. This improves modularity and maintainability.
  • New Microservice Implementation: A new apps/server application has been added, providing a standalone HTTP API for document conversion. This microservice leverages the new WASM-based LibreOffice engine and includes its own Dockerfile for easy deployment.
  • Enhanced Conversion API: The Conversion API within the effect-libreoffice package has been extended with fromUrl and toUrl methods, allowing conversions directly from and to remote URLs, further increasing flexibility.
  • Documentation and Build Tooling Updates: The README.md and AGENTS.md files have been thoroughly updated to reflect the new WASM-centric approach, installation instructions, and usage examples. Build configurations (tsconfig.json, vitest.config.ts, typedoc.json, biome.json) have been adjusted for the monorepo and new dependencies.
  • Removal of Legacy Components: All previous implementations related to LibreOffice CLI and Uno server (including Dockerfiles, compose files, benchmark scripts, and Uno-specific client/server logic) have been removed, streamlining the codebase significantly.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Changelog
  • .dockerignore
    • Added new ignore patterns for build artifacts and development tools.
  • AGENTS.md
    • Updated the linting command from biome check --apply . to biome check --write ..
    • Removed the 'Docker / Integration Tests' section, as external Docker dependencies are no longer central to the core library.
  • Dockerfile
    • Removed the Dockerfile for the Alpine-based unoserver image.
  • README.md
    • Updated the project description to reflect the new WebAssembly-based conversion approach.
    • Replaced the 'Implementations' and 'Comparison' sections with an 'Overview' detailing the WASM engine's benefits.
    • Revised installation instructions to include @matbee/libreoffice-converter.
    • Updated usage examples for the functional API and direct service usage to align with the new WASM-based LibreOffice.layer.
    • Removed all sections related to CLI, Uno server (start and remote), and Docker/Integration tests.
    • Added a new 'Available Service Methods' section listing the WASM-based operations.
  • apps/server/Dockerfile
    • Added a new multi-stage Dockerfile for building and running the effect-libreoffice server application.
  • apps/server/package.json
    • Added a new package.json for the @effect-libreoffice/server application, defining its dependencies and scripts.
  • apps/server/src/index.ts
    • Added new API routes for document conversion (convert, convertUrl) and health management (health).
    • Implemented Conversion.fromUrl and Conversion.toUrl for URL-based conversions.
    • Integrated API documentation generation and a root redirect to /docs.
  • apps/server/src/server.ts
    • Renamed from src/microservice/server.ts.
    • Updated the server to use the new LibreOffice.layer and NodeHttpClient.layerUndici for WASM-based conversions.
  • biome.json
    • Updated the Biome JSON schema version from 2.4.4 to 2.3.15.
  • compose.yml
    • Removed the Docker Compose file that defined unoserver services.
  • docker/ubuntu.Dockerfile
    • Removed the Dockerfile for the Ubuntu-based LibreOffice image.
  • examples/cloud-run/compose.yml
    • Removed the Docker Compose file for Cloud Run examples.
  • examples/cloud-run/uno.Dockerfile
    • Removed the Dockerfile for the Cloud Run Uno server example.
  • package.json
    • Transformed into a pnpm workspace root package.json.
    • Removed specific effect-libreoffice metadata (description, author, license, homepage, repository, bugs, exports, files, keywords, dependencies, peerDependencies, peerDependenciesMeta, types).
    • Updated name to effect-libreoffice-workspace and private to true.
    • Modified build script to run pnpm -r build.
    • Updated @effect/language-service and vitest dev dependency versions.
    • Removed fast-xml-parser and zetajs dev dependencies.
  • packages/api/package.json
    • Added a new package.json for the @effect-libreoffice/api package, defining its metadata, scripts, and dependencies.
  • packages/api/src/client.ts
    • Renamed from src/microservice/client.ts.
  • packages/api/src/domain.ts
    • Renamed from src/microservice/domain.ts.
    • Removed ConversionError and replaced its usage with LibreOffice.LibreOfficeError.
    • Added ConvertUrlPayload schema for URL-based conversion requests.
    • Extended ConversionApi with a new convertUrl endpoint.
  • packages/api/src/index.ts
    • Added a new index file to export modules from the @effect-libreoffice/api package.
  • packages/effect-libreoffice/package.json
    • Added a new package.json for the effect-libreoffice core library, defining its metadata, scripts, and peer dependencies.
  • packages/effect-libreoffice/src/Conversion.test.ts
    • Renamed from src/Conversion.test.ts.
    • Updated TestLive layer to use LibreOffice.layer and FetchHttpClient.layer.
    • Modified a test case to assert on LibreOfficeError message instead of direct string for stream failure.
  • packages/effect-libreoffice/src/Conversion.ts
    • Renamed from src/Conversion.ts.
    • Added fromUrl function to create conversion pipelines from URLs.
    • Introduced resolveInputData to handle input from files, streams, buffers, and URLs.
    • Updated toFile to use the new LibreOffice.LibreOffice service and handle input resolution.
    • Added toUrl function to convert and upload results to a URL.
    • Updated toStream to directly use the LibreOffice.LibreOffice service for in-memory conversion.
  • packages/effect-libreoffice/src/index.test.ts
    • Added a new test file for the WASM-based LibreOffice service, including tests for conversion, parallel conversions, and error handling.
  • packages/effect-libreoffice/src/index.ts
    • Added a new index file to export Conversion and LibreOffice modules.
  • packages/effect-libreoffice/src/libreoffice.ts
    • Added a new file defining the LibreOffice service interface, LibreOfficeError schema, and a layer for the WASM-based implementation.
  • packages/effect-libreoffice/src/shared.ts
    • Renamed from src/shared.ts.
  • packages/effect-libreoffice/src/wasm.test.ts
    • Renamed from src/wasm.test.ts.
    • Updated tests to use the new LibreOffice service instead of LibreOfficeWasm.
  • packages/effect-libreoffice/src/wasm.ts
    • Added a new file implementing the WASM-based LibreOffice converter using @matbee/libreoffice-converter/server.
    • Includes error mapping from @matbee/libreoffice-converter errors to LibreOfficeError.
  • pnpm-lock.yaml
    • Updated to reflect changes in dependencies, new workspace packages, and removal of old dependencies.
    • Updated various package versions, including @effect/language-service, @matbee/libreoffice-converter, vitest, esbuild, docker-compose, msgpackr, postcss, pump, rolldown-plugin-dts, rolldown, std-env, tar-fs, tar-stream, tinyexec, tinyrainbow, undici, and unrun.
    • Removed fast-xml-parser and fast-xml-builder related entries.
  • pnpm-workspace.yaml
    • Added a new workspace configuration file to define the monorepo structure.
  • src/benchmark.bench.ts
    • Removed the benchmark test file.
  • src/cli.ts
    • Removed the CLI utility file.
  • src/index.test.ts
    • Removed the old core library test file.
  • src/index.ts
    • Removed the old core library index file.
  • src/microservice/index.ts
    • Removed the old microservice index file.
  • src/ubuntu-docker.test.ts
    • Removed the Ubuntu Docker integration test file.
  • src/uno/schema-utils.test.ts
    • Removed the Uno schema utility test file.
  • src/uno/schema-utils.ts
    • Removed the Uno schema utility file.
  • src/uno/uno-response.ts
    • Removed the Uno response schema file.
  • src/uno/uno.test.ts
    • Removed the Uno integration test file.
  • src/uno/uno.ts
    • Removed the Uno client and server implementation file.
  • src/uno/xml-parser.ts
    • Removed the XML parser utility file.
  • tsconfig.json
    • Updated noEmit to true.
    • Added paths aliases for effect-libreoffice and @effect-libreoffice/api to point to their new monorepo locations.
    • Updated include paths to cover packages/*/src and apps/*/src.
  • tsconfig.tsbuildinfo
    • Added a new TypeScript build info file.
  • typedoc.json
    • Updated entryPoints to include the new effect-libreoffice and @effect-libreoffice/api packages.
  • vitest.config.ts
    • Updated include and includeSource patterns to match the new monorepo structure.
    • Updated alias configurations for effect-libreoffice and @effect-libreoffice/api.
Ignored Files
  • Ignored by pattern: .github/workflows/** (2)
    • .github/workflows/docker-publish.yml
    • .github/workflows/publish.yml
Activity
  • No human activity has been recorded on this pull request yet.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request significantly refactors the effect-libreoffice library to utilize a WebAssembly (WASM) based LibreOffice converter, replacing previous CLI and Uno server implementations. Key changes include updating documentation, removing Docker-related files, and introducing new API routes for URL-based conversions. Review comments highlight a critical Dockerfile misconfiguration (missing build step, incorrect CMD), suggest simplifying context propagation in the server, recommend more specific error handling to avoid losing information, and advise using a more precise error code for WASM converter load failures.

@fiws fiws force-pushed the v2 branch 6 times, most recently from ccb19ed to 1134062 Compare March 14, 2026 12:02
@fiws fiws force-pushed the v2 branch 2 times, most recently from abeca18 to 7452795 Compare March 14, 2026 20:11
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.

1 participant