Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide permalinks for topics #21505

Open
gnprice opened this issue Mar 21, 2022 · 11 comments · Fixed by #30114
Open

Provide permalinks for topics #21505

gnprice opened this issue Mar 21, 2022 · 11 comments · Fixed by #30114
Assignees
Labels
area: api area: search difficult Issues which we expect to be quite difficult help wanted in progress priority: high rust community request Issues of interest to the Rust community

Comments

@gnprice
Copy link
Member

gnprice commented Mar 21, 2022

As @CohenCyril reported at #15290:

The links (for streams, topics and messages) we obtain by clicking "Copy link"/"Copy link to conversation" in the interface, or automatically generated by "Quote & reply" are relative to the names of the stream/topic (while the id of the message stays correct), and they break when streams are renamed, when topics are moved or renamed and when messages are moved to other streams/topics. In particular, topics are moved or renamed quite frequently, by design, and when they are, all links to messages are suddenly lost, in external and internal communications, which is really problematic, ...

Our stream links were in fact already permalinks, and with #21426 our message links (with /near/) are too, by following the message to wherever it's gone.

But we also have links that are to topics without a message ID. We generate those when you click a topic in the left sidebar; in the URL bar when you're viewing a topic; and in Markdown from syntax like #**general>some topic**, which we generate for you through autocomplete. We should find a solution to make those links keep working after the topic is renamed, too -- particularly given that the resolve-topic feature causes topics to be renamed very frequently.

I think this will probably look something like: we encode into those links a message ID too, so that we can follow that message around using the same logic as in /near/ links. I.e., we'd add another narrow operator that takes a message ID, and has a slightly different meaning from near: it'd mean to find the thread where that message now is (just like for near), and then go to the first unread.

Chat thread: https://chat.zulip.org/#narrow/stream/101-design/topic/redirects.20from.20near.20links/near/1349463.2E01

#11699 has some older technical discussion that may be of limited use.

API and clients

@zulipbot
Copy link
Member

Hello @zulip/server-api, @zulip/server-search members, this issue was labeled with the "area: search", "area: api" labels, so you may want to check it out!

@alya
Copy link
Contributor

alya commented Nov 16, 2022

See more recent discussion on the above thread for a concrete proposal for how to solve this issue.

@alya alya added help wanted difficult Issues which we expect to be quite difficult labels Nov 16, 2022
@mojavelinux
Copy link

I'd like to add that another case when this comes up is when a topic is marked as resolved. As soon as the status is changed, any link to that topic that was previously shared becomes broken. That's because marking a topic as resolved effectively changes the title. I'd really like to be able to mark a topic as resolved without causing links to the topic to break since those links are often used in external locations such as issue trackers to direct people to a solution.

@gnprice
Copy link
Member Author

gnprice commented Mar 24, 2023

when a topic is marked as resolved. As soon as the status is changed, any link to that topic that was previously shared becomes broken.

Yes, very much this.

Personally I avoid ever using the "link to a topic" feature, because I know those links will break if anyone resolves the topic or otherwise renames it. Instead I always link to a message.

But of course other people do use the "link to a topic" feature — after all, we offer the feature, so people are quite justified in expecting it to work. And so:

I'd really like to be able to mark a topic as resolved without causing links to the topic to break

I also avoid ever using the "resolve topic" or "rename topic" features, except when the topic is pretty new and I can hope nobody has made links to it elsewhere.

All of these are useful features. It would be good if we fixed things so that using one of them didn't break the other.

@evykassirer
Copy link
Collaborator

Leaving a note here that having topic IDs is the solution I'd like to see for this problem. I think that linking to a topic without any particular message (i.e. going to the bottom of the topic) is a useful feature that people would want to use.

@ojeda
Copy link

ojeda commented Aug 14, 2023

As I discussed with Mateusz, this would be useful in the Linux kernel so that links to Zulip topics can be as stable as possible, and thus useful for Link: tags (and potentially Closes: tags too) within commit messages.

@RalfJung
Copy link

RalfJung commented Apr 1, 2024

In Rust we experience broken links to Zulip topics after they got renamed all the time, and I think it's fundamentally due to this issue.

@alya alya added the rust community request Issues of interest to the Rust community label Apr 1, 2024
@Jazzagi
Copy link

Jazzagi commented May 7, 2024

Another raised hand for topic permalinks here! 🖐️ We link to zulip threads from various other systems to join context together, some of the team use the resolve feature and some don't, but when they do any links break. We did figure out that when it happens we can add .E2.9C.94.20 to the url and it finds the resolved topic, but that's obviously less than ideal, especially if we want to use some sort of automation to update a topic.

@roanster007
Copy link
Collaborator

@zulipbot claim

roanster007 added a commit to roanster007/zulip that referenced this issue May 20, 2024
This commit adds a new narrow operator -- "with" which expects
a string operand of message_id, and returns all the messages
in the same channel and topic of the operand, with the first
unread message of the topic as anchor.

This is done as an effort to provide permalinks for topics in
zulip#21505.
roanster007 added a commit to roanster007/zulip that referenced this issue May 23, 2024
This commit adds a new narrow operator -- "with" which expects
a string operand of message_id, and returns all the messages
in the same channel and topic of the operand, with the first
unread message of the topic as anchor.

This is done as an effort to provide permalinks for topics in
zulip#21505.
roanster007 added a commit to roanster007/zulip that referenced this issue May 27, 2024
This commit converts the links generated by the markdown
of the "#-mention" of topics to permalinks -- the links containing
the "with" narrow operator, the operand being the last message
of the channel and topic of the mention.

Partly Fixes zulip#21505
roanster007 added a commit to roanster007/zulip that referenced this issue Jul 1, 2024
Adds server and web app support for processing the new `with`
search operator.

Fixes part of zulip#21505.

Co-authored-by: roanster007 <[email protected]>
roanster007 added a commit to roanster007/zulip that referenced this issue Jul 1, 2024
Adds server and web app support for processing the new `with`
search operator.

Fixes part of zulip#21505.

Co-authored-by: roanster007 <[email protected]>
roanster007 added a commit to roanster007/zulip that referenced this issue Jul 5, 2024
Adds server and web app support for processing the new `with`
search operator.

Fixes part of zulip#21505.

Co-authored-by: roanster007 <[email protected]>
roanster007 added a commit to roanster007/zulip that referenced this issue Jul 6, 2024
Adds server and web app support for processing the new `with`
search operator.

Fixes part of zulip#21505.

Co-authored-by: roanster007 <[email protected]>
roanster007 added a commit to roanster007/zulip that referenced this issue Jul 9, 2024
Adds server and web app support for processing the new `with`
search operator.

Fixes part of zulip#21505.

Co-authored-by: roanster007 <[email protected]>
timabbott added a commit to roanster007/zulip that referenced this issue Jul 13, 2024
Adds server and web app support for processing the new `with`
search operator.

Fixes part of zulip#21505.

Co-authored-by: roanster007 <[email protected]>
Co-authored-by: Tim Abbott <[email protected]>
timabbott added a commit to roanster007/zulip that referenced this issue Jul 13, 2024
Adds server and web app support for processing the new `with`
search operator.

Fixes part of zulip#21505.

Co-authored-by: roanster007 <[email protected]>
Co-authored-by: Tim Abbott <[email protected]>
roanster007 added a commit to roanster007/zulip that referenced this issue Jul 13, 2024
Adds server and web app support for processing the new `with`
search operator.

Fixes part of zulip#21505.

Co-authored-by: roanster007 <[email protected]>
Co-authored-by: Tim Abbott <[email protected]>
timabbott added a commit to roanster007/zulip that referenced this issue Jul 13, 2024
Adds server and web app support for processing the new `with`
search operator.

Fixes part of zulip#21505.

Co-authored-by: roanster007 <[email protected]>
Co-authored-by: Tim Abbott <[email protected]>
@gnprice
Copy link
Member Author

gnprice commented Jul 14, 2024

#30114 was merged to add support in the server and web app for accepting these topic permalinks 🎉

However, this issue won't be complete until we start actually generating them in each of the places in the UI where we generate a link to a topic. From the issue description above, I believe the list of those is:

We generate those when you click a topic in the left sidebar; in the URL bar when you're viewing a topic; and in Markdown from syntax like #**general>some topic**, which we generate for you through autocomplete.

@gnprice gnprice reopened this Jul 14, 2024
@github-project-automation github-project-automation bot moved this from Done to In progress in Zulip release priorities Jul 14, 2024
@gnprice
Copy link
Member Author

gnprice commented Jul 14, 2024

There are a series of follow-up tasks to #30114 listed here:
#30114 (comment)

The current plan for when to start generating these topic permalinks is (from @timabbott):

Just a reminder that the current release engineering plan for this feature is that we will not have the product start generating these for several more weeks, while we wait for end users to upgrade to the newer versions of the mobile apps that support processing these links. And we might have to wait longer if end-to-end testing discovers correctness bugs in the mobile implementations that seem important.

But nonetheless, I think it's a really important milestone to have the initial support for this included in 9.0.

roanster007 added a commit to roanster007/zulip that referenced this issue Oct 9, 2024
This commit converts the links generated by the markdown
of the "#-mention" of topics to permalinks -- the links containing
the "with" narrow operator, the operand being the last message
of the channel and topic of the mention.

Part of zulip#21505
roanster007 added a commit to roanster007/zulip that referenced this issue Oct 9, 2024
This commit updates the topic links obtained from clicking
the topics in the left sidebar, recent view and inbox, and
those obtained from "Copy link to topic" to use the new
topic permalinks.

Fixes zulip#21505
roanster007 added a commit to roanster007/zulip that referenced this issue Oct 9, 2024
This commit converts the links generated by the markdown
of the "#-mention" of topics to permalinks -- the links containing
the "with" narrow operator, the operand being the last message
of the channel and topic of the mention.

Part of zulip#21505
roanster007 added a commit to roanster007/zulip that referenced this issue Oct 9, 2024
This commit updates the topic links obtained from clicking
the topics in the left sidebar, recent view and inbox, and
those obtained from "Copy link to topic" to use the new
topic permalinks.

Fixes zulip#21505
roanster007 added a commit to roanster007/zulip that referenced this issue Oct 11, 2024
This commit converts the links generated by the markdown
of the "#-mention" of topics to permalinks -- the links containing
the "with" narrow operator, the operand being the last message
of the channel and topic of the mention.

Part of zulip#21505
roanster007 added a commit to roanster007/zulip that referenced this issue Oct 11, 2024
This commit updates the topic links obtained from clicking
the topics in the left sidebar, recent view and inbox, and
those obtained from "Copy link to topic" to use the new
topic permalinks.

Fixes zulip#21505
roanster007 added a commit to roanster007/zulip that referenced this issue Oct 12, 2024
This commit converts the links generated by the markdown
of the "#-mention" of topics to permalinks -- the links containing
the "with" narrow operator, the operand being the last message
of the channel and topic of the mention.

Part of zulip#21505
roanster007 added a commit to roanster007/zulip that referenced this issue Oct 12, 2024
This commit updates the topic links obtained from clicking
the topics in the left sidebar, recent view and inbox, and
those obtained from "Copy link to topic" to use the new
topic permalinks.

Fixes zulip#21505
roanster007 added a commit to roanster007/zulip that referenced this issue Oct 12, 2024
This commit updates the topic links obtained from clicking
the topics in the left sidebar, recent view and inbox, and
those obtained from "Copy link to topic" to use the new
topic permalinks.

Fixes zulip#21505
roanster007 added a commit to roanster007/zulip that referenced this issue Oct 30, 2024
This commit converts the links generated by the markdown
of the "#-mention" of topics to permalinks -- the links containing
the "with" narrow operator, the operand being the last message
of the channel and topic of the mention.

Part of zulip#21505
roanster007 added a commit to roanster007/zulip that referenced this issue Oct 30, 2024
This commit updates the topic links obtained from clicking
the topics in the left sidebar, recent view and inbox, and
those obtained from "Copy link to topic" to use the new
topic permalinks.

Fixes zulip#21505
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: api area: search difficult Issues which we expect to be quite difficult help wanted in progress priority: high rust community request Issues of interest to the Rust community
Projects
Status: In progress
Development

Successfully merging a pull request may close this issue.

9 participants