diff --git a/apps/web_v1/scripts/structure-check.mjs b/apps/web_v1/scripts/structure-check.mjs index 0d6b791..4d82261 100644 --- a/apps/web_v1/scripts/structure-check.mjs +++ b/apps/web_v1/scripts/structure-check.mjs @@ -36,7 +36,7 @@ if (!html.includes('森林AI')) failures.push('document title mus if (!html.includes('href="/senlinai-icon.svg"')) failures.push('favicon must use /senlinai-icon.svg') if (!existsSync('public/senlinai-icon.svg')) failures.push('missing public/senlinai-icon.svg') -for (const file of ['src/pages/login.tsx', 'src/pages/projects/project-topbar.tsx', 'src/pages/projects/project-rail.tsx']) { +for (const file of ['src/pages/login.tsx', 'src/pages/projects/project-topbar.tsx']) { const source = readFileSync(file, 'utf8') if (!source.includes('/senlinai-icon.svg')) failures.push(`${file} must use the brand icon`) } @@ -51,6 +51,9 @@ const projectRailSource = readFileSync('src/pages/projects/project-rail.tsx', 'u if (!projectRailSource.includes('projectNameLabel(project.name)')) { failures.push('project rail labels must derive from the project name') } +if (!projectRailSource.includes('icon={}') || projectRailSource.includes('rail-brand-icon')) { + failures.push('workspace rail entry must use the dashboard icon instead of the brand logo') +} const apiFiles = ['client.ts', 'projects.ts', 'mappers.tsx', 'search.ts', 'inbox.ts', 'ai.ts'].map((name) => `src/api/${name}`) const apiSource = apiFiles.map((file) => readFileSync(file, 'utf8')).join('\n') diff --git a/apps/web_v1/scripts/visual-check.mjs b/apps/web_v1/scripts/visual-check.mjs index d4647b5..6bb6066 100644 --- a/apps/web_v1/scripts/visual-check.mjs +++ b/apps/web_v1/scripts/visual-check.mjs @@ -166,6 +166,8 @@ const collectMetrics = async () => page.evaluate(() => { workspaceActions, dashboardButton: rect(dashboard), dashboardButtonActive: dashboard?.classList.contains('active') ?? false, + dashboardUsesPanelIcon: Boolean(dashboard?.querySelector('.arco-icon-dashboard')), + dashboardUsesBrandImage: Boolean(dashboard?.querySelector('img')), workspaceExploreButton: rect(workspaceExplore), workspaceExploreButtonActive: workspaceExplore?.classList.contains('active') ?? false, projectButton: rect(project), @@ -267,6 +269,7 @@ if (metrics.overflowX) failures.push('expected no horizontal overflow') if (!metrics.workbenchMain) failures.push('missing workbench main') if (!metrics.hasWorkspacePage) failures.push('expected login to land on workspace page') if (!metrics.dashboardButtonActive) failures.push('expected dashboard button to be active after login') +if (!metrics.dashboardUsesPanelIcon || metrics.dashboardUsesBrandImage) failures.push('expected workspace entry to use the panel icon instead of the brand logo') if (!metrics.workspaceExploreButton) failures.push('expected fixed workspace explore button to render in project rail') if (metrics.workspaceExploreButtonActive) failures.push('expected fixed workspace explore button not to be active after login') if (metrics.projectButtonActive) failures.push('expected first project button not to be active on workspace landing page') diff --git a/apps/web_v1/src/App.css b/apps/web_v1/src/App.css index ca88279..1ea1dff 100644 --- a/apps/web_v1/src/App.css +++ b/apps/web_v1/src/App.css @@ -126,12 +126,6 @@ border-radius: 12px; } -.rail-brand-icon { - width: 40px; - height: 40px; - border-radius: 10px; -} - .brand-name { font-size: 18px; font-weight: 700; diff --git a/apps/web_v1/src/pages/projects/project-rail.tsx b/apps/web_v1/src/pages/projects/project-rail.tsx index 7e0f0b0..3cf8dce 100644 --- a/apps/web_v1/src/pages/projects/project-rail.tsx +++ b/apps/web_v1/src/pages/projects/project-rail.tsx @@ -1,6 +1,6 @@ import type { CSSProperties } from 'react' import { Badge, Button, Layout, Space } from '@arco-design/web-react' -import { IconCompass, IconPlus } from '@arco-design/web-react/icon' +import { IconCompass, IconDashboard, IconPlus } from '@arco-design/web-react/icon' import type { Project, WorkbenchView } from './project-types' const { Sider } = Layout @@ -26,10 +26,10 @@ export function ProjectRail({