merge: retire Canvas inspiration entry

# Conflicts:
#	README.md
#	src/components/layout/MainLayout.tsx
#	src/components/layout/Sidebar.tsx
#	tests/e2e/image-workspace-v2.spec.ts
#	tests/unit/app-module-provider-gate.test.tsx
#	tests/unit/title-bar.test.tsx
This commit is contained in:
inman
2026-09-07 10:24:24 +08:00
12 changed files with 128 additions and 114 deletions

View File

@@ -39,7 +39,6 @@ const PreviewScene = lazy(() => import('./pages/Makelore').then(({ PreviewScene:
const ProjectConfiguration = lazy(() => import('./pages/ProjectConfiguration').then(({ ProjectConfiguration: component }) => ({ default: component })));
const Workbench = lazy(() => import('./pages/Workbench').then(({ Workbench: component }) => ({ default: component })));
const ImageCanvas = lazy(() => import('./pages/ImageCanvas').then(({ ImageCanvas: component }) => ({ default: component })));
const ImagePromptMuseum = lazy(() => import('./pages/ImagePromptMuseum').then(({ ImagePromptMuseum: component }) => ({ default: component })));
const AiHardware = lazy(() => import('./pages/AiHardware').then(({ AiHardware: component }) => ({ default: component })));
const Settings = lazy(() => import('./pages/Settings').then(({ Settings: component }) => ({ default: component })));
const Setup = lazy(() => import('./pages/Setup').then(({ Setup: component }) => ({ default: component })));
@@ -456,7 +455,7 @@ function App() {
<Route path="/chat" element={<ProjectChatRoute />} />
<Route path="/deliverables" element={<PreviewScene />} />
<Route path="/image-canvas" element={<ImageCanvas />} />
<Route path="/image-prompts" element={<ImagePromptMuseum />} />
<Route path="/image-prompts/*" element={<Navigate to="/image-canvas" replace />} />
<Route path="/ai-hardware" element={<AiHardware />} />
<Route path="/workbench/:projectId" element={<Workbench />} />
<Route path="/models" element={<Models />} />

View File

@@ -1,7 +1,6 @@
import { useEffect, useMemo, useState } from 'react';
import {
FolderKanban,
Lightbulb,
Loader2,
Pencil,
Plus,
@@ -157,15 +156,6 @@ export function ImageWorkspaceSidebar({ sidebarCollapsed }: ImageWorkspaceSideba
>
<Plus className="h-4 w-4" />
</Button>
<Button
type="button"
variant="ghost"
size="icon"
aria-label="获取设计灵感"
onClick={() => navigate('/image-prompts')}
>
<Lightbulb className="h-4 w-4" />
</Button>
</div>
);
}
@@ -181,14 +171,6 @@ export function ImageWorkspaceSidebar({ sidebarCollapsed }: ImageWorkspaceSideba
<Plus className="h-4 w-4 text-brand" />
</button>
<button
type="button"
className="motion-press flex min-h-9 w-full items-center gap-2 rounded-xl px-2.5 text-left text-sm text-muted-foreground transition-colors hover:bg-surface-subtle hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-brand/30"
onClick={() => navigate('/image-prompts')}
>
<Lightbulb className="h-4 w-4" />
</button>
</div>
<div className="mb-2 mt-5 flex items-center justify-between px-2">

View File

@@ -26,7 +26,6 @@ export function MainLayout() {
});
const activeModule = getAiModuleForPath(location.pathname);
const isPaintingModule = activeModule === 'painting';
const isPromptMuseum = location.pathname === '/image-prompts' || location.pathname.startsWith('/image-prompts/');
const isCanvasWorkspace = location.pathname === '/image-canvas';
const isChatWorkspace = location.pathname === '/chat';
@@ -79,9 +78,8 @@ export function MainLayout() {
<TitleBar
integrated
workspaceLayout={isChatWorkspace}
overlay={isPaintingModule && !isPromptMuseum}
overlay={isPaintingModule}
showSidebarControls={!isCanvasWorkspace}
pageTitle={isPromptMuseum ? '获取灵感' : undefined}
sidebarPeekOpen={sidebarPeekOpen}
onSidebarPeekChange={handleSidebarPeekChange}
/>

View File

@@ -181,7 +181,6 @@ export function Sidebar({ workspaceLayout = false, sidebarPeekOpen = false, onSi
const isProgrammingModule = activeModule === 'programming';
const isPaintingModule = activeModule === 'painting';
const isRobotModule = activeModule === 'robot';
const isPromptMuseum = location.pathname === '/image-prompts' || location.pathname.startsWith('/image-prompts/');
const visibleProjects = projects;
const selectedProjectFolderName = getFolderName(newProjectSelectedPath);
const accountName = userProfile?.displayName?.trim() || getAuthUserDisplayName(authUser) || '未登录用户';
@@ -549,7 +548,7 @@ export function Sidebar({ workspaceLayout = false, sidebarPeekOpen = false, onSi
<div
className={cn(
'bg-transparent px-3 text-foreground',
isPaintingModule && !isPromptMuseum && !sidebarCollapsed ? 'pb-2 pt-10' : 'py-2',
isPaintingModule && !sidebarCollapsed ? 'pb-2 pt-10' : 'py-2',
sidebarCollapsed && 'px-2',
)}
>

View File

@@ -1,7 +1,6 @@
import { useEffect, useMemo, useState } from 'react';
import {
FolderKanban,
Lightbulb,
Loader2,
Pencil,
Plus,
@@ -277,19 +276,6 @@ export function DesignWorksRail({
)}
</div>
<footer className="shrink-0 border-t border-border/60 p-3">
<button
type="button"
className="flex h-9 w-full items-center gap-2 rounded-xl px-2.5 text-xs font-medium text-muted-foreground hover:bg-surface-subtle hover:text-foreground"
onClick={() => {
window.location.hash = '/image-prompts';
}}
>
<Lightbulb className="h-4 w-4" />
</button>
</footer>
<Dialog open={dialog !== null} onOpenChange={(open) => !open && !saving && setDialog(null)}>
<DialogContent className="sm:max-w-md">
<DialogHeader>