Commit Graph

18 Commits

Author SHA1 Message Date
ludan 2a2ab701e3 feat: 工具子页面隐藏Topbar、限制素材上传数量、修复移动端布局
CI / verify (pull_request) Has been cancelled
本次修改主要包含以下变更:

一、工具子页面隐藏Topbar(App.tsx / EcommercePage.tsx):
- 新增 onWorkspaceChromeChange 回调,EcommercePage 向 App 层通知当前是否为工具子页面
- 工具子页面(智能抠图/快速详情/水印移除/翻译/图片编辑/一键套图/文案/一键视频等)自动隐藏顶部导航栏
- 组件卸载时重置 isToolPage 状态,避免切换页面时残留

二、素材上传数量限制(EcommercePage.tsx):
- maxCloneProductImages 从 20 张调整为 10 张
- 上传超限时 toast 提示用户「最多上传 10 张素材」
- 新增 AppstoreAddOutlined、HighlightOutlined、TranslationOutlined、PlayCircleOutlined 等图标导入

三、移动端布局修复(ecommerce.css + ecommerce-standalone.css):
- 指令栏容器宽度限制为 calc(100vw - 24px),防止溢出
- 素材缩略图区域改为横向滚动,隐藏滚动条
- 缩略图固定 flex-shrink: 0 防止被压缩(58px / 54px)
- 工具栏宽度 100%,box-sizing 修复
- 新增工具页面相关样式规则

变更文件:
- src/App.tsx (+26)
- src/features/ecommerce/EcommercePage.tsx (+66)
- src/styles/ecommerce-standalone.css (+209)
- src/styles/pages/ecommerce.css (+198)
2026-06-18 13:23:55 +08:00
stringadmin a2ccf290e5 Fix ecommerce generation history sync
CI / verify (pull_request) Has been cancelled
2026-06-18 10:16:40 +08:00
stringadmin da9c5c2fca Merge codex/main-latest-20260615-030000: 一键视频工具 + 快捷操作配色修复 2026-06-17 21:33:50 +08:00
ludan 6dd2a107fd feat: 电商创作场景支持带货视频时长、移动端隐藏设置按钮、优化平台选择器样式
- 新增带货视频时长选项(5/10/15秒)及时长选择 popover

- 创作标签在移动端(<=640px)隐藏平台/语种/比例/设置/时长按钮行,仅保留文本输入框

- 重构平台选择器为单列滚动列表,移除平台 logo,统一比例/语种/平台 active 高亮样式

- 优化 composer 整体布局节奏(素材紧凑、工具栏底部固定、响应式高度)

- 调整 AI 帮写提交按钮为青色系渐变样式
2026-06-17 17:02:55 +08:00
ludan 2cd76ec3a5 feat: add composer toolbelt with asset library, work mode selector, AI-powered prompt writing, and scenario settings
- EcommercePage.tsx (+260):
  - Add ComposerAssetTabKey and ComposerWorkModeKey types; extend ComposerMenuKey with assetLibrary/workMode/aiWrite
  - Add composerTooltip/composerAssetTab/composerWorkMode/aiWriteDraft state
  - Add composerAssetTabs (最近保存/套图配方/模特库), composerWorkModeOptions (快捷/思考), and composerRatioOptions (7 presets with display dimensions)
  - Add scenarioSettingsKeys and scenarioAdvancedSettingsKeys for conditional settings panel display
  - Add PaperPlaneRight icon import for AI writing send button
  - Reorder salesVideo tag position in commerceScenarioOptions; emoji icons replace Ant Design icons
  - handleCommerceScenarioClick: second click on active scenario now deselects (sets null) instead of toggling visibility
  - shouldShowScenarioSettings: settings panel visible for poster/mainImage/model/scene/festival/salesVideo but not popular
  - renderComposerAssetPanel: asset library popover with tab selector (recent/recipe/model) and grid display
  - renderComposerWorkModePanel: work mode radio popover with description cards
  - renderComposerAiWritePanel: AI prompt auto-complete panel with text input and send button; applyAiWriteSuggestion merges keyword + mode hint + platform context into composer prompt
  - Toolbar restructured with .ecom-command-tool pill buttons (upload/assets/mode/AI write) in .ecom-command-composer-actions

- ecommerce-standalone.css (+937):
  - Composer toolbar: horizontal flex row with space-between, overflow-x scroll with hidden scrollbar
  - .ecom-command-tool: 40px pill-shaped buttons with gradient backgrounds, hover/active/dragging states with glow transition and lift
  - .ecom-command-tool--upload: icon+label layout for upload button
  - .ecom-command-tool--icon: 40px square icon-only button variant
  - Asset panel: tab selector row, 3-column recipe grid with aspect-ratio cards, hover scale effect
  - Work mode panel: radio-style card selector with description text
  - AI write panel: text input area with send button, responsive sizing
  - Tooltip: positioned above toolbar buttons with arrow pointer

- pages/ecommerce.css (+490):
  - Composer input focus-within: green glow border + deepened shadow + lift transition
  - Asset library, work mode, AI write panel styles with consistent tokenized spacing and transitions

- standalone/overrides.css (+7):
  - ≤420px settings option row: switch from grid to flex with flex:1 on buttons for tight viewport fit
2026-06-17 14:52:42 +08:00
Codex 65be92ba43 fix(ecommerce): strengthen product set count stepper theme override
Use html body #root .ecommerce-standalone prefix and !important

to ensure the stepper matches the local light theme.
2026-06-17 11:56:30 +08:00
Codex 98acb79a20 fix(ecommerce): align product set count stepper with local light theme
Add local-theme-parity overrides for .clone-ai-count-stepper

container and count value so they match the page's light palette.
2026-06-17 11:51: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
stringadmin 307537a7ce fix(ecommerce): 补全 clone-ai-node-label 在 result-stack 顶部的定位样式 2026-06-15 11:33:04 +08:00
stringadmin 0b2d6b901f feat: 电商工作台进度与生成记录健壮性优化 2026-06-15 10:24:31 +08:00
stringadmin 4d5f487a80 fix: adjust ecommerce source thumbnail label 2026-06-12 19:32:20 +08:00
stringadmin 6d93c2b9b8 refactor: 清理未使用参数、移除死代码、聚焦电商核心模块
主要变更概述:
================

1. 清理未使用的函数参数 (TypeScript noUnusedParameters)
------------------------------------------------------
- AppShell.tsx: 移除未使用的 backendHealth prop 及 ServerConnectionHealth 导入
- canvasUtils.ts: 移除 resolveWorkflowVideoModel 的 workflowModel 参数
- canvasWorkflowDeserialize.ts: 同步更新调用方
- CanvasPage.tsx: 移除 resolveWorkflowVideoModel 未使用导入
- HomePage.tsx: 移除 onOpenTokenMonitor、onOpenImageTool 未使用 props
- ToolboxSection.tsx: 移除 onOpenImageTool 未使用 prop 及 WebImageWorkbenchTool 类型导入
- ScriptTokensPage.tsx: 移除 formatReportMarkdown 的 script 参数,更新 2 处调用
- TokenUsagePage.tsx: 移除 onOpenImageTool、onSelectView 未使用 props
- WorkbenchPage.tsx: 移除 renderComposerToolbar 的 showStop 参数,更新 2 处调用

2. 移除未使用的模块和死代码
--------------------------
删除以下未在电商模块中使用的功能模块:
- 画布模块 (canvas/): CanvasPage, canvasUtils, canvasWorkflow* 等
- 主页模块 (home/): HomePage, ToolboxSection, WelcomeSplash 等
- 工作台模块 (workbench/): WorkbenchPage, ConversationSidebar 等
- 社区模块 (community/, community-review/)
- 数字人模块 (digital-human/)
- 图片工作台 (image-workbench/)
- 其他独立工具页: agent, assets, beta-applications, character-mix,
  compliance, dialog-generator, more, profile, provider-health,
  report, resolution-upscale, script-tokens, settings, size-template,
  subtitle-removal, watermark-removal

3. 移除未使用的公共组件
----------------------
- AnimatedPanel, BeforeAfterCompare, BetaApplicationModal
- CookieConsentBanner, DropZone, EmptyState, NotFoundPage
- NotificationCenter, OnboardingTour, OptimizedImage
- PageTransition, RechargeModal, ShellIcon, Skeleton
- StudioToolLayout, TaskStatusBar, WorkspacePageShell

4. 移除未使用的 API 客户端
--------------------------
- betaApplicationClient, communityClient, conversationClient
- draftClient, modelCapabilitiesClient, notificationClient
- projectTaskClient, providerHealthClient, publicConfigClient
- referenceUploadService, reportClient, scriptEvalClient
- uploadWithProgress

5. 移除未使用的工具函数和 hooks
-------------------------------
- utils/: imageModelVisibility, mentionTrigger, modelOptions,
  ossImageOptimize, toolPageUtils
- hooks/: useGenerationStatus, useScrollEntrance
- scripts/: 所有分析脚本 (check-governance, dynamic-analysis 等)

6. 移除未使用的样式文件
----------------------
删除与已移除模块对应的 CSS 文件,保留电商模块专用样式

7. 新增电商模块功能文件
----------------------
+ src/api/generationRecordClient.ts (生成记录客户端)
+ src/features/ecommerce/ecommerceGenerationPersistence.ts (生成持久化)

验证:
- TypeScript 编译 (tsc --noEmit --noUnusedParameters) 零错误通过
- 所有保留文件的功能完整性未受影响
2026-06-12 11:12:55 +08:00
Codex 5ddfd37f4d Polish ecommerce tool page layouts 2026-06-11 23:10:23 +08:00
stringadmin 51ecefced4 Merge branch 'main' into codex/ecommerce-ui-current 2026-06-11 15:05:40 +00:00
Codex 9b9a276014 feat: enhance ecommerce UI — sidebar, transitions, ratio options, cancel buttons, i18n fixes 2026-06-11 20:38:35 +08:00
ludan a09513029c feat: refine ecommerce standalone typography, layout grid, gradient title, and unified theme typography system
- ecommerce-standalone.css: Title max-width expanded to 520px with gradient text effect (background-clip:text + linear-gradient), adjusted clamp font-size and line-height, added text-shadow glow; command option row switched from flex-wrap to CSS grid (6×44px) with centered layout for consistent icon button alignment; refined button sizing/spacing across composer toolbar
- ecommerce.css: Added high-specificity overrides for image workbench entry page — title min-height and heavy font-weight (860), rounded option buttons (15px border-radius), inline reference text with ellipsis overflow; responsive breakpoints at 760px and 540px with gradient title, compact row layout, adapted font scaling for narrow viewports (+631 lines)
- dark-green.css: Introduced comprehensive typography normalization using html body #root specificity — font-family/letter-spacing reset across all elements; semantic mapping for body text (p/em/li/td), strong/b, code blocks (font-mono), icon sets (anticon/shell-icon), interactive controls (button/label/tab/chip/badge/tag/pill), headings (h1-h6 with size variants), decorative text (subtitle/desc/hint/meta/caption/empty), and numeric values (score/number/count/value/amount/price); mobile responsive headline scaling at ≤767px; all rules preserve SVG/path/use elements from font override (+177 lines)
2026-06-11 15:16:46 +08:00
ludan bbea5d1e58 feat: enhance ecommerce UI with typewriter animation, icon buttons, responsive layout, and refined design tokens
- EcommercePage.tsx: Add typewriter animation (useTypewriter hook) for slogan text with blinking cursor; replace text-based add/delete buttons with Ant Design icons (CloudUploadOutlined, DeleteOutlined); make command history panel responsive to window width (auto-collapse ≤1180px); update button labels from generic "添加" to context-specific "上传商品图" / "上传素材"
- New useTypewriter.ts hook: Character-by-character typewriter animation with configurable speed and pause-before-loop, auto-resets on text change
- reset.css: Add comprehensive HTML/body typography baseline (font-size, text-rendering, font-smoothing, line-height); extend reset coverage to select/canvas/svg elements; add overflow-wrap:anywhere for text-bearing elements; add min-width:0 to prevent form element overflow
- primitives.css: Add reusable typography utility classes (ui-page-title, ui-section-title, ui-body-copy) with design token references
- tokens.css: Expand design token set for typography scales, font weights, and leading values
- ecommerce-standalone.css: Add 689 lines of standalone ecommerce page styles
- Page CSS (ecommerce, image-workbench, more-tools, more, script-tokens, script-tokens-v5, studio-layout): Enhanced visual styles and layout refinements across all pages
- app-shell.css: Shell-level layout and styling improvements
2026-06-11 11:31:39 +08:00
stringadmin 3d98933e24 Initial ecommerce standalone package 2026-06-10 14:06:16 +08:00