matrix-org / matrix-org/patience
Hydrogen service worker confuses multiple client instances
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 21
- Forks
- 3
- PR merge metrics
- No merged PRs in 30d
Description
The Hydrogen service worker causes general confusion when running multiple instances at the same time like Patience does, since all instances hear what the others are doing.
We'll need to do at least one of:
- Isolate each client on its own domain (blocks direct window access)
- Run a modified Hydrogen instance with service workers disabled
- Craft some hack to make it seem like the browser doesn't support service workers
We are already attempting the hack approach:
...but it seems to only work in Firefox. Recent Chrome appears to run the frame's document before the hack has a chance to mess with things.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with core/api/adapters/hydrogen.ts around lines 155-170 and reproduce multiple Hydrogen client instances in Chrome and Firefox. Determine which isolation approach reliably prevents instances from hearing one another, then verify that behavior across both browsers.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- testing
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 28/100