Skip to content

feat(apps): LibreOffice as a shipped computer app, opening Office files by type through its server (FD-5705) - #655

Closed
earakely-scale wants to merge 9 commits into
mainfrom
edgararakelyan/fd-5705-hb3-libreoffice-on-linux-computers
Closed

earakely-scale wants to merge 9 commits into
mainfrom
edgararakelyan/fd-5705-hb3-libreoffice-on-linux-computers

Conversation

@earakely-scale

@earakely-scale earakely-scale commented Nov 12, 2026 •

Copy link
Copy Markdown
Collaborator

What

A new shipped bundle, apps, with its first computer app, libreoffice. It's a computer_app env with Writer, Impress and Calc for an X11 Linux desktop on amd64 and arm64. There's also a new example, office: a computer env of ubuntu-24.04, reference and libreoffice, with a probe task and an agent task. In the agent task, Claude Code writes a .docx memo and a two-slide .pptx whose second slide has an entrance animation, and a verifier reads both files inside the computer.

How

  • Packages: Writer, Impress and Calc from Ubuntu's apt with the GTK3 interface, plus Carlito, Caladea and Liberation 2, the fonts with Office's metrics, so Office files keep their layout.
  • Unattended: an install step writes agentenv.xcd into /etc/libreoffice/registry, a configuration layer under the user's profile. It turns off the tip of the day, the first-run and new-version bars, the "Get involved" and donation bars, the "Keep current format?" question on save, lock files beside documents, and document recovery after the app is stopped. The layer is an .xcd because .xcu files in that folder aren't read. Locks are turned off by UseLocking; the two file-locking keys alone didn't stop the .~lock.*# files.
  • One copy, started by its server: LibreOffice runs one copy per user and hands later invocations to it. The app launches on demand through its server (soffice --nologo, the Start Center), ready once a libreoffice window shows, and the server stops it by process group. So every launcher on the computer goes through the server: the install step copies each LibreOffice desktop entry into /usr/local/share/applications, which takes precedence, with Exec pointed at open.py. open.py never runs soffice itself. It leaves the files it opens in a request file beside the app's server and asks the server to launch the app. The server's launch hands the files to the running copy. That launch takes the data plane's turn, the same one a load or a reset holds from stop to relaunch, so neither can stop LibreOffice between the running check and the handoff. With no copy running, the launch starts one, and open.py launches again once it's ready. A copy started outside the server would survive a load or a reset.
  • By type: a file opened by type goes to the right app. That's the file manager, exo-open, or an agent double-clicking a file. A .docx, .odt or .rtf goes to Writer, a .pptx or .odp to Impress, and an .xlsx, .ods or .csv to Calc. CSVs are opened comma-separated as UTF-8 with no Text Import dialog (--infilter=CSV:44,34,76,1).
  • Launch while running: a launch while LibreOffice runs goes to that copy (_launch_running). It hands over the files waiting in requests, oldest first, or with none waiting, runs a bare launch, as LibreOffice's own launchers do. If the server started a second copy instead, it would hand off to the first and exit, leaving the server tracking a process that's gone. With a document open, LibreOffice opens no new window for it, not even with --startcenter or private:factory/startcenter. I checked that against 24.2.7.
  • Data: the profile ~/.config/libreoffice. The image has none, so each deploy and each data reset starts with a clean profile under the same defaults.
  • Skill: SKILL.md covers opening each app, saving in Office formats, Writer, Impress (including entrance animations) and Calc, and what to do when something gets in the way.

Testing

  • tst/unit/env/envs/test_libreoffice_app.py and tst/unit/bundle/shipped_bundles_test.py: 28 passed locally, on amd64 and on arm64. They cover the declaration, the install step (desktop entries rewritten, registry layer versioned, MIME cache updated), open.py's invocations and its launch through the server.
  • tst/integration/computer/libreoffice_app_test.py, on an amd64 host and an arm64 host, both with local Docker:
    • Gate 3: the arch is ready with LibreOffice, and the probe passes at full.
    • Deployed:
      • Before anything is opened, the app isn't launched.
      • Calibri, Cambria, Arial, Times New Roman and Courier New resolve to their metric-compatible fonts.
      • A .csv, an .xlsx, a .pptx and a .docx opened with exo-open each open in the right app, in one soffice.bin, with no dialog and no lock file.
      • Text typed into the memo through computer_* saves as .docx with no question.
      • The menu launcher, run while LibreOffice is running, starts no second copy, and the app stays ready.
      • A data reset clears the profile, relaunches the app with one copy, ready, and the memo reopens with no dialog.
  • tst/integration/computer/office_example_test.py: the example's check runs against a deployed computer. With no files it fails all three results, naming the missing file. A memo and a deck converted headless by LibreOffice pass the memo and slides checks. They fail the animation check when the deck has no animation, and also when only the second slide's title enters. The deck whose list of three enters, converted from a flat ODP, passes everything. The check parses each slide's XML and requires an entrance effect whose target is the shape holding the list of exactly three items. The agent task's test runs only with a model endpoint, as the desktop example's does.

Results on b279ef8, this branch's base, with its diff, on an amd64 host and an arm64 host, each composing and deploying its own arch on local Docker:

amd64 arm64
unit (29) passed passed
libreoffice_app_test.py gate 3 passed passed
libreoffice_app_test.py deployed passed (7:01 for the three) passed (5:30 for the three)
office_example_test.py check passed passed
office_example_test.py agent skipped (no model endpoint) skipped (no model endpoint)

CI ran the same tests on its amd64 runners: both libreoffice_app_test.py tests in integration-local-slow (7/12) and the office check in (6/12), all passed.

The verifier also ran against LibreOffice 24.2.7 output in a plain Ubuntu 24.04 container: missing files fail all three results, a deck with no animation fails only animation, and the animated deck passes all three.

Docs

The docs site should cover the apps bundle and libreoffice: listing it in a computer env's apps, what it opens by type, the unattended defaults, and that the server starts every copy. It should also cover the office example.

🤖 Generated with Claude Code

RetriggerView in GreptileConfidence Score: 5/5

The PR appears safe to merge; no new actionable issue was found.

Summary

Adds LibreOffice as a shipped computer app and an office example.

  • LibreOffice opens Office files through one server-managed copy.
  • The office example checks a desktop and creates animated Office files.

Diagram

sequenceDiagram
    participant Desktop as Desktop launcher
    participant Opener as open.py
    participant Server as App server
    participant Office as LibreOffice
    Desktop->>Opener: Open files
    Opener->>Server: Queue files and request launch
    Server->>Office: Start tracked copy if needed
    Opener->>Server: Request launch again once ready
    Server->>Office: Hand queued files to running copy
Loading

Reviews (6) · Last reviewed commit: "refactor(apps): open.py's ready poll int..." · Reviewed by Greptile

earakely-scale and others added 6 commits November 12, 2026 14:55
…es by type through its server (FD-5705)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…the office agent task

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…pens no window while a document is open

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@earakely-scale earakely-scale changed the title feat(apps): LibreOffice as a shipped computer app, opening Office files by type through its server feat(apps): LibreOffice as a shipped computer app, opening Office files by type through its server (FD-5705) Nov 12, 2026
…ounts

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@earakely-scale
earakely-scale marked this pull request as ready for review November 12, 2026 23:34
@earakely-scale
earakely-scale requested a review from a team as a code owner November 12, 2026 23:34
…d or reset takes; the office check follows the animation to the list

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@earakely-scale

Copy link
Copy Markdown
Collaborator Author

Moved to scaleapi/synthetic-pipelines#1905: the LibreOffice app and its office example now live there as one agent-env bundle, cua_desktop_apps/libreoffice/, beside the other CUA desktop apps. It needs nothing new from agent-env, so nothing here changes.

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