Commit Graph

138 Commits

Author SHA1 Message Date
ludan da06187a9c Merge branch 'master' of http://118.145.251.184:3000/OmniAI/omniai-web into feat/profile-ui-polish 2026-06-03 09:55:15 +08:00
ludan 87d81d2c86 feat: 个人中心界面UI优化,提升商业产品精致度
ProfilePage组件优化:
- 新增个性签名编辑功能(内联编辑/确认/取消交互)
- 新增 icon 导入(EditOutlined, CheckOutlined, CloseOutlined)
- 新增 formatProfileDate 工具函数,统一日期格式化(中文友好)
- 新增 formatTaskType 函数,任务类型中文化显示
- 新增 formatTaskStatus 函数,任务状态中文化显示
- 新增 formatAssetStatus 函数,资产状态中文化显示
- 优化空状态展示,增加图标占位

dark-green主题层样式增强:
- 个人中心背景增加微光渐变(accent光晕+半透明遮罩)
- Banner区域高度优化为214px,增加底部渐变分割线
- Banner叠加层增加径向光晕效果
- Banner编辑按钮增加毛玻璃质感(backdrop-filter)
- 侧边栏/主体/选项卡/列表卡片等多处细节增强
- 按钮、标签、统计数字等组件加入微交互
- 保持暗绿主题配色体系不变,仅提升精致度
2026-06-03 09:53:05 +08:00
stringadmin 4ed02aaad5 feat: 错误监控面板、生成通知、社区搜索、任务队列优化
- AdminMonitor: admin用户可见的客户端错误实时监控面板,右下角浮窗
- generationNotifier: 生成完成浏览器通知 + 站内Toast
- CommunityPage: 新增搜索框,标题/描述/标签模糊匹配,防抖300ms
- App.tsx: 全局unhandled error/rejection监听上报
- WorkbenchPage: 任务并发提示改为显示当前任务数
- serverConnection: 后端client-errors路由注册
- WelcomeSplash: 欢迎按钮全程显示

Co-Authored-By: Claude Code <noreply@anthropic.com>
2026-06-03 02:01:21 +08:00
stringadmin 468d1d27dd fix: 全站页面保活机制、登录拦截优化、UI修复与功能完善
- 移除未登录全页面拦截,改为浏览自由 + 功能使用时弹窗
- 修复PageTransition退出动画卡死导致黑屏的bug
- CanvasPage添加加载中状态避免首次访问黑屏假死
- 全站7个工具页添加页面保活机制,切页后台任务不中断
- 修复未登录时401误触发"用户已在别处登录"弹窗
- 删除MorePage模板板块、微信登录、EcommerceTemplates/SizeTemplate路由
- 剧本评分接入DashScope qwen3.7-max直连API
- 电商视频生成重构为3阶段可视管线(策划→生成图片→生成视频)
- 电商视频保活增强:异步函数直接写localStorage避免卸载丢失
- Workbench侧边栏移除mode过滤,三模式共用同一对话列表
- 首页更新轮播图/背景视频、按钮跳转修正、文案优化
- AppShell顶栏新增网站备案信息按钮
- 多个页面的terminate/cancel按钮覆盖、单镜头重试、批量保存下载

Co-Authored-By: Claude Code <noreply@anthropic.com>
2026-06-03 01:39:06 +08:00
stringadmin 8f57e08004 Merge branch 'master' of http://118.145.251.184:3000/OmniAI/omniai-web into fix/ecommerce-video-400-bug 2026-06-02 23:26:23 +08:00
stringadmin e94413bd33 Merge pull request 'feat: 首页增加工具箱功能区、剧本评测可视化展示;重构剧本评分页面UI' (#6) from feature/首页和下方的功能页面 into master
Reviewed-on: #6
2026-06-02 15:24:43 +00:00
OmniAI Developer 1cac62d14a feat: 首页下方剧本评测展示页替换为ScriptReviewShowcase,团队token监控替换为ModelGenerationShowcase 2026-06-02 22:45:16 +08:00
stringadmin e555209516 fix: page transition UI jitter — remove enter phase to prevent double animation
The three-phase exit→enter→idle flow caused a visible "double refresh"
jitter. During the enter phase (220ms), the wrapper animated from
opacity:0 while cancelling child .page-motion with animation:none
!important. When phase switched to idle, the !important rule was
removed and child .page-motion re-triggered, creating a second
entrance animation — the jitter.

Fix: remove the enter phase entirely. After exit animation (180ms),
phase goes directly to idle. The child page's own .page-motion class
handles entrance naturally via React's fresh DOM mount. No wrapper
animation on enter, no double-animation conflict.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-02 22:19:14 +08:00
stringadmin ec9204437d feat(ecommerce): dynamic set image count + per-type API calls
Previously all 4 image tools generated a single image and duplicated
it across 5 fixed card slots. Now:

- Set (套图) mode: uses cloneSetCounts (卖点图/白底图/场景图 quantity)
  to determine how many images to generate. Each type gets its own
  createImageTask call with a type-specific prompt, so images differ
  by category (selling-point vs white-background vs lifestyle scene).
- Preview cards are dynamically built from cloneSetCounts, not from
  the fixed 5-slot productSetPreviewCards template. A card labeled
  "卖点图 1", "卖点图 2" etc for count > 1, or just "卖点图" for
  count = 1.
- clonePreview: shows dynamic card grid for set mode, single result
  for detail/model/hot modes.
- setPreview: shows original image as main card, then all generated
  set cards in the grid.
- generateSetImages: new async function that loops over each count
  type and generates images sequentially with distinct prompts.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-02 22:09:12 +08:00
OmniAI Developer d4d8cc528d feat: 剧本评测页面支持更多文本文件格式上传,优化历史记录排序和UI交互 2026-06-02 21:36:44 +08:00
stringadmin 51b711226e fix(ecommerce): show generated images in all tool previews
The set/detail preview areas were using static placeholder images
instead of the API-generated results. Fix:

- Add productSetResultImages state for set tool results
- Add detailResultUrl state for detail tool results
- Create setPreviewCards (like clonePreviewCards) that overlays
  generated URLs onto static card templates
- Replace setPreview JSX references from productSetPreviewCards
  to setPreviewCards so generated URLs are displayed
- Replace detailPreview longPage image with detailResultUrl fallback
- Update handleSetGenerate setResultFn to save URLs via
  setProductSetResultImages
- Update handleDetailGenerate setResultFn to save URL via
  setDetailResultUrl

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-02 21:31:43 +08:00
ludan 178c2ec695 Merge branch 'master' of http://118.145.251.184:3000/OmniAI/omniai-web into feat/home-entry-buttons-refined 2026-06-02 21:30:06 +08:00
stringadmin b07ff439f3 feat(ecommerce): replace mock image generators with real gpt-image-2 API calls
All four image tools (套图, 详情图, 模特图, 爆款图复刻) previously used
setTimeout + static sample images. Now they:

1. Upload product images to OSS via uploadAssetBinary
2. Build contextual prompts including platform/ratio/language/market + user text
3. Call aiGenerationClient.createImageTask with model=gpt-image-2
4. Poll task status via waitForTask (SSE + fallback polling)
5. Display the generated result URL in the preview grid

Key changes:
- Add ServerRequestError + waitForTask imports
- Add imageAbortRef for task cancellation
- Add uploadCloneImages() (generic version of uploadProductImages)
- Add buildEcommerceImagePrompt() with output-type-specific instructions
- Add generateEcommerceImage() orchestrating upload → prompt → API → result
- Replace all 5 mock handlers (handleGenerate, handleSetGenerate,
  handleDetailGenerate, handleTryOnGenerate, handleGenerateModel) with
  real async API calls
- Handle 402 (Payment Required) with user-friendly error message

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-02 21:19:52 +08:00
stringadmin 3f19829126 fix(ecommerce): handle 402 Payment Required — stop rendering loop and show balance warning
When the server returns 402 (balance insufficient), the rendering loop
continued submitting all remaining scenes, each failing with the same 402.
Now it immediately stops the loop, sets a clear "余额不足,请充值后再生成视频"
error message, and aborts further scene submissions.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-02 19:42:20 +08:00
stringadmin 5fcd225825 fix(ecommerce): video 400 error — use OSS URLs instead of data URLs for video generation
The renderScene function was passing local data URLs (data:image/png;base64,...)
as imageUrl and referenceUrls to createVideoTask, which the /api/ai/video endpoint
rejects with 400 Bad Request. The planning phase already uploads images to OSS
but the resulting URLs were not returned to the component.

- Add imageUrls field to EcommerceVideoPlanResult
- Return OSS imageUrls from runVideoPlan alongside existing plan data
- Use planResult.imageUrls[0] in handleRender instead of productImageDataUrls[0]
- Use planResult?.imageUrls[0] for sourceImage display fallback

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-02 19:37:29 +08:00
ludan 324ebf5ce5 feat: 优化首页入口按钮质感,提升商业产品精致度
- 按钮背景改为微渐变+毛玻璃效果(backdrop-filter)
- 边框改为半透明白色,圆角从8px升级到12px
- 增加内高光+外层深度阴影提升层次感
- 字间距、字重大小幅调整,更精致克制
- hover态增加accent光晕+图标变绿+放大效果
- 主按钮增加渐变绿底+内高光+绿色辉光阴影
- 增加按压态scale(0.97)反馈
- 主按钮图标hover放大1.12倍
2026-06-02 19:09:00 +08:00
OmniAI Developer dd69b295c2 Merge origin/master into feature/首页和下方的功能页面 - 解决冲突 2026-06-02 19:05:43 +08:00
OmniAI Developer 05e4f5b4b3 feat: 首页增加工具箱功能区、剧本评测可视化展示;重构剧本评分页面UI
- 首页新增工具箱功能区(ToolboxSection),展示四大AI工具卡片
- 首页剧本功能区替换为六维柱状图可视化(ScriptReviewVisual)
- 剧本评分页面(ScriptTokensPage)全面重构为新版UI布局
- 左侧面板:上传区、AI识别信息、历史评测(持久化)、操作按钮
- 右侧:剧本输入区、评测结果Hero、六维柱状图、亮点/扣分点、优化建议表格
- 历史评测支持localStorage持久化,按时间倒序排列
2026-06-02 18:58:13 +08:00
stringadmin e5e5af5b54 Merge pull request 'Feat/ui animation enhancements' (#5) from feat/ui-animation-enhancements into master
Reviewed-on: #5
2026-06-02 10:48:38 +00:00
stringadmin fd71b2b18e fix: redirect to login page after logout instead of workbench
Logout and session expiry previously redirected to "workbench" which
requires authentication, causing 401 errors and a frozen page state.
Now correctly redirects to "login" page immediately.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-02 18:47:00 +08:00
stringadmin 6b9953625e feat: UI interaction polish — exit animations, hover effects, directional transitions
- Add AnimatedPanel component with CSS transition-based enter/exit for
  Profile popover and Notification panel (140ms scale+fade)
- Add nav-activate-pulse animation for floating-nav active indicator (320ms glow)
- Add tool-panel-fade-in crossfade when switching ecommerce tools
- Add carousel-card-label slide-up-in 260ms on active carousel card
- Add feature-visual img hover scale(1.03)+brightness, experience-route hover translateY(-2px)
- Add community-case-card--mosaic hover scale(1.02)+shadow lift
- Add directional PageTransition: forward→slideX(20px), backward→slideX(-20px)
- Move vite proxy target from hardcoded IP to VITE_DEV_PROXY env variable
- Add .env.example for developer onboarding

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-02 18:31:39 +08:00
ludan 9ababfda46 fix: 修复剧本评分文本框随内容无限下拉导致按钮被挤出视口
- textarea 增加 max-height 限制高度不随内容增长
- textarea 增加 overflow-y: auto 启用内部滚动
- text-shell 同步增加 max-height 约束
2026-06-02 18:18:00 +08:00
ludan ecade14bd0 feat: 实现全局响应式布局,适配不同设备、不同屏幕、不同分辨率
- 统一断点体系:560px(手机)、900px(平板)、1180px(小桌面)
- Shell导航:900px底部导航条、560px紧凑布局、顶栏触控优化
- 电商页面:三栏布局在平板/手机下改为单栏堆叠+横向标签切换
- 工作台:启动页编辑器全宽、消息气泡适配窄屏、建议标签换行
- 画布页面:工具栏横向滚动、节点缩小、手机全屏操作
- 社区/资产库/工具页/数字人等全部17个页面补齐响应式断点
- 新增32条@media规则,媒体查询从107条增至139条
2026-06-02 17:45:57 +08:00
stringadmin 93a538d51d feat: UI animation enhancements across all major pages
P1 - Critical UX feedback:
- Add scale-in + slide-up-in entrance animations to profile popover and notification panel
- Port SmoothedProgressBar to EcommercePage (4 generation tools: clone, detail, tryOn, productSet)
- Add result-reveal stagger animation to ecommerce result grids
- Add heart-pop spring animation to CommunityPage favorite toggle

P2 - Visual polish:
- Add scroll-entrance IntersectionObserver animations for HomePage feature sections and experience section
- Add chat-message-in entrance animation to WorkbenchPage message rows
- Fix prefers-reduced-motion accessibility in WelcomeSplash canvas (skip animation, instant entry)

P3 - CSS consolidation:
- Remove conflicting .page-motion definition from legacy-pages.css (keep translateY version from legacy-components.css)
- Consolidate skeleton-shimmer: remove opacity-pulse keyframe from primitives.css, unify with gradient sweep
- Wire up --ease-spring token for heart-pop animation
- Add :active press states (scale 0.97) to topbar buttons, brand lockup

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-02 17:37:51 +08:00
stringadmin 94080f30f7 Merge pull request 'feat: 升级剧本评分系统为 DeepSeek V4 多维评分体系' (#4) from feat/script-eval-deepseek-v4 into master
Reviewed-on: #4
2026-06-02 09:03:11 +00:00
stringadmin 7d446dfc5f Merge branch 'master' into feat/script-eval-deepseek-v4 2026-06-02 09:02:46 +00:00
stringadmin d71437b09c Merge pull request 'Fix/ecommerce 502 bug' (#3) from fix/ecommerce-502-bug into master
Reviewed-on: #3
2026-06-02 09:01:38 +00:00
stringadmin f1bfbf8608 Merge branch 'master' into fix/ecommerce-502-bug 2026-06-02 09:01:31 +00:00
stringadmin 94c1453c9b fix: upload-binary Content-Type fix, 429/timeout retry, 120s timeout - Remove Content-Type: application/json from uploadAssetBinary FormData request - Add retryOnTransient for 429 + timeout + signal timed out errors - Increase AI chat timeout from 60s to 120s per call - Apply retry logic to both chat() and visionChat() 2026-06-02 16:58:59 +08:00
stringadmin 9504f8ee87 fix(ecommerce): replace base64 upload with binary blob in video service
runVideoPlan was passing blob URLs as "dataUrl" to uploadAssetWithProgress,
which sent them to /api/oss/upload (base64 path). Blob URLs don't match
DATA_URL_PATTERN regex, causing corrupt 44-byte files on OSS.

Now uses uploadAssetBinary (FormData multipart) via /api/oss/upload-binary,
fetching blob → uploading binary directly, same as EcommercePage path.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-02 16:16:09 +08:00
ludan d1b5d64bc8 feat: 升级剧本评分系统为 DeepSeek V4 多维评分体系
变更内容:
- scriptEvalClient: 替换系统提示词为 DeepSeek V4 完整版(六维评分细则、
  评分类别、评分铁律、等级标准),维度满分调整为 hook 20/plot 20/
  character 18/dialogue 15/visual 15/content 12,总分算法改为直接累加,
  模型使用 qwen3.7-max,增加请求链路 console 日志
- ScriptTokensPage: 同步维度满分和描述(角色塑造 18、内容深度 12),
  增加页面挂载和评测流程的 console 日志
- vite.config: esbuild.drop 移除 "console",保留 "debugger",
  确保开发环境 console 日志正常输出
2026-06-02 16:04:26 +08:00
stringadmin 44c748b0dc feat(ecommerce): use FormData binary upload instead of base64 dataUrl
- Add uploadAssetBinary method to aiGenerationClient (FormData + busboy)
- Replace base64 dataUrl upload in uploadProductImages with direct blob upload
  via /oss/upload-binary multipart endpoint
- This eliminates the DATA_URL_PATTERN regex parsing bug that produced
  44-byte corrupt files on OSS, causing DashScope "image format illegal" errors

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-02 16:03:50 +08:00
stringadmin 160552b45e fix(ecommerce): 502 bug - vision model upgrade + MIME normalization + fallback
- Upgrade VISION_MODEL to qwen3.7-plus (latest, confirmed working with image_url)
- Add VISION_FALLBACK_MODEL = qwen-vl-plus for retry on "image format" errors
- Normalize upload MIME types: unsupported formats (HEIC/AVIF) fall back to image/png
  to prevent server saving as .bin which DashScope can't read
- Server-side: add image/avif, image/heic, image/heif to MIME_EXTENSIONS

Root cause: DashScope returned "image format is illegal" when uploaded images
had unrecognized MIME types → saved as .bin → DashScope couldn't decode.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-02 15:20:23 +08:00
stringadmin c13bf800cc Merge pull request 'fix: replace hardcoded local image paths with OSS URLs' (#2) from fix/remove-hardcoded-image-paths into master
Reviewed-on: #2
2026-06-02 06:47:08 +00:00
stringadmin 16bf7bbdad fix: replace hardcoded local image paths with OSS URLs
Remove all local file imports referencing ../../../tu/ and
../../assets/ directories. Replace with OSS muban prefix URLs:
https://stringtest.oss-cn-hangzhou.aliyuncs.com/muban/

This fixes build failure on server (missing local image files)
and ensures images load from centralized OSS storage.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-02 14:34:55 +08:00
stringadmin 4b6f864aa9 Merge pull request 'refactor(workbench): extract types, constants, utils, sub-components from WorkbenchPage' (#1) from feature/workbench-refactor into master
Reviewed-on: #1
2026-06-02 06:20:32 +00:00
stringadmin 59efc78c0e refactor(workbench): extract types, constants, utils, sub-components from WorkbenchPage
WorkbenchPage.tsx: 4146 → 3047 lines (-27%)

Extracted to 6 sibling modules:
- workbenchConstants.ts (403L): types, MODE_META, option arrays, shared helpers
- workbenchStorage.ts (172L): localStorage read/write/persist functions
- workbenchReferenceUtils.ts (210L): image compression, fingerprint, file helpers
- workbenchMentionUtils.tsx (79L): prompt mention parsing and token rendering
- WorkbenchPromptPreview.tsx (87L): ReferencePreview, PromptPreviewLayer components
- WorkbenchSelectChips.tsx (263L): SelectChip, CompoundSelectChip, InlineOptionChip

All extracted code is imported back via ES module imports — no logic changes.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-02 14:18:26 +08:00
stringadmin bedee3ba8d Initial commit: OmniAI Web Frontend
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-02 12:38:01 +08:00