Commit Graph

70302 Commits

Author SHA1 Message Date
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
hayyaksi 03faca3626 Open the quick settings theme menu upwards so every theme is reachable (#34501)
Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
2026-08-12 11:22:55 +00:00
hayyaksi c490440424 Stop reporting a search you cancelled yourself as a failure (#34594)
Opening a search result aborts the search, which rejects whatever request
is still in flight. The rejection lands in the same handler as a real
failure, so the user was shown a "Search failed: signal is aborted without
reason" dialog for doing nothing more than clicking a result.

There is a guard for this already, but it only covers the case where the
component has come apart first: `aborted` is set by the unmount cleanup,
and the rejection often arrives before React gets that far. An AbortError
is now recognised for what it is and dropped, whichever way round the two
happen to land.

Nothing else changes: a rejection from any other cause still reaches the
error dialog, since that is a failure nobody asked for.

Tests: a search rejected with an AbortError no longer reports an error,
and one rejected with anything else still does.

Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
2026-08-12 11:18:33 +00:00
hayyaksi c08f235ea8 Respect retry_after_ms and stop retrying rate limited invites forever (#34480)
A rate limited invite was retried on a hard coded five second delay with no
bound, so the client kept hammering a server which had already refused, and
ignored the retry_after_ms it asked us to wait.

The delay now comes from the server, capped so a very long backoff cannot leave
the invite dialog hanging, and each address gives up after a few attempts with
an error rather than looping.

Cancelling an in-flight invite is a separate concern and is not addressed here.

Fixes https://github.com/element-hq/element-web/issues/30427

Co-authored-by: David Baker <dbkr@users.noreply.github.com>
2026-08-12 11:04:07 +00:00
David Baker 5349566611 Fix layout of user status dropdown (#34668)
* Bump to compound 10.0.1

For fix to the dropdown menu layout

* Snapshot
2026-08-12 10:20:52 +00:00
David Langley badb35bd1f Timeline MVVM 1 - Shared TimelineView and Overlay Buttons (#34464)
* Add shared timeline overlay buttons and view contract

The TimelineOverlayButtons presentational component (unread bar, jump-to-bottom)
plus the shared TimelineView VM contract (types) and its i18n strings. Consumed
by the TimelineView virtualizer in a follow-up commit.

* Add shared TimelineView component (TanStack Virtual)

Headless TanStack-Virtual timeline driven from RoomTimelineViewModel: anchorTo:"end"
viewport stability across prepends/trims, cold-load cover, jump-to via scrollToOffset,
and visible-state reporting via the virtualizer's onChange. Adds the @tanstack/react-virtual
dependency and the virtual-core isValidAnchorItem patch (runtime + types).

* Use Compound spacing tokens in timeline overlay and clarify comments

- Use Compound spacing tokens for overlay margins/insets instead of raw px
- Drop the stale Virtuoso reference from the overlay CSS comment
- Note the real-world duration of COLD_CAP_FRAMES
- Describe each load phase in plain English

* Remove jargon and explain/expand things in simple terms.

* Use time rather than a frame count and improve description.
2026-08-12 08:40:26 +00:00
Zack 23a666a9de Fix notification badge sizing (#34655)
* Fix notification badge sizing

* Update snapshots

* Add space panel badge regression test

* Update snapshot

* Updated test to test assert screenshot

* Update snapshot to look correct

* Update playwright test

* fix aliased issues
2026-08-12 07:04:55 +00:00
ElementRobot 00a5546fe6 [create-pull-request] automated change (#34666)
Co-authored-by: t3chguy <2403652+t3chguy@users.noreply.github.com>
2026-08-12 06:59:54 +00:00
rbondesson 72d8d9f60f Move EventTile to shared components - #4b (#34565)
* Define the shared EventTile shell contract

* Create a functional shared shell skeleton

* Implement the thread rendering branch

* Implement notification and threads-list branches

* Implement file and default timeline branches

* Add shared stories and complete shell tests

* Adding state flags, stories and styling

* Correct DOM order for IRC branch

* Refine EventTileView Storybook shell and fixtures

* Fix the room story for modern layout

* Fix Bubble layout

* Fix IRC layout

* Fix ThreadsList and Thread

* Fix File and Notification

* Cleanup of stories and styling

* Fix lint errors

* Added baseline screenshots

* Rename to avoid knip errors

* Avoid the knip error

* Fix test fail on click

* Use separate div wrappers for slots instead of relying on cloning components.

* Renamed names for slot classes

* Changed to conditional state classes

* Change layout and shape variants to classes

* Clean up and reorder for better readability

* Fix Sonar issues

* Fix Sonar issues
2026-08-12 06:53:40 +00:00
hayyaksi 7711207393 Keep a file's extension when it is renamed in the desktop save dialog (#34601)
Electron's save dialog offers only "All Files" unless it is handed filters,
so someone who replaced "photo.jpg" with "photo" got a file with no extension
at all and no way to open it. The browser does not do this: it offers the
file's own type, and puts the extension back when the name arrives without
one.

The download now names its type before the dialog goes up, and the "Save
image as..." context menu passes the same filters. A file with no extension
to preserve is left alone rather than being given a meaningless filter, and
"All Files" stays on the list so anyone who really wants an extensionless
name can still pick it.

Tests: a download with an extension gets filters, one without does not, and
the context menu path is covered as well.

Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
2026-08-11 16:40:18 +00:00
hayyaksi 400bf348ef Update the pinned message banner when a pinned message is edited (#34631)
* Update the pinned message banner when a pinned message is edited

The pinned events are fetched from a memo keyed on the pinned event ids, and editing a
pinned message leaves those ids untouched. Nothing invalidated the memo, so the banner
and the pinned messages card went on rendering the original text while the timeline
showed the edit.

Edits landing on a pinned event now invalidate it. An edit to any other event is
ignored, so an active room does not refetch the pinned set on every message.

* Address review: apply pinned edits in place instead of refetching

The counter that forced the memo to recompute was never read by the memo, so the
dependency array had to carry a variable that meant nothing to the computation.
The edit event is already in hand when the timeline fires, so holding onto it
rather than a tally gives the memo something it can actually consume.

Applying that edit to the fetched copy also removes a round-trip: the pinned set
was being fetched again purely to pick up content the client already had. It has
to run in an effect rather than in the memo because replacing an event notifies
whatever is rendering it, and that must not happen during a render.

The tests now assert the content the hook hands back rather than the number of
fetches, which is what the banner actually shows.
2026-08-11 16:38:35 +00:00