element-hq / element-hq/element-web
Scrolling the space hierarchy: `Failed to parse permalink Error: Unknown entity type in permalink`
- Dominant language
- TypeScript
- Stars
- 13.5k
- Forks
- 2.8k
- PR merge metrics
- PR metrics pending
Description
### Steps to reproduce
1. Explore rooms in a space
1. Scroll and browser the hierarchy
1. Notice errors in devtools console. I'm not sure if there is any visual effect (didn't notice)
### Outcome
#### What did you expect?
N/A
#### What happened instead?
```
Failed to parse permalink Error: Unknown entity type in permalink
at MatrixSchemePermalinkConstructor_MatrixSchemePermalinkConstructor.parsePermalink (MatrixSchemePermalinkConstructor.ts:98:19)
at parsePermalink (Permalinks.ts:426:59)
at tryTransformPermalinkToLocalHref (Permalinks.ts:367:32)
at events (linkify-matrix.ts:155:75)
at Options.getObj (index.js:2503:1)
at Token.render (index.js:2684:1)
at Options.render (index.js:2517:1)
at tokensToNodes (index.js:41:1)
at linkifyElementHelper (index.js:90:1)
at linkifyElement (index.js:162:1)
at linkifyElement (HtmlUtils.tsx:665:27)
at ref (SpaceHierarchy.tsx:225:46)
at dk (react-dom.production.min.js:259:285)
at push.exports.unstable_runWithPriority (scheduler.production.min.js:18:336)
at gg (react-dom.production.min.js:122:318)
at Uj (react-dom.production.min.js:252:279)
at Lj (react-dom.production.min.js:243:371)
at react-dom.production.min.js:123:110
at push.exports.unstable_runWithPriority (scheduler.production.min.js:18:336)
at gg (react-dom.production.min.js:122:318)
at jg (react-dom.production.min.js:123:61)
at ig (react-dom.production.min.js:122:428)
at Jg (react-dom.production.min.js:237:147)
at Oh (react-dom.production.min.js:170:408)
at SpaceHierarchy.tsx:531:9
```
### Operating system
Windows 10
### Browser information
Chrome Version 107.0.5304.63
### URL for webapp
https://develop.element.io/
### Application version
Element version: 2a46122f2864-react-c497046e39f6-js-b44787192db1 Olm version: 3.2.12
### Homeserver
matrix.org
### Will you send logs?
Yes, see https://github.com/matrix-org/element-web-rageshakes/issues/16521
Contributor guide
Research direction
Reproduce the error by scrolling the space hierarchy, then trace the stack from SpaceHierarchy.tsx through linkify-matrix.ts and Permalinks.ts to MatrixSchemePermalinkConstructor.ts:98. Check how the permalink parser handles the unknown entity type and use the existing stack trace and console output to verify the issue is resolved.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react, typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100