diff --git a/playwright/e2e/knock/knock-into-room.spec.ts b/playwright/e2e/knock/knock-into-room.spec.ts index 21c5a145e3..1a4974e891 100644 --- a/playwright/e2e/knock/knock-into-room.spec.ts +++ b/playwright/e2e/knock/knock-into-room.spec.ts @@ -227,8 +227,8 @@ test.describe("Knock Into Room", () => { await expect(roomPreviewBar.getByRole("button", { name: "Request access" })).toBeVisible(); await expect( - page.getByRole("group", { name: "Historical" }).getByRole("treeitem", { name: "Cybersecurity" }), - ).toBeVisible(); + page.getByRole("group", { name: "Rooms" }).getByRole("treeitem", { name: "Cybersecurity" }), + ).not.toBeVisible(); }); test("should knock into the room then knock is cancelled by another user and room is forgotten", async ({ diff --git a/playwright/e2e/one-to-one-chat/one-to-one-chat.spec.ts b/playwright/e2e/one-to-one-chat/one-to-one-chat.spec.ts index cfc0cac5e9..39b30fbab5 100644 --- a/playwright/e2e/one-to-one-chat/one-to-one-chat.spec.ts +++ b/playwright/e2e/one-to-one-chat/one-to-one-chat.spec.ts @@ -43,8 +43,8 @@ test.describe("1:1 chat room", () => { // wait till the room was left await expect( - page.getByRole("group", { name: "Historical" }).locator(".mx_RoomTile").getByText(user2.displayName), - ).toBeVisible(); + page.getByRole("group", { name: "Rooms" }).locator(".mx_RoomTile").getByText(user2.displayName), + ).not.toBeVisible(); // open new 1:1 chat room await page.goto(`/#/user/${user2.userId}?action=chat`); diff --git a/src/components/views/rooms/RoomList.tsx b/src/components/views/rooms/RoomList.tsx index 9c1fad223b..28154c40d6 100644 --- a/src/components/views/rooms/RoomList.tsx +++ b/src/components/views/rooms/RoomList.tsx @@ -87,7 +87,10 @@ export const TAG_ORDER: TagID[] = [ DefaultTagID.LowPriority, DefaultTagID.ServerNotice, DefaultTagID.Suggested, - DefaultTagID.Archived, + // DefaultTagID.Archived isn't here any more: we don't show it at all. + // The section still exists in the code as a place for rooms that we know + // about but aren't joined. At some point it could be removed entirely + // but we'd have to make sure that rooms you weren't in were hidden. ]; const ALWAYS_VISIBLE_TAGS: TagID[] = [DefaultTagID.DM, DefaultTagID.Untagged]; diff --git a/src/stores/room-list/algorithms/Algorithm.ts b/src/stores/room-list/algorithms/Algorithm.ts index cc81d36249..0645b7e49b 100644 --- a/src/stores/room-list/algorithms/Algorithm.ts +++ b/src/stores/room-list/algorithms/Algorithm.ts @@ -498,6 +498,8 @@ export class Algorithm extends EventEmitter { newTags[DefaultTagID.Invite].push(room); } for (const room of memberships[EffectiveMembership.Leave]) { + // We may not have had an archived section previously, so make sure its there. + if (newTags[DefaultTagID.Archived] === undefined) newTags[DefaultTagID.Archived] = []; newTags[DefaultTagID.Archived].push(room); }