Commit Graph

82 Commits

Author SHA1 Message Date
Codex d819cecfc6 fix(ecommerce): restore quick action colors for product/copywriting/more
Add missing --quick-accent/--quick-bg/--quick-text variables for

- product (商品套图)

- copywriting (一键文案)

- more (更多功能)
2026-06-17 11:33:36 +08:00
Codex 2c3c6eb2c9 Merge remote-tracking branch 'origin/main' into codex/main-latest-20260615-030000
# Conflicts:
#	src/styles/ecommerce-standalone.css
2026-06-17 11:04:26 +08:00
ludan e86cd18f1d feat: enhance scenario tabs with more/expand toggle, template carousel navigation, and 16 new templates
- package.json: Add @phosphor-icons/react ^2.1.10 dependency for additional icon set
- package-lock.json: Sync lockfile with new dependency and clean peer:true markers

- EcommercePage.tsx:
  - Reorder scenario tabs: model (模特图) moved to position 3 after mainImage
  - Add primaryCommerceScenarioKeys to define first 4 visible scenarios (popular/poster/mainImage/model)
  - Change activeCommerceScenario initial state from "popular" to null — no scenario auto-selected on mount
  - Add isCommerceScenarioMoreOpen state to toggle expanded scenario list
  - Add templateStripRef for programmatic scroll control
  - visibleCommerceScenarioOptions: filter to primary keys by default, show all when expanded
  - "更多/收起" toggle button with dashed border, dynamic icon (··· or CloseOutlined)
  - isCloneTemplateStripVisible defaults to false — template strip hidden until scenario clicked
  - activeCommerceScenarioTemplates: returns empty array when no scenario selected
  - Template strip wrapped in ecom-command-template-carousel with prev/next navigation arrows (‹ ›)
  - scrollCommerceTemplateStrip(direction): smooth scroll by card width or viewport step
  - handleCommerceScenarioMoreToggle: expand/collapse scenario list
  - handleCloneTemplateCardClick: now also sets activeCommerceScenario to card.scenario
  - Scroll hint text: "点击更多查看全部场景" when collapsed, "左右滑动查看全部场景" when expanded
  - Auto-scroll template strip to left on scenario/visibility change via useEffect

  - Add 16 new CommerceScenarioTemplate cards:
    - poster: 节日礼赠海报, 奢品香水海报
    - mainImage: 模特展示主图, 细节质感主图
    - model: 男装夹克模特, 帽子配饰模特
    - scene: 户外露营场景, 美妆喷雾场景
    - festival: 父亲节礼盒图, 香薰蜡烛礼盒
    - background: 高级灰背景, 居家背景
    - retouch: 色彩统一精修, 细节锐化精修
    - salesVideo: 痛点种草视频, 温馨开箱视频

- ecommerce-standalone.css (+559 lines):
  - Scenario shell (.ecom-command-scenario-shell): centered flex wrapper with padding
  - Scenario tabs: pill-shaped buttons (border-radius 999px), gradient backgrounds, scroll-snap
  - "更多" button: dashed border in collapsed state, solid when expanded
  - Template carousel (.ecom-command-template-carousel): horizontal scroll with snap, smooth scroll-behavior, hidden scrollbar
  - Carousel fade edges: ::before/::after gradient masks (54px width)
  - Navigation arrows (.ecom-command-template-nav): circular buttons positioned absolute at edges, hover/focus reveal with scale transition, opacity 0→1 on carousel hover
  - Template cards: flexible sizing (clamp 260px-312px), 96px media thumbnail, scroll-snap-align start
  - Per-scenario color mapping via --mode-accent: popular pink, poster/festival orange, mainImage/scene/background green, model/retouch/salesVideo blue, more blue
  - Active state: radial gradient glow + color-mix border/shadow from --mode-accent
  - Scroll hint: animated ← → arrows (ecom-scroll-hint-left/right keyframes at 1.6s infinite)
  - Responsive: ≤900px left-aligned tabs + persistent nav arrows, ≤640px compact sizing, full-width carousel with overflow hidden
2026-06-17 10:16:40 +08:00
Codex eb7b769155 Merge remote-tracking branch 'origin/main' into codex/main-latest-20260615-030000
# Conflicts:
#	src/styles/ecommerce-standalone.css
2026-06-16 23:28:07 +08:00
stringadmin 57cf34b0d0 style: local ecommerce-standalone.css changes (authority sync) 2026-06-16 22:50:14 +08:00
Codex ad38a4a0e3 feat(ecommerce): add one-click copywriting tool with quick-board entry
- Add EcommerceCopywritingPanel component

- Wire copywriting tool into EcommercePage routing and state

- Add quick action entry; place before '更多功能'

- Add copywriting styles aligned with quick-set/hot-clone pages

- Merge latest main
2026-06-16 21:47:07 +08:00
stringadmin c7adbc153b fix: restore ecommerce platform rule type imports 2026-06-16 21:40:07 +08:00
stringadmin 17152efa2c Merge branch 'main-merge-work' of ssh://118.145.251.184-port2222/OmniAI/omniai-ds-code-package into main-merge-work 2026-06-16 21:37:38 +08:00
stringadmin a605fad7e0 Merge origin/main into main-merge-work 2026-06-16 21:33:41 +08:00
stringadmin 4ca2ab4a9c Merge origin/main into main-merge-work (resolve EcommercePage/CSS conflicts) 2026-06-16 21:13:25 +08:00
stringadmin 588da45902 refactor: optimize Topbar scroll listener; sync WIP ecommerce refactor and CSS 2026-06-16 21:09:41 +08:00
stringadmin 5466036349 refactor: extract Topbar and LocalAvatar components from App.tsx 2026-06-16 20:15:53 +08:00
ludan 5811cbac16 feat: refactor ecommerce toolbar from mode tabs to scenario-based tabs with rich template cards
- EcommercePage.tsx:
  - Introduce CommerceScenarioKey type (popular/poster/mainImage/scene/festival/model/background/retouch/salesVideo) and CommerceScenarioTemplate interface with scenario/output/desc/badge fields
  - Add commerceScenarioOptions (9 scenario tabs with icons) replacing cloneOutputOptions as toolbar data source; each scenario maps to an output mode via commerceScenarioOutputMap
  - Add commerceScenarioTemplates (16 templates across 8 scenarios) with thumbnail, badge, title, and description; popularCommerceScenarioTemplates aggregates cross-scenario highlights for the "热门" default tab
  - Replace activeCloneTemplateCards with activeCommerceScenarioTemplates filtered by scenario; popular tab shows highlights, others show scenario-specific templates
  - handleCommerceScenarioClick: switch scenario, auto-toggle output mode, toggle template strip visibility; clicking active scenario toggles strip; popular tab preserves current output
  - handleCloneTemplateCardClick: auto-switch output mode to match template, fill prompt, focus textarea with 80ms delayed re-focus for reliability
  - Template card markup upgraded: media thumbnail (94px cover image with hover scale), body with badge pill, title, and 2-line description
  - Active scenario button shows close indicator (CloseOutlined) when strip is open
  - Template strip defaults to visible (isCloneTemplateStripVisible initial true)
  - Add "左右滑动查看更多" scroll hint for narrow viewports
- ecommerce-standalone.css (+355 lines):
  - Scenario tabs: horizontal flex scroll with hidden scrollbar, pill-shaped buttons (grid: 24px icon + fluid label), per-scenario color accent via --mode-accent custom property (pink for popular, orange for poster/festival, green for mainImage/scene/background, blue for model/retouch/salesVideo)
  - Active/open states: radial gradient glow, lifted shadow, intensified border color
  - Icon slot: 24px rounded square with tinted background and inset highlight
  - Close indicator: absolute top-right circle with hover scale
  - Template cards: 2-column grid (94px media + fluid body), badge capsule, thumbnail with hover scale(1.035), title 820 weight, 2-line description clamp
  - Responsive: ≤1024px 2-col card grid, ≤900px scroll-hint visible + left-aligned tabs, ≤640px horizontal scroll cards with snap, compact card sizing
2026-06-16 19:11:50 +08:00
stringadmin c38f056527 style: make topbar fixed transparent floating header 2026-06-16 16:39:58 +08:00
stringadmin 047c66ed88 Merge 4993f6e: multi-turn conversation system 2026-06-16 14:34:00 +08:00
stringadmin 91f2f9dfe8 Merge 79f220d: add responsive layouts for template cards and hot clone 2026-06-16 14:29:13 +08:00
stringadmin 1eca1d702b Merge c1c7cb3: fix ecommerce preview and module compatibility 2026-06-16 14:28:43 +08:00
stringadmin ff4d40bcf6 Merge 003c41d: 抽出 useVideoSceneRunner hook 2026-06-16 14:27:54 +08:00
stringadmin c8e0839fc8 Merge b67f2e7: codex/main-latest branch (de3eb1d + 643595b + f056547) 2026-06-16 14:24:18 +08:00
stringadmin 8269e32779 Merge 85adcdc: 优化记录详情对话面板布局与视觉层次 2026-06-16 14:04:11 +08:00
stringadmin 39a3edde1c Merge e3b48e2: 完善电商记录详情页 (resolved via ab99e3b) 2026-06-16 14:03:30 +08:00
stringadmin c748d1e3ba Merge 62fcf46: 抽出克隆/历史持久化模块 2026-06-16 14:01:34 +08:00
stringadmin 2e87adc957 Merge 9a9c7eb: optimize ecommerce hot clone UI (resolved conflicts + fixed unclosed block) 2026-06-16 14:00:11 +08:00
stringadmin 0958a9870e Merge 6dd2922: 收口 server/client 数据解析层 2026-06-16 13:55:41 +08:00
stringadmin bdedad0b90 Merge 8985dee: 统一 taskSubscription import 为静态 2026-06-16 13:55:25 +08:00
stringadmin a9f707525d Merge f30e585: extract platform rules and prompt builders 2026-06-16 13:55:02 +08:00
stringadmin 2b69a82aea Merge 96d335d: generation record detail workspace 2026-06-16 13:54:10 +08:00
stringadmin e460901ad7 Merge 45e6534: 引入 Vitest 测试骨架 2026-06-16 13:53:40 +08:00
stringadmin b416e96e99 Merge 307537a: fix(ecommerce) clone-ai-node-label 定位样式 2026-06-16 13:53:14 +08:00
ludan 4993f6eeec feat: implement multi-turn conversation system for generation record detail with deduplication enhancement
- generationRecordClient.ts: Enhance save deduplication with payload signature — replace simple recordId-based dedup with stableJsonStringify-based signature comparison; same recordId + same signature skips save, changed payload proceeds; add buildSaveSignature covering tool/mode/title/status/prompt/taskIds/assets/config/result/metadata; store signature alongside savedAt in recentlySavedRecords map for per-turn save accuracy
- EcommercePage.tsx: Introduce EcommerceHistoryTurn interface and multi-turn conversation architecture —
  - Add EcommerceHistoryTurn with full generation context (status/output/platform/market/language/ratio/requirement/images/results/counts/modules/scenes/replicateLevel); EcommerceHistoryRecord gains status/errorMessage/turns[] fields
  - beginEcommerceHistoryTurn() — start a new generation turn, create or append to record, persist to localStorage immediately
  - updateLocalEcommerceHistoryTurn() — real-time turn status sync (generating→done/failed) with record summary mirroring via syncRecordSummaryWithTurn()
  - restoreHistoryTurnInputs() — one-click parameter restoration from failed turns for retry
  - upsertCanvasNode() — insert or update canvas node by ID (dedup by turnId), alternating row layout (x: index*420, y: 0 or 160)
  - Generate flow wired to turns: status callbacks update turn state; cancel sets turn to failed; results written to turn.results
  - Record detail conversation panel refactored from single-message to per-turn iteration — each turn renders user message (requirement + meta + assets) and assistant message (status-aware text + progress bar during generation + result thumbnails); failed turns show "恢复参数" retry button; generating turn shows EcommerceProgressBar
  - openEcommerceHistoryRecord() loads all turns as canvas nodes with distributed positions; preserves generating turn tracking via activeHistoryTurnIdRef
  - History list items display status label (生成中/失败/time)
  - Product set preview backdrop moved to createPortal(document.body) with z-index 4000
- pages/ecommerce.css: Bump product-set-preview-backdrop z-index from 100 to 4000 for Portal rendering layer
2026-06-16 13:02:11 +08:00
Codex 79f220dbbf feat: add responsive layouts for template cards and hot clone 2026-06-16 11:44:55 +08:00
Codex c1c7cb3cc7 fix ecommerce preview and module compatibility 2026-06-15 22:00:00 +08:00
Codex b67f2e7601 Merge branch 'main' of http://118.145.251.184:3000/OmniAI/omniai-ds-code-package into codex/main-latest-20260615-030000 2026-06-15 21:56:00 +08:00
stringadmin 003c41ddcc refactor(video): 抽出 useVideoSceneRunner hook,视频场景任务编排与 UI 分离(#3) 2026-06-15 20:18:26 +08:00
Codex f056547160 fix: align hot clone reference upload UI 2026-06-15 19:59:00 +08:00
stringadmin 643595bede refactor(css): CSS 第一阶段瘦身——止血 + 拆分 ecommerce-standalone(#6) 2026-06-15 18:32:14 +08:00
Codex de3eb1d06a merge main and adjust clone mode tabs 2026-06-15 18:25:38 +08:00
ludan 85adcdceef feat: 优化记录详情对话面板布局与视觉层次
本次修改聚焦于电商记录详情页的对话面板体验打磨:

一、对话顺序优化(EcommercePage.tsx):
- 将"新需求"跟进消息从AI回复之前移至AI回复之后
- 调整后的对话时间线:用户历史需求 → AI回复 → 用户新需求,逻辑更符合真实对话流程

二、对话面板视觉升级(ecommerce-standalone.css):
- 对话面板宽度采用CSS变量动态控制(408-440px),视觉更宽敞
- 消息气泡区分明确:
  · 用户消息:左侧缩进26-36px,蓝色调渐变背景,青色边框
  · AI消息:右侧缩进26-36px,蓝调边框,中性背景
  · 跟进消息:独特高亮样式,更强边框(0.24透明度)和投影
- 排版细节打磨:
  · 消息标签字号12px/权重820
  · 正文13px/行高1.64
  · 气泡内间距15px、圆角20px、投影加深
- 元信息标签(emo)精修:28px高度、圆角胶囊样式
- 素材缩略图:46x46px、圆角14px
- 响应式适配:≤900px面板收窄至92vw,≤480px去除消息缩进

变更文件:
- src/features/ecommerce/EcommercePage.tsx (+20/-20)
- src/styles/ecommerce-standalone.css (+121)
2026-06-15 18:23:36 +08:00
ludan e3b48e2614 feat: 完善电商记录详情页,支持触摸手势交互、对话式需求面板与画布节点拖拽
本次修改全面打磨电商图片工作台的记录详情体验,主要包含以下变更:

一、记录详情对话面板(EcommercePage.tsx):
- 将记录详情中的"需求"区域重构为聊天对话式布局:
  · 历史需求消息:展示原始需求文本、参数元信息(平台/语种/比例/设置)、已上传素材缩略图
  · 新增跟进需求消息(is-followup):若当前素材与历史记录不同,自动展示新上传素材及当前参数配置
  · AI 回复消息保持原有状态展示
- 记录详情中素材上传数量上限从 7 张提升至 20 张(maxCloneProductImages)
- 上传按钮重构:移至素材列表左侧,显示当前数量/上限,满额时禁用并提示"已满"

二、触摸与手势交互:
- 新增 PreviewTouchGesture 完整手势系统:
  · 单指平移(pan):支持触摸拖拽预览画布
  · 双指缩放(pinch):以双指中心为锚点进行缩放,范围 0.25x-2x
  · 自动排除交互元素(按钮/输入框/链接等)避免冲突
  · 智能切换:单指/双指模式无缝切换
- 画布节点触摸拖拽(canvas node drag):
  · 支持触摸拖拽移动生成结果节点
  · 考虑当前缩放级别计算位移
  · 与预览画布手势互不干扰

三、记录详情页视觉升级(ecommerce-standalone.css):
- 整体背景采用径向渐变+线性渐变,营造专业 SaaS 质感
- 对话面板与历史面板统一采用毛玻璃卡片风格
- 聊天消息气泡:圆角 18px、柔和投影、用户消息左侧缩进 18px
- 历史面板宽度固定 292px
- CSS 自定义属性体系(record-detail-*)统一管理颜色和阴影
- 面板头部加高加粗标题,优化可读性

四、其他细节优化:
- 历史刷新按钮图标从文本符号改为 ReloadOutlined 组件
- 素材缩略图移除 hover 放大镜效果(.ecom-command-asset-zoom)
- 刷新按钮禁用样式完善

变更文件:
- src/features/ecommerce/EcommercePage.tsx (+246/-11)
- src/styles/ecommerce-standalone.css (+1369)
2026-06-15 16:20:55 +08:00
stringadmin 62fcf461b6 refactor(ecommerce): 抽出克隆/历史持久化模块(#2 续) 2026-06-15 16:06:45 +08:00
Codex 9a9c7eb86d feat: optimize ecommerce hot clone UI 2026-06-15 15:26:49 +08:00
stringadmin 6dd292207f refactor(api): 收口 server/client 数据解析层,消除 aiGenerationClient 的 as T 断言 2026-06-15 15:06:41 +08:00
stringadmin 8985deea0a fix(video): 统一 taskSubscription import 为静态,消除 Vite chunk 警告 2026-06-15 14:42:37 +08:00
stringadmin f30e585cfa refactor(ecommerce): extract platform rules and prompt builders 2026-06-15 14:35:40 +08:00
stringadmin 3f1954b38d Merge branch 'main' into feat/ecommerce-record-detail-conversation-panel 2026-06-15 05:41:12 +00:00
ludan 96d335db8a feat: add generation record detail workspace with AI conversation panel and canvas reset
- EcommercePage.tsx: Add isCloneConversationCollapsed state for toggling conversation sidebar; introduce isMainCloneWorkspace / isRecordDetailWorkspace derived flags to scope record-detail features to main clone tool only; compute currentResultCount, activeHistoryRecord, and currentResultThumbs for display; add canvas reset button (zoom=1, offset=0) in preview toolbar when viewing a history record; build AI conversation panel (clone-ai-conversation-panel) as left sidebar with:
  - Header showing record title, model/platform/language metadata, and collapse button
  - User message bubble with requirement text and uploaded asset thumbnails (up to 4 + overflow count)
  - Assistant message bubble with status-aware response text (done/generating/failed/idle), EcommerceProgressBar during generation, and clickable result thumbnails that open product set preview
  - Collapse/expand toggle button with MenuFoldOutlined / MenuUnfoldOutlined icons
- ecommerce-standalone.css (+1204 lines): Define record detail workspace layout (CSS grid: 352px chat column + fluid canvas); grid-pattern background with radial gradient accent; conversation panel styling with chat bubble cards, asset thumbnail grids, result thumbnail buttons, scrollable body; collapsed state (grid-template-columns: 0 1fr); toggle button positioning; responsive breakpoints for tablets and mobile with adjusted chat width and stacked layout
2026-06-15 13:40:14 +08:00
stringadmin 45e6534ee1 test: 引入 Vitest 测试骨架并抽出颜色/比例纯函数模块 2026-06-15 13:39:02 +08:00
stringadmin 307537a7ce fix(ecommerce): 补全 clone-ai-node-label 在 result-stack 顶部的定位样式 2026-06-15 11:33:04 +08:00
Codex 062c8b3445 feat: 临时下线智能抠图与图片翻译入口 2026-06-15 10:42:33 +08:00
stringadmin 0b2d6b901f feat: 电商工作台进度与生成记录健壮性优化 2026-06-15 10:24:31 +08:00