Commit Graph

20 Commits

Author SHA1 Message Date
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
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
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