From c1a163cbc9dd68c85505058dd47a6d1ef700ebc1 Mon Sep 17 00:00:00 2001 From: Andy Balaam Date: Tue, 5 Aug 2025 15:57:40 +0100 Subject: [PATCH 01/27] Hide recovery key when prompting for verification (#30471) * Separate security_key_title from security_key_label since they differ in designs See https://www.figma.com/design/ZodBLtGnKmRTGJo5SGLnH3/ER-137--Excluding-Insecure-Devices?node-id=92-8818&t=02JILBe2n7sx7ljU-1 In parallel with this, I have updated security_key_title in localazy. * Hide recovery key on entry screen after login --- .../e2e/crypto/device-verification.spec.ts | 2 +- playwright/e2e/crypto/utils.ts | 4 ++-- .../security/_AccessSecretStorageDialog.pcss | 17 +++++++++++++++++ .../security/AccessSecretStorageDialog.tsx | 18 +++++++----------- src/i18n/strings/en_EN.json | 1 + .../dialogs/AccessSecretStorageDialog-test.tsx | 6 +++--- 6 files changed, 31 insertions(+), 17 deletions(-) diff --git a/playwright/e2e/crypto/device-verification.spec.ts b/playwright/e2e/crypto/device-verification.spec.ts index eb21dfc909..ab36c37a76 100644 --- a/playwright/e2e/crypto/device-verification.spec.ts +++ b/playwright/e2e/crypto/device-verification.spec.ts @@ -209,7 +209,7 @@ test.describe("Device verification", { tag: "@no-webkit" }, () => { const dialog = page.locator(".mx_Dialog"); // We use `pressSequentially` here to make sure that the FocusLock isn't causing us any problems // (cf https://github.com/element-hq/element-web/issues/30089) - await dialog.locator("textarea").pressSequentially(recoveryKey); + await dialog.getByTitle("Recovery key").pressSequentially(recoveryKey); await dialog.getByRole("button", { name: "Continue", disabled: false }).click(); await page.getByRole("button", { name: "Done" }).click(); diff --git a/playwright/e2e/crypto/utils.ts b/playwright/e2e/crypto/utils.ts index 289b123e86..0521df236e 100644 --- a/playwright/e2e/crypto/utils.ts +++ b/playwright/e2e/crypto/utils.ts @@ -228,7 +228,7 @@ export async function logIntoElement(page: Page, credentials: Credentials, secur await useSecurityKey.click(); } // Fill in the recovery key - await page.locator(".mx_Dialog").locator("textarea").fill(securityKey); + await page.locator(".mx_Dialog").getByTitle("Recovery key").fill(securityKey); await page.getByRole("button", { name: "Continue", disabled: false }).click(); await page.getByRole("button", { name: "Done" }).click(); } @@ -263,7 +263,7 @@ export async function verifySession(app: ElementAppPage, securityKey: string) { const settings = await app.settings.openUserSettings("Encryption"); await settings.getByRole("button", { name: "Verify this device" }).click(); await app.page.getByRole("button", { name: "Verify with Recovery Key" }).click(); - await app.page.locator(".mx_Dialog").locator("textarea").fill(securityKey); + await app.page.locator(".mx_Dialog").getByTitle("Recovery key").fill(securityKey); await app.page.getByRole("button", { name: "Continue", disabled: false }).click(); await app.page.getByRole("button", { name: "Done" }).click(); await app.settings.closeDialog(); diff --git a/res/css/views/dialogs/security/_AccessSecretStorageDialog.pcss b/res/css/views/dialogs/security/_AccessSecretStorageDialog.pcss index 9d81097d60..2c78a62f8d 100644 --- a/res/css/views/dialogs/security/_AccessSecretStorageDialog.pcss +++ b/res/css/views/dialogs/security/_AccessSecretStorageDialog.pcss @@ -15,6 +15,23 @@ Please see LICENSE files in the repository root for full details. } .mx_AccessSecretStorageDialog_primaryContainer { + .mx_AccessSecretStorageDialog_recoveryKeyEntry { + /* + * Be specific here to avoid "margin: 9px" from _common.pcss + */ + :not(.mx_textinput):not(.mx_Field):not(.mx_no_textinput) { + input { + /* + * From figma: https://www.figma.com/design/ZodBLtGnKmRTGJo5SGLnH3/ER-137--Excluding-Insecure-Devices?node-id=102-43729&t=QmewENUd7f6Tmw9U-1 + */ + width: 448px; + height: 70px; + margin: 0px; + border: 1px solid; + } + } + } + .mx_AccessSecretStorageDialog_recoveryKeyFeedback { &::before { content: ""; diff --git a/src/components/views/dialogs/security/AccessSecretStorageDialog.tsx b/src/components/views/dialogs/security/AccessSecretStorageDialog.tsx index bfe99b80c8..da9a67a644 100644 --- a/src/components/views/dialogs/security/AccessSecretStorageDialog.tsx +++ b/src/components/views/dialogs/security/AccessSecretStorageDialog.tsx @@ -6,14 +6,13 @@ SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only OR LicenseRef-Element-Com Please see LICENSE files in the repository root for full details. */ -import { Button } from "@vector-im/compound-web"; +import { Button, PasswordInput } from "@vector-im/compound-web"; import LockSolidIcon from "@vector-im/compound-design-tokens/assets/web/icons/lock-solid"; import { debounce } from "lodash"; import classNames from "classnames"; import React, { type ChangeEvent, type FormEvent } from "react"; import { type SecretStorage } from "matrix-js-sdk/src/matrix"; -import Field from "../../elements/Field"; import { Flex } from "../../../../shared-components/utils/Flex"; import { _t } from "../../../../languageHandler"; import { EncryptionCard } from "../../settings/encryption/EncryptionCard"; @@ -53,7 +52,7 @@ interface IState { * Access Secure Secret Storage by requesting the user's passphrase. */ export default class AccessSecretStorageDialog extends React.PureComponent { - private inputRef = React.createRef(); + private inputRef = React.createRef(); public constructor(props: IProps) { super(props); @@ -119,7 +118,7 @@ export default class AccessSecretStorageDialog extends React.PureComponent): void => { + private onRecoveryKeyChange = (ev: ChangeEvent): void => { this.setState({ recoveryKey: ev.target.value, }); @@ -181,17 +180,14 @@ export default class AccessSecretStorageDialog extends React.PureComponent
-
diff --git a/src/i18n/strings/en_EN.json b/src/i18n/strings/en_EN.json index b5a7c16e6e..712214e036 100644 --- a/src/i18n/strings/en_EN.json +++ b/src/i18n/strings/en_EN.json @@ -920,6 +920,7 @@ }, "privacy_warning": "Make sure nobody can see this screen!", "restoring": "Restoring keys from backup", + "security_key_label": "Recovery key", "security_key_title": "Recovery key" }, "bootstrap_title": "Setting up keys", diff --git a/test/unit-tests/components/views/dialogs/AccessSecretStorageDialog-test.tsx b/test/unit-tests/components/views/dialogs/AccessSecretStorageDialog-test.tsx index 23fa06720c..2f136cb0e8 100644 --- a/test/unit-tests/components/views/dialogs/AccessSecretStorageDialog-test.tsx +++ b/test/unit-tests/components/views/dialogs/AccessSecretStorageDialog-test.tsx @@ -31,7 +31,7 @@ describe("AccessSecretStorageDialog", () => { const enterRecoveryKey = async (valueToEnter: string = recoveryKey): Promise => { await act(async () => { - fireEvent.change(screen.getByRole("textbox"), { + fireEvent.change(screen.getByTitle("Recovery key"), { target: { value: valueToEnter, }, @@ -67,7 +67,7 @@ describe("AccessSecretStorageDialog", () => { renderComponent({ onFinished, checkPrivateKey }); // check that the input field is focused - expect(screen.getByRole("textbox")).toHaveFocus(); + expect(screen.getByTitle("Recovery key")).toHaveFocus(); await enterRecoveryKey(); await submitDialog(); @@ -111,7 +111,7 @@ describe("AccessSecretStorageDialog", () => { renderComponent({ checkPrivateKey, keyInfo }); await enterRecoveryKey(); - expect(screen.getByRole("textbox")).toHaveValue(recoveryKey); + expect(screen.getByTitle("Recovery key")).toHaveValue(recoveryKey); await expect(screen.findByText("The recovery key you entered is not correct.")).resolves.toBeInTheDocument(); expect(screen.getByText("Continue")).toHaveAttribute("aria-disabled", "true"); From ff87df482528b65c77773293eaa4c4702ea7e9af Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 5 Aug 2025 16:19:36 +0100 Subject: [PATCH 02/27] Update docker (#30481) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .github/workflows/docker.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/docker.yaml b/.github/workflows/docker.yaml index 0b887ecc77..e7d06e75cf 100644 --- a/.github/workflows/docker.yaml +++ b/.github/workflows/docker.yaml @@ -37,14 +37,14 @@ jobs: install: true - name: Login to Docker Hub - uses: docker/login-action@74a5d142397b4f367a81961eba4e8cd7edddf772 # v3 + uses: docker/login-action@184bdaa0721073962dff0199f1fb9940f07167d1 # v3 if: github.event_name != 'pull_request' with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} - name: Login to GitHub Container Registry - uses: docker/login-action@74a5d142397b4f367a81961eba4e8cd7edddf772 # v3 + uses: docker/login-action@184bdaa0721073962dff0199f1fb9940f07167d1 # v3 if: github.event_name != 'pull_request' with: registry: ghcr.io @@ -96,7 +96,7 @@ jobs: - name: Docker meta id: meta - uses: docker/metadata-action@902fa8ec7d6ecbf8d84d538b9b233a880e428804 # v5 + uses: docker/metadata-action@c1e51972afc2121e065aed6d45c65596fe445f3f # v5 if: github.event_name != 'pull_request' with: images: | From e10b1f9222bbc74277bc68f1cbefa8980d20c719 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 5 Aug 2025 16:19:44 +0100 Subject: [PATCH 03/27] Update nginxinc/nginx-unprivileged:alpine-slim Docker digest to e61b77b (#30482) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index ff9ec91f0a..80f12f47e4 100644 --- a/Dockerfile +++ b/Dockerfile @@ -19,7 +19,7 @@ RUN /src/scripts/docker-package.sh RUN cp /src/config.sample.json /src/webapp/config.json # App -FROM nginxinc/nginx-unprivileged:alpine-slim@sha256:86df552d36eb24c45d3f5becf6423bd056a3fd235d7085fe3d5ea28ba89a8232 +FROM nginxinc/nginx-unprivileged:alpine-slim@sha256:e61b77b27c8f3124fad6d19e894ca5b603bcaf6a34a2df035511299dfa6fad35 # Need root user to install packages & manipulate the usr directory USER root From 4b8f404bb3953fc56421aa474c5ac2e7fc9006ee Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 5 Aug 2025 15:20:19 +0000 Subject: [PATCH 04/27] Update playwright to v1.54.2 (#30485) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- package.json | 2 +- yarn.lock | 29 ++++++++++++++--------------- 2 files changed, 15 insertions(+), 16 deletions(-) diff --git a/package.json b/package.json index 675120f452..c85fbccf9e 100644 --- a/package.json +++ b/package.json @@ -74,7 +74,7 @@ }, "resolutions": { "**/pretty-format/react-is": "19.1.0", - "@playwright/test": "1.54.1", + "@playwright/test": "1.54.2", "@types/react": "19.1.8", "@types/react-dom": "19.1.6", "oidc-client-ts": "3.3.0", diff --git a/yarn.lock b/yarn.lock index b4fe445ee6..3d2be19cf5 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2653,12 +2653,12 @@ resolved "https://registry.yarnpkg.com/@pkgjs/parseargs/-/parseargs-0.11.0.tgz#a77ea742fab25775145434eb1d2328cf5013ac33" integrity sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg== -"@playwright/test@1.54.1", "@playwright/test@^1.50.1": - version "1.54.1" - resolved "https://registry.yarnpkg.com/@playwright/test/-/test-1.54.1.tgz#a76333e5c2cba5f12f96a6da978bba3ab073c7e6" - integrity sha512-FS8hQ12acieG2dYSksmLOF7BNxnVf2afRJdCuM1eMSxj6QTSE6G4InGF7oApGgDb65MX7AwMVlIkpru0yZA4Xw== +"@playwright/test@1.54.2", "@playwright/test@^1.50.1": + version "1.54.2" + resolved "https://registry.yarnpkg.com/@playwright/test/-/test-1.54.2.tgz#ff0d1e5d8e26f3258ae65364e2d4d10176926b07" + integrity sha512-A+znathYxPf+72riFd1r1ovOLqsIIB0jKIoPjyK2kqEIe30/6jF6BC7QNluHuwUmsD2tv1XZVugN8GqfTMOxsA== dependencies: - playwright "1.54.1" + playwright "1.54.2" "@polka/url@^1.0.0-next.24": version "1.0.0-next.28" @@ -4545,7 +4545,6 @@ "@vector-im/matrix-wysiwyg-wasm@link:../../Library/Caches/Yarn/v6/npm-@vector-im-matrix-wysiwyg-2.39.0-a6238e517f23a2f3025d9c65445914771c63b163-integrity/node_modules/bindings/wysiwyg-wasm": version "0.0.0" - uid "" "@vector-im/matrix-wysiwyg@2.39.0": version "2.39.0" @@ -11932,17 +11931,17 @@ playwright-core@1.53.2, playwright-core@>=1.2.0: resolved "https://registry.yarnpkg.com/playwright-core/-/playwright-core-1.53.2.tgz#78f71e2f727713daa8d360dc11c460022c13cf91" integrity sha512-ox/OytMy+2w1jcYEYlOo1Hhp8hZkLCximMTUTMBXjGUA1KoFfiSZ+DU+3a739jsPY0yoKH2TFy9S2fsJas8yAw== -playwright-core@1.54.1, playwright-core@^1.51.0: - version "1.54.1" - resolved "https://registry.yarnpkg.com/playwright-core/-/playwright-core-1.54.1.tgz#d32edcce048c9d83ceac31e294a7b60ef586960b" - integrity sha512-Nbjs2zjj0htNhzgiy5wu+3w09YetDx5pkrpI/kZotDlDUaYk0HVA5xrBVPdow4SAUIlhgKcJeJg4GRKW6xHusA== +playwright-core@1.54.2, playwright-core@^1.51.0: + version "1.54.2" + resolved "https://registry.yarnpkg.com/playwright-core/-/playwright-core-1.54.2.tgz#73cc5106f19ec6b9371908603d61a7f171ebd8f0" + integrity sha512-n5r4HFbMmWsB4twG7tJLDN9gmBUeSPcsBZiWSE4DnYz9mJMAFqr2ID7+eGC9kpEnxExJ1epttwR59LEWCk8mtA== -playwright@1.54.1: - version "1.54.1" - resolved "https://registry.yarnpkg.com/playwright/-/playwright-1.54.1.tgz#128d66a8d5182b5330e6440be3a72ca313362788" - integrity sha512-peWpSwIBmSLi6aW2auvrUtf2DqY16YYcCMO8rTVx486jKmDTJg7UAhyrraP98GB8BoPURZP8+nxO7TSd4cPr5g== +playwright@1.54.2: + version "1.54.2" + resolved "https://registry.yarnpkg.com/playwright/-/playwright-1.54.2.tgz#e2435abb2db3a96a276f8acc3ada1a85b587dff3" + integrity sha512-Hu/BMoA1NAdRUuulyvQC0pEqZ4vQbGfn8f7wPXcnqQmM+zct9UliKxsIkLNmz/ku7LElUNqmaiv1TG/aL5ACsw== dependencies: - playwright-core "1.54.1" + playwright-core "1.54.2" optionalDependencies: fsevents "2.3.2" From db9514760d39ab1bb81312669b04956598e1c1fe Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 5 Aug 2025 15:20:40 +0000 Subject: [PATCH 05/27] Update testing-library monorepo (#30487) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- yarn.lock | 30 +++++++++++------------------- 1 file changed, 11 insertions(+), 19 deletions(-) diff --git a/yarn.lock b/yarn.lock index 3d2be19cf5..0e88f58050 100644 --- a/yarn.lock +++ b/yarn.lock @@ -34,7 +34,7 @@ dependencies: axe-core "~4.10.3" -"@babel/code-frame@^7.0.0", "@babel/code-frame@^7.27.1": +"@babel/code-frame@^7.0.0", "@babel/code-frame@^7.10.4", "@babel/code-frame@^7.27.1": version "7.27.1" resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.27.1.tgz#200f715e66d52a23b221a9435534a91cc13ad5be" integrity sha512-cjQ7ZlQ0Mv3b47hABuTevyTuYN4i+loJKGeV9flcCgIK37cCXRh+L1bd3iBHlynerhQ7BhCkn2BPbQUL+rGqFg== @@ -43,7 +43,7 @@ js-tokens "^4.0.0" picocolors "^1.1.1" -"@babel/code-frame@^7.10.4", "@babel/code-frame@^7.12.13", "@babel/code-frame@^7.25.7": +"@babel/code-frame@^7.12.13", "@babel/code-frame@^7.25.7": version "7.25.7" resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.25.7.tgz#438f2c524071531d643c6f0188e1e28f130cebc7" integrity sha512-0xZJFNE5XMpENsgfHYTw8FbX4kv53mFLn2i3XPoq69LyhYSCBJtitaHx9QnsVTrsogI4Z3+HtEfZ2/GFPOtf5g== @@ -3615,30 +3615,30 @@ testcontainers "^11.0.3" "@testing-library/dom@^10.4.0": - version "10.4.0" - resolved "https://registry.yarnpkg.com/@testing-library/dom/-/dom-10.4.0.tgz#82a9d9462f11d240ecadbf406607c6ceeeff43a8" - integrity sha512-pemlzrSESWbdAloYml3bAJMEfNh1Z7EduzqPKprCH5S341frlpYnUEW0H72dLxa6IsYr+mPno20GiSm+h9dEdQ== + version "10.4.1" + resolved "https://registry.yarnpkg.com/@testing-library/dom/-/dom-10.4.1.tgz#d444f8a889e9a46e9a3b4f3b88e0fcb3efb6cf95" + integrity sha512-o4PXJQidqJl82ckFaXUeoAW+XysPLauYI43Abki5hABd853iMhitooc6znOnczgbTYmEP6U6/y1ZyKAIsvMKGg== dependencies: "@babel/code-frame" "^7.10.4" "@babel/runtime" "^7.12.5" "@types/aria-query" "^5.0.1" aria-query "5.3.0" - chalk "^4.1.0" dom-accessibility-api "^0.5.9" lz-string "^1.5.0" + picocolors "1.1.1" pretty-format "^27.0.2" "@testing-library/jest-dom@^6.4.8", "@testing-library/jest-dom@^6.6.3": - version "6.6.3" - resolved "https://registry.yarnpkg.com/@testing-library/jest-dom/-/jest-dom-6.6.3.tgz#26ba906cf928c0f8172e182c6fe214eb4f9f2bd2" - integrity sha512-IteBhl4XqYNkM54f4ejhLRJiZNqcSCoXUOG2CPK7qbD322KjQozM4kHQOfkG2oln9b9HTYqs+Sae8vBATubxxA== + version "6.6.4" + resolved "https://registry.yarnpkg.com/@testing-library/jest-dom/-/jest-dom-6.6.4.tgz#577a1761768bda5458c42241add3b1570c34d39c" + integrity sha512-xDXgLjVunjHqczScfkCJ9iyjdNOVHvvCdqHSSxwM9L0l/wHkTRum67SDc020uAlCoqktJplgO2AAQeLP1wgqDQ== dependencies: "@adobe/css-tools" "^4.4.0" aria-query "^5.0.0" - chalk "^3.0.0" css.escape "^1.5.1" dom-accessibility-api "^0.6.3" lodash "^4.17.21" + picocolors "^1.1.1" redent "^3.0.0" "@testing-library/react@^16.0.0": @@ -5882,14 +5882,6 @@ chalk@^2.4.2: escape-string-regexp "^1.0.5" supports-color "^5.3.0" -chalk@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/chalk/-/chalk-3.0.0.tgz#3f73c2bf526591f574cc492c51e2456349f844e4" - integrity sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg== - dependencies: - ansi-styles "^4.1.0" - supports-color "^7.1.0" - chalk@^4.0.0, chalk@^4.0.2, chalk@^4.1.0, chalk@^4.1.2, chalk@~4.1.2: version "4.1.2" resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.2.tgz#aac4e2b7734a740867aeb16bf02aad556a1e7a01" @@ -11875,7 +11867,7 @@ pbkdf2@^3.1.2: sha.js "^2.4.11" to-buffer "^1.2.0" -picocolors@^1.0.0, picocolors@^1.0.1, picocolors@^1.1.0, picocolors@^1.1.1: +picocolors@1.1.1, picocolors@^1.0.0, picocolors@^1.0.1, picocolors@^1.1.0, picocolors@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/picocolors/-/picocolors-1.1.1.tgz#3d321af3eab939b083c8f929a1d12cda81c26b6b" integrity sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA== From 1de27b265b00a7219e8961ed90109217012682fa Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 5 Aug 2025 15:21:01 +0000 Subject: [PATCH 06/27] Update dependency @sentry/browser to v9.44.0 (#30490) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- yarn.lock | 68 +++++++++++++++++++++++++++---------------------------- 1 file changed, 34 insertions(+), 34 deletions(-) diff --git a/yarn.lock b/yarn.lock index 0e88f58050..d1aaeea923 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3132,35 +3132,35 @@ resolved "https://registry.yarnpkg.com/@rtsao/scc/-/scc-1.1.0.tgz#927dd2fae9bc3361403ac2c7a00c32ddce9ad7e8" integrity sha512-zt6OdqaDoOnJ1ZYsCYGt9YmWzDXl4vQdKTyJev62gFhRGKdx7mcT54V9KIjg+d2wi9EXsPvAPKe7i7WjfVWB8g== -"@sentry-internal/browser-utils@9.40.0": - version "9.40.0" - resolved "https://registry.yarnpkg.com/@sentry-internal/browser-utils/-/browser-utils-9.40.0.tgz#7eef6312aa4023636ac6aa19bc651b292639b502" - integrity sha512-Ajvz6jN+EEMKrOHcUv2+HlhbRUh69uXhhRoBjJw8sc61uqA2vv3QWyBSmTRoHdTnLGboT5bKEhHIkzVXb+YgEw== +"@sentry-internal/browser-utils@9.44.2": + version "9.44.2" + resolved "https://registry.yarnpkg.com/@sentry-internal/browser-utils/-/browser-utils-9.44.2.tgz#9d6be15ee170b8aae5045a0eacd9dfe5d70e93ad" + integrity sha512-VvaSk8DDV8fsUZf+bnbjziyu4RJgSNAxZ4jFo5Jq7Z/SXc7uciOGElpEzgALcY0uMbFA/0IsXQKpB1s01ZsoZQ== dependencies: - "@sentry/core" "9.40.0" + "@sentry/core" "9.44.2" -"@sentry-internal/feedback@9.40.0": - version "9.40.0" - resolved "https://registry.yarnpkg.com/@sentry-internal/feedback/-/feedback-9.40.0.tgz#ae38b5b33051330e850d0828a859d2263a6166cb" - integrity sha512-39UbLdGWGvSJ7bAzRnkv91cBdd6fLbdkLVVvqE2ZUfegm7+rH1mRPglmEhw4VE4mQfKZM1zWr/xus2+XPqJcYw== +"@sentry-internal/feedback@9.44.2": + version "9.44.2" + resolved "https://registry.yarnpkg.com/@sentry-internal/feedback/-/feedback-9.44.2.tgz#ab97736219e3dcd4d055e8b09701a4cb5a219402" + integrity sha512-EVyTIc/V2p3aK2GwMk1/r192C8uxLipJXYB+nQCIqYTduuvdg9jCUFsK90FbRCbIqQtglcvVYmyNZwY4IaMxoQ== dependencies: - "@sentry/core" "9.40.0" + "@sentry/core" "9.44.2" -"@sentry-internal/replay-canvas@9.40.0": - version "9.40.0" - resolved "https://registry.yarnpkg.com/@sentry-internal/replay-canvas/-/replay-canvas-9.40.0.tgz#812072a8fce4d003988a437b1392256374205fb5" - integrity sha512-GLoJ4R4Uipd7Vb+0LzSJA2qCyN1J6YalQIoDuOJTfYyykHvKltds5D8a/5S3Q6d8PcL/nxTn93fynauGEZt2Ow== +"@sentry-internal/replay-canvas@9.44.2": + version "9.44.2" + resolved "https://registry.yarnpkg.com/@sentry-internal/replay-canvas/-/replay-canvas-9.44.2.tgz#e751089af0fd6efaf4f90292a51d86142c34b00b" + integrity sha512-49wOCuXz5qf507BW6UuGOFGSxCGke84rreglLRr+N/8n3Ag2GQC7zcxn25SwidVsWYQo70GxSqzAwZVrOCe6Vw== dependencies: - "@sentry-internal/replay" "9.40.0" - "@sentry/core" "9.40.0" + "@sentry-internal/replay" "9.44.2" + "@sentry/core" "9.44.2" -"@sentry-internal/replay@9.40.0": - version "9.40.0" - resolved "https://registry.yarnpkg.com/@sentry-internal/replay/-/replay-9.40.0.tgz#19c99105d1c9bf42f482d639942b1b7caf0e02f1" - integrity sha512-WrmCvqbLJQC45IFRVN3k0J5pU5NkdX0e9o6XxjcmDiATKk00RHnW4yajnCJ8J1cPR4918yqiJHPX5xpG08BZNA== +"@sentry-internal/replay@9.44.2": + version "9.44.2" + resolved "https://registry.yarnpkg.com/@sentry-internal/replay/-/replay-9.44.2.tgz#c727d766249787bd2c9840c13ba63b47f8372dc8" + integrity sha512-LALsZg8n0F5OsOUELByXnCxPdovwl7eJja903fjamzC1MoWtTB06RXiZHqv/E1+HuTsseR2EggS0dLXfptximg== dependencies: - "@sentry-internal/browser-utils" "9.40.0" - "@sentry/core" "9.40.0" + "@sentry-internal/browser-utils" "9.44.2" + "@sentry/core" "9.44.2" "@sentry/babel-plugin-component-annotate@4.0.0": version "4.0.0" @@ -3168,15 +3168,15 @@ integrity sha512-1sozj4esnQBhJ2QO4imiLMl1858StkLjUxFF1KxgX/X1uEL/QlW2MYL8CKzbLeACy1SkR9h4V8GXSZvCnci5Dw== "@sentry/browser@^9.0.0": - version "9.40.0" - resolved "https://registry.yarnpkg.com/@sentry/browser/-/browser-9.40.0.tgz#75395fa311014596b259711e5fb9350c05962aa0" - integrity sha512-qz/1Go817vcsbcIwgrz4/T34vi3oQ4UIqikosuaCTI9wjZvK0HyW3QmLvTbAnsE7G7h6+UZsVkpO5R16IQvQhQ== + version "9.44.2" + resolved "https://registry.yarnpkg.com/@sentry/browser/-/browser-9.44.2.tgz#c7a61ac6c79a409e1cf21096d32afbb515c73b55" + integrity sha512-m5oMprtmPTeZB9PFrQfWmRQglSgzozAUFUFiQdL0g2QJkmyNL4LzEE2L88dxGSbnABLRu0MI1ySiEQTFa7ZSbw== dependencies: - "@sentry-internal/browser-utils" "9.40.0" - "@sentry-internal/feedback" "9.40.0" - "@sentry-internal/replay" "9.40.0" - "@sentry-internal/replay-canvas" "9.40.0" - "@sentry/core" "9.40.0" + "@sentry-internal/browser-utils" "9.44.2" + "@sentry-internal/feedback" "9.44.2" + "@sentry-internal/replay" "9.44.2" + "@sentry-internal/replay-canvas" "9.44.2" + "@sentry/core" "9.44.2" "@sentry/bundler-plugin-core@4.0.0": version "4.0.0" @@ -3252,10 +3252,10 @@ "@sentry/cli-win32-i686" "2.50.2" "@sentry/cli-win32-x64" "2.50.2" -"@sentry/core@9.40.0": - version "9.40.0" - resolved "https://registry.yarnpkg.com/@sentry/core/-/core-9.40.0.tgz#26a83ca3d39465d02be20b3aec2de03873177678" - integrity sha512-cZkuz6BDna6VXSqvlWnrRsaDx4QBKq1PcfQrqhVz8ljs0M7Gcl+Mtj8dCzUxx12fkYM62hQXG72DEGNlAQpH/Q== +"@sentry/core@9.44.2": + version "9.44.2" + resolved "https://registry.yarnpkg.com/@sentry/core/-/core-9.44.2.tgz#a2d55a6b108702925dfa7d97eb423cbc671fd2cc" + integrity sha512-4wduCY9vz+VRMZXTT1dzk08L2nReeR+lzpY8hCcc+Wu100BoJR+TNlrSn1rG5iIo98NDW860JsRA7SVDUDOiNQ== "@sentry/webpack-plugin@^4.0.0": version "4.0.0" From 51c4506431470c57a5ab7c01ceddc784610b7333 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 5 Aug 2025 15:21:25 +0000 Subject: [PATCH 07/27] Update dependency testcontainers to v11.5.0 (#30491) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- yarn.lock | 44 ++++++++++++++++++++++++++++---------------- 1 file changed, 28 insertions(+), 16 deletions(-) diff --git a/yarn.lock b/yarn.lock index d1aaeea923..8929ddafd6 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4059,19 +4059,26 @@ "@types/node" "*" "@types/node@*", "@types/node@>=13.7.0": - version "24.1.0" - resolved "https://registry.yarnpkg.com/@types/node/-/node-24.1.0.tgz#0993f7dc31ab5cc402d112315b463e383d68a49c" - integrity sha512-ut5FthK5moxFKH2T1CUOC6ctR67rQRvvHdFLCD2Ql6KXmMuCrjsSsRI9UsLCm9M18BMwClv4pn327UvB7eeO1w== + version "24.2.0" + resolved "https://registry.yarnpkg.com/@types/node/-/node-24.2.0.tgz#cde712f88c5190006d6b069232582ecd1f94a760" + integrity sha512-3xyG3pMCq3oYCNg7/ZP+E1ooTaGB4cG8JWRsqqOYQdbWNY4zbaV0Ennrd7stjiJEFZCaybcIgpTjJWHRfBSIDw== dependencies: - undici-types "~7.8.0" + undici-types "~7.10.0" -"@types/node@18", "@types/node@^18.11.18": +"@types/node@18": version "18.19.120" resolved "https://registry.yarnpkg.com/@types/node/-/node-18.19.120.tgz#07b3bd73875956d5281fa27e6d77a66415f7d455" integrity sha512-WtCGHFXnVI8WHLxDAt5TbnCM4eSE+nI0QN2NJtwzcgMhht2eNz6V9evJrk+lwC8bCY8OWV5Ym8Jz7ZEyGnKnMA== dependencies: undici-types "~5.26.4" +"@types/node@^18.11.18": + version "18.19.121" + resolved "https://registry.yarnpkg.com/@types/node/-/node-18.19.121.tgz#c50d353ea2d1fb1261a8bbd0bf2850306f5af2b3" + integrity sha512-bHOrbyztmyYIi4f1R0s17QsPs1uyyYnGcXeZoGEd227oZjry0q6XQBQxd82X1I57zEfwO8h9Xo+Kl5gX1d9MwQ== + dependencies: + undici-types "~5.26.4" + "@types/normalize-package-data@^2.4.0": version "2.4.4" resolved "https://registry.yarnpkg.com/@types/normalize-package-data/-/normalize-package-data-2.4.4.tgz#56e2cc26c397c038fab0e3a917a12d5c5909e901" @@ -14650,9 +14657,9 @@ test-exclude@^6.0.0: minimatch "^3.0.4" testcontainers@^11.0.0, testcontainers@^11.0.3: - version "11.3.2" - resolved "https://registry.yarnpkg.com/testcontainers/-/testcontainers-11.3.2.tgz#a2c5564875633d2efd5236698f9487aaaaeb8480" - integrity sha512-Kkc27Lor8ojvWKJOJKWjaE8BGnr3Sc0Wwjxel5DM4bEjhaX+8b76FvQ60Xr1sQLt09KqNVIA9ek81FCK69HZ0A== + version "11.5.0" + resolved "https://registry.yarnpkg.com/testcontainers/-/testcontainers-11.5.0.tgz#99e992d4401d0fcedd5e14ba7710b27d3be749d5" + integrity sha512-RPhuRqJ7OZR5e/uw9UEGbxuKjHGXruLlorRRcJvx429xzVapYammBNxmO2PNUW4M5lM/l6NryOY/AVECXaunSw== dependencies: "@balena/dockerignore" "^1.0.2" "@types/dockerode" "^3.3.42" @@ -15033,15 +15040,15 @@ undici-types@~5.26.4: resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-5.26.5.tgz#bcd539893d00b56e964fd2657a4866b221a65617" integrity sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA== -undici-types@~7.8.0: - version "7.8.0" - resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-7.8.0.tgz#de00b85b710c54122e44fbfd911f8d70174cd294" - integrity sha512-9UJ2xGDvQ43tYyVMpuHlsgApydB8ZKfVYTsLDhXkFL/6gfkp+U8xTGdh8pMJv1SpZna0zxG1DwsKZsreLbXBxw== +undici-types@~7.10.0: + version "7.10.0" + resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-7.10.0.tgz#4ac2e058ce56b462b056e629cc6a02393d3ff350" + integrity sha512-t5Fy/nfn+14LuOc2KNYg75vZqClpAiqscVvMygNnlsHBFpSXdJaYtXMcdNLpl/Qvc3P2cB3s6lOV51nqsFq4ag== undici@^7.12.0: - version "7.12.0" - resolved "https://registry.yarnpkg.com/undici/-/undici-7.12.0.tgz#e93244fa49383e8a0e1a4295048fd454541c7ccb" - integrity sha512-GrKEsc3ughskmGA9jevVlIOPMiiAHJ4OFUtaAH+NhfTUSiZ1wMPIQqQvAJUrJspFXJt3EBWgpAeoHEDVT1IBug== + version "7.13.0" + resolved "https://registry.yarnpkg.com/undici/-/undici-7.13.0.tgz#9331f99fc42970dcbdf54199e6604755ba54433a" + integrity sha512-l+zSMssRqrzDcb3fjMkjjLGmuiiK2pMIcV++mJaAc9vhjSGpvM7h43QgP+OAMb1GImHmbPyG2tBXeuyG5iY4gA== unhomoglyph@^1.0.6: version "1.0.6" @@ -15800,7 +15807,12 @@ yallist@^3.0.2: resolved "https://registry.yarnpkg.com/yallist/-/yallist-3.1.1.tgz#dbb7daf9bfd8bac9ab45ebf602b8cbad0d5d08fd" integrity sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g== -yaml@^2.2.2, yaml@^2.3.3, yaml@^2.7.0, yaml@^2.8.0: +yaml@^2.2.2: + version "2.8.1" + resolved "https://registry.yarnpkg.com/yaml/-/yaml-2.8.1.tgz#1870aa02b631f7e8328b93f8bc574fac5d6c4d79" + integrity sha512-lcYcMxX2PO9XMGvAJkJ3OsNMw+/7FKes7/hgerGUYWIoWu5j/+YQqcZr5JnPZWzOsEBgMbSbiSTn/dv/69Mkpw== + +yaml@^2.3.3, yaml@^2.7.0, yaml@^2.8.0: version "2.8.0" resolved "https://registry.yarnpkg.com/yaml/-/yaml-2.8.0.tgz#15f8c9866211bdc2d3781a0890e44d4fa1a5fff6" integrity sha512-4lLa/EcQCB0cJkyts+FpIRx5G/llPxfP6VQU5KByHEhLxY3IJCH0f0Hy1MHI8sClTvsIb8qwRJ6R/ZdlDJ/leQ== From 401fc63eb008ad131e767ba7581bb93bca29a750 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 5 Aug 2025 15:21:51 +0000 Subject: [PATCH 08/27] Update dependency @vector-im/compound-design-tokens to v6 (#30496) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index c85fbccf9e..4ef5ec11f4 100644 --- a/package.json +++ b/package.json @@ -97,7 +97,7 @@ "@sentry/browser": "^9.0.0", "@types/png-chunks-extract": "^1.0.2", "@types/react-virtualized": "^9.21.30", - "@vector-im/compound-design-tokens": "^5.0.0", + "@vector-im/compound-design-tokens": "^6.0.0", "@vector-im/compound-web": "^8.1.2", "@vector-im/matrix-wysiwyg": "2.39.0", "@zxcvbn-ts/core": "^3.0.4", diff --git a/yarn.lock b/yarn.lock index 8929ddafd6..e50bb6547c 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4530,10 +4530,10 @@ resolved "https://registry.yarnpkg.com/@ungap/structured-clone/-/structured-clone-1.2.0.tgz#756641adb587851b5ccb3e095daf27ae581c8406" integrity sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ== -"@vector-im/compound-design-tokens@^5.0.0": - version "5.0.1" - resolved "https://registry.yarnpkg.com/@vector-im/compound-design-tokens/-/compound-design-tokens-5.0.1.tgz#341edcc860a7200ad38ba1f4a0a8f5f43ff5174f" - integrity sha512-PbxhjfHsVGBmrioM7iZ1wgcG8KIZRcnHIJhhEpWascWQwJ9lRm1K7ixV7sjwPWYQlmweSUB8jz4qmp7VTrxWng== +"@vector-im/compound-design-tokens@^6.0.0": + version "6.0.0" + resolved "https://registry.yarnpkg.com/@vector-im/compound-design-tokens/-/compound-design-tokens-6.0.0.tgz#a07975ee46307fc31c2ec64a216b6be2b3b27fb3" + integrity sha512-Jk0NsLPCvdcuZi6an1cfyf4MDcIuoPlvja5ZWgJcORyGQZV1eLMHPYKShq9gj+EYk/BXZoPvQ1d6/T+/LSCNPA== "@vector-im/compound-web@^8.1.2": version "8.1.2" From 261d073f6d5a6c73b16852585c0e7ea030a34bf4 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 5 Aug 2025 15:25:41 +0000 Subject: [PATCH 09/27] Update dependency @babel/runtime to v7.28.2 (#30489) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/yarn.lock b/yarn.lock index e50bb6547c..d161aeb7a4 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1191,9 +1191,9 @@ "@babel/plugin-transform-typescript" "^7.27.1" "@babel/runtime@^7.0.0", "@babel/runtime@^7.12.13", "@babel/runtime@^7.12.5", "@babel/runtime@^7.15.4", "@babel/runtime@^7.17.9", "@babel/runtime@^7.5.5", "@babel/runtime@^7.7.2", "@babel/runtime@^7.8.7", "@babel/runtime@^7.9.2": - version "7.27.6" - resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.27.6.tgz#ec4070a04d76bae8ddbb10770ba55714a417b7c6" - integrity sha512-vbavdySgbTTrmFE+EsiqUTzlOr5bzlnJtUv9PynGCAKvfQqjIXbvFdumPM/GxMDfyuGMJaJAU6TO4zc1Jf1i8Q== + version "7.28.2" + resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.28.2.tgz#2ae5a9d51cc583bd1f5673b3bb70d6d819682473" + integrity sha512-KHp2IflsnGywDjBWDkR9iEqiWSpc8GIi0lgTT3mOElT0PP1tG26P4tmFI2YvAdzgq9RGyoHZQEIEdZy6Ec5xCA== "@babel/template@^7.22.5", "@babel/template@^7.25.7", "@babel/template@^7.27.1", "@babel/template@^7.27.2", "@babel/template@^7.3.3": version "7.27.2" From f2379878cd647550ea348f817645f2ca7b0e8c62 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 5 Aug 2025 15:25:54 +0000 Subject: [PATCH 10/27] Update typescript-eslint monorepo to v8.39.0 (#30494) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- yarn.lock | 127 ++++++++++++++++++++++++++++-------------------------- 1 file changed, 66 insertions(+), 61 deletions(-) diff --git a/yarn.lock b/yarn.lock index d161aeb7a4..4a0f6062c4 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4312,29 +4312,29 @@ "@types/yargs-parser" "*" "@typescript-eslint/eslint-plugin@^8.19.0": - version "8.38.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.38.0.tgz#6e5220d16f2691ab6d983c1737dd5b36e17641b7" - integrity sha512-CPoznzpuAnIOl4nhj4tRr4gIPj5AfKgkiJmGQDaq+fQnRJTYlcBjbX3wbciGmpoPf8DREufuPRe1tNMZnGdanA== + version "8.39.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.39.0.tgz#c9afec1866ee1a6ea3d768b5f8e92201efbbba06" + integrity sha512-bhEz6OZeUR+O/6yx9Jk6ohX6H9JSFTaiY0v9/PuKT3oGK0rn0jNplLmyFUGV+a9gfYnVNwGDwS/UkLIuXNb2Rw== dependencies: "@eslint-community/regexpp" "^4.10.0" - "@typescript-eslint/scope-manager" "8.38.0" - "@typescript-eslint/type-utils" "8.38.0" - "@typescript-eslint/utils" "8.38.0" - "@typescript-eslint/visitor-keys" "8.38.0" + "@typescript-eslint/scope-manager" "8.39.0" + "@typescript-eslint/type-utils" "8.39.0" + "@typescript-eslint/utils" "8.39.0" + "@typescript-eslint/visitor-keys" "8.39.0" graphemer "^1.4.0" ignore "^7.0.0" natural-compare "^1.4.0" ts-api-utils "^2.1.0" "@typescript-eslint/parser@^8.19.0": - version "8.38.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-8.38.0.tgz#6723a5ea881e1777956b1045cba30be5ea838293" - integrity sha512-Zhy8HCvBUEfBECzIl1PKqF4p11+d0aUJS1GeUiuqK9WmOug8YCmC4h4bjyBvMyAMI9sbRczmrYL5lKg/YMbrcQ== + version "8.39.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-8.39.0.tgz#c4b895d7a47f4cd5ee6ee77ea30e61d58b802008" + integrity sha512-g3WpVQHngx0aLXn6kfIYCZxM6rRJlWzEkVpqEFLT3SgEDsp9cpCbxxgwnE504q4H+ruSDh/VGS6nqZIDynP+vg== dependencies: - "@typescript-eslint/scope-manager" "8.38.0" - "@typescript-eslint/types" "8.38.0" - "@typescript-eslint/typescript-estree" "8.38.0" - "@typescript-eslint/visitor-keys" "8.38.0" + "@typescript-eslint/scope-manager" "8.39.0" + "@typescript-eslint/types" "8.39.0" + "@typescript-eslint/typescript-estree" "8.39.0" + "@typescript-eslint/visitor-keys" "8.39.0" debug "^4.3.4" "@typescript-eslint/project-service@8.35.0": @@ -4346,13 +4346,13 @@ "@typescript-eslint/types" "^8.35.0" debug "^4.3.4" -"@typescript-eslint/project-service@8.38.0": - version "8.38.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/project-service/-/project-service-8.38.0.tgz#4900771f943163027fd7d2020a062892056b5e2f" - integrity sha512-dbK7Jvqcb8c9QfH01YB6pORpqX1mn5gDZc9n63Ak/+jD67oWXn3Gs0M6vddAN+eDXBCS5EmNWzbSxsn9SzFWWg== +"@typescript-eslint/project-service@8.39.0": + version "8.39.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/project-service/-/project-service-8.39.0.tgz#71cb29c3f8139f99a905b8705127bffc2ae84759" + integrity sha512-CTzJqaSq30V/Z2Og9jogzZt8lJRR5TKlAdXmWgdu4hgcC9Kww5flQ+xFvMxIBWVNdxJO7OifgdOK4PokMIWPew== dependencies: - "@typescript-eslint/tsconfig-utils" "^8.38.0" - "@typescript-eslint/types" "^8.38.0" + "@typescript-eslint/tsconfig-utils" "^8.39.0" + "@typescript-eslint/types" "^8.39.0" debug "^4.3.4" "@typescript-eslint/scope-manager@8.23.0": @@ -4371,37 +4371,37 @@ "@typescript-eslint/types" "8.35.0" "@typescript-eslint/visitor-keys" "8.35.0" -"@typescript-eslint/scope-manager@8.38.0": - version "8.38.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-8.38.0.tgz#5a0efcb5c9cf6e4121b58f87972f567c69529226" - integrity sha512-WJw3AVlFFcdT9Ri1xs/lg8LwDqgekWXWhH3iAF+1ZM+QPd7oxQ6jvtW/JPwzAScxitILUIFs0/AnQ/UWHzbATQ== +"@typescript-eslint/scope-manager@8.39.0": + version "8.39.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-8.39.0.tgz#ba4bf6d8257bbc172c298febf16bc22df4856570" + integrity sha512-8QOzff9UKxOh6npZQ/4FQu4mjdOCGSdO3p44ww0hk8Vu+IGbg0tB/H1LcTARRDzGCC8pDGbh2rissBuuoPgH8A== dependencies: - "@typescript-eslint/types" "8.38.0" - "@typescript-eslint/visitor-keys" "8.38.0" + "@typescript-eslint/types" "8.39.0" + "@typescript-eslint/visitor-keys" "8.39.0" "@typescript-eslint/tsconfig-utils@8.35.0": version "8.35.0" resolved "https://registry.yarnpkg.com/@typescript-eslint/tsconfig-utils/-/tsconfig-utils-8.35.0.tgz#6e05aeb999999e31d562ceb4fe144f3cbfbd670e" integrity sha512-04k/7247kZzFraweuEirmvUj+W3bJLI9fX6fbo1Qm2YykuBvEhRTPl8tcxlYO8kZZW+HIXfkZNoasVb8EV4jpA== -"@typescript-eslint/tsconfig-utils@8.38.0", "@typescript-eslint/tsconfig-utils@^8.38.0": - version "8.38.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/tsconfig-utils/-/tsconfig-utils-8.38.0.tgz#6de4ce224a779601a8df667db56527255c42c4d0" - integrity sha512-Lum9RtSE3EroKk/bYns+sPOodqb2Fv50XOl/gMviMKNvanETUuUcC9ObRbzrJ4VSd2JalPqgSAavwrPiPvnAiQ== +"@typescript-eslint/tsconfig-utils@8.39.0", "@typescript-eslint/tsconfig-utils@^8.39.0": + version "8.39.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/tsconfig-utils/-/tsconfig-utils-8.39.0.tgz#b2e87fef41a3067c570533b722f6af47be213f13" + integrity sha512-Fd3/QjmFV2sKmvv3Mrj8r6N8CryYiCS8Wdb/6/rgOXAWGcFuc+VkQuG28uk/4kVNVZBQuuDHEDUpo/pQ32zsIQ== "@typescript-eslint/tsconfig-utils@^8.35.0": version "8.36.0" resolved "https://registry.yarnpkg.com/@typescript-eslint/tsconfig-utils/-/tsconfig-utils-8.36.0.tgz#63ef8a20ae9b5754c6ceacbe87b2fe1aab12ba13" integrity sha512-Nhh3TIEgN18mNbdXpd5Q8mSCBnrZQeY9V7Ca3dqYvNDStNIGRmJA6dmrIPMJ0kow3C7gcQbpsG2rPzy1Ks/AnA== -"@typescript-eslint/type-utils@8.38.0": - version "8.38.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-8.38.0.tgz#a56cd84765fa6ec135fe252b5db61e304403a85b" - integrity sha512-c7jAvGEZVf0ao2z+nnz8BUaHZD09Agbh+DY7qvBQqLiz8uJzRgVPj5YvOh8I8uEiH8oIUGIfHzMwUcGVco/SJg== +"@typescript-eslint/type-utils@8.39.0": + version "8.39.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-8.39.0.tgz#310ec781ae5e7bb0f5940bfd652573587f22786b" + integrity sha512-6B3z0c1DXVT2vYA9+z9axjtc09rqKUPRmijD5m9iv8iQpHBRYRMBcgxSiKTZKm6FwWw1/cI4v6em35OsKCiN5Q== dependencies: - "@typescript-eslint/types" "8.38.0" - "@typescript-eslint/typescript-estree" "8.38.0" - "@typescript-eslint/utils" "8.38.0" + "@typescript-eslint/types" "8.39.0" + "@typescript-eslint/typescript-estree" "8.39.0" + "@typescript-eslint/utils" "8.39.0" debug "^4.3.4" ts-api-utils "^2.1.0" @@ -4415,16 +4415,21 @@ resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-8.35.0.tgz#e60d062907930e30008d796de5c4170f02618a93" integrity sha512-0mYH3emanku0vHw2aRLNGqe7EXh9WHEhi7kZzscrMDf6IIRUQ5Jk4wp1QrledE/36KtdZrVfKnE32eZCf/vaVQ== -"@typescript-eslint/types@8.38.0", "@typescript-eslint/types@^8.37.0", "@typescript-eslint/types@^8.38.0": - version "8.38.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-8.38.0.tgz#297351c994976b93c82ac0f0e206c8143aa82529" - integrity sha512-wzkUfX3plUqij4YwWaJyqhiPE5UCRVlFpKn1oCRn2O1bJ592XxWJj8ROQ3JD5MYXLORW84063z3tZTb/cs4Tyw== +"@typescript-eslint/types@8.39.0", "@typescript-eslint/types@^8.39.0": + version "8.39.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-8.39.0.tgz#80f010b7169d434a91cd0529d70a528dbc9c99c6" + integrity sha512-ArDdaOllnCj3yn/lzKn9s0pBQYmmyme/v1HbGIGB0GB/knFI3fWMHloC+oYTJW46tVbYnGKTMDK4ah1sC2v0Kg== "@typescript-eslint/types@^8.35.0": version "8.36.0" resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-8.36.0.tgz#d3d184adc2899e2912c13b17c1590486ef37c7ac" integrity sha512-xGms6l5cTJKQPZOKM75Dl9yBfNdGeLRsIyufewnxT4vZTrjC0ImQT4fj8QmtJK84F58uSh5HVBSANwcfiXxABQ== +"@typescript-eslint/types@^8.37.0": + version "8.38.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-8.38.0.tgz#297351c994976b93c82ac0f0e206c8143aa82529" + integrity sha512-wzkUfX3plUqij4YwWaJyqhiPE5UCRVlFpKn1oCRn2O1bJ592XxWJj8ROQ3JD5MYXLORW84063z3tZTb/cs4Tyw== + "@typescript-eslint/typescript-estree@8.23.0": version "8.23.0" resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-8.23.0.tgz#f633ef08efa656e386bc44b045ffcf9537cc6924" @@ -4455,15 +4460,15 @@ semver "^7.6.0" ts-api-utils "^2.1.0" -"@typescript-eslint/typescript-estree@8.38.0": - version "8.38.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-8.38.0.tgz#82262199eb6778bba28a319e25ad05b1158957df" - integrity sha512-fooELKcAKzxux6fA6pxOflpNS0jc+nOQEEOipXFNjSlBS6fqrJOVY/whSn70SScHrcJ2LDsxWrneFoWYSVfqhQ== +"@typescript-eslint/typescript-estree@8.39.0": + version "8.39.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-8.39.0.tgz#b9477a5c47a0feceffe91adf553ad9a3cd4cb3d6" + integrity sha512-ndWdiflRMvfIgQRpckQQLiB5qAKQ7w++V4LlCHwp62eym1HLB/kw7D9f2e8ytONls/jt89TEasgvb+VwnRprsw== dependencies: - "@typescript-eslint/project-service" "8.38.0" - "@typescript-eslint/tsconfig-utils" "8.38.0" - "@typescript-eslint/types" "8.38.0" - "@typescript-eslint/visitor-keys" "8.38.0" + "@typescript-eslint/project-service" "8.39.0" + "@typescript-eslint/tsconfig-utils" "8.39.0" + "@typescript-eslint/types" "8.39.0" + "@typescript-eslint/visitor-keys" "8.39.0" debug "^4.3.4" fast-glob "^3.3.2" is-glob "^4.0.3" @@ -4471,15 +4476,15 @@ semver "^7.6.0" ts-api-utils "^2.1.0" -"@typescript-eslint/utils@8.38.0": - version "8.38.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-8.38.0.tgz#5f10159899d30eb92ba70e642ca6f754bddbf15a" - integrity sha512-hHcMA86Hgt+ijJlrD8fX0j1j8w4C92zue/8LOPAFioIno+W0+L7KqE8QZKCcPGc/92Vs9x36w/4MPTJhqXdyvg== +"@typescript-eslint/utils@8.39.0": + version "8.39.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-8.39.0.tgz#dfea42f3c7ec85f9f3e994ff0bba8f3b2f09e220" + integrity sha512-4GVSvNA0Vx1Ktwvf4sFE+exxJ3QGUorQG1/A5mRfRNZtkBT2xrA/BCO2H0eALx/PnvCS6/vmYwRdDA41EoffkQ== dependencies: "@eslint-community/eslint-utils" "^4.7.0" - "@typescript-eslint/scope-manager" "8.38.0" - "@typescript-eslint/types" "8.38.0" - "@typescript-eslint/typescript-estree" "8.38.0" + "@typescript-eslint/scope-manager" "8.39.0" + "@typescript-eslint/types" "8.39.0" + "@typescript-eslint/typescript-estree" "8.39.0" "@typescript-eslint/utils@^6.0.0 || ^7.0.0 || ^8.0.0": version "8.23.0" @@ -4517,12 +4522,12 @@ "@typescript-eslint/types" "8.35.0" eslint-visitor-keys "^4.2.1" -"@typescript-eslint/visitor-keys@8.38.0": - version "8.38.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-8.38.0.tgz#a9765a527b082cb8fc60fd8a16e47c7ad5b60ea5" - integrity sha512-pWrTcoFNWuwHlA9CvlfSsGWs14JxfN1TH25zM5L7o0pRLhsoZkDnTsXfQRJBEWJoV5DL0jf+Z+sxiud+K0mq1g== +"@typescript-eslint/visitor-keys@8.39.0": + version "8.39.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-8.39.0.tgz#5d619a6e810cdd3fd1913632719cbccab08bf875" + integrity sha512-ldgiJ+VAhQCfIjeOgu8Kj5nSxds0ktPOSO9p4+0VDH2R2pLvQraaM5Oen2d7NxzMCm+Sn/vJT+mv2H5u6b/3fA== dependencies: - "@typescript-eslint/types" "8.38.0" + "@typescript-eslint/types" "8.39.0" eslint-visitor-keys "^4.2.1" "@ungap/structured-clone@^1.2.0": From d837d2f62d65bf47ed8e93f6f5c1712529c6344c Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 5 Aug 2025 16:04:58 +0000 Subject: [PATCH 11/27] Update Node.js to 2d63e0f (#30483) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 80f12f47e4..172a03b229 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,7 @@ # syntax=docker.io/docker/dockerfile:1.17-labs@sha256:9187104f31e3a002a8a6a3209ea1f937fb7486c093cbbde1e14b0fa0d7e4f1b5 # Builder -FROM --platform=$BUILDPLATFORM node:22-bullseye@sha256:a80324457a2c8d09c83ff9edf2bdf71f378d3288de920e68a358bd3c484b8c4a AS builder +FROM --platform=$BUILDPLATFORM node:22-bullseye@sha256:2d63e0f812d023c4c764e83d7e30dc94949304443ebc372d5c445e63a5ae49c1 AS builder # Support custom branch of the js-sdk. This also helps us build images of element-web develop. ARG USE_CUSTOM_SDKS=false From 9be2b973d0c486e2860ae7b7137333d839f67ae6 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 5 Aug 2025 16:39:49 +0000 Subject: [PATCH 12/27] Update react monorepo (#30486) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- package.json | 10 +++++----- yarn.lock | 36 ++++++++++++++++++------------------ 2 files changed, 23 insertions(+), 23 deletions(-) diff --git a/package.json b/package.json index 4ef5ec11f4..064773c9b7 100644 --- a/package.json +++ b/package.json @@ -73,10 +73,10 @@ "test:storybook:update": "playwright-screenshots --entrypoint yarn --with-node-modules && playwright-screenshots --entrypoint /work/node_modules/.bin/test-storybook --with-node-modules --url http://host.docker.internal:6007/ --updateSnapshot" }, "resolutions": { - "**/pretty-format/react-is": "19.1.0", + "**/pretty-format/react-is": "19.1.1", "@playwright/test": "1.54.2", - "@types/react": "19.1.8", - "@types/react-dom": "19.1.6", + "@types/react": "19.1.9", + "@types/react-dom": "19.1.7", "oidc-client-ts": "3.3.0", "jwt-decode": "4.0.0", "caniuse-lite": "1.0.30001724", @@ -223,9 +223,9 @@ "@types/node-fetch": "^2.6.2", "@types/pako": "^2.0.0", "@types/qrcode": "^1.3.5", - "@types/react": "19.1.8", + "@types/react": "19.1.9", "@types/react-beautiful-dnd": "^13.0.0", - "@types/react-dom": "19.1.6", + "@types/react-dom": "19.1.7", "@types/react-transition-group": "^4.4.0", "@types/sanitize-html": "2.16.0", "@types/semver": "^7.5.8", diff --git a/yarn.lock b/yarn.lock index 4a0f6062c4..e85e9f7e72 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4128,10 +4128,10 @@ dependencies: "@types/react" "*" -"@types/react-dom@19.1.6": - version "19.1.6" - resolved "https://registry.yarnpkg.com/@types/react-dom/-/react-dom-19.1.6.tgz#4af629da0e9f9c0f506fc4d1caa610399c595d64" - integrity sha512-4hOiT/dwO8Ko0gV1m/TJZYk3y0KBnY9vzDh7W+DH17b2HFSOGgdj33dhihPeuy3l0q23+4e+hoXHV6hCC4dCXw== +"@types/react-dom@19.1.7": + version "19.1.7" + resolved "https://registry.yarnpkg.com/@types/react-dom/-/react-dom-19.1.7.tgz#2863f2aa89e023592b981204ef92c5221b286410" + integrity sha512-i5ZzwYpqjmrKenzkoLM2Ibzt6mAsM7pxB6BCIouEVVmgiqaMj1TjaK7hnA36hbW5aZv20kx7Lw6hWzPWg0Rurw== "@types/react-redux@^7.1.20": version "7.1.34" @@ -4156,10 +4156,10 @@ "@types/prop-types" "*" "@types/react" "*" -"@types/react@*", "@types/react@19.1.8": - version "19.1.8" - resolved "https://registry.yarnpkg.com/@types/react/-/react-19.1.8.tgz#ff8395f2afb764597265ced15f8dddb0720ae1c3" - integrity sha512-AwAfQ2Wa5bCx9WP8nZL2uMZWod7J7/JSplxbTmBQ5ms6QpqNYm672H0Vu9ZVKVngQ+ii4R/byguVEUZQyeg44g== +"@types/react@*", "@types/react@19.1.9": + version "19.1.9" + resolved "https://registry.yarnpkg.com/@types/react/-/react-19.1.9.tgz#f42b24f35474566a39b5c3a98e4d0c425b79a849" + integrity sha512-WmdoynAX8Stew/36uTSVMcLJJ1KRh6L3IZRx1PZ7qJtBqT3dYTgyDTx8H1qoRghErydW7xw9mSJ3wS//tCRpFA== dependencies: csstype "^3.0.2" @@ -12984,9 +12984,9 @@ react-docgen@^8.0.0: strip-indent "^4.0.0" "react-dom@^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0", react-dom@^19.0.0: - version "19.1.0" - resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-19.1.0.tgz#133558deca37fa1d682708df8904b25186793623" - integrity sha512-Xs1hdnE+DyKgeHJeJznQmYMIBG3TKIHJJT95Q58nHLSrElKlGQqDTR2HQ9fx5CN/Gk6Vh/kupBTDLU11/nDk/g== + version "19.1.1" + resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-19.1.1.tgz#2daa9ff7f3ae384aeb30e76d5ee38c046dc89893" + integrity sha512-Dlq/5LAZgF0Gaz6yiqZCf6VCcZs1ghAJyrsu84Q/GT0gV+mCxbfmKNoGRKBYMJ8IEdGPqu49YWXD02GCknEDkw== dependencies: scheduler "^0.26.0" @@ -13002,10 +13002,10 @@ react-focus-lock@^2.5.1: use-callback-ref "^1.3.3" use-sidecar "^1.1.3" -react-is@19.1.0, react-is@^17.0.1, react-is@^18.0.0: - version "19.1.0" - resolved "https://registry.yarnpkg.com/react-is/-/react-is-19.1.0.tgz#805bce321546b7e14c084989c77022351bbdd11b" - integrity sha512-Oe56aUPnkHyyDxxkvqtd7KkdQP5uIUfHxd5XTb3wE9d/kRnZLmKbDB0GWk919tdQ+mxxPtG6EAs6RMT6i1qtHg== +react-is@19.1.1, react-is@^17.0.1, react-is@^18.0.0: + version "19.1.1" + resolved "https://registry.yarnpkg.com/react-is/-/react-is-19.1.1.tgz#038ebe313cf18e1fd1235d51c87360eb87f7c36a" + integrity sha512-tr41fA15Vn8p4X9ntI+yCyeGSf1TlYaY5vlTZfQmeLBrFo3psOPX6HhTDnFNL9uj3EhP0KAQ80cugCl4b4BERA== react-is@^16.13.1, react-is@^16.7.0: version "16.13.1" @@ -13100,9 +13100,9 @@ react-virtuoso@^4.12.6: integrity sha512-bfvS6aCL1ehXmq39KRiz/vxznGUbtA27I5I24TYCe1DhMf84O3aVNCIwrSjYQjkJGJGzY46ihdN8WkYlemuhMQ== "react@^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0", react@^19.0.0: - version "19.1.0" - resolved "https://registry.yarnpkg.com/react/-/react-19.1.0.tgz#926864b6c48da7627f004795d6cce50e90793b75" - integrity sha512-FS+XFBNvn3GTAWq26joslQgWNoFu08F4kl0J4CgdNKADkdSGXQyTCnKteIAJy96Br6YbpEU1LSzV5dYtjMkMDg== + version "19.1.1" + resolved "https://registry.yarnpkg.com/react/-/react-19.1.1.tgz#06d9149ec5e083a67f9a1e39ce97b06a03b644af" + integrity sha512-w8nqGImo45dmMIfljjMwOGtbmC/mk4CMYhWIicdSflH91J9TyCyczcPFXJzrZ/ZXcgGRFeP6BU0BEJTw6tZdfQ== read-cache@^1.0.0: version "1.0.0" From 24f923feac6b32e17a343d47e8c8566b17955d6c Mon Sep 17 00:00:00 2001 From: Florian Duros Date: Tue, 5 Aug 2025 19:04:45 +0200 Subject: [PATCH 13/27] Move `number.ts` to utils in shared components (#30498) * refactor: move `number.ts` in shared components * chore: include ts test file in sonar config --- sonar-project.properties | 2 +- src/audio/Playback.ts | 2 +- src/audio/RecorderWorklet.ts | 2 +- src/audio/VoiceRecording.ts | 2 +- src/components/views/audio_messages/PlaybackWaveform.tsx | 2 +- src/components/views/audio_messages/SeekBar.tsx | 2 +- src/components/views/emojipicker/EmojiPicker.tsx | 2 +- src/components/views/rooms/AppsDrawer.tsx | 2 +- .../shared-components/utils/numbers.test.ts | 2 +- src/{ => shared-components}/utils/numbers.ts | 0 src/stores/widgets/WidgetLayoutStore.ts | 2 +- src/utils/arrays.ts | 2 +- 12 files changed, 11 insertions(+), 11 deletions(-) rename test/unit-tests/utils/numbers-test.ts => src/shared-components/utils/numbers.test.ts (99%) rename src/{ => shared-components}/utils/numbers.ts (100%) diff --git a/sonar-project.properties b/sonar-project.properties index 23333a43cc..31ce8d776f 100644 --- a/sonar-project.properties +++ b/sonar-project.properties @@ -6,7 +6,7 @@ sonar.organization=element-hq sonar.sources=src,res sonar.tests=test,playwright,src -sonar.test.inclusions=test/*,playwright/*,src/**/*.test.tsx +sonar.test.inclusions=test/*,playwright/*,src/**/*.test.* sonar.exclusions=__mocks__,docs,element.io,nginx sonar.cpd.exclusions=src/i18n/strings/*.json diff --git a/src/audio/Playback.ts b/src/audio/Playback.ts index 54d2c710d0..96930d43af 100644 --- a/src/audio/Playback.ts +++ b/src/audio/Playback.ts @@ -15,7 +15,7 @@ import { arrayFastResample } from "../utils/arrays"; import { type IDestroyable } from "../utils/IDestroyable"; import { PlaybackClock } from "./PlaybackClock"; import { createAudioContext, decodeOgg } from "./compat"; -import { clamp } from "../utils/numbers"; +import { clamp } from "../shared-components/utils/numbers"; import { DEFAULT_WAVEFORM, PLAYBACK_WAVEFORM_SAMPLES } from "./consts"; import { PlaybackEncoder } from "../PlaybackEncoder"; diff --git a/src/audio/RecorderWorklet.ts b/src/audio/RecorderWorklet.ts index ec4a143c4e..5f96e686ce 100644 --- a/src/audio/RecorderWorklet.ts +++ b/src/audio/RecorderWorklet.ts @@ -7,7 +7,7 @@ Please see LICENSE files in the repository root for full details. */ import { type IAmplitudePayload, type ITimingPayload, PayloadEvent, WORKLET_NAME } from "./consts"; -import { percentageOf } from "../utils/numbers"; +import { percentageOf } from "../shared-components/utils/numbers"; // from AudioWorkletGlobalScope: https://developer.mozilla.org/en-US/docs/Web/API/AudioWorkletGlobalScope declare const currentTime: number; diff --git a/src/audio/VoiceRecording.ts b/src/audio/VoiceRecording.ts index bde86f9dd7..2c5788ef21 100644 --- a/src/audio/VoiceRecording.ts +++ b/src/audio/VoiceRecording.ts @@ -19,7 +19,7 @@ import { PayloadEvent, WORKLET_NAME } from "./consts"; import { UPDATE_EVENT } from "../stores/AsyncStore"; import { createAudioContext } from "./compat"; import { FixedRollingArray } from "../utils/FixedRollingArray"; -import { clamp } from "../utils/numbers"; +import { clamp } from "../shared-components/utils/numbers"; import recorderWorkletFactory from "./recorderWorkletFactory"; const CHANNELS = 1; // stereo isn't important diff --git a/src/components/views/audio_messages/PlaybackWaveform.tsx b/src/components/views/audio_messages/PlaybackWaveform.tsx index c1f470f4b1..895348fb51 100644 --- a/src/components/views/audio_messages/PlaybackWaveform.tsx +++ b/src/components/views/audio_messages/PlaybackWaveform.tsx @@ -11,7 +11,7 @@ import React from "react"; import { arraySeed, arrayTrimFill } from "../../../utils/arrays"; import Waveform from "./Waveform"; import { type Playback } from "../../../audio/Playback"; -import { percentageOf } from "../../../utils/numbers"; +import { percentageOf } from "../../../shared-components/utils/numbers"; import { PLAYBACK_WAVEFORM_SAMPLES } from "../../../audio/consts"; interface IProps { diff --git a/src/components/views/audio_messages/SeekBar.tsx b/src/components/views/audio_messages/SeekBar.tsx index 587975ce1b..c5ec63b359 100644 --- a/src/components/views/audio_messages/SeekBar.tsx +++ b/src/components/views/audio_messages/SeekBar.tsx @@ -10,7 +10,7 @@ import React, { type ChangeEvent, type CSSProperties, type ReactNode } from "rea import { type PlaybackInterface } from "../../../audio/Playback"; import { MarkedExecution } from "../../../utils/MarkedExecution"; -import { percentageOf } from "../../../utils/numbers"; +import { percentageOf } from "../../../shared-components/utils/numbers"; import { _t } from "../../../languageHandler"; interface IProps { diff --git a/src/components/views/emojipicker/EmojiPicker.tsx b/src/components/views/emojipicker/EmojiPicker.tsx index 71659d579b..13caa817ae 100644 --- a/src/components/views/emojipicker/EmojiPicker.tsx +++ b/src/components/views/emojipicker/EmojiPicker.tsx @@ -26,7 +26,7 @@ import { Type, } from "../../../accessibility/RovingTabIndex"; import { Key } from "../../../Keyboard"; -import { clamp } from "../../../utils/numbers"; +import { clamp } from "../../../shared-components/utils/numbers"; import { type ButtonEvent } from "../elements/AccessibleButton"; export const CATEGORY_HEADER_HEIGHT = 20; diff --git a/src/components/views/rooms/AppsDrawer.tsx b/src/components/views/rooms/AppsDrawer.tsx index a5c869c0c3..ac6328c3bf 100644 --- a/src/components/views/rooms/AppsDrawer.tsx +++ b/src/components/views/rooms/AppsDrawer.tsx @@ -22,7 +22,7 @@ import ResizeHandle from "../elements/ResizeHandle"; import Resizer, { type IConfig } from "../../../resizer/resizer"; import PercentageDistributor from "../../../resizer/distributors/percentage"; import { Container, WidgetLayoutStore } from "../../../stores/widgets/WidgetLayoutStore"; -import { clamp, percentageOf, percentageWithin } from "../../../utils/numbers"; +import { clamp, percentageOf, percentageWithin } from "../../../shared-components/utils/numbers"; import UIStore from "../../../stores/UIStore"; import { type ActionPayload } from "../../../dispatcher/payloads"; import Spinner from "../elements/Spinner"; diff --git a/test/unit-tests/utils/numbers-test.ts b/src/shared-components/utils/numbers.test.ts similarity index 99% rename from test/unit-tests/utils/numbers-test.ts rename to src/shared-components/utils/numbers.test.ts index 1de68ce499..928fd67ae0 100644 --- a/test/unit-tests/utils/numbers-test.ts +++ b/src/shared-components/utils/numbers.test.ts @@ -6,7 +6,7 @@ SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only OR LicenseRef-Element-Com Please see LICENSE files in the repository root for full details. */ -import { clamp, defaultNumber, percentageOf, percentageWithin, sum } from "../../../src/utils/numbers"; +import { clamp, defaultNumber, percentageOf, percentageWithin, sum } from "./numbers"; describe("numbers", () => { describe("defaultNumber", () => { diff --git a/src/utils/numbers.ts b/src/shared-components/utils/numbers.ts similarity index 100% rename from src/utils/numbers.ts rename to src/shared-components/utils/numbers.ts diff --git a/src/stores/widgets/WidgetLayoutStore.ts b/src/stores/widgets/WidgetLayoutStore.ts index eaea0957b0..bb1c8161bc 100644 --- a/src/stores/widgets/WidgetLayoutStore.ts +++ b/src/stores/widgets/WidgetLayoutStore.ts @@ -14,7 +14,7 @@ import { type IWidget } from "matrix-widget-api"; import SettingsStore from "../../settings/SettingsStore"; import WidgetStore, { type IApp } from "../WidgetStore"; import { WidgetType } from "../../widgets/WidgetType"; -import { clamp, defaultNumber, sum } from "../../utils/numbers"; +import { clamp, defaultNumber, sum } from "../../shared-components/utils/numbers"; import defaultDispatcher from "../../dispatcher/dispatcher"; import { ReadyWatchingStore } from "../ReadyWatchingStore"; import { SettingLevel } from "../../settings/SettingLevel"; diff --git a/src/utils/arrays.ts b/src/utils/arrays.ts index b54e0949f2..c87be4aee9 100644 --- a/src/utils/arrays.ts +++ b/src/utils/arrays.ts @@ -6,7 +6,7 @@ SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only OR LicenseRef-Element-Com Please see LICENSE files in the repository root for full details. */ -import { percentageOf, percentageWithin } from "./numbers"; +import { percentageOf, percentageWithin } from "../shared-components/utils/numbers"; /** * Quickly resample an array to have less/more data points. If an input which is larger From 6fca4d106ec9ff6189d94c76589913397b383997 Mon Sep 17 00:00:00 2001 From: Florian Duros Date: Tue, 5 Aug 2025 19:04:55 +0200 Subject: [PATCH 14/27] Move `clock` into shared components (#30480) * refactor: extract `formatSeconds` from `DateUtils` * refactor: move clock into shared-components * refactor: update clock imports * test(e2e): add screenshots --- .../audio-clock--default-linux.png | Bin 0 -> 5380 bytes .../audio-clock--lot-of-seconds-linux.png | Bin 0 -> 6782 bytes src/DateUtils.ts | 27 +------------- .../views/audio_messages/DurationClock.tsx | 2 +- .../audio_messages/LiveRecordingClock.tsx | 2 +- .../views/audio_messages/PlaybackClock.tsx | 2 +- .../views/messages/LegacyCallEvent.tsx | 2 +- .../audio/Clock/Clock.stories.tsx | 29 +++++++++++++++ .../audio/Clock/Clock.test.tsx | 26 +++++++++++++ .../audio/Clock}/Clock.tsx | 18 +++------ .../Clock/__snapshots__/Clock.test.tsx.snap | 23 ++++++++++++ src/shared-components/audio/Clock/index.tsx | 8 ++++ src/shared-components/utils/DateUtils.ts | 35 ++++++++++++++++++ 13 files changed, 133 insertions(+), 41 deletions(-) create mode 100644 playwright/shared-component-snapshots/audio-clock--default-linux.png create mode 100644 playwright/shared-component-snapshots/audio-clock--lot-of-seconds-linux.png create mode 100644 src/shared-components/audio/Clock/Clock.stories.tsx create mode 100644 src/shared-components/audio/Clock/Clock.test.tsx rename src/{components/views/audio_messages => shared-components/audio/Clock}/Clock.tsx (76%) create mode 100644 src/shared-components/audio/Clock/__snapshots__/Clock.test.tsx.snap create mode 100644 src/shared-components/audio/Clock/index.tsx create mode 100644 src/shared-components/utils/DateUtils.ts diff --git a/playwright/shared-component-snapshots/audio-clock--default-linux.png b/playwright/shared-component-snapshots/audio-clock--default-linux.png new file mode 100644 index 0000000000000000000000000000000000000000..be66f4b70cbd9d2171aed4c290511a8a966a1073 GIT binary patch literal 5380 zcmeHL`%jZ+6#k%~OkkL?6bF`?=wJzG35p18PbB5UZ}JJ!5e}a z=BixU5#or^7A7cFdb3@rTtq-8Qrco^rIuSMEwrV#eYihi@WYb+@}4(e-kkHCH|Kf2 zbKa}pC&v4(30wmJfN#S7y+;AS6WqG@d%1&VH~fGb0IUTP_U`$CST`k4z9P@67wAbfC+-OrM$q=YPRGO#6Lb?EIlgjza~CVeg(nwJayq< zSl)cdiHHT^9q&f3KfNlwx{fz_#cVKMjEKJ(lcd`8xaI_`&I4hzT4cQzG#~xSPSeDk zXAR3_>p>)f)Q;R$pk2G+B8X`JS^>D<u2uk0N|pBn-2)O6aY_d*aJWS z;O2im?#Rsd-2O*a6?&FFf<0+zqH-+@CiJ>?47 zGQySccnh5y$r|bf9LWuPC=oqxAMWm`qB>qUDs)_ubEciO3pdfLo>hpo+KeO3c8u|o zy;1alVH@j0Vr|ZyqEFe}hozP%?x4t+SShuqdkhQhwED4pLeVkN_1LX}XX~iyw?l|g zhuIKR_FOpEfMCSh|4Oz}4T^luwqW1!0Nw89BYh8F(oFI;+gx_eq#>8+O6%)hZ#r`e*2>2 zgFZiFQFta+#?7*gyjGO!2WOO1LMblelT(Z&>32=5Mf?bs{A638FJd!@GCW*fWSnew zH29{XEcY8n=}cL%Sun$d(wTm%I^sn=m_vMgZiV-x;Zw@xVT*|V=18iTfiA@5*o9p; z6qbf#jmTh%5oX;YFIw1_3Wjoo|J z*eYd)iLWn2Bv%GkLNAvwVHARr?4)_~t=Fr}635T+!|5_3Nj;x?<-Z>VfaHP--u$= z*}Kl*M4Q7@|0d7pIvv*4$VV-cy4A0Ot+Hw~rCp-E;8n}I@ubB z$_YcE6r!9DKh48uOq=6pkh`3(2+S?c2~9Qautt>J!GcXoqjuWwWk{&8K`BVH*wTcy z-#sRB@^od`ljqz)J`4UPz8oJPPixv9GHOxZBE!k}XY(YYed6t&nR+X<9i9gk85Kj$ zC#u!{mrcDqvWd#In$^c^QwTj-j2JvvRc}lde>m5w8by%{Du!5`5B`3|Q%|@RphN)d zz@#q)pq-^|(!J<{3Ghod|Zz9?Ye;faM#nU4q~e1eYMJydW&cQ`rBFtL7+hmUlX;L} a3j)|Yhtiybk%8bBAYotPUe>p1rT+lu15Ypj literal 0 HcmV?d00001 diff --git a/playwright/shared-component-snapshots/audio-clock--lot-of-seconds-linux.png b/playwright/shared-component-snapshots/audio-clock--lot-of-seconds-linux.png new file mode 100644 index 0000000000000000000000000000000000000000..b4879e1a0c7adbd86d838e3a79c5628bdd2960f3 GIT binary patch literal 6782 zcmeI0>sJ!!7RH&HlPx{v%*muAb=J%&8!MeW87YFzbn&F6dCz+n^M*oRLFLj+qs?UM zX`IqjG-JFgq^PK5wv#q%$IvSRGE`0DxHI#aV9 zp8F3q9Ix^`^!&v9XEQI303kq4v}8`2BW1kJvny`0_R~!aT2hObBx=`}7)j=9ca3UY znQ5aR368=B8l>FCr|Avi0Cxd94jAI@|79F8otcoj_hiq_i^D{3@eY9%A+#ikpb{Yu z4JomPw23|F1k5~>5qQrw{91OlCih+?)#l(h4z?=j8`H3;2a_r@Z;KS~@wjNeOoh8g z!T3d!3QQaQjEab-hvTDHRk>7hg|ZUY#az6m{;upo#N?RkB;wSYh~vlONxIo%WvD1e zTeNamA)xofW~>g1=&mU3LNq1(eH2wA#=0+tV$kpy)mV$D81WF#K8kDPQW4jA70tb3 z8U=EzIJcm@@3d|xW>y-iUo#O-Q@e=PUfeBPh$Q|Y@vR1p&zkzWS%Axx-4)8~0*kYEc#rJa&LcA^(3 zBRu^ztrR)BN9}lOa?@G7@Omc|d4;vUL263d2vYPWBjyJFm}=gGls^^bhx^v41;V04 z=EJRwHa2BrDc|f-$8&z&wMCh9u^XI#$(m7TsXwl<#x3`Ta_cBm@|qwzV~hD!QFW}( z-&Idc3qg-3PbA=?y0md$qe!-pltvD{!3pPHs+@*l5#6UhjQ$L?%)o+4OCjk=tpQnW z&&rC5$=*-!PFth1<7Pq?6O`o{hQmlF(YN5S@$%L2l{wV?Q2}&tp?!RyCfGZwJbYu4 z_ukN`GbFr&Tm5MMIXyNNjTeF;zaH}>tWA-cxkTPKKr7-P@JPcHicEIv-sb|zT;VK@ zQ5=&(F@!rB_VlZ9e_j|Im86Ua`9OOZL#jL&uaXPc)HA_Tg_Djlwr^_MohxEt1`aLJ zfnZQIw|#8QqyxHkR(SfzMHoB?Od?^{#)e7iFtD1>@99lls;*FCQ2Mx3*g&v3zf`9} zXa&?ee}+>ckrwdx3PKez7K>_u!6GY<8J^~ju*hT?^ILj=Yp{ThSDRBo3{M~N>`g*h zca|*X#vqBw&+|-PSa|vlJ1ror!!0O z;VBTu?fD>>RiZ3{))j8}m8!z0y(_ZZN^KtuzdmVxAE(_kx6G*XdYsUeo{DMc(kh%J zR#6;KP7LMnU4v?ywsPwkdI`CYKocY-Wv!{cZ#M_e{ux`0q-If@LJn0^M8zcMgfJe@ z(!Hu)Tj%1Ea=W1i0Z&TKbby}mTsgK&&xSXI z<>YubC&E_OXTLuIqAFaIbxh}Ksn5mNAg_wJ+pJN4W%+?geNlUk&)%)MVp|9K{^Bff zbNwlpjVn4nvBm`@S!lUeJG8Lz;}q<^836DFCuJu(V|7l!obq-C_hN6vd8r>M$_~<9 zgBB;=1c#(uOO;QaqxR?mi3WF`CIz2vYINv}$qFHMZN`38#1QQ93cvRkW+<-b%M@bkdsWmITQf zrFU$qXDNENi*B<o)XCgru<)Rrs&(?Xm zr2FJVLt@lTCkWJ4(4=zr4_Wz?*!5Z>Qv0EryFWY==UWv~YaX;GJw9yn%QTLI^DPAJ zw=GrvfEE>(Jew=H5bOx9MNF3-b)(!^ z0*{3F;%ca?oNHPi=0|{o1%#&n=_;Y97%N6f^}9}|W#5)YT5IdJN_J6fBleH~5YY+TMv9_C7jZSN*%=k>4{&H=h}U|nLpLkqF1iH#u_P=}{z!#Q>b z+M_t4i)IhRx^sg{KK`HM@_D35;pO$d|(-EgbDSs&VnrQDy`y4mf!xM=T~{5Tbhsktf(xw%^6 zOF8L_d=m873t!6)zm?VPLiZ1iOyG4c)oGtkJ`CMANZu=`lVh`mvVsJphgxvGWBF2j zfRdzE<05+atll>1YDLvOy9bb<_9Ns9h&q|Lxz-#dc`tt_?HzKD>eVlvMcr0EaTZ5y zA$WOA!%v5c9X(jKR`Dd)7q@5qmL?XOi^$>jZZxE_2A@=*)6FAc$DkW!?GdEAy9@>W zzRzSi5sP^qS;sRs$Ef-n|C$=C7W*{!<3W_>n;tElonMAA-KnP41=TihI55+^_J;OiC%qNLS^; + +const Template: StoryFn = (args) => ; + +export const Default = Template.bind({}); + +export const LotOfSeconds = Template.bind({}); +LotOfSeconds.args = { + seconds: 99999999999999, +}; diff --git a/src/shared-components/audio/Clock/Clock.test.tsx b/src/shared-components/audio/Clock/Clock.test.tsx new file mode 100644 index 0000000000..fdbbf49518 --- /dev/null +++ b/src/shared-components/audio/Clock/Clock.test.tsx @@ -0,0 +1,26 @@ +/* + * Copyright 2025 New Vector Ltd. + * + * SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only OR LicenseRef-Element-Commercial + * Please see LICENSE files in the repository root for full details. + */ + +import { composeStories } from "@storybook/react-vite"; +import { render } from "jest-matrix-react"; +import React from "react"; + +import * as stories from "./Clock.stories.tsx"; + +const { Default, LotOfSeconds } = composeStories(stories); + +describe("Clock", () => { + it("renders the clock", () => { + const { container } = render(); + expect(container).toMatchSnapshot(); + }); + + it("renders the clock with a lot of seconds", () => { + const { container } = render(); + expect(container).toMatchSnapshot(); + }); +}); diff --git a/src/components/views/audio_messages/Clock.tsx b/src/shared-components/audio/Clock/Clock.tsx similarity index 76% rename from src/components/views/audio_messages/Clock.tsx rename to src/shared-components/audio/Clock/Clock.tsx index d9f1a3d6c5..9aa114e415 100644 --- a/src/components/views/audio_messages/Clock.tsx +++ b/src/shared-components/audio/Clock/Clock.tsx @@ -1,7 +1,6 @@ /* Copyright 2024 New Vector Ltd. Copyright 2021-2023 The Matrix.org Foundation C.I.C. - SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only OR LicenseRef-Element-Commercial Please see LICENSE files in the repository root for full details. */ @@ -9,24 +8,18 @@ Please see LICENSE files in the repository root for full details. import React, { type HTMLProps } from "react"; import { Temporal } from "temporal-polyfill"; -import { formatSeconds } from "../../../DateUtils"; +import { formatSeconds } from "../../utils/DateUtils"; -interface Props extends Pick, "aria-live" | "role"> { +export interface Props extends Pick, "aria-live" | "role"> { seconds: number; - formatFn: (seconds: number) => string; } /** * Clock which represents time periods rather than absolute time. - * Simply converts seconds using formatFn. - * Defaulting to formatSeconds(). + * Simply converts seconds using formatSeconds(). * Note that in this case hours will not be displayed, making it possible to see "82:29". */ -export default class Clock extends React.Component { - public static defaultProps = { - formatFn: formatSeconds, - }; - +export class Clock extends React.Component { public shouldComponentUpdate(nextProps: Readonly): boolean { const currentFloor = Math.floor(this.props.seconds); const nextFloor = Math.floor(nextProps.seconds); @@ -47,9 +40,10 @@ export default class Clock extends React.Component { dateTime={this.calculateDuration(seconds)} aria-live={this.props["aria-live"]} role={role} + /* Keep class for backward compatibility with parent component */ className="mx_Clock" > - {this.props.formatFn(seconds)} + {formatSeconds(seconds)} ); } diff --git a/src/shared-components/audio/Clock/__snapshots__/Clock.test.tsx.snap b/src/shared-components/audio/Clock/__snapshots__/Clock.test.tsx.snap new file mode 100644 index 0000000000..2fdcedd7c3 --- /dev/null +++ b/src/shared-components/audio/Clock/__snapshots__/Clock.test.tsx.snap @@ -0,0 +1,23 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`Clock renders the clock 1`] = ` +
+ +
+`; + +exports[`Clock renders the clock with a lot of seconds 1`] = ` +
+ +
+`; diff --git a/src/shared-components/audio/Clock/index.tsx b/src/shared-components/audio/Clock/index.tsx new file mode 100644 index 0000000000..bc261bb283 --- /dev/null +++ b/src/shared-components/audio/Clock/index.tsx @@ -0,0 +1,8 @@ +/* + * Copyright 2025 New Vector Ltd. + * + * SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only OR LicenseRef-Element-Commercial + * Please see LICENSE files in the repository root for full details. + */ + +export { Clock } from "./Clock"; diff --git a/src/shared-components/utils/DateUtils.ts b/src/shared-components/utils/DateUtils.ts new file mode 100644 index 0000000000..146aeecbd2 --- /dev/null +++ b/src/shared-components/utils/DateUtils.ts @@ -0,0 +1,35 @@ +/* + * Copyright 2025 New Vector Ltd. + * + * SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only OR LicenseRef-Element-Commercial + * Please see LICENSE files in the repository root for full details. + */ + +/** + * Formats a number of seconds into a human-readable string. + * @param inSeconds + */ +export function formatSeconds(inSeconds: number): string { + const isNegative = inSeconds < 0; + inSeconds = Math.abs(inSeconds); + + const hours = Math.floor(inSeconds / (60 * 60)) + .toFixed(0) + .padStart(2, "0"); + const minutes = Math.floor((inSeconds % (60 * 60)) / 60) + .toFixed(0) + .padStart(2, "0"); + const seconds = Math.floor((inSeconds % (60 * 60)) % 60) + .toFixed(0) + .padStart(2, "0"); + + let output = ""; + if (hours !== "00") output += `${hours}:`; + output += `${minutes}:${seconds}`; + + if (isNegative) { + output = "-" + output; + } + + return output; +} From 9c911d5c5988917c5ae9706ad668668db3c4b31c Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 5 Aug 2025 18:07:47 +0000 Subject: [PATCH 15/27] Update definitelyTyped (#30484) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- yarn.lock | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) diff --git a/yarn.lock b/yarn.lock index e85e9f7e72..9e94d32315 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4044,12 +4044,12 @@ integrity sha512-yslwR0zZ3zAT1qXcCPxIcD23CZ6W6nKsl6JufSJHAmdwOBuYwCVJkaMsEo9yzxGV7ATfoX8S+RgtnajOEtKxYA== "@types/node-fetch@^2.6.2": - version "2.6.12" - resolved "https://registry.yarnpkg.com/@types/node-fetch/-/node-fetch-2.6.12.tgz#8ab5c3ef8330f13100a7479e2cd56d3386830a03" - integrity sha512-8nneRWKCg3rMtF69nLQJnOYUcbafYeFSjqkw3jCRLsqkWFlHaoQrr5mXmofFGOx3DKn7UfmBMyov8ySvLRVldA== + version "2.6.13" + resolved "https://registry.yarnpkg.com/@types/node-fetch/-/node-fetch-2.6.13.tgz#e0c9b7b5edbdb1b50ce32c127e85e880872d56ee" + integrity sha512-QGpRVpzSaUs30JBSGPjOg4Uveu384erbHBoT1zeONvyCfwQxIkUshLAOqN/k9EjGviPRmWTTe6aH2qySWKTVSw== dependencies: "@types/node" "*" - form-data "^4.0.0" + form-data "^4.0.4" "@types/node-forge@^1.3.0": version "1.3.11" @@ -4065,14 +4065,7 @@ dependencies: undici-types "~7.10.0" -"@types/node@18": - version "18.19.120" - resolved "https://registry.yarnpkg.com/@types/node/-/node-18.19.120.tgz#07b3bd73875956d5281fa27e6d77a66415f7d455" - integrity sha512-WtCGHFXnVI8WHLxDAt5TbnCM4eSE+nI0QN2NJtwzcgMhht2eNz6V9evJrk+lwC8bCY8OWV5Ym8Jz7ZEyGnKnMA== - dependencies: - undici-types "~5.26.4" - -"@types/node@^18.11.18": +"@types/node@18", "@types/node@^18.11.18": version "18.19.121" resolved "https://registry.yarnpkg.com/@types/node/-/node-18.19.121.tgz#c50d353ea2d1fb1261a8bbd0bf2850306f5af2b3" integrity sha512-bHOrbyztmyYIi4f1R0s17QsPs1uyyYnGcXeZoGEd227oZjry0q6XQBQxd82X1I57zEfwO8h9Xo+Kl5gX1d9MwQ== @@ -8286,7 +8279,7 @@ foreground-child@^3.1.0, foreground-child@^3.3.1: cross-spawn "^7.0.6" signal-exit "^4.0.1" -form-data@^4.0.0: +form-data@^4.0.0, form-data@^4.0.4: version "4.0.4" resolved "https://registry.yarnpkg.com/form-data/-/form-data-4.0.4.tgz#784cdcce0669a9d68e94d11ac4eea98088edd2c4" integrity sha512-KrGhL9Q4zjj0kiUt5OO4Mr/A/jlI2jDYs5eHBpYHPcBEVSiipAvn2Ko2HnPe20rmcuuvMHNdZFp+4IlGTMF0Ow== From 8a550cf3f6e7f33195f51a9c35da9811977f91d1 Mon Sep 17 00:00:00 2001 From: ElementRobot Date: Wed, 6 Aug 2025 09:37:31 +0100 Subject: [PATCH 16/27] [create-pull-request] automated change (#30503) Co-authored-by: t3chguy <2403652+t3chguy@users.noreply.github.com> --- playwright/testcontainers/synapse.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/playwright/testcontainers/synapse.ts b/playwright/testcontainers/synapse.ts index 6c8962abf2..bfadcf0fec 100644 --- a/playwright/testcontainers/synapse.ts +++ b/playwright/testcontainers/synapse.ts @@ -7,7 +7,7 @@ Please see LICENSE files in the repository root for full details. import { SynapseContainer as BaseSynapseContainer } from "@element-hq/element-web-playwright-common/lib/testcontainers"; -const TAG = "develop@sha256:2f6fff14ff23f356705abdbf2ed62c3dd6ca2103cef4ae813714ddc199bbd76a"; +const TAG = "develop@sha256:cb00ff0892f117b8803e817fc470d74f03c8bc6d3f58335230f7317c9b15e584"; /** * SynapseContainer which freezes the docker digest to stabilise tests, From 15f1291cbcbb5920f87fd0ea73dba27ce12d91b1 Mon Sep 17 00:00:00 2001 From: Robin Date: Wed, 6 Aug 2025 14:17:00 +0200 Subject: [PATCH 17/27] Fix widget initialization in React development mode (#30463) Since the upgrade to React 19, widget initialization (most notably affecting group calls) has been broken in development mode. This is because React now executes all callback refs twice, and the callback ref that receives the widget's iframe was not prepared to deal with that. I've fixed this by creating and attaching the iframe to the DOM in the callback ref, which allows us to properly couple its lifetime to that of the StopGapWidget. I've also added some insurance against strict mode-style races in StopGapWidget (doesn't hurt). --- src/components/views/elements/AppTile.tsx | 120 +++++++++++----------- src/stores/widgets/StopGapWidget.ts | 30 ++++-- 2 files changed, 78 insertions(+), 72 deletions(-) diff --git a/src/components/views/elements/AppTile.tsx b/src/components/views/elements/AppTile.tsx index cfb95abcc3..e88650788a 100644 --- a/src/components/views/elements/AppTile.tsx +++ b/src/components/views/elements/AppTile.tsx @@ -62,6 +62,20 @@ import { parseUrl } from "../../../utils/UrlUtils"; import RightPanelStore from "../../../stores/right-panel/RightPanelStore.ts"; import { RightPanelPhases } from "../../../stores/right-panel/RightPanelStorePhases.ts"; +// Note that there is advice saying allow-scripts shouldn't be used with allow-same-origin +// because that would allow the iframe to programmatically remove the sandbox attribute, but +// this would only be for content hosted on the same origin as the element client: anything +// hosted on the same origin as the client will get the same access as if you clicked +// a link to it. +const sandboxFlags = + "allow-forms allow-popups allow-popups-to-escape-sandbox " + + "allow-same-origin allow-scripts allow-presentation allow-downloads"; + +// Additional iframe feature permissions +// (see - https://sites.google.com/a/chromium.org/dev/Home/chromium-security/deprecating-permissions-in-cross-origin-iframes and https://wicg.github.io/feature-policy/) +const iframeFeatures = + "microphone; camera; encrypted-media; autoplay; display-capture; clipboard-write; clipboard-read;"; + interface IProps { app: IWidget | IApp; // If room is not specified then it is an account level widget @@ -138,7 +152,7 @@ export default class AppTile extends React.Component { }; private contextMenuButton = createRef(); - private iframe?: HTMLIFrameElement; // ref to the iframe (callback style) + private iframeParent: HTMLElement | null = null; // parent div of the iframe private allowedWidgetsWatchRef?: string; private persistKey: string; private sgWidget?: StopGapWidget; @@ -397,18 +411,46 @@ export default class AppTile extends React.Component { }); } + /** + * Creates the widget iframe and opens communication with the widget. + */ private startMessaging(): void { - try { - this.sgWidget?.startMessaging(this.iframe!); - } catch (e) { - logger.error("Failed to start widget", e); - } + // We create the iframe ourselves rather than leaving the job to React, + // because we need the lifetime of the messaging and the iframe to be + // the same; we don't want strict mode, for instance, to cause the + // messaging to restart (lose its state) without also killing the widget + const iframe = document.createElement("iframe"); + iframe.title = WidgetUtils.getWidgetName(this.props.app); + iframe.allow = iframeFeatures; + iframe.src = this.sgWidget!.embedUrl; + iframe.allowFullscreen = true; + iframe.sandbox = sandboxFlags; + this.iframeParent!.appendChild(iframe); + // In order to start the widget messaging we need iframe.contentWindow + // to exist. Waiting until the next layout gives the browser a chance to + // initialize it. + requestAnimationFrame(() => { + // Handle the race condition (seen in strict mode) where the element + // is added and then removed before we enter this callback + if (iframe.parentElement === null) return; + try { + this.sgWidget?.startMessaging(iframe); + } catch (e) { + logger.error("Failed to start widget", e); + } + }); } - private iframeRefChange = (ref: HTMLIFrameElement): void => { - this.iframe = ref; + /** + * Callback ref for the parent div of the iframe. + */ + private iframeParentRef = (element: HTMLElement | null): void => { + // Detach the existing iframe (if any) from the document so we know not + // to do anything further with it, like starting up the messaging + this.iframeParent?.querySelector("iframe")?.remove(); + this.iframeParent = element; if (this.unmounted) return; - if (ref) { + if (element && this.sgWidget) { this.startMessaging(); } else { this.resetWidget(this.props); @@ -426,24 +468,8 @@ export default class AppTile extends React.Component { /** * Ends all widget interaction, such as cancelling calls and disabling webcams. - * @private - * @returns {Promise<*>} Resolves when the widget is terminated, or timeout passed. */ - private async endWidgetActions(): Promise { - // widget migration dev note: async to maintain signature - // HACK: This is a really dirty way to ensure that Jitsi cleans up - // its hold on the webcam. Without this, the widget holds a media - // stream open, even after death. See https://github.com/vector-im/element-web/issues/7351 - if (this.iframe) { - // In practice we could just do `+= ''` to trick the browser - // into thinking the URL changed, however I can foresee this - // being optimized out by a browser. Instead, we'll just point - // the iframe at a page that is reasonably safe to use in the - // event the iframe doesn't wink away. - // This is relative to where the Element instance is located. - this.iframe.src = "about:blank"; - } - + private endWidgetActions(): void { if (WidgetType.JITSI.matches(this.props.app.type) && this.props.room) { LegacyCallHandler.instance.hangupCallApp(this.props.room.roomId); } @@ -457,6 +483,7 @@ export default class AppTile extends React.Component { this.sgWidget?.stopMessaging({ forceDestroy: true }); } + private onWidgetReady = (): void => { this.setState({ loading: false }); }; @@ -554,16 +581,11 @@ export default class AppTile extends React.Component { } private reload(): void { - this.endWidgetActions().then(() => { - // reset messaging - this.resetWidget(this.props); - this.startMessaging(); - - if (this.iframe && this.sgWidget) { - // Reload iframe - this.iframe.src = this.sgWidget.embedUrl; - } - }); + this.endWidgetActions(); + // reset messaging + this.resetWidget(this.props); + this.iframeParent?.querySelector("iframe")?.remove(); + this.startMessaging(); } // TODO replace with full screen interactions @@ -621,20 +643,6 @@ export default class AppTile extends React.Component { public render(): React.ReactNode { let appTileBody: JSX.Element | undefined; - // Note that there is advice saying allow-scripts shouldn't be used with allow-same-origin - // because that would allow the iframe to programmatically remove the sandbox attribute, but - // this would only be for content hosted on the same origin as the element client: anything - // hosted on the same origin as the client will get the same access as if you clicked - // a link to it. - const sandboxFlags = - "allow-forms allow-popups allow-popups-to-escape-sandbox " + - "allow-same-origin allow-scripts allow-presentation allow-downloads"; - - // Additional iframe feature permissions - // (see - https://sites.google.com/a/chromium.org/dev/Home/chromium-security/deprecating-permissions-in-cross-origin-iframes and https://wicg.github.io/feature-policy/) - const iframeFeatures = - "microphone; camera; encrypted-media; autoplay; display-capture; clipboard-write; " + "clipboard-read;"; - const appTileBodyClass = classNames({ "mx_AppTileBody": true, "mx_AppTileBody--large": !this.props.miniMode, @@ -654,8 +662,6 @@ export default class AppTile extends React.Component { ); - const widgetTitle = WidgetUtils.getWidgetName(this.props.app); - if (this.sgWidget === null) { appTileBody = (
@@ -692,16 +698,8 @@ export default class AppTile extends React.Component { } else if (this.sgWidget) { appTileBody = ( <> -
+
{this.state.loading && loadingElement} -