Skip to content

Open cross-org link in desktop#1490

Open
GZGavinZhao wants to merge 1 commit intozulip:mainfrom
GZGavinZhao:push-tzkzxsozywzm
Open

Open cross-org link in desktop#1490
GZGavinZhao wants to merge 1 commit intozulip:mainfrom
GZGavinZhao:push-tzkzxsozywzm

Conversation

@GZGavinZhao
Copy link

@GZGavinZhao GZGavinZhao commented Jan 6, 2026

Fixes: #1219

Two new IPC messages are introduced to implement this feature:

  1. "update-org-urls": (urls: string[]) => void in MainMessage stores the list of urls for connected organizations.
  2. "navigate-to-org-url": (url: string) => void in RenderMessage that opens the corresponding tab if the url points to a connected organization. If not, this is a no-op. Uses the list of urls from above to determine whether a url belongs to a connected organization.

These should also help implement #1403.

I'm open to better ways of storing the urls in update-org-urls. The current logic of storing the list of urls in a global variable works but I don't program enough in JavaScript to know if this is idiomatic.

Surprising to me the current implementation works in an (imagined) corner case where the link points to an organization that was added after Zulip desktop was started. It seems like reloadView() (which calls updateOrgUrls through initTabs) is called every time a new organization is added? I couldn't find this in the code.

Screenshots and screen captures:

Apologies for the half blank screen and missing cursor, still trying to figure out the situation on Wayland 😅

demo.mp4

Platforms this PR was tested on:

  • Windows
  • macOS
  • Linux (specify distro: Solus)
Self-review checklist
  • Self-reviewed the changes for clarity and maintainability
    (variable names, code reuse, readability, etc.).

Communicate decisions, questions, and potential concerns.

  • Explains differences from previous plans (e.g., issue description).
  • Highlights technical choices and bugs encountered.
  • Calls out remaining decisions and concerns.
  • Automated tests verify logic where appropriate.

Individual commits are ready for review (see commit discipline).

  • Each commit is a coherent idea.
  • Commit message(s) explain reasoning and motivation for changes.

Completed manual review and testing of the following:

  • Visual appearance of the changes.
  • Responsiveness and internationalization.
  • Strings and tooltips.
  • End-to-end functionality of buttons, interactions and flows.
  • Corner cases, error conditions, and easily imagined bugs.

@GZGavinZhao GZGavinZhao force-pushed the push-tzkzxsozywzm branch 2 times, most recently from 80a5417 to eadcb2c Compare January 6, 2026 02:10
Fixes: zulip#1219

Two new IPC messages are introduced to implement this feature:
1. `"update-org-urls": (urls: string[]) => void` in `MainMessage` stores the
   list of urls for connected organizations.
2. `"navigate-to-org-url": (url: string) => void` in `RenderMessage` that opens
   the corresponding tab if the url points to a connected organization. If not,
   this is a no-op. Uses the list of urls from above to determine whether a url
   belongs to a connected organization.
@GZGavinZhao GZGavinZhao marked this pull request as ready for review January 6, 2026 02:46
@alya
Copy link
Collaborator

alya commented Jan 6, 2026

Thanks! @shubham-padia Could you please review?

@GZGavinZhao
Copy link
Author

Gentle ping...?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Open Zulip links in Desktop app (cross-org)

4 participants