Add web-app-desktop-bridge - #540
Open
palchrb wants to merge 1 commit into
Open
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Adds
web-app-desktop-bridge, a small extension that makes connected OpenCloudportals 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
opencloudprovider entry in the desktop app'sproviders/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 atstartup, 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 shapeas the Nextcloud connector — deliberately without an
emailfield, since thedesktop 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
subclaim have opaque UUIDs as account names.Outside the desktop app (no
window.AscDesktopEditor) the extension doesnothing.
No user-facing strings, hence no l10n. Note:
pnpm-lock.yamlwas regeneratedwith pnpm 10 — happy to regenerate with pnpm 11 if CI prefers.
Related Issue
No existing issue in this repository. Companion change: an
opencloudproviderentry for the desktop app itself, proposed separately to the desktop app
projects (ref. ONLYOFFICE/DesktopEditors#2047).
How Has This Been Tested?
external reverse proxy with an external IdP; ONLYOFFICE DesktopEditors
(arm64 .deb) with an
opencloudentry in itsproviders/directoryappears in the Clouds list with the user's display name
removed from the list
extension loads and does nothing
Types of changes