Skip to content

Add web-app-desktop-bridge - #540

Open
palchrb wants to merge 1 commit into
opencloud-eu:mainfrom
palchrb:feature/desktop-bridge
Open

Add web-app-desktop-bridge#540
palchrb wants to merge 1 commit into
opencloud-eu:mainfrom
palchrb:feature/desktop-bridge

Conversation

@palchrb

@palchrb palchrb commented Aug 28, 2026

Copy link
Copy Markdown

Description

Adds web-app-desktop-bridge, a small extension that makes connected OpenCloud
portals show up (and persist) in the ONLYOFFICE desktop app's Clouds list.

Note on scope: this extension is one half of the integration. The other
half is an opencloud provider entry in the desktop app's providers/
directory — without it, the desktop app drops the announcement as coming from
an unknown provider and this extension is effectively a no-op. No shipped
desktop build includes that entry yet; it can be added to an installed app by
dropping a provider directory into <install dir>/providers/ (enumerated at
startup, no rebuild), and it is being proposed to the desktop app projects
(ref. ONLYOFFICE/DesktopEditors#2047).

The desktop app only remembers a connected cloud when the portal page itself
announces the login via AscDesktopEditor.execCommand('portal:login', ...).
On Nextcloud/ownCloud the ONLYOFFICE connector app does this. OpenCloud needs
no connector for the editors — WOPI and the built-in collaboration service
cover that natively — so connected OpenCloud portals were never remembered by
the desktop app.

This extension provides just the missing announcement: inside the desktop
app's shell it waits for the authenticated user in the runtime's user store
(useUserStore), then announces the portal once with the same payload shape
as the Nextcloud connector — deliberately without an email field, since the
desktop start page silently drops the event on email mismatch. The display
name is preferred over the account name because deployments that autoprovision
usernames from the OIDC sub claim have opaque UUIDs as account names.
Outside the desktop app (no window.AscDesktopEditor) the extension does
nothing.

No user-facing strings, hence no l10n. Note: pnpm-lock.yaml was regenerated
with pnpm 10 — happy to regenerate with pnpm 11 if CI prefers.

Related Issue

No existing issue in this repository. Companion change: an opencloud provider
entry for the desktop app itself, proposed separately to the desktop app
projects (ref. ONLYOFFICE/DesktopEditors#2047).

How Has This Been Tested?

  • test environment: OpenCloud 7.5.0 (rolling, opencloud-compose) behind an
    external reverse proxy with an external IdP; ONLYOFFICE DesktopEditors
    (arm64 .deb) with an opencloud entry in its providers/ directory
  • test case 1: log in to the portal inside the desktop app → the portal
    appears in the Clouds list with the user's display name
  • test case 2: restart the desktop app → the portal entry persists; it can be
    removed from the list
  • test case 3: open the same OpenCloud instance in a regular browser → the
    extension loads and does nothing

Types of changes

  • Bugfix
  • Enhancement (a change that doesn't break existing code or deployments)
  • Breaking change (a modification that affects current functionality)
  • Technical debt (addressing code that needs refactoring or improvements)
  • Tests (adding or improving tests)
  • Documentation (updates or additions to documentation)
  • Maintenance (like dependency updates or tooling adjustments)

The ONLYOFFICE desktop app only lists a connected cloud in its Clouds
panel when the portal page itself announces the login via
AscDesktopEditor.execCommand('portal:login', ...). On Nextcloud and
ownCloud the ONLYOFFICE connector app does this; OpenCloud needs no
connector for the editors themselves — WOPI and the built-in
collaboration service cover that natively — so connected OpenCloud
portals were never remembered by the desktop app.

This extension provides just that missing announcement. Inside the
desktop app's browser shell it waits for the authenticated user to
land in the runtime's user store, then announces the portal once with
the same payload shape as the Nextcloud connector (displayName, domain,
provider — deliberately no email field: the desktop start page compares
email against its stored portal entry and silently drops the event on
mismatch). The display name is preferred over the account name because
deployments that autoprovision usernames from the OIDC sub claim have
opaque UUIDs as account names. Outside the desktop app the extension
does nothing.

Verified end to end against OpenCloud 7.5 and ONLYOFFICE DesktopEditors
with an opencloud provider entry: the portal appears in the Clouds list
on login, survives app restarts, and can be removed from the list.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VzBsHpG5rHzxwgRofBDnw5
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