Compare commits

...

9 Commits

Author SHA1 Message Date
Timo
1fcf686fe5 also remove border for wider screens 2024-11-12 19:08:04 +01:00
Timo
09ca4252b4 use memory store + css 2024-11-12 18:44:34 +01:00
Hugh Nimmo-Smith
c49aa31e83 Lint 2024-11-12 14:17:15 +00:00
Hugh Nimmo-Smith
0c7b265224 Bump js-sdk to 8e65c13d5019eb215fa99c86ddef463d9c383115 2024-11-12 14:16:38 +00:00
Timo
bb14981e80 missing subkey 2024-11-12 14:12:01 +00:00
Timo
de16913da9 update delay event settings to match dev 2024-11-12 14:12:01 +00:00
Timo
c59ab81875 Remove memory store to make it testable 2024-11-12 14:12:01 +00:00
Timo
d66914d628 Bump js sdk to a branch supporting the state fix msc4222 changes and local-echo 2024-11-12 14:12:01 +00:00
Hugh Nimmo-Smith
ccd40b79e1 Mitigation for gappy/limited sync responses in SPA mode 2024-11-12 14:11:04 +00:00
6 changed files with 32 additions and 6 deletions

View File

@@ -17,5 +17,9 @@
},
"rageshake": {
"submit_url": "https://element.io/bugreports/submit"
},
"matrix_rtc_session": {
"membership_keep_alive_period": 5000,
"membership_server_side_expiry_timeout": 15000
}
}

View File

@@ -87,7 +87,7 @@
"livekit-client": "^2.5.7",
"lodash": "^4.17.21",
"loglevel": "^1.9.1",
"matrix-js-sdk": "matrix-org/matrix-js-sdk#8e9a04cdec0f88fc876bbbf406db55b0677f005d",
"matrix-js-sdk": "matrix-org/matrix-js-sdk#8e65c13d5019eb215fa99c86ddef463d9c383115",
"matrix-widget-api": "^1.10.0",
"normalize.css": "^8.0.1",
"observable-hooks": "^4.2.3",

View File

@@ -13,7 +13,7 @@
.reactionPopupMenuModal > div > div {
padding-inline: var(--cpd-space-6x) !important;
padding-block: var(--cpd-space-6x) var(--cpd-space-8x) !important;
padding-block: var(--cpd-space-6x) var(--cpd-space-6x) !important;
}
.reactionPopupMenu menu {
@@ -44,6 +44,7 @@
width: 1.4em;
height: 1.4em;
border-radius: var(--cpd-radius-pill-effect);
border: none;
}
@media (max-width: 800px) {
@@ -53,6 +54,7 @@
width: 1em;
height: 1em;
min-block-size: unset;
border: none;
}
}

View File

@@ -184,6 +184,10 @@ export const ReactionsProvider = ({
// This effect handles any *live* reaction/redactions in the room.
useEffect(() => {
const reactionTimeouts = new Set<number>();
// TODO: this should be somewhere more sensible
const handleTimelineReset = (): void => {
logger.warn("Received TimelineReset indicating limited sync response");
};
const handleReactionEvent = (event: MatrixEvent): void => {
// Decrypted events might come from a different room
if (event.getRoomId() !== room.roomId) return;
@@ -297,6 +301,7 @@ export const ReactionsProvider = ({
}
};
room.on(MatrixRoomEvent.TimelineReset, handleTimelineReset);
room.on(MatrixRoomEvent.Timeline, handleReactionEvent);
room.on(MatrixRoomEvent.Redaction, handleReactionEvent);
room.client.on(MatrixEventEvent.Decrypted, handleReactionEvent);
@@ -306,6 +311,7 @@ export const ReactionsProvider = ({
room.on(MatrixRoomEvent.LocalEchoUpdated, handleReactionEvent);
return (): void => {
room.off(MatrixRoomEvent.TimelineReset, handleTimelineReset);
room.off(MatrixRoomEvent.Timeline, handleReactionEvent);
room.off(MatrixRoomEvent.Redaction, handleReactionEvent);
room.client.off(MatrixEventEvent.Decrypted, handleReactionEvent);

View File

@@ -9,6 +9,7 @@ import { IndexedDBStore } from "matrix-js-sdk/src/store/indexeddb";
import { MemoryStore } from "matrix-js-sdk/src/store/memory";
import {
createClient,
Filter,
ICreateClientOpts,
Preset,
Visibility,
@@ -165,7 +166,20 @@ export async function initClient(
// Otherwise, a sync may complete before the listener gets applied,
// and we will miss it.
const syncPromise = waitForSync(client);
await client.startClient({ clientWellKnownPollPeriod: 60 * 10 });
await client.startClient({
clientWellKnownPollPeriod: 60 * 10,
// ask for a high limit to try and avoid gappy syncs
filter: Filter.fromJson(undefined, "element-call", {
room: {
timeline: {
limit: 1000,
},
},
}),
// we ask for 20 past message to try and get some recent context
// n.b. past reactions are not guaranteed to be visible
initialSyncLimit: 20,
});
await syncPromise;
return client;

View File

@@ -6017,9 +6017,9 @@ matrix-events-sdk@0.0.1:
resolved "https://registry.yarnpkg.com/matrix-events-sdk/-/matrix-events-sdk-0.0.1.tgz#c8c38911e2cb29023b0bbac8d6f32e0de2c957dd"
integrity sha512-1QEOsXO+bhyCroIe2/A5OwaxHvBm7EsSQ46DEDn8RBIfQwN5HWBpFvyWWR4QY0KHPPnnJdI99wgRiAl7Ad5qaA==
matrix-js-sdk@matrix-org/matrix-js-sdk#8e9a04cdec0f88fc876bbbf406db55b0677f005d:
version "34.10.0"
resolved "https://codeload.github.com/matrix-org/matrix-js-sdk/tar.gz/8e9a04cdec0f88fc876bbbf406db55b0677f005d"
matrix-js-sdk@matrix-org/matrix-js-sdk#8e65c13d5019eb215fa99c86ddef463d9c383115:
version "34.11.1"
resolved "https://codeload.github.com/matrix-org/matrix-js-sdk/tar.gz/8e65c13d5019eb215fa99c86ddef463d9c383115"
dependencies:
"@babel/runtime" "^7.12.5"
"@matrix-org/matrix-sdk-crypto-wasm" "^9.0.0"