Desktop: Lotus links use the public web app and open in-app (#248) #249

Merged
jared merged 1 commits from desktop-lotus-links into lotus 2026-09-28 19:53:20 -04:00
Owner

Fixes #248: in the desktop app, "Copy Lotus Link" copied a local http://localhost:…/#/… address, and public Lotus links in messages opened the browser instead of the room.

Changes

  • useLotusShareBase: in the desktop app, shared links use config webAppUrl (https://chat.lotusguild.org, set by cinny-desktop #23, https only). Otherwise it's the page origin, as before. Used by "Copy Lotus Link" on messages, in the space menu and on space tabs.
  • Link recogniser: accepts the origin and, in the desktop app, webAppUrl, so public links open in-app.
  • Web app: unchanged.

Verified

Simulated desktop (Tauri bridge + webAppUrl) against a local Synapse:

desktop web
Copy Lotus Link (message) https://chat.lotusguild.org/home/!room…/$event…?viaServers=… http://127.0.0.1:5173/home/… (origin, unchanged)
Copy Lotus Link (space) https://chat.lotusguild.org/!space…?viaServers=… origin (unchanged)
Public link in a message rendered as the #Voice Lounge room pill; the click opens the room in-app, nothing goes to the system browser plain link (the dev origin isn't chat.lotusguild.org, as expected)

Unit tests for the base selection (web, desktop with and without a valid webAppUrl); all 1,274 unit tests pass; Playwright 20 passed; tsc and eslint clean.

🤖 Generated with Claude Code

https://claude.ai/code/session_01PPmy3tPq869XDW4njjVaKA

Fixes **#248**: in the desktop app, "Copy Lotus Link" copied a local `http://localhost:…/#/…` address, and public Lotus links in messages opened the browser instead of the room. ## Changes - **`useLotusShareBase`:** in the desktop app, shared links use config `webAppUrl` (`https://chat.lotusguild.org`, set by cinny-desktop #23, https only). Otherwise it's the page origin, as before. Used by "Copy Lotus Link" on messages, in the space menu and on space tabs. - **Link recogniser:** accepts the origin **and**, in the desktop app, `webAppUrl`, so public links open in-app. - **Web app:** unchanged. ## Verified Simulated desktop (Tauri bridge + `webAppUrl`) against a local Synapse: | | desktop | web | |---|---|---| | Copy Lotus Link (message) | `https://chat.lotusguild.org/home/!room…/$event…?viaServers=…` | `http://127.0.0.1:5173/home/…` (origin, unchanged) | | Copy Lotus Link (space) | `https://chat.lotusguild.org/!space…?viaServers=…` | origin (unchanged) | | Public link in a message | rendered as the **#Voice Lounge** room pill; the click opens the room in-app, nothing goes to the system browser | plain link (the dev origin isn't chat.lotusguild.org, as expected) | Unit tests for the base selection (web, desktop with and without a valid `webAppUrl`); all 1,274 unit tests pass; Playwright 20 passed; tsc and eslint clean. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01PPmy3tPq869XDW4njjVaKA
jared added 1 commit 2026-09-28 19:39:55 -04:00
fix(desktop): Lotus links use the public web app, and open in-app (#248)
CI / Build & Quality Checks (pull_request) Successful in 1m50s
CI / Trigger Desktop Build (pull_request) Skipped
CI / Docker image build & smoke test (pull_request) Skipped
CI / Secret scan (gitleaks) (pull_request) Successful in 8s
CI / Playwright smoke (e2e) (pull_request) Successful in 9m19s
1ea6987083
Lotus permalinks (#130) were built from window.location.origin. In the
desktop app that's the local tauri-plugin-localhost server (hash-routed), so
"Copy Lotus Link" copied e.g. http://localhost:…/#/home/!room…, which works
for nobody else. And the link recogniser only knew that local base, so a real
https://chat.lotusguild.org/home/… link in a message opened the browser
instead of the room.

- useLotusShareBase: in the desktop app, links for other people use config
  `webAppUrl` (https only, set by cinny-desktop #23) in web path-routing
  form; otherwise the origin, as before. Used by "Copy Lotus Link" on
  messages, the space menu and space tabs.
- The recogniser accepts several bases: the origin, plus `webAppUrl` in the
  desktop app.
- The web app is unchanged.

Verified with a simulated desktop (Tauri bridge + webAppUrl) against a local
Synapse. Copied links are https://chat.lotusguild.org/home/<room>/<event> and
https://chat.lotusguild.org/<space>. A public link in a message renders as
the room pill and clicking it opens the room in-app, with nothing sent to the
system browser. The web app still copies origin links. Unit tests for the
base selection; Playwright 20 passed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PPmy3tPq869XDW4njjVaKA
jared merged commit c0c93213c1 into lotus 2026-09-28 19:53:20 -04:00
Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: LotusGuild/cinny#249