Commit Graph
24 Commits
Author SHA1 Message Date
seaislee1209andClaude Opus 4.8 c8f3f91d38 feat(images): 期2 图片趴三类 — 模特上身图/平台套图/自由创作 归类+成组+接模特库
后端:
- 独立生图三类归类:model+product→model_tryon(模特上身图,引用模特库,不送审) / cover→platform_kit(平台套图) / image→free_create(自由创作);生成演员(model 无 product)仍→person(视频角色,留期3)
- 成组:每次提交一个 batch_id 串起整批,落 asset.metadata;另记 mode + model_entity_id(上身图溯源模特库)
- generate-image 端点透传 model_entity_id;资产库 _tab_q+summary 加 tryon/kits/creations 三类桶
- 单测 StandaloneCategoryTests 直跑 worker 验四态归类全绿(绕开异步 .delay)

前端:
- 资产库 library.tsx 加三类 tab(模特上身图/平台套图/自由创作)+ 计数 + 筛选维度
- ai-tools 模特选择器数据源 person→模特库(listModels 映射,选中传形象图当参考 = 引用模特库),ActorLibrary 同源
- api.ts submitGenerateImage 加 model_entity_id

验收:tsc+build 全绿;无头 0 console error(资产库三类 tab 各归类正确、模特选择器 5 张取自模特库)
基线既有 3 失败(StandaloneImageReferenceTests 异步漂移)零新增

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-21 16:36:29 +08:00
seaislee1209andClaude Opus 4.8 b946a64409 fix(ui): 批量栏黑底还原 + 图片生成页排版对齐HTML + 视频卡去多余上传
- .bulk-bar 全局裸类被 admin-page.css 白底版盖掉 → 收窄到 .admin-app;
  商品库/项目/资产库批量浮条恢复黑底
- 批量浮条显隐改绑「有无选中」(.show)而非编辑模式 → 退选即消失
- asset-factory 三卡:开始生成按钮挪回 factory-text 内(对齐HTML),
  按钮紧跟描述、卡片高度回正;tag/desc/价格字号对齐HTML(10.5/13.5/10.5)
- 全站内容区上内边距 48px→24px(对齐设计稿 #page-content),标题不再整体偏低
- 视频卡移除多余「上传」按钮(AI生成不需单卡上传,全局上传入口保留);
  video-card-head 顶端对齐改垂直居中

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-20 18:34:33 +08:00
seaislee1209andClaude Opus 4.8 38f56cb037 feat(core): Wave 3 batch2 — 资产库详情/上传/批量 + AI工具模特库/gen-card/pl-modal
资产库(P0,sub-agent):多选+吸底 bulk-bar、资产详情弹窗(立绘+三视图+标签/属性+商品媒体画廊)、
  上传 Drawer→居中 Modal(类型分段+按类型字段+拖拽预览)、缺三视图徽标(复用现成类)
AI图片工具(P0,sub-agent):接入现成 ActorLibrary 模特库弹窗、gen-card 三件套(再生成/就地反馈/
  已采用绿角标,采用反馈去全局弹窗改就地)、平台套图恢复多选+分组、商品库 pl-modal 选择器(restraint重写)

验证: tsc 0 · build 0 · 走查 资产详情/上传弹窗开关ESC + 模特库/pl-modal 打开 全过 · 0 console error

⚠️ 真实数据缺(未造假):资产「移动到」改分类需 api.updateAsset 支持 category 字段;
  详情三视图版本历史 V1 是 mock 无真实源;平台无 platform 字段→前端组织分批。均移交监督。

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-19 05:08:21 +08:00
seaislee1209andClaude Opus 4.8 8a0ae6a19d perf(core): Wave 0 性能根因 — 连接复用/视频轮询脏检查/图懒加载/隐藏tab停轮询
- settings/base.py: MySQL 加 CONN_MAX_AGE=300 + 健康检查 + connect_timeout=5
  (development/production 共用,production 经 from .base import * 继承);development 去重
- App.tsx pollVideosQuiet: 收尾 setProjectDetail 改 JSON 脏检查,在途段未变化时
  跳过 setState,整棵管线不再每 5 秒空重渲染(纯前端,不碰生成业务)
- ai-tools.tsx: 任务历史网格+列表两处 img 补 loading=lazy/decoding=async
- pipeline.tsx: 审核(8s)+在途资产(4s)纯读轮询加 document.hidden 守卫
  (视频5s轮询驱动生成,保守不加;详见进度文档)

验证: tsc 0 · django check 0 · 14 路由 headless boot 0 报错 · 登录 726ms 无假延迟无邮箱

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-19 03:36:07 +08:00
zycandClaude Opus 4.8 9fce7e8fff feat(core): 平台套图/模特上身图生成设置加可编辑提示词输入框
生成结合提示词出图,默认按商品名预填模板,可自由编辑

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-18 14:15:06 +08:00
zycandClaude Opus 4.8 326c34ecd1 fix(core): 资产详情大图随数据显示,缩略图已出大图不再卡转圈
- 三视图/立绘大图改为跟数据(url)走,出图完成即显示,不再被在途轮询的
  busy 标志挡住——根治「小缩略图已出、大图一直转圈」
- 一并带上工作区其余改动(script_agent / services / tests / ai-tools / actor-library / App)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-18 10:57:02 +08:00
zycandClaude Opus 4.8 0695c36f4c fix(ai): 平台套图改走商品主图参考 image_edit · 模特上身图锁商品+模特双图
- 平台套图(cover)以前纯文生图,不参考真实商品主图 → 出图与商品对不上;
  现以商品主图为参考图1走 image_edit,锁包装一致性,有模特则参考图2=模特
- 新增 build_platform_cover_prompt_refs;model_url 解析对 cover 模式同样生效
- 补回归测试:cover 传商品主图、model 传商品主图+模特图、无主图回落文生图

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-17 21:58:39 +08:00
zycandClaude Opus 4.8 7c6d4477da feat(core): 列表数据在途显示骨架屏(加载态),不再先显示空状态
渐进渲染后,列表在接口返回前会短暂显示「0 SKU / 显示 0」的空状态,易被误读为「没数据」。
新增 SkeletonGrid/SkeletonRows(components/loading),区分「加载中(请求在途且无数据)」与
「加载完确实为空」:

- 全局态页(商品库/视频项目/工作台最近项目):App 传 loading={!dataLoaded},未加载完显示骨架。
- 自取页(资产库/商品详情AI素材/图片生成任务/账单流水):各自 loading 标志,首次拉取时显示骨架/加载行。
- 团队成员有 owner 兜底行(非空)不改。

闸:9 页全绿、功能正常;实测 /products 加载期显示骨架→数据到后渲染真实卡片。

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-17 21:37:07 +08:00
zycandClaude Opus 4.8 c9fb7139ac refactor(core): 抽出共享 ProductCreateDrawer · 商品/项目新建复用同一流程
- 新增 components/product-create-drawer.tsx,products/projects 改用同一右侧 Drawer 组件(products -188 / projects -116)
- ai-tools 配套调整;附 perf-report 产物

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-17 20:13:40 +08:00
zycandClaude Opus 4.8 f1bc5933ef perf(core): 非资产全局态也改按页懒加载,bootstrap 从 ~10 接口瘦到 ~6
启动只保留「每页 shell 都要」的全局数据:商品/项目(侧栏+导航)、余额(顶栏)、
模型配置(多生成页+pipeline 共用)、未读数(侧栏徽标,page_size=1 轻量)。其余移到各页按需:
- 账户页:流水(本就服务端分页)+ 趋势 + 团队成员 本页自取,充值后刷新。
- 团队页:成员 + 团队动态 本页自取,增删成员/充值后刷新。
- 生图工厂:任务历史 + 任务缩略图本页自取。
- 通知:bootstrap 只取 page_size=1 拿未读数(notificationsBadge),列表由消息中心/团队页各自拉。
- 全局默认分页改 DefaultPagination(支持 ?page_size 覆盖,默认 20 上限 200):
  根治 projects/products 等列表端点忽略 page_size、数据过 20 即被迫翻页(同 assets 旧病)。

闸:9 页功能正常、无瀑布、API 检查全过;首屏接口数 5~8(原 8~13)。perf 预算下调到新基线。

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-17 18:58:53 +08:00
zycandClaude Opus 4.8 2f6d3f5823 perf(core): 全站资产改服务端懒加载,撤掉 bootstrap 全量 allAssets
不再在启动时一次性拉全部资产(数据多时随之变慢/串多页),各页按需服务端分页/过滤:
- 生图(ImageWorkbench 模特库按 category=person、AssetFactory 按 ai 生成图)页面内懒加载。
- 商品库/项目向导封面图改用后端内嵌 cover_preview_url / images[].preview_url,不再反查全局 assets。
- 商品详情 AI 素材按 ?product 懒加载(上传/生成/采用三视图后刷新)。
- 工作台资产总数走轻量 /assets/summary/。
- App bootstrap 删除 api.allAssets() 与全局 assets state;loadData 仅留必要全局数据。
- 后端 ?product 过滤并集补上 ProductImage 关联资产,等价前端原 belongsToProduct。
- pipeline 用项目详情已内嵌的 *_url 显示,调用处传空 assets(不再依赖全局全量)。

闸验证:9 页功能正常、无分页瀑布、无接口报错;首屏不再含资产全量拉取。

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-17 18:25:05 +08:00
zycandClaude Opus 4.8 9bdd0683f8 fix(core): 商品详情页三视图改走 image_edit 参考真实主图 + 该商品 AI 素材归属
- 商品详情页「AI 生成三视图」原走独立生图老链路(纯文生图),只凭商品名脑补,
  出来通用图不像真品。改:前端传 reference_product;后端 run_standalone_image_task
  据此取商品主图走 image_edit(复用 build_product_triview_prompt_refs 锁包装),
  取不到主图优雅回落文生图。图片创作页(自由创作)不带标记,不受影响。
- 商品详情页素材区改为只显示「该商品」AI 素材(asset.product 归属)而非全团队。
- 首登水合带重试,失败不再静默(否则页面卡在全 0,要刷新才好)。

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-17 15:54:04 +08:00
zycandClaude Opus 4.8 f7a403ead3 fix(core): 测试清单 行16-33 — 商品详情/视频项目/新建向导/图片生成 批量修复
商品库+详情(行16-23):AI素材空状态缺省页;三视图16:9+版本历史切换+采用按钮;
详情「生成视频」预勾选商品、快捷生成图带入商品;管理商品编辑态保留底部统计;
删除商品 icon+DELETE ITEM 文案、乐观删除防重复点击;卡片图铺满占位区。

视频项目+新建向导(行24-28):筛选脚本来源按真实数据渲染;新建项目内「创建新商品」
右侧抽屉+创建后自动选中;开始栏 sticky 常驻;默认选中商品即显示卖点、未填完禁用开始;
去掉脚本风格/人物设定区块。

图片生成工作台(行29-33):模特单选;生成中改 spinner 动态图标+按钮间距;多任务并行;
重跑追加批次而非覆盖+更多按钮 hover 气泡菜单+「加入资产库/取消」切换与提示弹窗;
多批次本地持久化恢复。

收尾:App.tsx 接 initialProductId/preselectProductId/onCreateProduct/onAdoptTriView;
全局 toast 自动消失(成功3s/错误5s)修复行17③/22「右上角提示一直挂着」。

tsc -b && vite build 通过。

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-16 15:10:26 +08:00
zycandClaude Opus 4.8 57018fb101 fix(core): 测试清单 行4-15 — 记住我7天/工作台布局/商品创建选择弹窗/上传图持久化/清空筛选
- 记住我7天:勾选才持久化token+预填用户名,7天过期强制重登(localStorage vs sessionStorage)
- 工作台:最近项目进度/状态列对齐、快捷&提示卡片圆角边框、余额按钮金额左对齐
- 商品创建成功改为复用弹窗,选择 继续创建/去新建项目;主图随创建上传持久化
- 商品卡显示真实主图、点视频进详情视频项目tab
- 商品库/视频项目补 清空筛选 按钮

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-16 14:13:52 +08:00
iye b2288a2652 feat(frontend): polish login and design tokens 2026-06-16 12:30:45 +08:00
zycandClaude Opus 4.8 3472c3cc9c 修复整站502(健康探针被慢请求饿死)+全部模特死链+图片并发限流
- 后端 gunicorn 加 --threads 4:纯 sync worker 下几张图就占满 3 worker,
  健康探针 /api/health/ 拿不到 worker→超时→pod 判不就绪→流量被掐→整站502。
  图片生成 I/O 密集,加线程后慢请求不再饿死探针/其他接口。
- 前端图片生成并发上限 2:每张仍独立短请求,但不再 N 条一起砸单 pod 致 OOM。
- ai-tools 全部模特→ 接成展开/收起全部模特(原为纯 span 死链,模特>6 时第7个起选不到)。

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-15 16:15:49 +08:00
zycandClaude Fable 5 216a711291 后端生成闸+多项修复;前端全站更新;QA 审计与报告
后端:
- 新增 celery_health 生成前置闸——无 worker 在线时图片/视频生成入口
  一律 503,防"提交到 ARK 后无人轮询、结果悬空+额度冻结"的数据丢失
- 拼接导出:帧率跟随源众数、字幕逐句重映射、原声/BGM 混音修复
- 资金核算审计脚本 + genesis 账目回填 + 滞留预留清理命令
- 接入 yunqi provider 与豆包 TTS 模型(catalog/migrations/bootstrap 命令)

前端:全站页面更新(pipeline/library/products/projects/team/account 等),
新增共享 pager 分页组件

QA:刷新 function-audit 全量输出,新增 full-qa 报告
文档:BP 产品介绍资料、design/CLAUDE.md

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-15 10:06:15 +08:00
zycandClaude Opus 4.8 3fac38c5ef feat(core): notification inbox infinite scroll + command palette fix (+ pending WIP)
消息中心:全量渲染 → 真·后端分页滚动加载
- backend(ops/views): NotificationPagination(10/页,page_size 可覆盖)+
  响应回 type_counts(按收件人绝对计数,不受分页/搜索影响)
- frontend(messages): 自管分页,滚到底加载下一批;tab/搜索走服务端并重置到第1页;
  代号作废在途旧请求防切换卡空白;乐观标已读;「已加载 X / Y」分母用当前筛选总数
- api/App/types: listNotifications 支持 page/page_size/search;allNotifications 携带 type_counts

命令面板(侧边栏搜索):修复点开后 UI 错位
- app-shell: 遮罩 className 漏了基类 shell-command-bg(只有 .show)致无定位塌到左下;
  补回基类 + header 类名对齐 .shell-command-h
- messages-page.css: 工作台收进视口高度,收件箱在面板内滚动

本次提交一并带入此前若干未提交 WIP(account/ai-tools/library/pipeline/products/settings +
accounts/ai/assets/billing/projects 后端),按用户要求整体推 dev。

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-10 09:37:41 +08:00
zycandClaude Opus 4.8 0873e724bf feat(core/frontend): pipeline stage editor (burn-in controls) + double-submit guard & button greying
Pipeline (脚本→资产→故事板→视频→拼接):
- Stage1 render real script shots + wire 确认脚本→adopt (advance stage)
- Stage2 add person/scene AI-生成 buttons + clickable category tabs
- Stage4 auto-poll videos to completion + per-segment upload + real frame thumbnails + download
- Stage5 real timeline editor: clips undo/redo/split/copy/delete/drag-reorder/zoom,
  subtitle style + per-clip text editor, transition select (xfade preview),
  BGM upload + volume, save draft, export-with-save → shows/download final MP4
- embedded asset URLs everywhere (beat assets pagination)

UX: re-entry guard in action() (no double-submit anywhere) + greyed :disabled
styles for btn-aigen/chat-mode/pill-cta/tl-action so generate buttons visibly
disable while generating.

Also includes prior uncommitted frontend work: settings preferences/sessions/avatar,
asset delete, account/team/products pages, fonts.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-09 14:46:42 +08:00
seaislee1209andClaude Opus 4.8 64b0f3a1aa feat(core/frontend): restore ModelPhotoDemoPage A/B static showcase to baselines (§1 last item)
ModelPhotoDemoPage variant A/B pixel-restored to model-photo-demo-a/b.html (product rail + model grid +
batch result cards / task-stream layout). Sibling AssetFactoryPage/ImageWorkbenchPage untouched.
+ QA: shot-aitools.mjs / shot-pipeline.mjs. verified: tsc --noEmit clean; A/B + model-photo screenshots match.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-05 17:14:56 +08:00
seaislee1209andClaude Opus 4.8 2242241c3b feat(core/frontend): ai-tools per-mode layouts (image=chat-stream / model=person picker / cover=platform) + pipeline real unread bell
- ImageWorkbenchPage now renders mode-specific layouts matching each baseline:
  image -> chat-stream (conversation list + hero + prompt chips + chat input bar);
  model -> product rail + 真人模特 cards (assets category=person, fallback Ava/Luna/Mia/Zoe) + per-model count;
  cover -> platform-kit picker. Generation (onGenerate) wiring + loading/empty/fail states preserved.
- pipeline.tsx: bespoke topbar bell now shows real unreadCount (was hardcoded 12); App.tsx threads it.
verified: tsc --noEmit clean; screenshot confirms image-optimize matches chat-stream baseline.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-05 17:06:30 +08:00
seaislee1209andClaude Opus 4.8 099bf0e6aa feat(core/frontend): wire settings/avatar/image-gen + real data render (library/product-detail/pipeline)
App.tsx: thread saveProfile/changePassword/uploadAvatar/generateImages handlers + assets prop to pages.
- settings.tsx: profile save / password modal / avatar upload wired; notification/theme prefs -> localStorage
- library.tsx + product-detail: asset thumbnails + grids render real TOS preview_url
- ai-tools ImageWorkbenchPage: 生成图片 wired to /api/ai/generate-image, renders returned assets
- pipeline.tsx stage2-5: base_assets/storyboard/video_segments(adopted_asset)/timeline(clips/subtitles/bgm)
  rendered from real project data; graceful empty states
- types.ts: +VideoSegment.adopted_asset, +Timeline.subtitle_tracks/bgm_tracks
verified: tsc --noEmit clean; screenshots confirm pipeline stages 2-5 + product-detail render real data+images
(demo asset object_keys re-pointed to image objects so thumbnails resolve)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-05 16:20:10 +08:00
seaislee1209andClaude Opus 4.8 78fd7ee13d feat(core/frontend): P1 pixel restoration (settings/messages/wizard/product-create faithful; ai-tools draft)
- settings.tsx + settings-page.css: restore to settings.html (left-nav + sections), real user/team data
- messages.tsx + messages-page.css: rich inbox restore (filters/detail/props grid) on real notifications
- projects.tsx ProjectWizardPage + project-wizard-page.css: restore to projects-new.html
- products.tsx ProductCreateUploadPage + product-create-page.css: restore to product-create-v2 baseline
- ai-tools.tsx (AssetFactory/ImageWorkbench) + ai-tools-page.css: DRAFT unified studio shell;
  deviates from per-page baselines (image-optimize should be chat-stream; model-photo product+person picker)
  -> pending rework alongside P3 standalone image-gen decision
- shot-p1.mjs: playwright visual-parity capture (react vs exact baseline; uses 127.0.0.1 not localhost)
- verified: tsc --noEmit clean; screenshots confirm settings/wizard/product-create/messages faithful

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-05 14:25:19 +08:00
zyc cfdcd84a30 feat: add AirShelf core implementation 2026-06-05 10:21:40 +08:00