From 855e160cda4413166086d8ef542d8d626883c84f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=ABl=20Poyet?= Date: Tue, 30 Dec 2025 15:31:42 +0100 Subject: [PATCH] fix: adapt assetlinks for new element android fork --- CLAUDE.md | 35 +++++++++++++++++++++--- apps/web/res/.well-known/assetlinks.json | 10 +++++++ 2 files changed, 41 insertions(+), 4 deletions(-) diff --git a/CLAUDE.md b/CLAUDE.md index 6d4101667a..45866a097e 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -2,14 +2,29 @@ This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository. +## Prerequisites + +- Node.js >= 20.0.0 +- Yarn 1.x (classic) + ## Commands +### Setup +- `yarn install` - Install dependencies +- Copy `config.sample.json` to `config.json` and configure (see docs/config.md) + ### Development - `yarn start` - Run development server on http://localhost:8080 - `yarn start:https` - Run development server with HTTPS - `yarn build` - Production build (outputs to webapp/) - `yarn dist` - Create distribution tarball +**Linux note**: If builds fail silently or with `EMFILE: too many open files`, increase inotify limits: +```bash +sudo sysctl fs.inotify.max_user_watches=131072 +sudo sysctl fs.inotify.max_user_instances=512 +``` + ### Testing - `yarn test` - Run Jest unit tests - `yarn test:playwright` - Run Playwright e2e tests @@ -49,8 +64,8 @@ Components are organized in `/src/components/`: ### State Management Uses Flux architecture with: - Centralized dispatcher in `/src/dispatcher/` -- Stores in `/src/stores/` as singletons -- Actions dispatched through `dis.dispatch()` +- Stores in `/src/stores/` as singletons (access via `FooStore.instance`) +- Dispatch actions: `dis.dispatch({ action: Action.FOO, ...payload })` or `dis.fire(Action.FOO)` for action-only ### Styling - PostCSS files with `.pcss` extension @@ -76,7 +91,19 @@ Plugin architecture in `/src/modules/`: ### Important Conventions - TypeScript strict mode - always use explicit types -- Functional components with hooks preferred over class components +- Functional components with hooks preferred over class components (except "structures" which use classes) - Translations use `_t()` function with hierarchical keys - 4-space indentation, 120 character line limit -- Component files: UpperCamelCase, utilities: kebab-case \ No newline at end of file +- Component files: UpperCamelCase, utilities: kebab-case +- Use `Optional` type instead of truly optional parameters when callers should explicitly acknowledge missing values +- CSS class names must be prefixed with `mx_` and match component name (e.g., `mx_RoomTile`) + +### Linked Development with matrix-js-sdk +For developing against local SDK changes: +```bash +# In matrix-js-sdk directory +yarn link && yarn install + +# In element-web directory +yarn link matrix-js-sdk && yarn install && yarn start +``` \ No newline at end of file diff --git a/apps/web/res/.well-known/assetlinks.json b/apps/web/res/.well-known/assetlinks.json index 17fd1c0d62..61b821ba8d 100644 --- a/apps/web/res/.well-known/assetlinks.json +++ b/apps/web/res/.well-known/assetlinks.json @@ -58,5 +58,15 @@ "C6:DB:9B:9C:8C:BD:D6:5D:16:E8:EC:8C:8B:91:C8:31:B9:EF:C9:5C:BF:98:AE:41:F6:A9:D8:35:15:1A:7E:16" ] } + }, + { + "relation": ["delegate_permission/common.handle_all_urls"], + "target": { + "namespace": "android_app", + "package_name": "ch.healthchat.element", + "sha256_cert_fingerprints": [ + "8A:FC:64:57:9F:5A:BA:4F:53:39:94:72:8E:30:39:08:06:C8:68:6A:ED:61:76:58:BF:4B:AC:4B:67:25:5C:FD" + ] + } } ]