Commit Graph
566 Commits
Author SHA1 Message Date
liquidliang 155ec00987 chore: enhance CDN response validation and update version to 0.5.25 2026-01-20 13:20:52 +08:00
liquidliang 8bd7f30c19 chore: bump version to 0.5.25 2026-01-20 13:11:17 +08:00
liquidliang 51b5f3f99b chore: bump version to 0.5.17 and update build time in version.json 2026-01-20 12:13:55 +08:00
liquidliang c64e4a7342 feat(media-library): 优化素材库 UI 交互、缩放缓存、Grid 布局及空间效率 2026-01-20 12:01:46 +08:00
liquidliang dcabd75e69 docs(claude): 添加 React 事件委托、筛选逻辑、Grid 布局及 UI 高度统一规则 2026-01-20 12:00:41 +08:00
liquid ef30e2e0a5 chore: bump version to 0.5.16 2026-01-20 09:27:15 +08:00
liquid c126ed5ea2 chore: bump version to 0.5.15 2026-01-20 09:07:22 +08:00
liquidliang 31f684fd86 refactor(sw-debug): reorganize cache statistics panel and enhance LLM API log entry styles
- Moved the cache statistics panel to a new position for better layout consistency.
- Updated LLM API log entry styles for improved readability and consistency with Fetch logs.
- Added functionality for copying URLs from log entries and improved error handling for image loading.
- Enhanced metadata handling for cached media, including timestamp extraction and validation.
2026-01-19 20:47:46 +08:00
liquidliang de1329701d feat(sw): implement CORS domain handling and cache validation
- Added functionality to mark domains with CORS issues, allowing the Service Worker to skip these domains in future requests.
- Introduced a mechanism to check for expired CORS failures, enabling retries after a specified TTL.
- Enhanced debug status reporting to include counts and lists of CORS failed domains.
- Updated image request handling to manage CORS errors more effectively, including support for opaque responses.
- Improved asset loading logic to prioritize Cache Storage and ensure only valid assets are processed.
2026-01-19 20:09:34 +08:00
liquidliang 310b7d02f7 docs(claude): 添加缓存策略和数据一致性规则
- 更新素材库数据来源说明,增加 Cache Storage 作为第三数据源
- 添加缓存策略区分表格(AI生成 vs 本地图片)
- 新增规则:批量加载与单个加载方法必须保持逻辑一致
- 新增规则:IndexedDB 元数据必须验证 Cache Storage 实际数据
- 新增规则:本地缓存图片只存 Cache Storage,不存 IndexedDB
2026-01-19 19:46:26 +08:00
liquidliang d402148378 docs(claude): 添加 UI 重构信息完整性和日志保留优先级规则 2026-01-19 15:15:39 +08:00
liquidliang 8e8738ca65 feat(prompt-history): enhance prompt history management with preset prompts
- Integrated preset prompts into the history management system, allowing users to see both historical and preset suggestions.
- Implemented deduplication logic to prevent duplicate entries between history and preset prompts.
- Updated UI components to visually distinguish preset prompts and added functionality to prevent deletion and pinning of preset items.
- Enhanced the prompt button to display source labels for different prompt origins (AI input, image, video, preset).
2026-01-19 10:50:50 +08:00
liquid c4c7e3dc66 添加更多版本 2026-01-18 22:25:26 +08:00
liquid bfb7ed5626 fix(memory): 修复 workflows Map 和 setInterval 内存泄漏
1. workflow-submission-service.ts 和 sw-workflow-client.ts:
   - 为 workflows Map 添加定时清理机制
   - 工作流完成/失败后 5 分钟自动清理

2. duplex-communication 服务:
   - RequestManager: 保存 cleanupTimerId,添加 destroy 方法
   - DuplexClient: 保存 performanceMonitoringTimerId,添加 destroy 方法
   - DuplexServer: 保存两个定时器 ID,添加 destroy 方法
   - MigrationManager: 保存 performanceMonitoringTimerId,添加 destroy 方法
2026-01-18 21:14:08 +08:00
liquid 19f54ec9bc feat(sw-debug): add memory monitoring and crash logging features
- Introduced a memory monitoring panel displaying JS heap usage, total size, limit, and usage percentage.
- Added functionality to log crash snapshots, including types (startup, periodic, error, beforeunload) and memory stats.
- Implemented UI elements for viewing, filtering, refreshing, and exporting crash logs.
- Enhanced service worker to handle crash snapshot storage and retrieval.
- Updated styles for crash log entries and memory monitoring display.
- Integrated memory tracking in various components to prevent memory leaks.
2026-01-18 13:45:30 +08:00
liquid de86f2a2b5 优化渐变 2026-01-18 09:37:10 +08:00
liquid 42c8c1d32f Merge branch '72-fill' into develop 2026-01-17 23:41:52 +08:00
liquid 946f46d72a Merge remote-tracking branch 'origin/72-fill' into develop 2026-01-17 23:37:26 +08:00
liquid 5bfcb9ee2d feat: 调整4k配置 2026-01-17 23:26:37 +08:00
liquid 160170b93e refactor(fill-panel): enhance fill panel functionality and styles
- Updated FillPanel to trigger fill type changes only on user actions for solid, gradient, and image fills.
- Refactored GradientFillPanel to utilize the new GradientEditor component, simplifying the code and improving maintainability.
- Enhanced ImageFillPanel with throttled updates for smoother user interactions and added input fields for precise control over scale, offset, and rotation values.
- Improved styles in image-fill-panel.scss for better layout and usability.

These changes collectively enhance the user experience and maintainability of the fill panel components.
2026-01-17 23:23:23 +08:00
liquid 12576ee4e3 feat(debug-panel): add debug panel and logging enhancements
- Introduced a new Debug Panel in the toolbar for accessing debug logs.
- Updated version to 0.5.7 in package.json and version.json.
- Enhanced service worker caching logic to improve reliability.
- Removed the Clean Missing Assets feature from the toolbar.
- Updated translations and added a new debug log icon.
2026-01-17 21:34:16 +08:00
liquid b1f58f5822 refactor(ai-input-bar, project-drawer): remove debug logs and add cleanup effect
- Removed debug logging from the handleGenerate function in AIInputBar to streamline the code and improve performance.
- Added a cleanup effect in ProjectDrawer to clear the click timer on component unmount, preventing potential memory leaks.
2026-01-17 20:28:57 +08:00
liquid d76a0e9e34 feat(service-worker): enhance postMessage logging and workflow recovery
- Implemented a debug mode for postMessage logging, allowing logs to be controlled based on the debug state, improving performance when debugging is disabled.
- Added functionality to recover workflows and tool requests after page refreshes, ensuring continuity in user experience.
- Introduced new message types for cached chat results and improved handling of chat workflows.
- Updated various components to utilize the new logging and recovery features, enhancing overall robustness and user feedback.
- Bumped version to 0.5.6 in relevant files.
2026-01-17 20:27:20 +08:00
liquid d7a30ea0cd feat(minimap): add touch support for mobile interactions
- Implemented touch event handlers to enhance user experience on mobile devices.
- Added functionality to show and update preview on touch start and move, regardless of dragging state.
- Introduced a delay for hiding the preview after touch end to improve visibility of final position.
2026-01-17 10:03:46 +08:00
liquid bbcd896584 style(ai-input-bar, version-update-prompt): enhance responsiveness and positioning for mobile devices
- Adjusted the positioning of the ai-input-bar to account for the left toolbar width, ensuring it remains centered in the available space.
- Updated the version-update-prompt styles for better alignment and spacing on mobile, preventing overlap with zoom controls and improving overall layout.
2026-01-17 09:59:05 +08:00
liquid dcfd46a76c refactor(storage): enhance database version handling and integrity checks
- Updated IndexedDB handling to dynamically detect the current database version and ensure it meets minimum requirements.
- Added functions to check for the existence of required object stores and repair the database if necessary.
- Refactored workspace storage service to utilize dynamic version detection for store creation.
- Removed unnecessary debug logs from multi-selection handles component for cleaner code.
2026-01-17 09:36:58 +08:00
liquid 40329f90bd Merge branch 'origin/feat/project-drawer-rename' - Resolve autoEditBoardId conflict 2026-01-17 08:48:08 +08:00
liquid eb8da7e728 fix(service-worker): improve version update handling and error response caching
- Updated service worker to check for old caches to determine if a new version is available.
- Enhanced error handling by attempting to serve cached responses for failed network requests.
- Adjusted the version update prompt styling for better responsiveness and visibility.
- Changed the service worker's behavior to reload the page directly if no waiting worker is found, ensuring users get the latest resources immediately.
2026-01-17 08:40:07 +08:00
liquid f51f914620 docs(claude): 添加工具函数使用和滑块更新策略规则
- 添加"优先使用项目已有的工具函数"规则,避免重复实现 debounce/throttle
- 添加"滑块等连续输入控件的更新策略"规则,内部状态立即更新 + 外部回调节流
2026-01-16 23:01:44 +08:00
liquid e2b4a842ee chore(release): update version to 0.5.2 and enhance fill panel styles
- Updated app version in index.html to 0.5.2.
- Modified version.json to reflect the new build time and version.
- Improved fill panel styles in Drawnix, including adjustments to dimensions, padding, and border radius for a more compact design.
- Added functionality to synchronize external value changes in the ImageFillPanel component.
- Enhanced gradient and image fill handling across various components to improve rendering and user experience.

These changes contribute to a more polished and user-friendly interface.
2026-01-16 22:43:43 +08:00
liquidliang 206af04b67 feat(drawnix): enhance fill options with gradient and image support
- Added support for gradient and image fills in the drawing tools.
- Updated PopupFillButton to handle different fill types, including solid, gradient, and image.
- Introduced new functions for setting gradient and image fills in property transforms.
- Enhanced the popover component to manage fill properties more effectively.

These changes significantly improve the flexibility of fill options available to users, allowing for more creative designs.
2026-01-16 18:20:56 +08:00
liquidliang 77391d8ba3 去掉重试逻辑 2026-01-16 17:58:33 +08:00
ljquan aeb8a39e43 Merge pull request #69 from ljquan/backup
Backup
2026-01-16 15:42:46 +08:00
liquidliangandClaude 8181a3f572 fix(backup): 修复备份恢复服务的 TypeScript 类型错误
- 导入 PlaitTheme 和 CorePlaitElement 类型
- 修改 DrawnixFileData.theme 类型从 string 改为 PlaitTheme
- 添加 ensureElementIds 函数确保导入的元素都有 id
- 修复 elements 赋值时的类型兼容性问题

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2026-01-16 15:41:54 +08:00
liquidliang 00df2f7e84 docs(claude): 添加新规则 - 生产代码禁止保留调试日志 2026-01-16 15:38:30 +08:00
liquidliang 85271a247d feat(drawnix): add multi-selection resize functionality and new stroke styles
- Introduced a new `withMultiResize` plugin to enable unified resizing of multiple selected elements, supporting Freehand and PenPath types.
- Added `MultiSelectionHandles` component for visual control points during multi-selection resizing.
- Enhanced stroke styles in the toolbar, including a new double stroke style for Freehand elements.
- Updated various components and styles to accommodate the new resizing features and improve user experience.

These changes significantly enhance the drawing capabilities, allowing for more flexible and efficient editing of multiple elements simultaneously.
2026-01-16 15:30:50 +08:00
liquidliang e8b1f31b82 feat(viewport): implement viewport saving and restoration functionality
- Added viewport saving with debounce to prevent excessive saves during panning and zooming.
- Implemented viewport restoration on component mount and visibility change.
- Enhanced WorkspaceService to support waiting for initialization before proceeding with operations.
- Updated Wrapper component to handle viewport changes and apply them accordingly.

This improves user experience by ensuring viewport state is preserved across sessions and interactions.
2026-01-16 14:30:13 +08:00
liquidliang 8c4c0b34ea Merge branch '64-shap' into develop 2026-01-16 12:35:01 +08:00
liquidliang 52bf30f9d0 fix(toolbar): improve key assignment and stroke width calculation
- Updated key assignment in FreehandPanel to include row index for uniqueness.
- Refactored stroke width calculation in PopupToolbar to handle both PenPath and Freehand elements more efficiently, ensuring consistent stroke width detection.

These changes enhance the stability and accuracy of the toolbar's drawing features.
2026-01-16 12:34:06 +08:00
liquidliang 05b9a4d9c3 feat(toolbar): add corner radius feature and enhance pen settings
- Introduced a new corner radius button in the popup toolbar for PenPath elements.
- Updated the PenPath component to support corner radius adjustments.
- Enhanced the pen settings to include corner radius as a configurable property.
- Improved the stroke width settings in the toolbar for better user experience.
- Updated translations for new toolbar features.

This commit enhances the drawing capabilities by allowing users to set corner radii on paths, improving the overall design flexibility.
2026-01-16 12:34:00 +08:00
liquidliangandClaude e1785a8fe1 refactor(task-queue): 移除重复提交检测并优化存储性能
根据项目规范,重复提交检测应由 UI 层(按钮防抖/禁用)处理,而非后端层。
此变更移除了 SW 和客户端中的 fingerprint/lock 机制,简化任务提交流程。

主要改动:
- 删除 fingerprint.ts 和 lock.ts 工具模块
- 移除 SW/client 中的重复提交检测逻辑
- 添加 requestIdleCallback 延迟初始化,减少页面加载阻塞
- IndexedDB 批量保存优化,减少事务开销
- 修复 SW 初始化时序:等待存储恢复完成后再处理任务
- 移除未使用的 maxConcurrent 配置

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2026-01-15 20:55:33 +08:00
liquidliangandClaude ec60835ebf feat(auth): 当 API 返回 401 错误时自动打开设置对话框
当 API 返回 401 认证错误(Invalid Token)时,自动弹出设置对话框
让用户重新配置 API Key,同时显示错误提示信息。

- 新增 api-auth-error-event.ts 定义事件常量和工具函数
- apiCalls.ts 检测 401 错误并触发事件
- workflow-submission-service.ts 检测工作流失败的 401 错误
- drawnix.tsx 监听事件并打开设置对话框 + 显示 MessagePlugin 错误提示

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2026-01-15 20:50:49 +08:00
liquidliangandClaude 4ba9774142 refactor(api): 移除 API 重试逻辑简化错误处理
移除所有 API 调用中的重试机制,让用户在失败时手动决定是否重试:
- 移除 fetchWithRetry 函数和相关重试配置
- 移除 GeminiConfig 中的 maxRetries 和 retryDelay 参数
- 移除 VideoAPIService 和 CharacterAPIService 中的网络重试逻辑
- 移除 downloadFile 函数的重试参数
- 将任务队列的 maxRetries 设置为 0(不自动重试)
- 增加 HTTP 请求超时时间(图片 20 分钟,视频 30 分钟)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2026-01-15 19:51:13 +08:00
liquidliang 2a66799f1d 优化画笔 2026-01-15 13:22:46 +08:00
liquidliangandClaude 3077f76acd feat(toolbar): 优化工具栏交互体验
- QuickCreationToolbar 支持 hover 300ms 延迟展开子工具
- 将形状工具移至默认显示(位于画笔下方)
- 优化 AutoCompleteShapePicker 状态管理,修复选中渲染问题

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2026-01-15 11:40:39 +08:00
liquidliangandClaude Opus 4.5 ebe979fe58 docs(claude): 添加新规则 - Hover 延迟操作计时器清理
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-15 11:28:10 +08:00
liquidliang 82f9d7aab5 docs(claude): 添加新规则 - 元组类型 vs 数组类型 2026-01-15 10:20:40 +08:00
liquid ceff394bef 优化形状 2026-01-15 09:13:27 +08:00
liquidandClaude cb2fcaca68 feat(data): 支持保存文件时嵌入媒体数据
在保存 .drawnix 文件时,自动将虚拟 URL(/__aitu_cache__/ 和 /asset-library/)
对应的媒体数据以 Base64 格式嵌入到文件中。打开文件时自动恢复嵌入的媒体到缓存,
确保文件在其他设备上也能正常显示图片和视频。

- 新增 EmbeddedMediaItem 类型定义
- 添加 serializeAsJSONAsync 函数提取并嵌入媒体
- 添加 restoreEmbeddedMedia 函数恢复媒体到缓存

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2026-01-15 08:40:58 +08:00
liquid 378a5128c3 docs(claude): 添加新规则 - 对象字面量只能指定已知属性 2026-01-15 08:40:10 +08:00