* Update MemberListView.tsx
* Update MemberListViewModel.ts
* simplify 3PID invite keys to getStateKey and added regression test
* Use state_key for 3PID invite keys and set up test state before initial render
* Format common.tsx with oxfmt
* Refactor Mjolnir body to use render-only view model actions
* Extracted isMjolnirBodyAllowed from MessageEvent
* Converted the new test file to vitest
* Add EventTile root properties to view model
* Move render-related event reads into the vm
* Remove duplicate root derivation in UnwrappedEventTile
* Move data-has-reply derivation into EventTileViewModel
* Move getEventDisplayInfo() and dependencies into EventTileViewModel
* Add tests for improved coverage
* Cleanup and comments
* Fix: Replacement events have a fallback tile but must not show their own reply chain
* Combine dependency and prop updates into one atomic VM update
* Remove property which was never read and fix oxfmt issue
* Add new setting to store section state
* Store section state in device settings
* Wire up section header view model and new section functions
* Update room list vm tests
* Add e2e test on section state persistence
* Use more intuitive syntax for SectionExpansionState
* Formatting
* Fix chats section staying expanded
* Add CHAT section case in e2e test
* Fix joinRoom failing when the roomviewstore state changes.
* drive by type fix
* Help debugging failed dispatches
* Use proper types and include roomId in RoomViewStore tests
* remove focus
* Update apps/web/src/stores/RoomViewStore.tsx
Co-authored-by: R Midhun Suresh <hi@midhun.dev>
* fmt
* Add a test for coverage
---------
Co-authored-by: R Midhun Suresh <hi@midhun.dev>
* Add pure sender render inputs to EventTileViewModel
* Move sender/avatar normalization to EventTile
* Split sender and avatar adapters into focused leaf components
* Add tests for the sender and avatar adapters
* Fix sonar issues
* Make sender profile consume pure member info
* Collapse sender adapter onto snapshot-driven props
* Share current-member resolution for event and reply tiles
* Fix Prettier issues
* Keep settings preview on historical sender profiles
* Update the proprty name to reflect the use of the event-time sender data instead of resolving the current room member
* Fix Sonar issue
* Tighten member to MemberInfo | null in the view model
* Remove support for MSC3391 & MSC3852
As they were both rejected & closed.
Synapse already removed support for MSC3852 which means it already did nothing: https://github.com/element-hq/synapse/pull/19430
* Update snapshot
* Fix some documentation for element-desktop
Some of these links got broken, or outdated, during the monorepo switch.
* Fix desktop docker build script
It will fail with 'workspace_node_modules: no such file or directory' if the
directory does not exist.
This got broken by https://github.com/element-hq/element-web/pull/33641.
* Clarify native modules doc
Most of this stuff does not apply when using the docker build.
* update snapshot
* 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
* 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>
* 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
* 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
* 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
* 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
* 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
* 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.
* 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
* 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
* 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
* 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
* 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
* Avoid snapshot in metaspaces order test
Just assert the thing we're actually testing rather than a snapshot
because I keep having to update this snapshot every time anything in
the left panel changes and it's tedious.
* 🐂
* Get all the button roles instead
* Favourites & people are gone
* Query treeitems and then get the buttons from them
* 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