element-hq / element-hq/element-web
Include permalink in error message when replied to message fails to load
- Dominant language
- TypeScript
- Stars
- 13.5k
- Forks
- 2.8k
- PR merge metrics
- PR metrics pending
Description
### Your use case
#### What would you like to do?
When a reply fails to load whether it be network or code related, include a permalink or at least `event_id` for the message it's trying to load so it's possible to reference and find the event in question.
Currently, the error message just says the following which has no details.
```
Unable to load event that was replied to, it either does not exist or you do not have permission to view it.
```

#### Why would you like to do it?
It's not easy to find the message it's trying to reference yourself or debug the situation. Just have to View source and dive into the gritty details.
#### How would you like to achieve it?
Add a permalink to the event in question. The event probably exists if someone is trying to reference it.
These kind of code or network fail cases are unlimited and cannot made to be impossible to encounter. We should strive to improve the fail scenario which could be a variety of solutions:
1. Just the `event_id` to reference. The bare minimum that should be available. "What failed to load?"
1. Permalink so you can try seeing the message for yourself in whatever manner. This solves the problem in code and network fail scenarios and makes it convenient to see the content you were missing.
1. A retry button to try reloading the message when conditions are better. But this one is susceptible to code bugs like the one explained at the top of this comment so I'm not in favor of it.
1. Other ideas
### Have you considered any alternatives?
_No response_
### Additional context
Related to:
- https://github.com/vector-im/element-web/issues/19769
Contributor guide
Research direction
No file, test, or entry point is named in the issue. Start by searching the codebase for the current error text and review related issue #19769; done means the failure message identifies the replied-to event with an event_id or permalink.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- frontend
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100