diff --git a/.vite/deps/_metadata.json b/.vite/deps/_metadata.json new file mode 100644 index 0000000..551c287 --- /dev/null +++ b/.vite/deps/_metadata.json @@ -0,0 +1,8 @@ +{ + "hash": "42f20ac0", + "configHash": "2e77f0d9", + "lockfileHash": "e3b0c442", + "browserHash": "a53d060b", + "optimized": {}, + "chunks": {} +} \ No newline at end of file diff --git a/.vite/deps/package.json b/.vite/deps/package.json new file mode 100644 index 0000000..3dbc1ca --- /dev/null +++ b/.vite/deps/package.json @@ -0,0 +1,3 @@ +{ + "type": "module" +} diff --git a/design-qa.md b/design-qa.md new file mode 100644 index 0000000..e56a5bb --- /dev/null +++ b/design-qa.md @@ -0,0 +1,43 @@ +# Design QA + +Date: 2026-06-12 + +## Source Visual Truth + +- VI reference image: `/Users/cheyne/Library/Containers/com.tencent.xinWeChat/Data/Documents/xwechat_files/klji8o7ki_9a9c/temp/RWTemp/2026-06/e8e4c8be4c09458aeb31c70b9a1f45ba/f95f6b7b7b37a8ebeb3ef7b99d60e90f.png` +- Target style: Kaiwu blue-white tech UI, deep navy text, blue action color, light cards, clear mobile workflow entry. + +## Screenshot Evidence + +- Desktop login: `artifacts/mobile-qa/desktop-login.png` +- Desktop chat: `artifacts/mobile-qa/desktop-chat.png` +- Desktop stats: `artifacts/mobile-qa/desktop-stats.png` +- Mobile login: `artifacts/mobile-qa/mobile-login.png` +- Mobile chat: `artifacts/mobile-qa/mobile-chat.png` +- Mobile stats: `artifacts/mobile-qa/mobile-stats.png` +- Mobile workflows: `artifacts/mobile-qa/mobile-workflows.png` +- Mobile prompt library: `artifacts/mobile-qa/mobile-prompts.png` +- Mobile agent init modal fixed: `artifacts/mobile-qa/mobile-agentsnew-fixed.png` + +## Viewports And States + +- Desktop: 1440px wide. +- Mobile: 390 x 844. +- Authenticated local mock state used for `/agents/new` visual verification. + +## Checks + +- `npx tsc -b --pretty false`: passed. +- `npm run build`: passed. +- Inline style scan on changed H5/web target scope: passed. +- Target file line-count scan: highest changed target file is 248 lines. +- Mobile `/agents/new` DOM check: `scrollWidth=390`, `hasHorizontalOverflow=false`, modal width 374, hero grid one column, avatar grid three columns, no overflow offenders. + +## Findings + +- Initial `/agents/new` mobile modal used a desktop two-column modal layout and six-column avatar grid, causing the confirm button to overflow. +- Fixed with scoped H5 modal overrides and by moving AgentEditor modal/capability/panel styles out of inline style into CSS classes. + +## Final Result + +passed diff --git a/index.html b/index.html index b560476..0bf5a52 100644 --- a/index.html +++ b/index.html @@ -1,9 +1,10 @@ - - - 驷马智能 + + + + 鲸域AI
diff --git a/public/favicon.png b/public/favicon.png new file mode 100644 index 0000000..6d5ae7e Binary files /dev/null and b/public/favicon.png differ diff --git a/src/App.tsx b/src/App.tsx index 86d86a4..667d33b 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -1,4 +1,4 @@ -import { useEffect, useState } from 'react'; +import { useEffect, useState } from 'react'; import { Routes, Route, Navigate, useLocation, useNavigate } from 'react-router-dom'; import { Button, Drawer, Spin } from 'antd'; import { MenuOutlined, SearchOutlined } from '@ant-design/icons'; @@ -14,9 +14,11 @@ import TeamsPage from './pages/TeamsPage'; import PromptLibraryPage from './pages/PromptLibraryPage'; import StatsPage from './pages/StatsPage'; import SharedSessionPage from './pages/SharedSessionPage'; -import WorkflowsPage from './pages/WorkflowsPage'; -import { useAuth } from './store/auth'; -import { AgentAPI } from './api'; +import WorkflowsPage from './pages/WorkflowsPage'; +import { useAuth } from './store/auth'; +import { AgentAPI } from './api'; +import { useIsMobile } from './hooks/useIsMobile'; +import kaiwuIcon from './assets/brand/kaiwu-icon-gradient-transparent.png'; function HomeRedirect() { return ; @@ -24,10 +26,10 @@ function HomeRedirect() { export default function App() { const { user } = useAuth(); - const location = useLocation(); - const [paletteOpen, setPaletteOpen] = useState(false); + const location = useLocation(); + const [paletteOpen, setPaletteOpen] = useState(false); const [mobileNavOpen, setMobileNavOpen] = useState(false); - const [isMobile, setIsMobile] = useState(() => (typeof window === 'undefined' ? false : window.innerWidth < 768)); + const isMobile = useIsMobile(); // 全局快捷键 Ctrl/⌘ + K useEffect(() => { @@ -42,13 +44,7 @@ export default function App() { return () => window.removeEventListener('keydown', handler); }, [user]); - useEffect(() => { - const onResize = () => setIsMobile(window.innerWidth < 768); - window.addEventListener('resize', onResize); - return () => window.removeEventListener('resize', onResize); - }, []); - - const mainContent = ( + const mainContent = ( } /> } /> @@ -89,7 +85,8 @@ export default function App() { {isMobile && (
)} @@ -103,7 +100,7 @@ export default function App() { open={mobileNavOpen} onClose={() => setMobileNavOpen(false)} width={280} - styles={{ body: { padding: 0 } }} + className="mobile-nav-drawer" > setPaletteOpen(true)} onNavigate={() => setMobileNavOpen(false)} /> diff --git a/src/assets/brand/kaiwu-icon-gradient-transparent.png b/src/assets/brand/kaiwu-icon-gradient-transparent.png new file mode 100644 index 0000000..5162ebc Binary files /dev/null and b/src/assets/brand/kaiwu-icon-gradient-transparent.png differ diff --git a/src/assets/brand/kaiwu-logo-horizontal-gradient.svg b/src/assets/brand/kaiwu-logo-horizontal-gradient.svg new file mode 100644 index 0000000..5fca7ef --- /dev/null +++ b/src/assets/brand/kaiwu-logo-horizontal-gradient.svg @@ -0,0 +1,53 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +开物 + +AI 商 业 系 统 + + \ No newline at end of file diff --git a/src/components/Sidebar.tsx b/src/components/Sidebar.tsx index c1db857..607b7bf 100644 --- a/src/components/Sidebar.tsx +++ b/src/components/Sidebar.tsx @@ -15,6 +15,7 @@ import { } from '@ant-design/icons'; import { useAuth } from '../store/auth'; import { useTheme } from '../main'; +import kaiwuIcon from '../assets/brand/kaiwu-icon-gradient-transparent.png'; interface Props { onOpenPalette?: () => void; @@ -67,9 +68,9 @@ export default function Sidebar({ onOpenPalette, onNavigate }: Props) { return (