Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
Michael Telatynski 2025-12-09 16:39:02 +00:00
parent a5e27cec0d
commit 2a96f224f6
No known key found for this signature in database
GPG Key ID: A2B008A5F49F5D0D
10 changed files with 70 additions and 124 deletions

View File

@ -13,72 +13,30 @@ import { test } from ".";
test.describe("Read receipts", { tag: "@mergequeue" }, () => {
test.describe("Message ordering", () => {
test.describe("in the main timeline", () => {
test.fixme(
"A receipt for the last event in sync order (even with wrong ts) marks a room as read",
() => {},
);
test.fixme(
"A receipt for a non-last event in sync order (even when ts makes it last) leaves room unread",
() => {},
);
test.fixme("A receipt for the last event in sync order (even with wrong ts) marks a room as read", () => {});
test.fixme("A receipt for a non-last event in sync order (even when ts makes it last) leaves room unread", () => {});
});
test.describe("in threads", () => {
// These don't pass yet - we need MSC4033 - we don't even know the Sync order yet
test.fixme(
"A receipt for the last event in sync order (even with wrong ts) marks a thread as read",
() => {},
);
test.fixme(
"A receipt for a non-last event in sync order (even when ts makes it last) leaves thread unread",
() => {},
);
test.fixme("A receipt for the last event in sync order (even with wrong ts) marks a thread as read", () => {});
test.fixme("A receipt for a non-last event in sync order (even when ts makes it last) leaves thread unread", () => {});
// These pass now and should not later - we should use order from MSC4033 instead of ts
// These are broken out
test.fixme(
"A receipt for last threaded event in ts order (even when it was received non-last) marks a thread as read",
() => {},
);
test.fixme(
"A receipt for non-last threaded event in ts order (even when it was received last) leaves thread unread",
() => {},
);
test.fixme(
"A receipt for last threaded edit in ts order (even when it was received non-last) marks a thread as read",
() => {},
);
test.fixme(
"A receipt for non-last threaded edit in ts order (even when it was received last) leaves thread unread",
() => {},
);
test.fixme(
"A receipt for last threaded reaction in ts order (even when it was received non-last) marks a thread as read",
() => {},
);
test.fixme(
"A receipt for non-last threaded reaction in ts order (even when it was received last) leaves thread unread",
() => {},
);
test.fixme("A receipt for last threaded event in ts order (even when it was received non-last) marks a thread as read", () => {});
test.fixme("A receipt for non-last threaded event in ts order (even when it was received last) leaves thread unread", () => {});
test.fixme("A receipt for last threaded edit in ts order (even when it was received non-last) marks a thread as read", () => {});
test.fixme("A receipt for non-last threaded edit in ts order (even when it was received last) leaves thread unread", () => {});
test.fixme("A receipt for last threaded reaction in ts order (even when it was received non-last) marks a thread as read", () => {});
test.fixme("A receipt for non-last threaded reaction in ts order (even when it was received last) leaves thread unread", () => {});
});
test.describe("thread roots", () => {
test.fixme(
"A receipt for last reaction to thread root in sync order (even when ts makes it last) marks room as read",
() => {},
);
test.fixme(
"A receipt for non-last reaction to thread root in sync order (even when ts makes it last) leaves room unread",
() => {},
);
test.fixme(
"A receipt for last edit to thread root in sync order (even when ts makes it last) marks room as read",
() => {},
);
test.fixme(
"A receipt for non-last edit to thread root in sync order (even when ts makes it last) leaves room unread",
() => {},
);
test.fixme("A receipt for last reaction to thread root in sync order (even when ts makes it last) marks room as read", () => {});
test.fixme("A receipt for non-last reaction to thread root in sync order (even when ts makes it last) leaves room unread", () => {});
test.fixme("A receipt for last edit to thread root in sync order (even when ts makes it last) marks room as read", () => {});
test.fixme("A receipt for non-last edit to thread root in sync order (even when ts makes it last) leaves room unread", () => {});
});
});
});

View File

@ -12,18 +12,20 @@ import { test } from ".";
test.describe("Read receipts", { tag: "@mergequeue" }, () => {
test.describe("messages with missing referents", () => {
test.fixme(
"A message in an unknown thread is not visible and the room is read",
async ({ roomAlpha: room1, roomBeta: room2, util, msg }) => {
// Given a thread existed and the room is read
await util.goTo(room1);
await util.receiveMessages(room2, ["Root1", msg.threadedOff("Root1", "T1a")]);
test.fixme("A message in an unknown thread is not visible and the room is read", async ({
roomAlpha: room1,
roomBeta: room2,
util,
msg,
}) => {
// Given a thread existed and the room is read
await util.goTo(room1);
await util.receiveMessages(room2, ["Root1", msg.threadedOff("Root1", "T1a")]);
// When I restart, forgetting the thread root
// And I receive a message on that thread
// Then the message is invisible and the room remains read
},
);
// When I restart, forgetting the thread root
// And I receive a message on that thread
// Then the message is invisible and the room remains read
});
test.fixme("When a message's thread root appears later the thread appears and the room is unread", () => {});
test.fixme("An edit of an unknown message is not visible and the room is read", () => {});
test.fixme("When an edit's message appears later the edited version appears and the room is unread", () => {});

View File

@ -14,14 +14,8 @@ test.describe("Read receipts", { tag: "@mergequeue" }, () => {
test.describe("Notifications", () => {
test.describe("in the main timeline", () => {
test.fixme("A new message that mentions me shows a notification", () => {});
test.fixme(
"Reading a notifying message reduces the notification count in the room list, space and tab",
() => {},
);
test.fixme(
"Reading the last notifying message removes the notification marker from room list, space and tab",
() => {},
);
test.fixme("Reading a notifying message reduces the notification count in the room list, space and tab", () => {});
test.fixme("Reading the last notifying message removes the notification marker from room list, space and tab", () => {});
test.fixme("Editing a message to mentions me shows a notification", () => {});
test.fixme("Reading the last notifying edited message removes the notification marker", () => {});
test.fixme("Redacting a notifying message removes the notification marker", () => {});
@ -30,18 +24,9 @@ test.describe("Read receipts", { tag: "@mergequeue" }, () => {
test.describe("in threads", () => {
test.fixme("A new threaded message that mentions me shows a notification", () => {});
test.fixme("Reading a notifying threaded message removes the notification count", () => {});
test.fixme(
"Notification count remains steady when reading threads that contain seen notifications",
() => {},
);
test.fixme(
"Notification count remains steady when paging up thread view even when threads contain seen notifications",
() => {},
);
test.fixme(
"Notification count remains steady when paging up thread view after mark as unread even if older threads contain notifications",
() => {},
);
test.fixme("Notification count remains steady when reading threads that contain seen notifications", () => {});
test.fixme("Notification count remains steady when paging up thread view even when threads contain seen notifications", () => {});
test.fixme("Notification count remains steady when paging up thread view after mark as unread even if older threads contain notifications", () => {});
test.fixme("Redacting a notifying threaded message removes the notification marker", () => {});
});
});

View File

@ -32,7 +32,7 @@ Please see LICENSE files in the repository root for full details.
/* mask to dither resulting combined gradient */
url("$(res)/img/noise.png"),
/* gradient to apply different amounts of dithering to different parts of the gradient */
linear-gradient(
linear-gradient(
to bottom,
/* 10% dithering at the top */ rgb(0, 0, 0, 0.9) 20%,
/* 80% dithering at the bottom */ rgb(0, 0, 0, 0.2) 100%

View File

@ -12,8 +12,10 @@ import { ReleaseAnnouncement as ReleaseAnnouncementCompound } from "@vector-im/c
import { ReleaseAnnouncementStore, type Feature } from "../../stores/ReleaseAnnouncementStore";
import { useIsReleaseAnnouncementOpen } from "../../hooks/useIsReleaseAnnouncementOpen";
interface ReleaseAnnouncementProps
extends Omit<ComponentProps<typeof ReleaseAnnouncementCompound>, "open" | "onClick"> {
interface ReleaseAnnouncementProps extends Omit<
ComponentProps<typeof ReleaseAnnouncementCompound>,
"open" | "onClick"
> {
feature: Feature;
}

View File

@ -187,8 +187,8 @@ export default class RoomStatusBar extends React.PureComponent<IProps, IState> {
// if it's a resource limit exceeded error: those are shown in the top bar.
const errorIsMauError = Boolean(
this.state.syncStateData &&
this.state.syncStateData.error &&
this.state.syncStateData.error.name === "M_RESOURCE_LIMIT_EXCEEDED",
this.state.syncStateData.error &&
this.state.syncStateData.error.name === "M_RESOURCE_LIMIT_EXCEEDED",
);
return this.state.syncState === "ERROR" && !errorIsMauError;
}

View File

@ -22,8 +22,10 @@ export type ListContext<Context> = {
context: Context;
};
export interface IListViewProps<Item, Context>
extends Omit<VirtuosoProps<Item, ListContext<Context>>, "data" | "itemContent" | "context"> {
export interface IListViewProps<Item, Context> extends Omit<
VirtuosoProps<Item, ListContext<Context>>,
"data" | "itemContent" | "context"
> {
/**
* The array of items to display in the virtualized list.
* Each item will be passed to getItemComponent for rendering.

View File

@ -34,8 +34,10 @@ type DialogAesthetics = Partial<{
};
}>;
export interface InteractiveAuthDialogProps<T = unknown>
extends Pick<InteractiveAuthProps<T>, "makeRequest" | "authData"> {
export interface InteractiveAuthDialogProps<T = unknown> extends Pick<
InteractiveAuthProps<T>,
"makeRequest" | "authData"
> {
// matrix client to use for UI auth requests
matrixClient: MatrixClient;

View File

@ -177,12 +177,10 @@ class RoomSettingsDialog extends React.Component<IProps, IState> {
RoomSettingsTab.Notifications,
_td("notifications|enable_prompt_toast_title"),
"mx_RoomSettingsDialog_notificationsIcon",
(
<NotificationSettingsTab
roomId={this.state.room.roomId}
closeSettingsFn={() => this.props.onFinished(true)}
/>
),
<NotificationSettingsTab
roomId={this.state.room.roomId}
closeSettingsFn={() => this.props.onFinished(true)}
/>,
"RoomSettingsNotifications",
),
);
@ -214,12 +212,10 @@ class RoomSettingsDialog extends React.Component<IProps, IState> {
RoomSettingsTab.Advanced,
_td("common|advanced"),
"mx_RoomSettingsDialog_warningIcon",
(
<AdvancedRoomSettingsTab
room={this.state.room}
closeSettingsFn={() => this.props.onFinished(true)}
/>
),
<AdvancedRoomSettingsTab
room={this.state.room}
closeSettingsFn={() => this.props.onFinished(true)}
/>,
"RoomSettingsAdvanced",
),
);

View File

@ -46,22 +46,21 @@ import { TextualEventViewModel } from "../viewmodels/event-tiles/TextualEventVie
import { ElementCallEventType } from "../call-types";
// Subset of EventTile's IProps plus some mixins
export interface EventTileTypeProps
extends Pick<
EventTileProps,
| "mxEvent"
| "highlights"
| "highlightLink"
| "showUrlPreview"
| "forExport"
| "getRelationsForEvent"
| "editState"
| "replacingEventId"
| "permalinkCreator"
| "callEventGrouper"
| "isSeeingThroughMessageHiddenForModeration"
| "inhibitInteraction"
> {
export interface EventTileTypeProps extends Pick<
EventTileProps,
| "mxEvent"
| "highlights"
| "highlightLink"
| "showUrlPreview"
| "forExport"
| "getRelationsForEvent"
| "editState"
| "replacingEventId"
| "permalinkCreator"
| "callEventGrouper"
| "isSeeingThroughMessageHiddenForModeration"
| "inhibitInteraction"
> {
ref?: React.RefObject<any>; // `any` because it's effectively impossible to convince TS of a reasonable type
maxImageHeight?: number; // pixels
overrideBodyTypes?: Record<string, React.ComponentType<IBodyProps>>;