feat(web): restore legacy explore workspace
This commit is contained in:
@@ -121,8 +121,12 @@ for (const forbidden of ['DeepSeek V4.0 Flash', '给 DeepSeek 发送消息', 'Ic
|
||||
if (aiPageSource.includes(forbidden)) failures.push(`project AI page contains unsupported chat control ${forbidden}`)
|
||||
}
|
||||
|
||||
const explorePageSource = readFileSync('src/pages/workspace-explore.tsx', 'utf8')
|
||||
for (const required of ['explore-source-card', 'explore-reader-layout', '同步数据源', '添加数据源', 'detectSource']) {
|
||||
if (!explorePageSource.includes(required)) failures.push(`workspace explore page must restore ${required}`)
|
||||
}
|
||||
|
||||
const unsupportedControls = [
|
||||
{ file: 'src/pages/workspace-explore.tsx', required: '暂未开放', forbidden: ['同步数据源', '添加数据源', 'IconRefresh', 'IconEdit', 'IconDelete'] },
|
||||
{ file: 'src/pages/projects/project-new-channel.tsx', required: '暂未开放', forbidden: ['保存频道', '<Input', '<Select', '<TextArea'] },
|
||||
{ file: 'src/pages/projects/project-statusbar.tsx', forbidden: ['升级', '支付', 'billing-plan', '152GB', 'AI 空闲', '服务已连接', 'IconCheckCircle'] },
|
||||
{ file: 'src/pages/projects/project-topbar.tsx', forbidden: ['停靠左边', '停靠右边', 'DockIcon', 'isDesktopRuntime'] },
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user