Răsfoiți Sursa

群聊话题侧栏保留品牌栏和房间标题

LSamien 2 luni în urmă
părinte
comite
dcca277780

+ 8 - 4
src/client/components/app/WorkspaceShell.vue

@@ -561,8 +561,10 @@ onBeforeUnmount(() => {
 .sidebar-context__body :deep(.library-sidebar) { padding-top: 1px; }
 .sidebar-context__body :deep(.library-sidebar section) { margin-top: 2px; }
 
-.workspace-shell--sidebar-focused .desktop-sidebar > :not(.sidebar-context),
-.workspace-shell--sidebar-focused .desktop-sidebar .sidebar-context__heading { display: none; }
+.workspace-shell--sidebar-focused .desktop-sidebar .sidebar-search-trigger,
+.workspace-shell--sidebar-focused .desktop-sidebar > .sidebar-primary-action,
+.workspace-shell--sidebar-focused .desktop-sidebar .sidebar-feature-nav,
+.workspace-shell--sidebar-focused .desktop-sidebar .sidebar-footer { display: none; }
 .workspace-shell--sidebar-focused { grid-template-columns: 264px minmax(0, 1fr) auto; }
 .workspace-shell--sidebar-focused .desktop-sidebar .sidebar-context,
 .workspace-shell--sidebar-focused .desktop-sidebar--collapsed .sidebar-context { display: flex; flex: 1; }
@@ -626,8 +628,10 @@ onBeforeUnmount(() => {
   .mobile-drawer__header { display: flex; min-height: 49px; align-items: center; justify-content: space-between; padding: 0 14px 5px 12px; }
   .mobile-drawer__context { margin-top: 2px; }
   .mobile-drawer--focused { padding-block: max(9px, env(safe-area-inset-top)) max(9px, env(safe-area-inset-bottom)); }
-  .mobile-drawer--focused > :not(.sidebar-context),
-  .mobile-drawer--focused .sidebar-context__heading { display: none; }
+  .mobile-drawer--focused > .sidebar-search-trigger,
+  .mobile-drawer--focused > .sidebar-primary-action,
+  .mobile-drawer--focused > .sidebar-feature-nav,
+  .mobile-drawer--focused > .sidebar-footer { display: none; }
   .mobile-drawer--focused .mobile-drawer__context { margin-top: 0; flex: 1; }
   .mobile-drawer__context .sidebar-context__body :deep(.resource-sidebar) { min-height: 0; flex: 1; }
   .mobile-drawer__footer { padding-inline: 10px; }

+ 4 - 0
tests/e2e/workspace.spec.ts

@@ -547,6 +547,10 @@ test('selects existing group topics and creates a new protocol v4 topic on first
   await roomItem.click()
   const backToRooms = sidebar.locator('[data-sidebar-id="group-list"]')
   await expect(backToRooms).toContainText('返回房间列表')
+  await expect(sidebar.getByRole('button', { name: '返回对话' })).toBeVisible()
+  await expect(sidebar.getByRole('button', { name: '折叠侧边栏' })).toBeVisible()
+  await expect(sidebar.getByText('设计与工程协作', { exact: true })).toBeVisible()
+  await expect(sidebar.getByText('2 个 Agent', { exact: true })).toBeVisible()
   await expect(sidebar.getByRole('button', { name: '搜索', exact: true })).toBeHidden()
   await expect(sidebar.getByRole('button', { name: '新建群聊' })).toBeHidden()
   await expect(sidebar.getByRole('button', { name: '已归档' })).toBeHidden()