Commit Graph

48 Commits

Author SHA1 Message Date
kdletters d0ea13bc8d Merge branch 'master' into feat/canvas-undo-protection 2026-07-20 15:03:57 +08:00
kdletters d465e9b66c 补充图集拆分中的前端表现
维护逐图层拆分状态并在请求结束后可靠清理
源图集显示扫描蒙层和拆图中状态胶囊
工具栏显示旋转图标并禁用重复提交
补充工作流、画布、工具栏测试及入口验收文档
2026-07-18 19:52:45 +08:00
zhaojingyan c3cefb8b96 完善图片画布撤销保护与操作提示
为画布历史记录补充操作类型和内容消失保护

增加撤销成功及撤销阻止提示并在三秒后隐藏

补充拖动、上传、生成和替换等操作的历史语义

移除重做按钮、快捷键和重做历史

补充撤销规则的定向测试和说明文档
2026-07-18 17:19:41 +08:00
kdletters 5468bb3212 修复画布生成器恢复串台
区分生成结果归属与派生输入关系,避免角色动作和快速编辑面板串台
补全角色动作、视频、音效、背景音乐与宣发素材的生成器恢复类型
统一清理剪切和素材删除后的关联生成状态,避免孤立占位
补充生成器恢复、宣发类型和删除清理回归测试并同步编辑器文档
2026-07-17 21:23:12 +08:00
lhk229 aecabdacfd 新抠图算法 (#85)
Co-authored-by: 段舒康 <kdletters@qq.com>
Reviewed-on: https://git.genarrative.world/git/GenarrativeAI/Genarrative/pulls/85
Co-authored-by: Linghong <ink29535@proton.me>
Co-committed-by: Linghong <ink29535@proton.me>
2026-07-16 18:33:06 +08:00
kdletters 9807295a7d 调整画布生成输入与图集快速编辑
隐藏生成面板资源名称字段并恢复提示词输入边框

恢复图标图集快速编辑并仅对单图标禁用

补充工具栏右键菜单工作流回归测试与编辑器文档
2026-07-14 23:26:35 +08:00
kdletters ed8be38287 统一画布生成资源命名
新增所有生成面板的资源名称输入并统一80字符边界
贯通画布标题、项目资源、素材库与生成请求的名称传播
为图标图集和角色动作补齐命名契约及中间产物后缀
补充前后端回归测试、OpenAPI与编辑器文档
2026-07-14 10:27:25 +08:00
kdletters 4e7bcb8f24 补齐生成中间产物持久化与拆图提示
图标和UI图集拆分失败时保留主图集并在内联、队列及刷新路径提示
角色、图片修改、图标UI和角色动作链路把可恢复中间产物写入项目与素材库
外部生成摘要新增独立告警字段并清理成功任务的历史错误
同步共享契约、SpacetimeDB迁移与绑定、OpenAPI、设计文档和回归测试
2026-07-13 21:41:46 +08:00
kdletters eae00292a1 新增画板图集自动拆分
生成图标图集后自动拆分并持久化独立素材
新增图集工具栏手动拆分入口与权威画布回填
修复连通域切片阅读顺序并补齐前后端测试
同步外部接口与编辑器设计文档
2026-07-13 19:10:30 +08:00
kdletters 3cbc33bd69 优化画布快速编辑参数与替换规则
快速编辑继承并支持模型、比例和尺寸参数,旧模型回落当前默认模型
仅禁止图标与图标图集快速编辑,图标规范继续按普通图片处理
按用户选定分辨率替换当前图层并保持图层中心位置
补齐后端真实图层校验、移动端避让、定向测试与项目文档
2026-07-13 18:48:38 +08:00
kdletters 324f99efdf 修复外部生成任务大载荷导致的内存膨胀
阻止图片编辑器将 Data URL 和超限 JSON 写入生成任务,复用 objectKey 等轻量引用
新增外部生成任务摘要投影与分批 payload 压缩回填流程,避免正式列表读取大字段
收紧 SpacetimeDB 发布为永不删数据并移除 Jenkins 普通清库入口,补齐维护窗口门禁
更新生成绑定、运维文档和回归测试,并完成生产数据副本迁移与压缩验证
2026-07-11 13:55:05 +08:00
kdletters e464e62697 修复创作页滚动与画布生成状态同步
为创作页恢复可见滚动条并补充样式测试
普通点击画布对象时收敛多选状态,避免批量拖动
裁扩结果先资源化,并在去背完成时保留源图层
队列完成后重读未决项目快照并补充回归测试
同步图片画布持久化文档与长期排障记录
2026-07-10 08:46:17 +08:00
kdletters 00db7d39ea 统一生成器对话框范围行为
移除生成器对话框打开后的安全范围自动拉动视口。

取消快速编辑、裁扩和角色动画面板的画布范围夹取。

保留创建生成器时聚焦新占位的行为并更新回归测试。
2026-07-07 19:36:20 +08:00
kdletters 1fb5a0773e 修复画板提示与失效项目跳转
画板参考图选择提示改为持续显示并支持手动关闭。

显式项目访问失效时同步切回项目页状态。

补充提示关闭和项目失效回退测试。
2026-07-05 18:01:02 +08:00
kdletters d707613a8b 修复画布快速编辑回写与原图元数据
快速编辑回到原图面板流程,避免新建生成器占位

提交快速编辑时传入目标图层并在后端成功后回写画布

快速编辑生成输入记录原图引用,图片信息可展示原图来源

同步前后端测试与图片画布文档记忆
2026-07-02 23:05:48 +08:00
kdletters d50ecbc492 修复创作弹窗与生成器引用缓存
未开放工具弹窗补充平台主题背景
画布生成器缓存引用按当前账号过滤
新画布工具栏引导改用文档图片
补充弹窗、引导图和引用归属回归测试
2026-06-30 21:50:16 +08:00
kdletters 3530e9251e 优化画布任务计时与去背景占位
移除画布任务列表的百分比展示

生成中任务显示阶段和已用时,排队任务不计时

去除背景在项目画布中创建生成占位并通过后端快照完成

补充客户端、工作流和后端契约测试

同步图片画布技术文档和项目记忆
2026-06-30 19:24:35 +08:00
kdletters 53c5639620 完善画布任务与标准绿幕抠除链路
统一编辑器标准绿幕提示词和本地绿幕透明化后处理

生成标准绿幕资产前保存源图到 OSS 并下沉字节级抠绿到 platform-image

将手动去背景接入外部生成队列与画布任务侧栏

修复任务侧栏分页、滚动、计时、焦点与完成信息展示

补充右键菜单关闭和素材复制下载交互

同步编辑器相关文档和项目记忆

(cherry picked from commit a8c19e132d)
2026-06-30 17:12:13 +08:00
kdletters 08f188e26e 切换图片画布抠图到 BiRefNet
新增图片画布去背景 BFF 配置与路由,服务端代理 BiRefNet 并持久化结果。

将手动去背景、角色图、图标 spritesheet、UI 素材提取和角色动作帧抠图切到 BiRefNet。

新增画布右上角任务侧栏并展示去背景任务耗时与状态。

同步图片画布技术文档和项目决策记录。

(cherry picked from commit 495fcc8801)
2026-06-30 17:12:13 +08:00
kdletters bb51c7e0d2 快速编辑直接覆盖原图
将图片快速编辑提交切到 /api/editor/images/edits,并用结果回写源图层

保留重绘作为右侧新结果图层,角色重绘继续走 character 生成契约

更新快速编辑文档和定向回归测试
2026-06-27 20:06:24 +08:00
kdletters 8eecd038f5 允许UI素材提取选择模型
为UI素材提取面板接入图片模型选择器,默认使用nanobanana模型。

提取提交链路传递选中模型并按模型计算泥点价格。

后端UI素材提取请求支持模型字段,队列、执行、持久化和响应统一使用选中模型。

同步外部OpenAPI模型字段并补充前端工作流、客户端请求和后端默认模型测试。
2026-06-27 17:51:41 +08:00
kdletters 607042a250 按来源生成器打开快速编辑和改造
快速编辑和改造优先恢复图层来源生成器类型

按原生成器草稿恢复普通图片、角色、图标、规范、UI、宣发和动作参数

补充同源生成器恢复与画布工作流回归测试
2026-06-26 00:21:41 +08:00
kdletters 2c53fc302e 修复角色图去背景读取失败
去背景前统一解析私有图片资源

裁扩本地编辑复用图片引用解析

补充角色图去背景回归测试
2026-06-25 20:29:58 +08:00
kdletters e24781e983 统一快速编辑/改造参数继承逻辑
- 快速编辑与改造打开时优先复用对应生成器最近一次 imageModel/aspectRatio/imageSize 参数。

- 统一创建草稿函数 createQuickEditPanelDraft / createRedrawPanelDraft / createEditDialogDraft 的参数注入与默认回退。

- 编辑生成弹窗价格与参数展示改为使用当前 dialog 的图片模型/尺寸参数。

- 调整工作流测试为当前统一提交链路并新增参数继承回归用例。
2026-06-25 18:45:51 +08:00
kdletters 6bf8b0051b 完善画板生成器与素材导出体验
图片改造改为独立 quick-edit 生成器占位并补齐提交链路
生成完成应用项目快照后同步刷新素材库
序列帧导出补充 Spine JSON 与独立验证器
序列帧播放预加载帧资源以减少加载闪烁
本地 dev 默认启用 all 进程角色并更新文档
2026-06-25 00:12:21 +08:00
kdletters fbecb3c7cb 新增后台Dashboard并修正画板规范图选择
新增后台 Dashboard 默认入口、日周月筛选和运营汇总页签

补充后台 Dashboard 数据契约、接口统计和文档

修正画板角色与图标规范图选择、缓存和提示状态

修复创作页桌面导航类型收窄错误

更新 Codex 环境初始化脚本和相关回归测试记录
2026-06-23 22:44:04 +08:00
JenkenB 7830d201c4 Server-side billing for editor generation
Move editor generation pricing to backend: remove priceMudPoints from public request schemas and docs, require backend to compute model prices and perform pre-charge via execute_billable_asset_operation_with_cost. Update character animation and video handlers to use authenticated owner IDs and wrap generation requests in billing; remove client-side price validation. Adjust OpenAPI, project-memory docs, pricing management docs, and related tests to reflect that front-end only displays prices and must not submit priceMudPoints. Also document new user registration reward and wallet refund outbox behavior. Code and test changes applied across api-server handlers, shared contracts, and image-editor client/tests.
2026-06-22 23:11:23 +08:00
JenkenB a1677027f3 Merge branch 'codex/editor-asset-library' of https://git.genarrative.world/git/GenarrativeAI/Genarrative into codex/editor-asset-library 2026-06-22 21:27:54 +08:00
JenkenB 2007f1f9ce Update editor generation pricing defaults
Unify and lower default mud-point prices across editor generation features and update related API/schema, docs and tests. Changes set gpt-image-2 to 1K=3 / 2K=5, audio1.0 to 5, and chirp-v5 to 12, and update server default JSON, frontend models/workflows, OpenAPI schema (require aspectRatio/imageSize/priceMudPoints for UI extraction), multiple UX docs (quick-edit viewport, UI extraction panel, pricing guidance) and accompanying tests to match the new defaults and validation rules.
2026-06-22 21:10:43 +08:00
wuxiangwanzi d9cd2edf92 改造时隐藏系统提示词
改造和重绘面板只从用户可见输入快照恢复提示词。

没有用户输入快照的旧资源打开改造时保持输入框为空。

补充图片、音频、视频、规范和宣发素材改造提示词恢复测试。

更新图片画布编辑器文档中的系统提示词隐藏规则。
2026-06-22 20:13:23 +08:00
JenkenB 55469a2198 UI extraction selection + local FFmpeg dev env
Require an explicit red-box selection before extracting UI-design assets: add rectangular/ellipse/brush selection UI, render red-outline marks into a marked Data URL on the client, and update the extraction prompt to "仅提取被红色框框选的素材并整理成spritesheet". Add frontend overlay/raster models and tests to support the selection flow and adjust numerous image-editor tests and views to wire up the selection lifecycle. On the dev ops side, enhance scripts/dev to detect a local %LOCALAPPDATA%/Genarrative/ffmpeg/bin installation on Windows, prepend it to PATH and inject CHARACTER_ANIMATION_FFMPEG_PATH/FFPROBE_PATH (with tests), and export the helper. Server config now prefers GENARRATIVE_*-prefixed FFmpeg env vars and includes a Rust test to validate reading the prefixed variables. Update docs to describe the new UI extraction behavior and local FFmpeg handling.
2026-06-22 19:13:37 +08:00
JenkenB 163b2fa077 Add editor generation model pricing admin UI & API
Introduce centralized model pricing for editor generations: add EditorGenerationPricing types and admin API client methods (GET/POST), backend default config and runtime override support, and server route/handler changes to expose admin editor-generation-pricing. Add an AdminEditorGenerationPricingPage component, styles, route entry, icon, and tests, plus a test for admin routes. Update docs and decision log to describe the pricing contract and management workflow. This enables managing per-model pricing (perGeneration / perSecond, flat or tiered) from the admin panel and exposes runtime pricing to the main site.
2026-06-22 16:57:29 +08:00
JenkenB c836ac604d Treat character-action generations as video & UI tweaks
Handle character-action generation results as real video assets: use backend previewVideoPath as layer src, set mediaType="video" and assetKind="character-animation", and store the first frame only as thumbnail/poster. Update docs to document the new behavior and preserve backend frame extraction/green-screen workflows. Update UI/UX: compact parameter labels (e.g. "16:9·1K"), quick-edit treats original image as an implicit last reference (hidden from the reference bar) and allows editable bottom capsules, and ensure exports preserve true media file types. Change upload toolbar icon to Upload and add tests to cover the icon and video-layer behavior; also add serialization/hydration test for video thumbnails and adjust many integration/unit tests to reflect new labels, sizes and generation semantics. Files touched include multiple docs under docs/, edited components and tests under src/components/image-editor/, and minor stylesheet updates.
2026-06-22 13:45:20 +08:00
kdletters de9eaef28f 改为行引用保存画布参考图元数据
生成输入参考图只保存 refType/refId 行引用
生成器布局快照只保存参考图行指针并在加载时恢复临时源
上传参考图优先创建项目资源行并回写 resourceId
元数据弹窗改为展示参考图行引用信息
更新图片画布技术文档和项目决策记录
2026-06-21 17:27:23 +08:00
kdletters 4821fb90df Merge branch 'codex/editor-asset-metadata-migration' into codex/editor-asset-library
# Conflicts:
#	docs/project-memory/shared-memory/decision-log.md
#	server-rs/crates/api-server/src/editor_project.rs
#	src/components/image-editor/ImageCanvasEditorModel.ts
#	src/components/image-editor/ImageCanvasEditorView.test-utils.ts
#	src/components/image-editor/ImageCanvasEditorView.tsx
#	src/components/image-editor/useImageCanvasGenerationSubmissionWorkflow.ts
#	src/services/image-editor/editorProjectClient.test.ts
2026-06-19 16:55:41 +08:00
kdletters 0502c5c5df 修复画布生成面板关闭行为
移除普通生图、快速编辑和改造面板的独立关闭按钮

统一空白画布点击后的生成面板收起逻辑

避免快速编辑和改造误移除最近生成器

补充生成面板交互回归测试
2026-06-19 16:22:30 +08:00
JenkenB 4af8ab22d0 修复画布音频改造面板
修复音效素材点击改造后生成面板被选中逻辑关闭的问题

补充音频改造集成回归测试,确保不显示参考图且恢复提示词和时长

统一重绘按钮泥点展示并补充价格配置约束文档

收紧 Vidu 音效生成时长校验,避免静默夹取非法时长
2026-06-19 12:40:10 +08:00
JenkenB 0e47a54a91 对齐编辑器生成占位与面板参数
统一画布生成占位图标,按图片、规范、角色、图标、UI、视频、音频、宣发和快速编辑区分。

让图片、规范、宣发和视频新建占位按面板尺寸或固定输出尺寸创建,并在参数变化时同步占位大小。

完善快速编辑、音频生成、宣发素材和生成类面板相关契约与测试。

更新生成类面板 Lovart 改造文档和项目决策记录。
2026-06-19 12:15:57 +08:00
JenkenB ea29887d9c 完善快速编辑参考图与生成占位
- 快速编辑支持最多8张额外参考图,并将原图自动作为最后一张参考图提交

- 快速编辑尺寸和模型沿用原图配置,按禁用态参数胶囊展示

- 快速编辑提交前同步改写原图引用为实际图序号

- 快速编辑生成改为创建独立画布生成占位,并支持键盘删除生成中对象

- 对齐生成类面板参考图图标、规范类固定参数和相关文档测试
2026-06-18 22:50:42 +08:00
JenkenB 9c7b3ad16d Image editor: Seedance2.0 refs and audio changes
Adds Seedance 2.0 reference-media constraints and forbids video data URLs; updates docs/decision-log and pitfalls to record the new rules. Introduces typed audio params (type: one-shot|loop, tempo: number|null), generator-specific placeholder styles/avoidance and UI changes for generation panels. Implements related front-end changes (new crop/ raster edit components, many image-editor models, tests and workflow hooks) and server-side contract/handler updates across api-server, shared-contracts, platform-audio, platform-image and vector_engine_audio_generation to support the new submission/asset flow and validations.
2026-06-18 17:31:35 +08:00
JenkenB 6f1ae6caef 固定生成规范参数并支持删除生成中占位
生成规范类图片固定提交 16:9、2K 和 gpt-image-2,并在面板底部只读展示。

生成中占位支持通过 Delete 或 Backspace 删除,不新增可见删除按钮。

异步生成回写前按生成对象 ID 校验,避免已删除占位重新落回画布。

更新编辑器生成面板与图片画布技术文档及相关测试。
2026-06-18 16:53:59 +08:00
JenkenB 7b277480f0 Save generator snapshots in canvas layout
Persist generation-dialog snapshots into the canvas layout and restore them on load. Added serialization/hydration helpers and layout splitting in ImageCanvasEditorModel to store/load generation dialogs alongside layers; updated view and hooks to restore dialogs and keep composer state after refresh. Hide generation placeholders when a generated result layer exists, and persist generated images into the account-level asset library (createEditorAsset) for non-video results. Updated workflows and surfaces to invoke the new persist flow, added tests covering restore, placeholder hiding and asset creation, and updated docs/decision log to reflect the new behavior.
2026-06-18 11:57:28 +08:00
JenkenB 8956ed6fe6 Unify canvas generation placement and UI changes
Add unified placement and UI updates for canvas generation: docs require ImageCanvasGenerationPlacementModel to compute placeholder positions (avoid overlaps, center viewport on placement) and limit frontend video model entries. Refactor UI components and tests: expose div props on PlatformFloatingMenu, make PlatformInlineOptionButton forwardRef, replace inline placeholder actions with ImageCanvasGenerationImageOptionsView in basic generation composer, enhance character animation panel with parameter menu portal and option choices, add reference chip UI, and update many tests to match new interactions and labels. These changes align generation workflows, accessibility labels, and positioning behavior across editor panels.
2026-06-18 11:40:19 +08:00
kdletters 946308b75e 保存图片画布生成器快照
将生成器对话框作为画布布局项序列化和恢复

生成成功后保留生成器快照并锚定到成品图层

图片类生成结果同步写入账号素材库

补充生成器持久化测试和浏览器回归相关文档
2026-06-17 23:57:25 +08:00
kdletters 6d964937db 完善画布生成面板交互
补齐普通生图参考图来源菜单和画布选择流程

接入UI设计图与视频生成面板的提交链路

让生成引用上传目标支持多种生成面板

统一图片信息弹窗断言并补充相关测试

修复图标按钮浮层锚点ref与视频生成类型契约
2026-06-17 21:49:32 +08:00
JenkenB b2fd5574db 接入画板生成视频功能
新增画板底部生成视频入口、Lovart 风格面板、视频图层渲染与元数据展示。

接入 /api/editor/videos/generations 契约与后端 Ark/VectorEngine 视频任务链路。

统一编辑器生成类泥点配置,并补充 UI 设计图、参考图与生成面板结构测试。

更新编辑器技术方案、生成类面板方案和 Hermes 共享决策/踩坑记录。
2026-06-17 20:52:45 +08:00
JenkenB 05a47816b0 支持规范参考图输入
为角色形象规范、UI素材规范、自定义规范面板新增参考图上传入口。

生成规范时携带参考图并自动追加参考图生成规范语义。

补充生成流程和上传流程回归测试。

更新画板角色形象生成入口设计文档。
2026-06-17 14:20:23 +08:00
kdletters e07002c1dc 拆分图片画布生成工作流
新增 useImageCanvasGenerationWorkflow 承接生成入口、提交和结果落图

主视图改为通过生成工作流 hook 处理生成态清理和工具入口

补充生成工作流单测、拆分文档和 TRACKING 浏览器回归记录
2026-06-17 08:11:51 +08:00