Commit Graph

70291 Commits

Author SHA1 Message Date
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
hayyaksi 91e8f3bdae Keep a copy of the audio buffer so the WAV fallback can run (#34481)
* Keep a copy of the audio buffer so the WAV fallback can run

decodeAudioData detaches the buffer it is given, so the catch block handed an
already detached buffer to decodeOgg and it threw "Cannot perform Construct on
a detached ArrayBuffer" before it could re-encode. The fallback could never
run and the user saw an error instead of their voice message.

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

* Assert the fallback buffer is usable instead of constructing a view for its side effect

---------

Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
2026-08-11 16:08:59 +00:00
hayyaksi 9e8a57c81c Use the dark code highlighting stylesheet in the dark-custom theme (#34491)
dark-custom imported highlight.js's atom-one-light palette while every other
dark theme imports atom-one-dark, so syntax-highlighted code blocks rendered
dark grey on the theme's dark background. The neighbouring import on the next
line already pulls in the dark GitHub markdown stylesheet.

Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
2026-08-11 16:04:33 +00:00
hayyaksi f37623f054 Update the member list invite button when power levels change (#34475)
canInvite was only recomputed on third party invite state events, so granting or
revoking the power to invite left the member list header button in its previous
enabled or disabled state until the list was reopened.

Recompute it on RoomStateEvent.Update as well, which also covers the space join
rule branch in canInviteTo(), matching RoomSummaryCardViewModel.

Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
2026-08-11 16:02:37 +00:00
hayyaksi 0a86a6b93d Stop large audio playback when the media element ends (#34495) 2026-08-11 15:51:08 +00:00
hayyaksi 46d55f25a2 Tell the user when registration is being rate limited (#34519)
* Tell the user when registration is being rate limited

* Disable the submit button while registration is rate limited

The warning now sits with the button it is disabling, below the server picker,
rather than above it, so it reads as the reason you cannot continue.

The rate limit message moves out of errorText into its own state field to get
there, which also leaves the position of every other registration error alone.

When the server tells us how long to wait, we ask again ourselves once that
time is up, so the form comes back without the user having to guess when a
reload is worth it.

* Set the rate limit warning to medium weight

Scoped to the registration rate limit warning so the other auth errors keep
the bold they have always had.
2026-08-11 15:39:39 +00:00
hayyaksi 76aeb783b6 Open linkified room aliases and permalinks in the app rather than the browser (#34507) 2026-08-11 15:31:35 +00:00
Michael Telatynski 7897b0c71f Build docker image containing modules (#34657)
Switch to bake to simplify the building of 2 images
2026-08-11 13:03:24 +00:00
Will Hunt f69ffb2120 @element-hq/element-web-module-api 1.16.0 (#34654) 2026-08-11 10:51:11 +00:00
David Baker 3a196c7722 Fix spacing in user status dropdown (#34589)
* Exploration of a virtuoso-powered emoji picker

moved to shared components

Fable generated

* fix pnpm lock

* format & fix some lint issues

* wrong import

* fix lint warning

* Fix off-by-one

and remove manual overflow adjustment: let's leave the default unless
it turns out to be necessary. Emoji should not take that long to load.

* Convert to functional component

* WIP: change to one big virtuoso scroller

* Change to use virtuoso's own onRangeChanged

and santitise category data and how it's passed around

* Convert Tabs to functional component

and put the focusing behaviour back with it just keeping track of
refs by itself.

* Absorb two line config file into main component

* Actually add the config to the main file

* Convert emoji to functional

Also make selected always defined and use useCallback.

* QuickReactions to functional component

* Non-default exports & doc

* Search to functional component

* Well it seems to work just fine now

* Use ref prop

* fix lockfile AGAIN

* lint

* Remove default export

* Remove some mx_ classnames and fix the inputRef

to make the arrow keys in the search box work (well, work as much as
they ever did).

* Remove last of the mx_ id / classnames

(except the one in the test)

* Use useMemo to memoize

* No need to export props interface (I think?)

and fix comment now we don't do the mutation stuff anymore

* Fix test

* Fix axe violations & add screenshots

* Avoid comparing dom snapshots in test

* Allow more before or after, just compare order of the ones present in both.

* Switch existing usages to new emoji picker

and kill the old one with fire

* Unused stuff

* Remove i18n strings

* Fix some tests

* Update screenshots

* Fix test

by removing the last of the weird memoized-but-mutated data structure

* Experimental custom status

* Screenshot

* snapshots

* Update button label and fix test

* Move the string somewhere more sensible than 'a11y'

* i18n lint

* Give the emojis IDs so aria-activedescendant works

* Fix more tests

* Add a small wrapper emoji picker component

This lets us easily memoize the recent emojis when the emoji picker is opened.
Also it saves a bit of boilerplate.

* Remove old emojipicker css

* Typos

Co-authored-by: David Langley <davidl@element.io>

* Use compound constants

* Rethemendex

* Test for custom status

* Use catalog version for emojibase

* Add comments

* More comments

* Fix comment

* More comments

* more comments (and make them uniform)

* More comments

* Fix pnpm lock again

* Another comment

* Add option to hide quick reactions (and preview) bar

* Fix test

to use emoji not in the quick reactions bar

* Apply button types to new version

* Add comment

* Disable screenshot

as per comment

* Fix hover / background / border styles

* Screenshot

* Don't use the reactions row because it's gone now

* Fix spacing in user status dropdown

Updates to renderItem based Dropdown, allowing the item in the dropdown
to be customised.

Requires https://github.com/element-hq/compound-web/pull/538 (and
will be required to update to the version of compound it gets
released in).

* Update to new compound

* snapshots

* Fix tests

---------

Co-authored-by: Will Hunt <2072976+Half-Shot@users.noreply.github.com>
Co-authored-by: David Langley <davidl@element.io>
2026-08-10 15:20:29 +00:00
Florian Duros 3a7be0d3a9 Update room list documentation (#34359) 2026-08-10 14:19:19 +00:00
David Baker fef1f0e0dd Show & clear your own on-a-call status (#34613)
* Show & clear your own on-a-call status

The user menu / settings now reflects your own on-a-call status
and pressing the 'clear' button will clear both m.status and m.call,
whichever are set.

* Update function name

* Fix tests

And make the clear status function simpler by just throwing if either fails.

* Fix more tests
2026-08-10 14:13:42 +00:00