Commit Graph

582 Commits

Author SHA1 Message Date
JenkenB dfd567fe2c Add Agent execution guidelines & trim AGENTS.md
Introduce a new detailed Agent handbook (docs/【协作规范】Agent工作入口与执行准则-2026-06-22.md) and refactor AGENTS.md to be an entry-only navigation page. Update documentation cross-references (docs/README.md, project-memory README, document-map, team-conventions, development-workflow, decision-log and project-overview) to point to the new file and clarify reading/order rules, submission/validation constraints, and SpacetimeDB/back-end wording. Also adjust image canvas generation placement rules in the frontend doc and apply related changes to image-editor hooks/tests (src/components/image-editor/*). Purpose: separate high-level entry rules from complex execution details to reduce startup cost for complex tasks and centralize execution practices in a single guideline document.
2026-06-22 21:44:07 +08:00
JenkenB 75e1ac93db Refactor UI asset extraction overlay and handlers
Remove explicit cancel callback and centralize dismissal: clicking the canvas now dismisses active UI extraction (handled in ImageCanvasEditorView) instead of relying on an onCancel prop. Simplify ImageCanvasStageView and ImageCanvasUiAssetExtractionOverlayView APIs by removing onCancel and related UI. Improve preview bounds and rendering: add normalization to mark bounds, clamp to source dimensions, and render crop previews using an absolutely-positioned <img> for accurate, coordinate-based previews. Update styles for toolbar active states and preview image layout, and reduce SVG stroke width. Update tests and docs to reflect new behaviors and UI wording (tool highlight, accurate crop preview, and dismissal behavior).
2026-06-22 21:37:39 +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 25421140bf 优化画布泥点入口
让画布顶部泥点余额按钮复用创作页充值和兑换码入口

抽取账户充值支付结果与确认弹窗组件供创作页和画布页共用

补充画布泥点入口回归测试和编辑器技术文档
2026-06-22 21:08:33 +08:00
wuxiangwanzi 7fe4a10d19 优化画布顶部栏布局
收窄画布顶部栏高度和按钮间距

移除未命名画布下方的画布副标题

将画布标题和重命名入口贴近返回按钮

在顶部栏右端展示当前泥点余额

补充画布顶部栏测试和技术方案说明
2026-06-22 21:04:43 +08:00
kdletters 1176c71f72 角色动作素材改为序列帧
将角色动作结果图层主类型改为 image-sequence,并持久化完整帧列表与预览视频来源

在画布中增加序列帧播放器,展示透明 PNG 帧而不是预览视频

将角色动作单素材下载和画布素材导出改为序列帧 ZIP/frames 目录

更新角色动作、导出方案和项目记忆文档,补齐相关前端测试
2026-06-22 20:49:51 +08:00
wuxiangwanzi d9cd2edf92 改造时隐藏系统提示词
改造和重绘面板只从用户可见输入快照恢复提示词。

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

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

更新图片画布编辑器文档中的系统提示词隐藏规则。
2026-06-22 20:13:23 +08:00
JenkenB e91a46a419 Merge branch 'codex/editor-asset-library' of https://git.genarrative.world/git/GenarrativeAI/Genarrative into codex/editor-asset-library 2026-06-22 19:18:31 +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
kdletters 820e179be5 新增画布快捷键弹窗
添加画布右上角快捷键入口和独立弹窗

补齐 Windows 画布快捷键与选中图层命令

更新快捷键单测和画布文档
2026-06-22 17:58:00 +08:00
wuxiangwanzi 8b18a654eb 增加画布元素吸附功能
新增画布元素边缘、中心线与等距吸附计算。

接入图层与生成占位拖拽吸附,并保持多选队形同步偏移。

补充画布吸附模型和交互测试。

更新图片画布编辑器方案文档中的吸附验收口径。
2026-06-22 17:22:25 +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 0c78a6dc21 Merge branch 'codex/editor-asset-library' of https://git.genarrative.world/git/GenarrativeAI/Genarrative into codex/editor-asset-library 2026-06-22 13:52:43 +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 fc49ba2a61 后端写入画布生成完成态
后端在图片生成完成后直接写入画布布局和生成器状态

前端提交canvasCompletion并只应用后端项目快照刷新显示

移除项目加载时根据资源行推断生成完成态的路径

更新OpenAPI、图片画布文档和共享排障记忆
2026-06-21 22:30:03 +08:00
kdletters 928aecdcb1 扩展画布生成视频参数
生成视频面板支持多比例、4到15秒时长滑杆和静音开关
生成视频清晰度增加1080p并限制Fast模型不可选
生成视频请求默认携带联网搜索标记但不在前端展示
后端校验视频比例、时长、清晰度和声音参数并映射音频生成
更新编辑器视频参数文档和项目决策记录
2026-06-21 20:16:22 +08:00
kdletters de9eaef28f 改为行引用保存画布参考图元数据
生成输入参考图只保存 refType/refId 行引用
生成器布局快照只保存参考图行指针并在加载时恢复临时源
上传参考图优先创建项目资源行并回写 resourceId
元数据弹窗改为展示参考图行引用信息
更新图片画布技术文档和项目决策记录
2026-06-21 17:27:23 +08:00
kdletters 29d9c9ff5b 支持画布多选生成器
新增画布生成器选择 ID 模型,支持图层与生成器混合选择
补齐框选、Shift 点选、拖拽和删除对生成器占位的批量操作
修复音频控件焦点删除和手动素材标签资源持久化
更新图片画布编辑器多选语义文档
2026-06-21 15:59:34 +08:00
kdletters 10dcc2b403 修复图片画布素材与宣发尺寸问题
修复画布上传素材持久化回填和项目重进资源元数据恢复

修复图片、音频、视频图层的私有资源换签与视频裸路径回退

修复宣发素材切换模型后卡片尺寸变成1024x1024的问题

修复音视频预览、媒体导出格式、音频默认提示词和前端去背边界

修复角色动作生成在编辑器路径缺少ffprobe时的已知时长兜底

补充图片画布、资源换签、宣发尺寸、媒体导出和chromaKey回归测试

更新图片画布编辑器技术文档
2026-06-19 23:16:59 +08:00
kdletters 98545d74d1 修复画布底部上传入画布尺寸
底部工具栏上传图片后直接创建画布图层

上传图片在创建素材和图层前读取原始分辨率

补充上传尺寸解析与素材库集成回归测试

同步图片画布上传语义文档和共享决策记录
2026-06-19 17:36:20 +08:00
kdletters 05758775e8 角色重绘复用角色提示词限定
角色图层重绘提交为角色生成类型
补充角色重绘请求契约测试
更新图片画布重绘链路文档
2026-06-19 17:24:00 +08:00
kdletters aa67e72ec5 修复宣发素材生成器刷新恢复
恢复画布布局中的 publication 生成器快照

补齐宣发素材卡片类型、游戏信息和参考图 hydrate

增加模型、面板和编辑器加载链路回归测试

更新图片画布持久化文档和共享踩坑记录
2026-06-19 17:23:34 +08:00
kdletters f615fcd770 合并 master 到图片画布素材分支
保留图片画布素材元数据迁移记录

合入 Pingora 网关与生产运维更新

解决外部生成 worker 测试夹具时间戳冲突
2026-06-19 17:01:31 +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 e644d7c99f 后端保存画布生成素材
生成接口接收项目与素材上下文并返回 resource/asset 快照

画布前端使用后端回包落层并避免重复创建资源和素材

补充生成元数据保存边界的测试与文档
2026-06-19 16:30:56 +08:00
kdletters 76445da9b4 迁移画布素材生成元数据
扩展 editor_project_resource 和 editor_asset 保存素材类别与生成输入快照

调整前端资源与素材读写链路并停止把素材元数据写入新 layout

在服务端保存 layout 时回填并清洗旧图层元数据

更新图片画布契约文档、共享决策和相关测试期望
2026-06-19 15:11:32 +08:00
JenkenB cc3346758c 修复若干bug 2026-06-19 14:18:56 +08:00
JenkenB 097170836d Add UI-design asset extraction & spritesheet support
Introduce a new UI design asset extraction flow: add POST /api/editor/ui-designs/assets/extractions handler that always uses gpt-image-2 with the fixed prompt "提取画面中的所有独立并整理成spritesheet"; parse Data URL references, call OpenAI image edits, return a spritesheet and sliced icon assets. Increase request body limit for image Data URLs and wire the route with bearer auth. Add platform-image slicing: slice_generated_icon_spritesheet_all_by_connected_components (with auto-naming "素材 1..N", foreground estimation and heuristics) and export it. Add Rust tests for the handler, prompt constant, and slicing behavior. Update frontend client and integration tests to call the new extractEditorUiDesignAssets API and verify spritesheet + icon layers are added to the canvas and persisted. Update multiple docs to describe the extraction UI, toolbar placement, and related audio/playback pitfalls. Minor related updates: toolbar button ordering and audio duration / signed read-url notes.
2026-06-19 10:09:19 +08:00
JenkenB ea29887d9c 完善快速编辑参考图与生成占位
- 快速编辑支持最多8张额外参考图,并将原图自动作为最后一张参考图提交

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

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

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

- 对齐生成类面板参考图图标、规范类固定参数和相关文档测试
2026-06-18 22:50:42 +08:00
kdletters e3258f6f1d 完善 Pingora 直连切换门禁
新增 Pingora shadow env 回切脚本与对应检查。

补齐直连证据包时间线和 cutoverRunId 审计门禁。

支持 Gitea Host 透传并更新直连多域名文档。

修复百分号编码静态图标路径并补 smoke 覆盖。

更新生产发布与运维护栏对 Pingora 发布包的校验。
2026-06-18 21:10:45 +08:00
JenkenB b04b6cee2b 修复画板生成面板与音乐音效链路
统一画板生成类面板的参数选项、热区交互、底部按钮和输入框布局。

新增并完善画板生成音乐入口、音效和背景音乐面板以及音频生成提交流程。

按 VectorEngine Suno 音效文档调整音效请求体、任务 ID 解析、轮询和音频地址解析。

补充 Seedance 视频生成版权限制报错的中文提示。

更新编辑器相关技术文档和回归测试。
2026-06-18 20:24:52 +08:00
JenkenB eb855644d5 对齐规范固定参数禁用态样式
生成规范固定参数复用可编辑面板参数胶囊按钮样式。

固定比例尺寸和模型按钮保持禁用不可点击且不弹出选项。

补充面板测试覆盖禁用态和不可展开行为。

更新编辑器 Lovart 面板与图片画布技术文档。
2026-06-18 18:51:53 +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
kdletters 3c1fd004a7 记录 Pingora 直连窗口准备
补充 dev final-prep 审计结果

记录 direct env 候选与 dry-run runbook

明确 active env 提升前不得执行公网切换
2026-06-18 15:47:53 +08:00
kdletters 7fa1c6d791 记录 Pingora 高端口直连演练
补充 dev 高端口直连真实演练结果

记录临时 systemd 演练与 env source 踩坑

确认公网入口仍由 Nginx 承接
2026-06-18 15:42:38 +08:00
JenkenB ac180ecad9 完善画板生成音乐与生成面板交互
新增画板底部生成音乐入口,支持游戏音效和游戏背景音乐生成面板。

接入编辑器音频生成前后端契约、VectorEngine 请求与 BFF 路由。

补齐音频结果图层、元数据、画布恢复和客户端提交流程。

统一生成类面板 Lovart 式参数浮层、参考素材入口与相关测试。

更新编辑器音乐生成设计文档和项目长期记忆。
2026-06-18 15:42:17 +08:00
kdletters e79cc5bd09 纳入 Pingora realpath canary 启停门禁
将 realpath canary 启停烟测纳入 Pingora release readiness 默认门禁

补齐 readiness plan 对 realpath canary toggle 的自检

修正生产健康巡检测试夹具的 worker 实例模拟

同步 Pingora realpath canary 运维文档和项目共享记忆
2026-06-18 15:07:43 +08:00
kdletters 0cc2a79c7b 自动拉起 Pingora shadow 发布服务
让 API deploy 在发布包包含 Pingora 时先校验 shadow systemd 和 env 安全边界

在 shadow 配置安全时自动启动或重启 genarrative-pingora-gateway.service

拒绝 direct-entry capability、公网监听 env,并在 current 切换前失败

补充 production-api-deploy 动态烟测、生产运维护栏和 Pingora 运维文档

在 dev 服务器真实验证 shadow inactive 场景可由发布脚本自动拉起
2026-06-18 14:53:03 +08:00
JenkenB 38cbb85d48 严格区分Seedance视频模型
将画板生成视频默认模型调整为 seedance2.0-fast

为 seedance2.0 与 seedance2.0-fast 分别映射独立上游模型

固定角色动画使用 seedance2.0-fast 并更新前后端契约测试

同步更新编辑器生成面板和项目记忆文档
2026-06-18 14:40:39 +08:00
kdletters 10e559701f 补齐 Pingora runtime-only 彩排门禁
将 current release runtime-only 基础门禁接入直连彩排状态复核

保留 /opt/genarrative/current 调用路径,避免 symlink 展开导致 systemd ExecStart 自审误判

补充 release readiness plan 自测和 Pingora 运维文档

在 dev 服务器真实验证 runtime-only 门禁、Nginx 公网边界、Pingora shadow 和 realpath canary
2026-06-18 14:33:54 +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 4bca480f3c 补齐 Pingora 直连彩排状态
新增 Pingora 直连彩排状态脚本,核验 health patrol、端口归属、systemd、realpath canary 和 current release 自审

将彩排状态脚本纳入 API release 构建、部署、Jenkins 归档和生产运维护栏

补充 release readiness、current release audit、cutover snapshot 与发布部署检查对彩排脚本的覆盖

更新 Pingora 运维文档和共享记忆,记录 dev health patrol 真实配置漂移与修复方式

在 dev 服务器真实部署验证 Nginx 仍接 80/443、Pingora shadow 与 realpath canary 高端口正常、health patrol 和彩排状态均为 OK
2026-06-18 00:31:42 +08:00
kdletters 946308b75e 保存图片画布生成器快照
将生成器对话框作为画布布局项序列化和恢复

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

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

补充生成器持久化测试和浏览器回归相关文档
2026-06-17 23:57:25 +08:00
kdletters 123d4ada01 脚本化 Pingora realpath canary 启停
新增 realpath canary 启用和关闭脚本

将脚本纳入 release、deploy、Jenkins 和 current release 自审

补充脚本化 canary 文档和生产运维护栏

增加 realpath canary 启停自测和发布部署护栏
2026-06-17 23:45:58 +08:00
kdletters 93f085f95c 记录 Pingora realpath canary 加载顺序
补充 realpath canary 在 conf.d 中必须晚于 log_format 加载

记录 dev realpath canary current release 真实验收结果

新增生产运维护栏防止加载顺序说明丢失
2026-06-17 23:21:56 +08:00
kdletters 75b85ee5a9 修正 Pingora 高端口重定向验收
direct live 支持独立 redirect base URL 预期

release readiness 和切换证据链透传 redirect base URL

直连启用脚本透传高端口 rehearsal 参数

补充 direct live guard、运维门禁和文档示例
2026-06-17 23:00:28 +08:00
kdletters 057522fc2e 补齐 Pingora TLS 证书同步
新增 Pingora TLS 证书同步脚本,默认 dry-run,apply 时原子复制证书到私有目录并复核服务用户可读。

将证书同步脚本纳入 API release 构建、部署复制和 current release 自审清单。

补充发布包、deploy、自审和脚本自身门禁,覆盖缺失脚本、symlink 目标与权限边界。

更新 Pingora env 示例、运维文档和项目踩坑记录,明确不要放宽 Let’s Encrypt 原路径权限。
2026-06-17 22:40:05 +08:00