The repo had no upstream ancestry: a whole tree arrived in one commit in May, so
every update meant re-applying our patches by hand onto a fresh checkout, and a file
Element moved would take our lines with it silently.
The real base was found by measuring tree distance across develop rather than trusting
the changelog: deadd548, not the v1.12.17 tag. With that set as a temporary graft, this
merge computed as a proper three-way merge - 32 conflicts instead of 1757.
Resolutions, each decided rather than defaulted:
- 24 GitHub workflows stay deleted; we build on GitLab CI.
- MImageBody.tsx is gone upstream, migrated to MVVM. Our ClamAV error label moved into
ImageBodyViewModel.computeErrorLabel, ahead of the DecryptError branch, matching what
VideoBodyViewModel and FileBodyViewModel already do.
- Upstream extracted the room list item body into RoomListItemContent. Our call
participants list and its getInitials helper moved there; both sides' CSS classes and
both sides' props are kept.
- matrix-js-sdk follows upstream at 42.2.0 - our git ref pin was a workaround for a
stale ref, and following upstream is the point of this merge.
- Element Call stays ours. Checked before deciding: @element-hq/element-call-embedded
is referenced nowhere in the tree, while webpack.config.ts needs
@sorb/threadnet-call-embedded, so taking upstream's line would have deleted the noise
suppression from #0054 without a word.
The lockfile was regenerated with pnpm 11.20.0, which upstream now requires through
devEngines. CI already runs corepack enable, and onFail: download makes it fetch that
version by itself.
Not yet accepted: this needs a build and the ClamAV functional test - send an encrypted
file, receive a rejected one - before it goes near main.
* 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
* 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.
* 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
* Adapt OAuth2 implementation to Matrix Spec v1.18
* Handle more cases of oidc->oauth
* Fix test
* Fix read back of oauth2 context
* Iterate
* Fix tests
* Discard changes to apps/web/playwright/e2e/settings/account-user-settings-tab.spec.ts
* Fix test
* Fix test
* Fix test
* Potential fix for pull request finding 'Unused variable, import, function or class'
Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>
* Iterate
* Iterate
* Fix test
---------
Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>
* Migrate more jest tests to vitest
* Fix jest config
* Fix jest config
* Make remaining jest tests type-happy
* Iterate
* Fix Notifier import cycle
* Fix tests
* Delint
* Iterate
* Handle SDKContextClass `client` initialisation internally
Rather than via MatrixChat - this is predominantly for Lifecycle tests as they don't use a MatrixChat and it doesn't make much sense for this component to own this state.
* Fix tests
* Iterate
* Simplify diff
* Improve coverage
* Improve coverage
* Iterate
* Handle SDKContextClass `client` initialisation internally
Rather than via MatrixChat - this is predominantly for Lifecycle tests as they don't use a MatrixChat and it doesn't make much sense for this component to own this state.
* Fix tests
* Migrate autocomplete tests to vitest
* Migrate utils/beacon tests to vitest
* Migrate utils/device tests to vitest
* Migrate utils/crypto tests to vitest
* Migrate utils/localRoom tests to vitest
* Migrate notifications tests to vitest
* Fix types
* Make jest test happy
* Make sonar happier
* Separate out SDKContext
...from SDKContextClass, as the comments hopefully explain.
Also make the captitalisation consistent.
* Adding the new file usually helps too
* Fix import
* More comment
* Update the various imports of SDKContextClass
* Also fix case of TestSDKContext
* Update the mock
* feat:add missing methods to rls V3
* feat: use rls v3 methods instead of old alrgorithms
* feat: move stabel function to own utils
* feat: use this new moved functions
* test: cleaner test
* Switch from prettier to oxfmt
* Make knip happy
* Make knip happy
* Apply suggestion from @t3chguy
* Rename .oxfmtrc.json to .oxfmtrc.jsonc
* Make oxfmt happier
* Add user status on user profile icon
Currently unstyled & no tests
* Style the user status icon
* Update snapshot
for avatar wrapper
* More snapshot updates
* add if braces
* Split out user status functions
to avoid circular dep which has the weird effect of just breaking
jest's mocking.
* type imports
* Update imports
* Update snapshot
* Tests
* baseline image
* Just snapshot the component itself
* User status in user menu
first pass, unstyled
* fix export
* superstylin'
* snapshots
* Add story & test
* Snapshots
and re-use the repeated rules
* Tests
* Fix jest lcov projectRoot config
* Change tooltip text to just 'clear'
* Add comment & fix console warn
* Remove all options screenshot
as it's not really particularly useful as a preset story
* remove stale screenshot
* fix imports
---------
Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
* Use vitest for some EW unit tests
* Ensure library builds are done before unit tests
* Stabilise jest tests
* Move more tests over
* Make sonar happier
* Update types/node for happy-dom compat again
* Decrease max-workers to stabilise jest tests
* Split jest over 3 runners to alleviate memory woes
* Switch jest to runInBand
* Attempt to deflake jest tests
* tweak coverage
* tweak coverage
* fix: use configured brand name in JSON and PlainText chat export filenames
The JSON and PlainText chat export functions were using the hardcoded
default 'matrix' as the brand name in filenames, while the HTML/ZIP
export correctly used the configured brand (e.g., 'Element').
This made the filenames inconsistent:
- ZIP: Element - Room - Chat Export - timestamp.zip
- JSON: matrix - Room - Chat Export - timestamp.json
Now both JSON and PlainText exports pass SdkConfig.get().brand to
makeFileNameNoExtension(), matching the behavior of the base Exporter
class used by HTML exports.
Fixes#32853
Signed-off-by: RoySerbi <roy676564@gmail.com>
* refactor: read brand from SdkConfig inside makeFileNameNoExtension
Address review feedback from @t3chguy: the brand parameter on
makeFileNameNoExtension was effectively dead (all three call sites passed
SdkConfig.get().brand and the 'matrix' default was unreachable).
- Exporter.makeFileNameNoExtension now reads SdkConfig.get().brand directly
- All call sites (Exporter, JSONExport, PlainTextExport) simplified to no-arg
- Drop now-unused SdkConfig imports in JSONExport and PlainTextExport
Tests are unchanged: they already mock SdkConfig to return 'Element', so the
existing 'Element-branded destination file name' snapshots remain valid.
---------
Signed-off-by: RoySerbi <roy676564@gmail.com>
* Removing the wierd blue border color when focused + adjusted the border to show when squeezed at the end of border
* Update snapshots
* Update edited code block screenshot
* chore: add dnd kit deps
* chore: patch dnd kit to fix ts error
* feat(sc): add drag-and-drop to room list item and wrapper
* feat(sc): make the room list header a droppable element
* feat(sc): add dnd to room list view
* feat(tags): can tag room as CHAT
* feat(vm): implement `changeRoomSection`
* feat(sc): disable dragging in flat list
* fix: disable keyboard navigation when dragging element
* test(sc): update snapshots
* test(sc): add dnd test
* test(e2e): add e2e tests for room drag and drop
* test(vm): add tests for changeRoomSection
* fix: remove focus visible when dropping with the mouse
* test(playwright): update existing screenshots
* chore(sc): move numbers out of main build
The Ew RecorderWorklet imports shared component bundle. However if the
bundle uses some deps using document/window which, the worklet will not
work.
The solution is to put the used functions into a separate bundle.
* doc(sc): add subpath import into README
* doc: typo barrel/bundle
* test: improve test expect
* refactor: add utils to section tag
* fix: incorrect check in tagRoom
* fix: add doc about dndkit tunning
* Add shared event presentation context
* Add app-web event presentation mapper
* Wire event presentation provider into app timelines
* Add Storybook controls for event layout and density
* Wire compact density through app/web event presentation provider
* Use event presentation density for URL previews
* Move TileErrorView layout to event presentation context
* Minor fix and updated snapshot
* Updated snapshots for url preview group
* Prettier fix
* Restore removed story to fix missing playwright test
* Updates after review comments
* Fix prettier issue
* Layer Compound and shared component CSS
* Layer app theme CSS
* Remove !important flags from ActionBarView
* Remove unnecessary !important statements from shared components
* Avoid dead code errors for *.pcss just because layer is specified after @import url
* Remove unnecessary !important styling
* Override Banner defaults in RoomStatusBarView
* Updated snaps
* Updated snaps
* Fix styling of media body in app/web
* Fix styling for Compound anchors
* Fix styling issues in app/web
* More styling fixes
* Fix a problem extracting css for HTMLExport
* Revert changes
* Fix for theme styling
* Add test to improve coverage
* Prettier
* Fix styling issues
* Add data-kind attribute to avoid global styling override
* Update screenshot that now is correct
* Revert data-kind attribute
* Handle LinkPreview styling in .pcss
* Fix flaky test: Avoid racing the lazy-loaded ManageEventIndexDialog
* Take care of review comments
* Updated snaps
* Updated snaps again after merge
* Remove !important from RoomStatusBar
* Use other branch
* All the changes that got lost
* Fix merge
* Ensure emoji can only be one character long
* Fixup labs feature
* Remove redundant check
* Update snapshot
* update snapshot
* add snapshot
* unpin
* fix pnpm lock
* undo pn[m lockfile changes altogether
as we shouldn't actually need any afaik
* update snpahot for changed IDs
* Snapshot update
* Snapshot update
* There is now another section
* more snapshots
* more snapshot
* More snapshots
* oh come on snapshots
* actual snapshot update
* Fix sonar issues
* just update the thing manually
* [screams internally]
* Update snapshot
* test for useUserStatus
* Make useUserStatus actually truncate
* Split out slash command to its own file
& add test
* Remove irrelevant comment
* doc
* Comment on non-obvious error message
---------
Co-authored-by: David Baker <dbkr@users.noreply.github.com>
* feat(sc): add new toast type for room list
* feat(sc): add section entries in room list item menu
* feat(rls): expose util functions
* feat: allows to tag room with custom sections
* feat(vm): add new Chat moved toast to room list vm
* feat(vm): add section selection to room list item vm
* feat(e2e): add tests for adding room in a custom section
* test(e2e): update existing screenshots
* chore: fix lint after merge
* chore: remove outline in test
* Upgrade to compound 9.2.0
... to pick up the export of PageHeader
* update snapshots
* update shared-components snapshots
* More snapshot updates
* update snapshot
* GHA: Show disk usage on failure
* make sure to disconnect from possibly active calls for a room when leaving the room
* log error on log call
* Update apps/web/src/utils/leave-behaviour.ts
Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
* fix wrong logger import
* hang up calls properly on empty rooms for both legacy and element calls (listen for room event and leave call if only one member left). add tests for both legacy and element calls.
* format Call-test.ts
* revert async on function def
* revert Call.ts and Call-test.ts. Wrap legacy call hangup in try
---------
Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
* Update to compound-web 9.0.1
There are a couple of breaking changes in v9, leading to the changes in
`BugReportDialog` and `EncryptionCard`.
Most of these updates, however, are snapshot updates, due to changes in the CSS
class names in compound web (which happens due to updates in the CSS content in
those classes; `postcss-modules` generates class names based on the hash of the
CSS).
* update playwright screenshots
* Remove global h2 css rule in favour of heading styles/components
* Use Compound Heading in shared-components
and forbid hX elements
* Use Compound Heading in settings
add back margin to some legacy headings
* Tweak some headings
* Update screenshots
* Update screenshots
* Update snapshots
* Tweak .gitignore
* Update snapshots
* Iterate
* Update screenshots
* Update screenshots
* Update screenshot
* Refactor MFileBody using MVVM and move to shared component
* Simplyfing rendering properties
* Create a first version of view model for the component
* Simplifying component properties and make it possible to override module css using data-* attributes
* Create a MBodyFactory in element-web and use it to render MFileBodyView from MessageEvent
* Use <MediaBody instead of <button to support legacy rendering
* Updated styling and comments
* Refactoring className from snapshot to component property
* Rename MFileBody* to FileBody*
* Rename MFileBody* to FileBody*
* Refactoring render branches to allow for displaying nothing
* Fix styling issues
* Fix lint errors
* Fix for css selectors in playwright tests
* Remove the MFileBody component and change all callers to use MBodyFactory:FileBodyView
* Remove unused strings in element-web
* Revert to render text in story iframes
* Fix for prettier error
* Fix playwright test css selectors
* Apply legacy styling in element-web
* Add legacy styling for mx_MFileBody
* Restore file
* Change from <div to <button
* Calculate span width ad update screenshots
* Remove width calculation and update snapshots
* Fix for letter-spacing and better content in story
* Updated playwright screenshots
* Updated snapshots
* Fixing Sonar errors/warnings
* Removed extra parentheses
* Changes after review
* Change border-radius to px and updated snapshots
* Fix typo in description
* And another typo fix
* Changes after review
* chore: remove unused `ManualAlgorithm`
In the old room list ui, we can"t manually sort the rooms or the
sections. Neither in a menu or by drag and drop
* fix: add `undefined` to `tagRoom` signature since the code allows it
* test: add tests to `RoomListActions`
* chore: remuve unuseful comment
* refactor: remove unused ``newIndex
* doc: remove typing in tsdoc
* refactor: extract `getTagsForRoom` from old rls
`getTagsForRoom` doesn't rely on the rls state. We can extract it safely
to an external function.
The function is not moved into the rls v3 because the rls is for the
room list and not for other ui elements.
* refactor: remove dead code
* test: add more tests for `getTagsForRoom`
* refactor: `getTagsForRoom` in old rls
* doc: add missing tsdoc for `room`
* refactor: move `DefaultTagID` and `TagID` to rls v3
Move the enum and type in rls v3 and update imports
* refactor: move `getChangedOverrideRoomMutePushRules` from rls to rls v3
* refactor: replace `VisiblityProvider` by `isRoomVisible` and move it to rls v3