Commit Graph

70312 Commits

Author SHA1 Message Date
Michael Telatynski b819fa58df Migrate batch of Jest tests to Vitest (#34714)
* Migrate batch of Jest tests to Vitest

* Iterate
2026-08-17 11:41:52 +00:00
Zack e97358ba3e Refactor RoomAvatar to MVVM pattern (#33937)
* Refactor RoomAvatar to MVVM pattern

* Fix OXFMT failing passes

* Fix stories build issue

* add snapshot images + fix props issue

* Fix Eslint error

* Fix RoomAvatarViewModel test client setup

* Remove dead code left over from RoomAvatar refactor

* Update snapshot

* Fix RoomHeader avatar label and update RoomView snapshots

* Update snapshots

* Update snapshots

* Update Snapshots

* Update snapshots

* Update snapshot

* Fix room avatar component naming

* Simplify room avatar view model updates

* Update decorated room avatar view tests

* Document room avatar view model props

* Fix Oxlint error

* Fix image (correct image now)

* Fix mistake

* Use VM disposables for room avatar listeners

* Move room avatar view attrs into snapshot

* Update image

* Fix room avatar oxlint filename errors

* Format room avatar MVVM files

* Update room avatar VM test setter

* Update snapshot

* Use scoped room avatar listener disposables

* Use VM disposables

* Restore scoped disposables
2026-08-17 09:43:59 +00:00
R Midhun Suresh 11d770aedf Tooltip and cursor enhancements for the left panel separator (#34643)
* Show tooltip when mouse is anywhere on the separator

* Show correct cursor

* Fix tests

* Put tooltip inside separator container

* Update tests

* Fix hand icon not appearing
2026-08-17 08:21:41 +00:00
ElementRobot dd9aded7df [create-pull-request] automated change (#34723)
Co-authored-by: t3chguy <2403652+t3chguy@users.noreply.github.com>
2026-08-17 06:39:40 +00:00
rbondesson 3a75b7d47c Move EventTile to shared components - #4c (#34697)
* Add missing placement state contract for root and line

* Add editing, information and failure state

* Add bubble placement from state

* Add media and sticker line styling

* Added reply chain styling

* Add interactive stories for states and separate test confgis for baseline screenshots

* Use shared components instead of mocks where available

* Added more relevant slot content data

* Add missing states and use presentation context

* Add state styling

* Fix irc layout dom ordering

* Rearrange styling and add screenshots

* Removed stale screenshots

* Fix Sonar issue

* Add missing layout rule styling and replace legacy application CSS variables

* Updated snapshots

* Minor changes to styling for bubble container and border radius defaults
2026-08-14 15:15:59 +00:00
Valere Fedronic d732fa807f Rtc: Let the widget driver decide to fallback to well-known or not for rtc discovery. (#34581)
* rtc: fallback to well-known only if config allows

* Use existing rtc transports cached by client

* post rebase fixes

* post rebase test update

* cleanup callstore tests

* Lint + fmt fixes

* postrebase: update useCall tests

* fixup: fix mocking on useRoomCall task

* fix lint

* fixup lint

* fix missing act in react test

* fix client mocks

* fix test mocking for rtc discovery

* fix test mocking

* fix Callstore testing

* lint:js-fix

* add missing mocks

* Fix duplicate ElementWidgetDriver test cases

* Avoid logging warning about well-known foci when they are undefined

---------

Co-authored-by: Robin <robin@robin.town>
2026-08-14 14:41:24 +00:00
hayyaksi de188420ab Re-evaluate the unread state of a room when one of its events is decrypted (#34515)
Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
2026-08-14 14:39:12 +00:00
hayyaksi 471e182571 Let the next and previous room shortcuts work before a room is opened (#34506)
* Let the next and previous room shortcuts work before a room is opened

* Wait for the navigation these shortcuts dispatch

The three cases drained the microtask queue twice and then asserted, because the delta handler dispatches its navigation from inside the first dispatch's callback and one flush leaves that follow-up queued. Counting flushes encodes how far the implementation happens to defer the work; waiting for the assertion itself does not, and reads as what the case is actually waiting for.

The unread case also restored its notification-state spy by hand, on the belief that nothing else would. The suite has restored all mocks from a top-level afterEach since well before this branch, so the hand restoration was redundant and the note explaining it was wrong.

---------

Co-authored-by: David Baker <dbkr@users.noreply.github.com>
2026-08-14 13:36:55 +00:00
David Baker 2ec856d0bf Allow settings status directly from menu (#34707)
Clicking on custom now opens settings ready to enter a custom status
so most of this PR is passing the flags through for the UI to start in
that state.
2026-08-14 12:53:54 +00:00
hayyaksi 3773d662e4 Strip a UTF-8 byte order mark before parsing JSON files on desktop (#34504)
Co-authored-by: David Baker <dbkr@users.noreply.github.com>
2026-08-14 11:18:30 +00:00
hayyaksi 52c44ddbc5 Only offer permission levels the user can actually set (#34500)
Co-authored-by: David Baker <dbkr@users.noreply.github.com>
2026-08-14 11:02:30 +00:00
hayyaksi d4cb9619ea Show the unsent symbol on the All rooms badge (#34498)
Co-authored-by: David Baker <dbkr@users.noreply.github.com>
2026-08-14 10:41:06 +00:00
David Baker 0d01034c0f Use correct emoji font on the custom status emoji button (#34708)
* Use correct emoji font on the custom status emoji button

As per comment

* Screenshot
2026-08-14 08:57:55 +00:00
David Baker a1419c1a7c Wire up recent emoji to user status emoji picker (#34710)
* Wire up recent emoji to user status emoji picker

So recents are saved and displayed.

* Add tests
2026-08-14 08:12:17 +00:00
hayyaksi 62f1dfdefa Stop messages flickering through the file panel as they are sent (#34608)
* Stop messages flickering through the file panel as they are sent

A filtered timeline set is handed the room's pending events unless it is told
otherwise, and those are the whole room's pending events rather than the ones
the filter would have kept. So every message typed into the room appeared in
the file panel for as long as it took the remote echo to arrive, at which
point the filter finally threw it out again.

The file panel now asks for its timeline set without them. Nothing is lost by
that: a file sent from the panel still appears the moment it is sent, because
the panel adds live events itself and checks the message type while doing so,
which the pending list never did.

Tests: the file panel asks for a timeline set which does not carry the room's
pending events.

* Filter the pending events a filtered timeline set shows

Suppressing the file panel's pending events wholesale was the wrong lever: it is
an all-or-nothing switch on the room's detached pending list, so it also hid
files the user had just sent, and the e2e caught the panel staying empty.

Filter them instead. A timeline set already carries the filter it was built with,
so the pending events it hands the panel can be held to the same test as the
events the server returns. Files being sent still appear immediately; the text
messages that used to flicker through never qualify. Panels with no filter, which
is every other caller, are untouched.

---------

Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
2026-08-14 08:06:37 +00:00
ElementRobot 71069a081e [create-pull-request] automated change (#34712)
Co-authored-by: t3chguy <2403652+t3chguy@users.noreply.github.com>
2026-08-14 07:41:19 +00:00
Michael Telatynski ceaa3ff74e Cachebust languages.json (#34705)
* Cachebust languages.json

To avoid loading stale language files. The individual language files as hashbusted but the metadata file is not, and it is not feasible to do so.

* Switch cachebust to use Date.now to further avoid collisions

* Fix tests

* Fix tests
2026-08-13 23:55:38 +00:00
Michael Telatynski bfd2d16fa6 Migrate test/viewmodels from Jest to Vitest (#34702)
* Migrate test/viewmodels from Jest to Vitest

* Iterate
2026-08-13 23:39:22 +00:00
renovate[bot] f0a9c72a30 Update dependency postcss to v8.5.26 (#34688)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-08-13 23:38:44 +00:00
David Langley 26c2cbee5a Remove old draggable backgrounds (#34704) 2026-08-13 14:53:42 +00:00
Prince Panchani 8df56706b5 Fix illegible text on hovered Spotlight results in high-contrast theme (#34465)
* Fix illegible text on hovered Spotlight results in high-contrast theme

* Update Spotlight tests to use Axe for accessibility checks instead of custom contrast ratio calculations

* Refactor Spotlight accessibility tests to cover all themes and improve legibility checks across various UI elements

* Remove high-contrast theme from Spotlight legibility tests to streamline accessibility checks

* Fix invalid CSS comment breaking Oxfmt and scope out unrelated axe violation

_SpotlightDialog.pcss used // line comments, which are not valid CSS and
crashed the Oxfmt parser, causing spurious failures in Oxfmt and the
Static Analysis gate. Switched to a block comment.

The new Spotlight legibility test's broad axe scans also caught a
pre-existing nested-interactive violation (endAdornment buttons nested
inside clickable option rows), unrelated to the colour-contrast fix.
Scoped it out with axe.disableRules("nested-interactive") to keep the
contrast checks active without failing on the unrelated issue.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>

* Update Room Directory screenshot baseline for Spotlight hover-color fix

The high-contrast legibility fix changes hover/selected text color in
Spotlight results, which is reflected in the Room Directory dialog
screenshot test.

* Use CI-rendered baseline for the Room Directory screenshot

The previous baseline still had the pre-fix colours for
.mx_SpotlightDialog_result_publicRoomAlias and
.mx_SpotlightDialog_result_publicRoomDescription, so the Linux CI run
reported a 418px diff on filtered-one-result.png. Replace it with the
image the Linux CI runner actually produced with the fix applied.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

* Retrigger CI (transient Electron install failure in Vitest job)

---------

Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-13 14:27:35 +00:00
David Baker 366dd99b4d Make styling for the user menu more specific (#34679)
* Make user menu styles more specific

Only constrain the text elements that need to be constrained rather
than applying overflow: hidden to all children.

* Snapshot
2026-08-13 14:27:30 +00:00
hayyaksi 5d522035f4 Format relative timestamps using the locale's own date order (#34484)
Co-authored-by: David Baker <dbkr@users.noreply.github.com>
2026-08-13 13:40:03 +00:00
renovate[bot] 417f9b3aa5 Update dependency motion to v13 (#34694)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-08-13 13:30:45 +00:00
renovate[bot] 86eb80a1e4 Update npm non-major dependencies (#34698)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-08-13 13:30:11 +00:00
renovate[bot] 2d3a0d0bda Update dependency eslint-plugin-storybook to v10.5.7 (#34687)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-08-13 12:01:20 +00:00
Michael Telatynski eadc43ddf4 Enable oxlint rule typescript/no-floating-promises (#34586)
* Enable oxlint rule `typescript/no-floating-promises`

* Iterate
2026-08-13 10:24:13 +00:00
renovate[bot] 33dcc89c2f Update dependency electron to v43.4.0 (#34699)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-08-13 10:23:03 +00:00
renovate[bot] e573b8cad8 Update Node.js to d32cdf6 (#34675)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-08-13 10:21:27 +00:00
renovate[bot] d7433a328a Update Node.js to e98b72e (#34676)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-08-13 09:50:18 +00:00
renovate[bot] 4e3e50a5df Update dependency @types/css-tree to v3 (#34693)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-08-13 09:48:28 +00:00
renovate[bot] 6c6e264f56 Update pnpm to v11.21.0 (#34692)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-08-13 09:48:20 +00:00
renovate[bot] beec027658 Update dependency vite to v8.2.1 (#34689)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-08-13 09:46:53 +00:00
hayyaksi 64e1ca5398 Stop showing an unread count on a room you have left (#34595)
Leaving a room does not clear the notification counts the server last sent
for it, and nothing on our side clears them either, so a room sitting in
the historical list kept a badge that could never be got rid of: there is
no way to read a room you are not in.

The unread state of such a room is now nothing at all. Our own member
event is what decides it rather than getMyMembership(), which answers
"leave" both for a room we have left and for one we have not heard about
yet — blanking a badge that is merely late would be a worse bug than the
one being fixed here.

It goes below the invite and knock checks, which are leaves of a sort and
have their own answers, so a pending invite and a refused knock still show
what they showed before.

Tests: a left room with a count of 42 now reports nothing.

Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
2026-08-13 09:39:06 +00:00
hayyaksi e4da468d07 Avoid destroying a still-valid session when the OS keychain is temporarily unreadable (#33986)
* Avoid destroying a still-valid session when the OS keychain is temporarily unreadable

SafeStorageWriter.get() previously caught a decrypt failure and returned undefined,
indistinguishable from "no secret stored". When the OS keychain is briefly locked or
its ACL is invalidated by an app re-sign/update, an existing valid pickle key read as
absent, so the renderer fell back to the default key and createPickleKey then overwrote
the still-valid ciphertext - turning a transient hiccup into permanent session and
encryption-key loss.

Distinguish absent from present-but-undecryptable with a typed SafeStorageDecryptionError,
and never overwrite an existing undecryptable secret, so the session recovers on a later
launch once the keychain is readable again.

* Fail closed when a stored secret cannot be read, and defer the basic_text migration instead of poisoning skipped secrets

- isSecretUndecryptable now treats any error reading an existing secret as
  undecryptable, so an unexpected storage-layer error can never re-enable the
  destructive pickle-key overwrite.
- migrateBasicTextToPlaintext decrypts all secrets before writing anything: if
  any secret cannot be decrypted the migration is aborted and the app sticks
  with the basic_text backend (safeStorageBackendOverride) instead of recording
  the store as plaintext while a secret is still ciphertext - which would make
  the next launch re-encrypt that ciphertext as though it were the secret,
  silently corrupting it and defeating the overwrite guard.

* Fix the safeStorage tests so they run under CI

store.ts reads getConfig().brand when it raises a degraded-mode dialog, and the real
config module only populates itself in loadConfig(), which these tests never call.
Stubbing it lets the tests reach the dialog they are actually about instead of dying
on an undefined brand.

The ElectronStore fake also carried a constructor whose only job was to swallow the
options object. oxlint's no-useless-constructor is an error here, and it was the one
genuine failure on this branch, so the fake now leans on the implicit default
constructor - which ignores its arguments just as happily.
2026-08-13 09:05:35 +00:00
renovate[bot] 9a6a6e97f1 Update npm non-major dependencies (#34686)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-08-13 01:50:01 +00:00
rbondesson 726d848dd3 Move EventTile to shared components - #5a (#34583)
* Improve EventTile Playwright coverage

* oxfmt

* Fix thread previews for unencrypted replies

* Add search thread preview coverage

* Restore view model fix

* Split the failing test into two

* Fix failing test

* Changed from css class assertion to screenshot validation

* Updated screenshot
2026-08-12 15:34:37 +00:00
renovate[bot] 7874167696 Update npm non-major dependencies (#34678)
* Update npm non-major dependencies

* Delint

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
2026-08-12 14:45:05 +00:00
hayyaksi fc0f0d4e61 Restore the read marker fade by using a valid CSS easing function (#34485)
* Restore the read marker fade by using a valid CSS easing function

* Drop postcss-easings

The read marker was the last thing that could have used a named easing, and
its style now lives in shared-components, which vite builds without the
plugin. Nothing in the tree names an easing any more, so the plugin, its type
shim and the dependency all go.
2026-08-12 14:11:05 +00:00
renovate[bot] b30a9a18dc Update testcontainers to v12.1.0 (#34671)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-08-12 14:07:31 +00:00
renovate[bot] 4f9aabd1bd Update dockerfile non-major dependencies (#34677)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-08-12 14:02:09 +00:00
hayyaksi 8e6e5424bb Stop one finished sound from cutting off another (#34576)
Every sound played through a BackgroundAudio shares the one audio context,
which is suspended rather than closed when a sound ends so that it can be
reused. The handler suspended it whenever any source finished, so a sound
that started while an earlier one was still going was cut off part way
through. Suspending is not stopping either: the cut-off buffer stayed
where it was and picked up again the next time anything was played, which
is how a notification for one room ends up sounding in another.

The context is now suspended only once nothing this instance started is
still running, and each source is disconnected as it ends. A looping sound
holds the count up until it is stopped, and stopping it ends it, so the
context is still suspended as soon as everything is quiet.

Tests: the context is suspended when a lone sound ends, and left running
while a second sound outlasts the first.
2026-08-12 13:39:38 +00:00
Prince Panchani 59561e615a Add Sentry frame rewriting for Element Desktop integration (#34667)
* Add Sentry frame rewriting for Element Desktop integration

This change introduces the Sentry `rewriteFramesIntegration` to normalize stack frames for crashes occurring in Element Desktop. It ensures that stack traces from the custom `vector://vector/webapp` origin are grouped and symbolicated correctly, aligning them with the web app's release. This enhancement improves error tracking and debugging for users on the desktop platform.

* Refactor Sentry test file for improved readability and consistency

This update enhances the formatting of the `sentry-test.ts` file by aligning code for better readability. Changes include consistent indentation and spacing in mock function definitions and test cases. These adjustments aim to improve code maintainability and clarity without altering functionality.

* Add copyright notice and SPDX license to Sentry test file

This update introduces a copyright notice and SPDX license declaration at the top of the `sentry-test.ts` file. The addition clarifies the ownership and licensing terms for the file, ensuring compliance with legal requirements and improving documentation for future reference.

* Update copyright notice in Sentry test file

This commit updates the copyright notice in the `sentry-test.ts` file to reflect the new ownership under PrinceXDev. The change ensures that the file's legal attribution is accurate and up-to-date.

* Refactor Sentry test file for improved code consistency

This commit streamlines the formatting in the `sentry-test.ts` file by consolidating mock function definitions and enhancing the readability of the test cases. The changes include removing unnecessary line breaks and ensuring consistent spacing, which contributes to better maintainability without altering the functionality of the tests.
2026-08-12 13:16:19 +00:00
renovate[bot] 41c7ffaf54 Update Node.js to v24.19.0 (#34674)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-08-12 12:57:44 +00:00
renovate[bot] fd2bc60b2b Update rust:bullseye Docker digest to 02d78ca (#34673)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-08-12 12:57:36 +00:00
hayyaksi daf828b025 Replace the selected text when inserting a new line in the composer (#34509)
Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
2026-08-12 12:57:27 +00:00
renovate[bot] affde04fed Update nginxinc/nginx-unprivileged:alpine-slim Docker digest to ff4671e (#34672)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-08-12 12:56:47 +00:00
renovate[bot] 89b6b7cfbe Update dependency electron to v43.3.0 (#34670)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-08-12 12:31:12 +00:00
renovate[bot] 9f8380eb25 Update testcontainers docker digests (#34669)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-08-12 12:18:59 +00:00
hayyaksi 45d0d336e1 Keep the original URL when deserialising markdown links (#34488)
HTMLAnchorElement.href is the resolved, serialised URL, so editing a message
containing [a](http://example.com) put [a](http://example.com/) in the composer
and re-wrapped a plain autolinked URL as a markdown link. Read the href
attribute instead so the composer shows what the author wrote.

Co-authored-by: David Baker <dbkr@users.noreply.github.com>
2026-08-12 11:27:05 +00:00