From e785dfbf8bb01cdd964ae6f24bf3217451b5f3d6 Mon Sep 17 00:00:00 2001 From: mjkatgithub Date: Sat, 13 Jun 2026 14:44:01 +0200 Subject: [PATCH 1/2] Implement space home panel and lobby functionality - Introduced a new `SpaceHomePanel` component to display an overview of the selected space, including member count and available channels. - Enhanced `RoomCategoryList` to support navigation to the space lobby and clear room selections when leaving a space channel. - Added functionality to manage lobby entries, allowing users to join unjoined channels directly from the space home. - Updated internationalization support for new space home and lobby-related messages in English and German. - Enhanced `CHANGELOG` to reflect the addition of the space home panel and related features. --- CHANGELOG.md | 5 + app/components/Chat/RoomCategoryList.vue | 24 ++ app/components/Chat/SpaceHomePanel.vue | 213 ++++++++++++++++++ app/composables/chat/chatPageTypes.ts | 3 + app/composables/chat/useChatPageShell.ts | 7 + app/composables/chat/useChatRoomSidebar.ts | 39 ++++ app/composables/chat/useChatSpaceRail.ts | 3 + app/composables/i18n/locales/de.ts | 11 + app/composables/i18n/locales/en.ts | 10 + app/composables/useSpaceLobbyNames.ts | 82 +++++++ app/pages/chat.vue | 154 +++++++++++-- app/utils/spaceLobbyHierarchy.ts | 57 +++++ app/utils/spaceRoomCategories.ts | 200 +++++++++++++++- docs/architecture.md | 1 + tests/e2e/features/chat.feature | 11 +- .../e2e/step-definitions/leave-room.steps.mjs | 19 ++ tests/setup.ts | 11 + .../components/Chat/SpaceHomePanel.spec.ts | 111 +++++++++ .../unit/composables/useChatPageShell.spec.ts | 50 ++++ tests/unit/utils/spaceLobbyHierarchy.spec.ts | 61 +++++ tests/unit/utils/spaceRoomCategories.spec.ts | 45 ++++ 21 files changed, 1096 insertions(+), 21 deletions(-) create mode 100644 app/components/Chat/SpaceHomePanel.vue create mode 100644 app/composables/useSpaceLobbyNames.ts create mode 100644 app/utils/spaceLobbyHierarchy.ts create mode 100644 tests/unit/components/Chat/SpaceHomePanel.spec.ts create mode 100644 tests/unit/composables/useChatPageShell.spec.ts create mode 100644 tests/unit/utils/spaceLobbyHierarchy.spec.ts diff --git a/CHANGELOG.md b/CHANGELOG.md index a9133d0..3ef5669 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 chat view after leaving the active room; Cucumber E2E for ephemeral group, space channel, and DM leave flows ([#94](https://github.com/mjkatgithub/Decentra/issues/94)) +- Space home / sitemap view in the main pane when a Matrix Space is + selected but no channel is active; rail `selectSpace` clears room + selection; leaving a space channel lands on space home; lobby lists + unjoined channels with join actions and a sidebar Lobby entry + ([#124](https://github.com/mjkatgithub/Decentra/issues/124)) - Project architecture map for developers and agents: `docs/architecture.md`, `docs/README.md`, issue documentation checklist; `AGENTS.md` requires doc updates on structural changes diff --git a/app/components/Chat/RoomCategoryList.vue b/app/components/Chat/RoomCategoryList.vue index c9d7321..0fd85ac 100644 --- a/app/components/Chat/RoomCategoryList.vue +++ b/app/components/Chat/RoomCategoryList.vue @@ -70,6 +70,7 @@ const emit = defineEmits<{ openHomeStartDm: [] openHomeCreateRoom: [] openHomeExplorePublic: [] + openSpaceLobby: [] persistRoomOrder: [ payload: { parentSpaceId: string; orderedRoomIds: string[] }, ] @@ -94,6 +95,14 @@ const categoryDragEnabled = computed( () => Boolean(props.selectedRootSpaceId) && props.canReorderCategories, ) +const lobbyButtonActiveClass = computed(() => + !props.selectedRoomId + ? 'bg-primary-100 text-primary-800 dark:bg-primary-900/40' + + ' dark:text-primary-200' + : 'text-gray-700 hover:bg-gray-100 dark:text-gray-200' + + ' dark:hover:bg-gray-800', +) + const sortableDragOptions = { ghostClass: 'decentra-drag-ghost', chosenClass: 'decentra-drag-chosen', @@ -622,6 +631,21 @@ function onRoomDragEnd(_category: RoomSectionItem, rawEvent: unknown) {
+ +