feat(web): restore legacy explore workspace

This commit is contained in:
2026-07-22 15:39:57 +08:00
parent 1ed01a2059
commit 2e60f273fa
4 changed files with 243 additions and 10 deletions

View File

@@ -42,7 +42,28 @@ const visualCheckWorkspace = {
],
tags: [{ id: '019b0000-0000-7000-8000-000000000002', name: '产品' }],
recentSessions: [],
inbox: [],
inbox: [
{
id: '019b0000-0000-7000-8000-000000000003',
projectId,
source: '需求文档',
title: '森林项目体验优化需求',
summary: '整理工作台信息层级,并把关键需求沉淀为可跟进的项目计划。',
status: 'open',
tag: '需求',
time: '2026-07-22T08:00:00Z',
},
{
id: '019b0000-0000-7000-8000-000000000004',
projectId,
source: '架构讨论',
title: '项目资料组织方案',
summary: '围绕项目上下文统一组织任务、笔记、资料和 AI 会话。',
status: 'open',
tag: '架构',
time: '2026-07-22T07:00:00Z',
},
],
tasks: [],
aiSessions: [],
notesSources: [],
@@ -129,6 +150,8 @@ const collectMetrics = async () => page.evaluate(() => {
workbenchMain: rect(main),
hasWorkspacePage: Boolean(workspacePage),
hasProjectOverview: Boolean(projectOverview),
exploreSourceCardCount: document.querySelectorAll('.explore-source-card').length,
hasExploreReader: Boolean(document.querySelector('.explore-reader-layout')),
projectRailWidth: rail?.getBoundingClientRect().width,
projectRail: rect(rail),
channelSidebar: rect(sidebar),
@@ -300,6 +323,8 @@ if (!workspaceExploreMetrics.workspaceExploreButtonActive) failures.push('expect
if (workspaceExploreMetrics.dashboardButtonActive) failures.push('expected dashboard button not to be active on workspace explore page')
if (workspaceExploreMetrics.channelSidebar) failures.push(`expected workspace explore to hide channel sidebar, got ${JSON.stringify(workspaceExploreMetrics.channelSidebar)}`)
if (workspaceExploreMetrics.inspector) failures.push(`expected workspace explore to hide inspector, got ${JSON.stringify(workspaceExploreMetrics.inspector)}`)
if (workspaceExploreMetrics.exploreSourceCardCount !== 4) failures.push(`expected four legacy explore source cards, got ${workspaceExploreMetrics.exploreSourceCardCount}`)
if (!workspaceExploreMetrics.hasExploreReader) failures.push('expected legacy explore article reader to render')
if (!workspaceExploreMetrics.stage || !workspaceExploreMetrics.projectRail) {
failures.push(`missing workspace explore layout regions: rail=${JSON.stringify(workspaceExploreMetrics.projectRail)}, stage=${JSON.stringify(workspaceExploreMetrics.stage)}`)
} else if (Math.abs(workspaceExploreMetrics.stage.left - workspaceExploreMetrics.projectRail.right) > 1) {