Commit Graph
370 Commits
Author SHA1 Message Date
Michael TelatynskiandGitHub 7e8daab9ee Tweak CSS bundling to dedupe more styles (#34371)
* Tweak CSS bundling to dedupe more styles

Previously all of compound-web & compound-design-tokens were duplicated amongst all the themes rather than just being in `bundle.css`.

* Fix highlight.js & github-markdown-css dark/light

* Fix highlight.js & github-markdown-css dark/light

* Iterate
2026-07-22 09:08:27 +00:00
be8c07699b [create-pull-request] automated change (#34374)
Co-authored-by: t3chguy <2403652+t3chguy@users.noreply.github.com>
2026-07-22 08:08:17 +00:00
R Midhun SureshandGitHub 3bff251010 Auto Collapse Behaviour - Collapse left panel on window resize (#32964)
* Add functionality to UIStore

- Make it possible to query if the window is currently being resized
- Emit WidthIncreased/WidthDecreased events

* Change resize behaviour of panel

So that the panel does not become smaller when the window is resized.
This is consistent with the old room-list design.

* Introduce a `CollapseHandler` object

This should be used by the collapse behaviours to collapse/expand the
panel. There's a good reason to not have the behaviours depend directly
on the react-resizable-panels API methods: We dont want the collapse/expand
calls to conflict with each other. See the comments in the code for more
information.

* Introduce a base class for collapse behaviour logic

Behaviours should extend this class to describe when the panel should
automatically collapse and expand.

* Add the window resize collapse behaviour

* Create a central file from which to export all behaviours

* Add a class to orchestrate the collapse behaviours

ResizerViewModel will only have a dependency on this class.

* Collapse panel on app start if necessary

For eg, if the app is started with a small window width, the panel should be
collapsed.

* Wire auto collapse code into the viewmodel

* Write jest tests

* Fix e2e tests

* Fix lint error

* Fix e2e test failures

* Expand the panel before taking screenshot

Fixes incorrect narrow screenshots in RTE.spec.ts and CIDER.spec.ts

* Make comments consistent

* Move tests from jest to vitest

* Fix lint errors

* Improve comment

* Remove variable

* Remove mock

* Fix comment formatting
2026-07-21 16:37:28 +00:00
Florian DurosandGitHub 363ef74248 Room list: change Edit section label to Save in edit section dialog (#34364)
* Change `Edit section` label to `Save` in edit section dialog

* Update e2e tests
2026-07-21 15:39:42 +00:00
David BakerandGitHub 8effa81ad8 Set auto on-a-call status (#34306)
* Support for reading m.call status

(well, the prefixed version)

* Abstract the details away in userStatusFromProfile

make the validate functions non-exported

* Write on on-=a-call status

* Add tests

* Move user call status logic to its own listener

* Move tests

* use vi rather than jest

* add more mocks

* call async
2026-07-21 14:58:00 +00:00
Florian DurosandGitHub 475d16094c Room list: increase startup performance when rooms have notifications (#34358)
* Throttle section header update when listening to room notifications

* Update room list section header tests
2026-07-20 15:35:57 +00:00
Michael TelatynskiandGitHub b719f531dd Migrate more tests to vitest (#34349) 2026-07-20 13:07:35 +00:00
SiriusandGitHub 63eaba6b07 Include the url preview bundle field in the devtools timeline event editor (#34289)
* added urlpreview field in event editor

* oxfmt

* claude wrote test!

* handled reviews

* oxlint fix

* formatting

* removed useless stubclient
2026-07-20 09:17:51 +00:00
d254b41eaf [create-pull-request] automated change (#34342)
Co-authored-by: t3chguy <2403652+t3chguy@users.noreply.github.com>
2026-07-20 07:38:30 +00:00
13aa6fcc46 Warn when an encrypted search runs before the index has finished building (#34001)
* Warn when an encrypted search runs before the index has finished building

When a search runs in an encrypted room while the local Seshat index is still
crawling not-yet-indexed history, results can silently come back partial.
SearchWarning now subscribes to the event index's changedCheckpoint progress and
shows a polite (role=status) notice while the crawl is in progress, clearing
automatically the moment indexing finishes.

* Scope the partial-index warning to the room being searched

The warning was driven by `currentRoom() !== null`, which is a global signal:
it is non-null while the crawler has any outstanding checkpoint for any room.
Searching a fully-crawled room while an unrelated room was still being crawled
therefore claimed the results may be incomplete when they were not.

Drive it from `crawlingRooms()` instead, which reports the rooms with
outstanding checkpoints by id, and pass the search scope and room id in from
RoomSearchAuxPanel: a room-scoped search now asks only about that room, while
an all-rooms search still reacts to any outstanding checkpoint. Using room ids
throughout also avoids `currentRoom()` returning null, and so under-reporting a
crawl, when the js-sdk does not know the room at the head of the queue.

The `changedCheckpoint` payload only carries the globally-current room and
cannot answer a per-room question, so the handler re-reads the checkpoint set.

* Also warn when the searched room has not been indexed at all

The crawl set cannot see a room that has no checkpoint: before the initial
checkpoints have been seeded, such a room is absent from it and looks identical
to one that has been fully crawled. That is the case issue #32253 describes, so
ask isRoomIndexed() as well, and warn when the index holds no events for the
room being searched.

Only ask it while the crawler still has work outstanding. That is what the
warning claims, and the index has no event for its contents changing --
changedCheckpoint fires on checkpoint transitions only, and an idle crawler is
silent -- so a warning raised once the crawler had drained would never be
re-evaluated and would stick.

Rename the hook to useIsIndexIncomplete, as it no longer answers the narrower
question of whether a crawl is in progress. Re-seed it from the checkpoint set
on each scope or room change so that the previous search's answer is not left
on screen while the lookup is in flight, but not on each checkpoint change,
which would blink an already-earned warning off and on again.

Also reword the crawlingRooms() doc, which described the set as the rooms being
crawled when it holds every queued checkpoint too.

---------

Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
2026-07-17 16:20:30 +00:00
David BakerandGitHub d0a70fb1da Make the text copy button use IconButton (#34224)
* Make the text copy button use IconButton

This obviously should be a shared component, but design is looking at
what it will actually look like long term, so until then, let's at
least make it use compound's IconButton so it gets the hover background
state, and sort out the padding & margins.

Requires https://github.com/element-hq/compound-web/pull/528

* snapshots & add aria-label

* more snapshots

* Remove unnecessary width & height

update other screenshots with expected changes

* One more screenshot

* This really shouldn't be necessary: see what test fails

* Fix test to look in screen for the labels

Because the labels from the tooltip don't go in the container, they
get added to the dom at the top level in a floaty bit.

* update snapshots again

* Fix button size

and also add comment to the other place where we fudge the padding

* Update snapshots

* Align to center

* Screenshots
2026-07-17 14:49:53 +00:00
renovate[bot]GitHubrenovate[bot] <29139614+renovate[bot]@users.noreply.github.com>Michael Telatynski
67fc33ad98 Update npm non-major dependencies (#34320)
* Update npm non-major dependencies

* Oxfmt

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
2026-07-17 14:14:07 +00:00
renovate[bot]GitHubrenovate[bot] <29139614+renovate[bot]@users.noreply.github.com>Michael Telatynski
155992300a Update browserslist (#34265)
* Update browserslist

* Update test

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
2026-07-17 10:55:07 +00:00
SiriusandGitHub 63e65fc60a Use url preview bundle for URL preview in timeline (MSC4095) (#34170)
* use url preview bundle preview content in timeline

* fixed linting errors

* claude wrote a test!

* moved reading settings from the view model into the component

* claude wrote more tests

* applied reviews
2026-07-17 10:18:10 +00:00
David BakerandGitHub adbe90ceb7 Support for reading m.call status (#34295)
* Support for reading m.call status

(well, the prefixed version)

* Abstract the details away in userStatusFromProfile

make the validate functions non-exported

* Add test

* format the oxen

* Remove set function

should be in the other PR
2026-07-17 10:07:38 +00:00
Michael TelatynskiandGitHub 79ac7fbc9e Use oxlint to apply jsx/tsx extension consistently (#34303)
* Remove stale max-len disablements

* Remove stale camelCase & naming-convention disablements

* Remove stale ban-ts-comment disablements

* Remove stale no-var disablements

* Remove stale no-empty-property disablements

* Remove stale react rule disablements

* Remove stale no-constant-condition disablements

* Remove stale no-unused-vars disablements

* Remove stale disablements for disabled rules

* fixup camelcase

* Remove dead code

* Tidy code

* Tweak oxlint config

* Use oxlint to apply jsx/tsx extension consistently

* Fix import

* Fix imports

* Rename affected snapshots

* Update more imports
2026-07-17 09:50:57 +00:00
Michael TelatynskiandGitHub b51c5ed8a7 Tweak oxlint config & delint our code (#34301)
* Remove stale max-len disablements

* Remove stale camelCase & naming-convention disablements

* Remove stale ban-ts-comment disablements

* Remove stale no-var disablements

* Remove stale no-empty-property disablements

* Remove stale react rule disablements

* Remove stale no-constant-condition disablements

* Remove stale no-unused-vars disablements

* Remove stale disablements for disabled rules

* fixup camelcase

* Remove dead code

* Tidy code

* Tweak oxlint config
2026-07-17 07:55:31 +00:00
6290be95fd [create-pull-request] automated change (#34271)
Co-authored-by: t3chguy <2403652+t3chguy@users.noreply.github.com>
2026-07-17 07:19:53 +00:00
Florian DurosandGitHub 377534e6e9 Room list: fix *Chat moved* toast appearing when room list is loaded (#34305)
* Fix Chat moved toast appearing when room list is loaded

* Update e2e tests
2026-07-16 18:20:42 +00:00
Michael TelatynskiandGitHub b9972b7e9e Enable some oxlint a11y rules & improve keyboard accessibility (#34291)
* Conform to oxlint rule jsx-a11y/role-has-required-aria-props

* Conform to oxlint rule jsx-a11y/role-supports-aria-props

* Conform to oxlint rule jsx-a11y/interactive-supports-focus

* Conform to oxlint rule jsx-a11y/click-events-have-key-events

* Update snapshots
2026-07-16 17:29:49 +00:00
RobinandGitHub 6c40c56845 Fix join call button in header having two labels (#34293)
Both the tooltip ("Video call") and the aria-label attribute ("Join video call") were trying to set different labels. I propose that the "Video call" tooltip should actually count as a description.
2026-07-16 10:04:15 +00:00
Tol WassmanandGitHub f1f3aaad76 fix grammar in message for error loading reply (#33802) 2026-07-16 09:23:03 +00:00
R Midhun SureshandGitHub a5648306aa Add functionality to UIStore (#32963)
- Make it possible to query if the window is currently being resized
- Emit WidthIncreased/WidthDecreased events
2026-07-15 21:57:42 +00:00
Will HuntandGitHub cc76070639 Introduce a Module API to get application settings. (#34278)
* Add a module API to get application settings.

* fix test
2026-07-15 19:20:21 +00:00
SiriusandGitHub 8e0ed84eac Fixed sending url preview bundles relying on update delay (#34266)
* Fixed url preview bundle using url previews generated after the composer is cleared when sending message

* lint fix

* added comment

* fixed linting error

* added comments
2026-07-15 18:48:05 +00:00
Florian DurosandGitHub 123b33a2a4 Fix room list throwing an error when adding an existing room (#34281) 2026-07-15 13:29:31 +00:00
mxandreasandGitHub c2139f1987 Make notification settings copy/layout more user-friendly (#34120)
* Make notification settings copy/layout more user-friendly and closer to EX.

* Fix E2E tests.
2026-07-15 13:05:14 +00:00
Florian DurosandGitHub 017661eee3 Remove spammy matrix chat log (#34275) 2026-07-15 11:36:30 +00:00
Michael TelatynskiandGitHub 04fac0a9a4 Update find-unused-settings script (#34252)
* Move more tests over to vitest

* Add exception for test_setting

* Update find-unused-settings script

To not consider usage in tests as real usage

* Remove legacy font settings

They have been being migrated for over 2 years at this point and are flagged by the script as unused

* Re-add test
2026-07-15 10:21:49 +00:00
hayyaksiandGitHub 703bd6177c Make the persistent-storage request observable and warn when it is denied (#33987)
* Make the persistent-storage request observable and warn when it is denied

The end-to-end encryption crypto store lives in IndexedDB. If the origin's storage is not
durable, Chromium can evict it under storage pressure, forcing a logout and recovery-key
re-entry. tryPersistStorage() requested navigator.storage.persist() but only logged the
boolean result, so a denial was invisible.

Make the request observable: it is now async and checks persisted() first (short-circuiting
to avoid re-requesting/re-prompting), a failure to query the state no longer blocks the
request, and a denial warns via the logger (captured by rageshakes) with a stronger
desktop-specific message. It never rejects - the sole caller treats it as fire-and-forget.

This makes the risk observable but cannot by itself guarantee durability: no Electron
main-process API can force per-origin persistence, so a complete cure needs a follow-up.

* Address review: log query errors, drop the requestStorageAccess fallback and the desktop-specific warning

- Include the caught error when the persisted-state query fails.
- Remove the document.requestStorageAccess branch: it is the Storage Access
  API (cross-site cookie/storage access), not durability, and all supported
  browsers (Safari >= 15.2 included) have navigator.storage.persist().
- Drop the desktop-specific suffix from the denial warning.
- Reword the fire-and-forget doc to avoid referencing the caller.
- Simplify the test harness: no descriptor save/restore, delete the stub in
  afterEach.
2026-07-15 10:03:25 +00:00
renovate[bot]GitHubrenovate[bot] <29139614+renovate[bot]@users.noreply.github.com>Michael Telatynski
86b5a28a32 Update npm non-major dependencies (#34263)
* Update npm non-major dependencies

* Fix pcss comments

* Run oxfmt

* Fix lockfile

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
2026-07-15 09:15:58 +00:00
Michael TelatynskiandGitHub 0c61944ffd Move more tests over to vitest (#34249)
* Move more tests over to vitest

* Add exception for test_setting
2026-07-15 08:48:51 +00:00
e6460a5f4e Localazy Download (#34214)
* [create-pull-request] automated change

* Fix tests for notification settings label update.

* Fix lint.

* Screenshot updates for tests.

* Fix playwright E2E tests.

* Fix E2E playwright tests.

---------

Co-authored-by: t3chguy <2403652+t3chguy@users.noreply.github.com>
Co-authored-by: mxandreas <andreass@element.io>
2026-07-14 17:57:24 +00:00
David BakerandGitHub c09f572fa7 Add user status to autocomplete suggestion (#34241)
* Add user status to autocomplete suggestion

* Add test for PillCompletion titleIcon

* Convert to vitest

* Add test for UserStatusIcon

* Switch the user status icon view to be a view model based component

* Screenshots

* Add .catch

* Add test for UserProvider
2026-07-14 13:47:24 +00:00
Michael TelatynskiandGitHub b5fd249e38 Remove more usages of singleton store getter in favour of contexts (#34099)
* Expose SDKContextClass via window for debugging

* Remove stores from window if they are exposed via sdkContext

* Avoid usages of global store instance where React context is accessible

* Remove more usages of singleton store getter in favour of contexts

* Remove more usages of singleton store getter in favour of contexts

* Fix tests by adding SDKContext.Provider

* Fix tests by adding SDKContext.Provider

* Fix tests by adding SDKContext.Provider

* Fix tests by adding SDKContext.Provider

* Fix tests

* Fix tests

* Fix tests

* Iterate

* Fix bad merge

* Iterate

* Fix tests

* Iterate

* Iterate

* Iterate

* Iterate

* Iterate

* Improve coverage

* Improve coverage
2026-07-14 12:58:34 +00:00
David BakerandGitHub 732716ba12 User status in room summary card (#34239) 2026-07-14 08:56:03 +00:00
David BakerandGitHub 2f612c3a9d Add user status to dm room header (#34225)
* Add user status to dm room header

Also bumps the gap on the room header items to 8px because that's
what the designs have and I'm assuming it applies to everything, not
just the user status: pending design confirmation.

* Turns out the icons did have 8px gap

but via 4px of padding for reasons I can't discern

* Adjust spacing to 1.5x

as requested by design

* add tests

* Update screenshots

* add test for user status updating
2026-07-14 08:55:04 +00:00
Michael TelatynskiandGitHub b6859885a3 Upgrade to TypeScript 7 (#34208)
* Upgrade to TypeScript 7

for massive tsc speed gains

Those on WebStorm will want to upgrade to EAP to reap the benefits of the new TSGo compiler

Some things (module-api & shared-components) which utilise unplugin-dts (and api-extractor) need to hold a copy of ts6 for its conventional lib format and API. TS7 ships with no API until TS7.1.

Other things which use eslint also need ts6 for typescript-eslint.

Some type changes were necessary as TS7 caught some issues.

* Add knip exception

* Fix bad merge
2026-07-14 08:09:03 +00:00
SiriusandGitHub 84653bb416 Sending URL Preview Bundles (MSC 4095) (#34150)
* Fetches link previews for all links in message (instead of just the first one)

* message url component to display preview for multiple urls

* Revert visible behaviour back to only showing one URL preview

While fetching all link previews in the text message.

* Moved URL preview VM to MessageComposer

* Added com.beeper.linkpreviews to messages sent with the markdown compositor

* MSC 4452 implemented for the older (markdown) composer

* claude told me to use logger instead of console

* Previews generated with snapshot instead of vm

* moved attachPreviews to a separate file

* added attach URL previews to rich text editor

* don't let attachUrlPreviews block clearning the composer

* fixed linter errors

* moved url preview behind labs feature gate

* passed linters

* moved lab feature checking to where attach preview is used

* claude wrote some unit tests for url previewing

* fixed linter errors

* added feature to labs.md

* fixed linter errors

* fixed oxfmt error

* set previews to none if all previews failed

* resolved PR reviews besides the ones that requires a larger code change

* moved url preview VM creation to message composer

* removed delay when clearing composer url preview on message send

* minor changes to stop using globals everywhere

* moved debouncing responsibility to urlpreviewVM

* minor lint fixes

* added comment

* remove composer content from the state of urlpreview, moved it to the vm

* urlpreviewwrapper depends on the vm only

* added comments

* edited the comment

* updated snapshots

* claude fixed tests

* enable feature for tests that requires MSC4095

* updated snapshot
2026-07-13 15:31:18 +00:00
6aeb5f552b Add config param to disable client wellknown fetch (#34084)
* Add enable_client_well_known_lookups config option

Signed-off-by: David Langley <langley.dave@gmail.com>

* Gate client .well-known poll on enable_client_well_known_lookups

Signed-off-by: David Langley <langley.dave@gmail.com>

* Gate MatrixRTC foci well-known fallback on enable_client_well_known_lookups

Signed-off-by: David Langley <langley.dave@gmail.com>

---------

Signed-off-by: David Langley <langley.dave@gmail.com>
Co-authored-by: David Langley <langley.dave@gmail.com>
2026-07-13 15:27:36 +00:00
R Midhun SureshandGitHub c4606c19f8 Ongoing call tiles - Implement the view-models and store (#34198)
* Add a common view snapshot type

This will contain the common snapshot values used by both dm ongoing
call tile view and room ongoing call tile view.

* Implement the common join button component

* Implement the call icon component

* Implement the common container component

* Support single digit minutes in existing clock component

* Implement the view for duration component

* Add static profile pics to be used in storybook tests

* Implement view for member avatar component

* Implement view for face pile component

* Implement RoomOngoingCallTileView

* Implement DmOngoingCallTileView

* Support the new tiles in RootTileView

* Export all the views

* Update all the screenshots

* Implement view model for duration view

* Implement vm for face pile view

* Implement vm for member avatar view

* Expose call store via the sdk context

* Add method to get all calls in store

* Add store to track latest notification event per room

* Also expose new store via sdk context

* Create a base vm for both tiles

* Implement the room ongoing call tile vm

* Implement the dm ongoing call tile vm

* Support new tile vms in the root tile vm

* Rename getCallInRoom -> getCallOrThrow

* Change confusing comment in test

* Check existing events first and use decryption promise

* Clarify recompute vs update in code comment

* Use vi.mocked instead of ts-ignore

* Change type of size to number

* Import only the type

* Pass size as number instead of string

* Check if call is jistsi call in root tile

* Add more tests

* Rename isCallIgnored -> isCallDeclined

* Add a comment about the 10px margin

* Add comments to explain css heights and widths
2026-07-13 14:52:16 +00:00
Michael TelatynskiandGitHub 825fab6595 Remove SpaceStore singleton (#34088)
* Remove dead code

* Remove LegacyCallHandler singleton

Route via SDKContext to cut import cycles

* Remove SpaceStore singleton

Route via SDKContext to cut import cycles

* Fix tests

* Fix tests

* Fix tests

* Fix tests

* Iterate

* Post-merge fixup

* Iterate
2026-07-13 14:31:39 +00:00
David BakerandGitHub 4518ce5c2a Add user status emoji to member list (#34210)
* Add user status emoji to member list

* snapshots
2026-07-10 15:16:23 +00:00
David BakerandGitHub f09b27db7c Add user status in user info right panel card (#34212)
* Add user status in user info right panel card

Adds a very simple view component to do so, which will be reused
in the DM room header.

Also comment the other status view so the difference is clear.

* Add screenshot

* Add test

* Rename snapshot
2026-07-10 14:45:41 +00:00
Michael TelatynskiandGitHub aeea53dfde Expose SDKContext on the window & avoid using singleton store .instance (#34098)
* Expose SDKContextClass via window for debugging

* Remove stores from window if they are exposed via sdkContext

* Avoid usages of global store instance where React context is accessible

* Fix tests by adding SDKContext.Provider

* Fix tests by adding SDKContext.Provider

* Fix tests by adding SDKContext.Provider

* Fix tests by adding SDKContext.Provider

* Iterate

* Discard changes to apps/web/src/components/views/elements/AppTile.tsx
2026-07-10 09:51:38 +00:00
Michael TelatynskiandGitHub 15c85ec50f Switch from eslint to oxlint (#34166)
* Fix type imports

* Fix jsdoc

* Fixup types

* Fix stray awaits on non-thenables

* Fixup imports

* Fix splats

* Fix this-context on callbacks

* Memoise react contexts

* Prefer find/flatMap

* Make oxlint happier about our React keys

* Avoid unsafe default function params

* Fixup jsdoc

* Fixup contexts

* Switch from eslint to oxlint

* Some oxlint-related tweaks

* Iterate

* Partial revert to defer some changes and shrink diff

* Iterate

* Add eslint-plugin-element-call and enable the copyright rule

* Set strictStorePkgContentCheck

* Iterate

* Make sonar happy

* Fix new lints
2026-07-10 09:47:41 +00:00
Florian DurosandGitHub f21a3f5413 RoomList: add back Favourites and Low Priority filters when sections are disabled (#34162)
* Add back Favourites and Low Priority filter into shared components

* Wireup RoomList.showSections and filters in room list vm

* Add e2e test for filters and showSection setting
2026-07-09 10:25:45 +00:00
David BakerandGitHub 707d5a4353 Add user status to DM rooms in the room list (#34191)
* Add user status to DM rooms in the room list

* Screenshot

* Tests for fetchUserStatus
2026-07-09 09:56:23 +00:00
TimoandGitHub 7d26577089 add background: "solid" for EC (#34168) 2026-07-08 16:30:44 +00:00
Florian DurosandGitHub d041669031 Remove dead code on favourite and people metaspaces (#34187)
* Remove unused Favourites and People metaspaces

* Update existing tests

* Update snapshots

* Update i18n lang
2026-07-08 14:20:09 +00:00