Commit Graph
1051 Commits
Author SHA1 Message Date
liquid f13f809a3f docs: 添加编码规则 - SW 初始化统一入口
- CLAUDE.md: 添加第 23 条规则 - 使用 swChannelClient.ensureReady() 作为统一入口
- CODING_RULES.md: 添加详细规则和示例代码
2026-02-05 09:08:53 +08:00
liquid e6a39db673 docs: 添加编码规则 - 模块循环依赖处理
新增规则说明如何避免和解决 ES 模块循环依赖导致的 TDZ 错误:
- 将共享函数提取到独立的隔离模块
- 使用服务注册表和 Proxy 延迟服务访问
- 单例构造函数中使用 queueMicrotask 延迟
2026-02-05 09:04:43 +08:00
liquid e0f459a63d docs: 添加降级模式任务执行规则
- 合并 CLAUDE.md 规则 13 和 20(主线程直接读取 IndexedDB)
- 新增规则 15:降级模式下 createTask 后必须自动触发 executeTask
- CODING_RULES.md 添加详细示例和说明
- task-queue-service.ts: 添加 executeTask 方法,创建/重试任务后自动执行
- task-storage-writer.ts: 添加 deleteTask 方法
2026-02-05 08:24:36 +08:00
liquid 4757a0d4bf feat: enhance video handling and task queue management
- Improved video blob retrieval by adding network fallback if not found in cache.
- Updated service worker to allow GitHub API requests to bypass caching for better performance.
- Enhanced task queue management by allowing tasks in the SUBMITTING phase to be retried without marking them as failed.
- Introduced a transparent placeholder response for missing video thumbnails to prevent playback issues.
- Added detailed logging for task retries and execution phases to aid in debugging.
2026-02-04 23:35:34 +08:00
liquidliang 1dc71a993f feat: add master badge and enhance Gist handling
- Introduced a new badge for identifying the master Gist in the SyncSettings component.
- Removed unused functions related to switching and creating Gists to streamline the code.
- Updated the GitHubSyncContext to include a flag for identifying master Gists.
- Enhanced the GitHub API service to prioritize master Gists during sync operations.
- Improved logging for better debugging and tracking of sync processes.
2026-02-04 14:53:55 +08:00
liquidliang 4376be0cac feat: implement failed URL caching for external image requests
- Added a caching mechanism to store failed external image URLs for 5 minutes to avoid repeated requests for known 404 errors.
- Introduced functions to check if a URL is likely expired and to mark URLs as failed based on their response status.
- Enhanced the fetch event listener to skip requests for recently failed URLs, improving performance and reducing unnecessary network traffic.
2026-02-04 14:30:10 +08:00
liquidliang 9847d773ca chore: bump version to 0.5.70 2026-02-04 14:27:36 +08:00
liquidliang 036cce5291 chore: update build time and refactor imports for consistency
- Updated build time in version.json to reflect recent changes.
- Refactored imports in various components to utilize @aitu/utils for consistency and improved maintainability.
- Removed unnecessary console logs and debug statements across multiple files to clean up the codebase.
2026-02-04 14:27:27 +08:00
liquidliang 066eb12d12 refactor: 清理调试日志和未使用代码
- 移除 workflow-engine、workflow-polling-service、workflow-submission-service 中的调试 console.log
- 移除 fallback-executor、sw-capabilities/handler、drawnix.tsx 中的调试 console.log
- 移除 workflow-storage-writer 中的调试日志
- 移除 engine.ts 中未使用的 getEvents 方法和 Observable 导入
- 移除未使用的 WorkflowStatus 导入
- engine.ts 行数从 502 降至 466
2026-02-04 11:30:25 +08:00
liquidliang dae0bb8ac3 feat: integrate fake-indexeddb and refactor media executor
- Added fake-indexeddb as a dev dependency for improved testing.
- Refactored media executor by extracting utility functions for building image request bodies, parsing image responses, and polling video status.
- Updated workflow engine to utilize new utility functions for better code clarity and maintainability.
- Adjusted version.json build time to reflect recent changes.
2026-02-04 11:19:47 +08:00
liquidliang 8dfcf4a351 docs: 更新工具函数规则 - 添加新模块和避免不必要包装
- 更新 @aitu/utils 可用函数列表(blob、device、format、indexeddb)
- 添加"避免不必要的函数包装/别名"规则
- 优化规则 15 描述:禁止二次导出或不必要的包装
2026-02-04 11:19:20 +08:00
liquidliang af1fb113ec chore: update app version to 0.5.69 and adjust build time in version.json 2026-02-04 10:31:27 +08:00
liquidliang 5c86d02b79 docs: 添加编码规则 - 降级路径功能一致性
降级到主线程直接调用 API 时,必须保持与 SW 模式相同的功能行为,
特别是 LLM API 日志记录,否则调试工具会漏掉这些调用。
2026-02-04 10:30:55 +08:00
liquidliang f51c14c05d chore: bump version to 0.5.69 2026-02-04 10:30:15 +08:00
liquid 3d844c4250 docs: 添加 LLM 响应格式兼容性和工作流状态同步规则
- LLM 响应格式兼容性:支持多种 AI 返回格式
- 工作流状态同步:使用轮询 IndexedDB 替代 SW 事件依赖
2026-02-04 09:18:09 +08:00
liquid 900db04dc5 feat(executor): implement unified media execution and workflow enhancements
- Added a new media executor to handle image, video, and AI analysis tasks, allowing for asynchronous execution and improved task management.
- Introduced new RPC methods for executor operations, including PING and EXECUTOR_EXECUTE.
- Updated workflow executor to support pending main thread steps, ensuring proper handling of canvas operations and media generation tools.
- Enhanced workflow status synchronization with a new hook for better UI updates and reliability.
- Removed deprecated tool response handling for improved code clarity and efficiency.
- Updated documentation to reflect changes in workflow and executor functionalities.
2026-02-04 09:16:36 +08:00
liquidliang 84e9436cc6 fix(workflow): enhance workflow submission with timeout and retry logic
- Implemented a timeout mechanism for workflow submissions, allowing for better handling of long-running operations.
- Added retry logic to ensure successful submission after initialization failures, improving robustness against transient errors.
- Updated the new workflow detection logic to consider a 60-second window for new workflows instead of 10 seconds.
- Removed unnecessary debugger statement from the AI analyze tool.
- Bumped build time in version.json to reflect recent changes.
2026-02-03 20:43:21 +08:00
liquidliang 10f953f73c docs: 添加编码规则 - IndexedDB 直接读取和 RPC 超时处理
- 主线程直接读取 IndexedDB 优于 RPC:避免 postMessage 限制
- RPC 超时与重连策略:合理超时 + 自动重连重试
2026-02-03 20:42:27 +08:00
liquidliang ebb412d1c3 docs: 添加同步数据格式一致性规则
- CLAUDE.md: 添加第19条 SW 规则摘要
- CODING_RULES.md: 添加详细示例和数据格式参考表

修复调试面板中多处使用错误数据格式的问题:
- tasks.json 结构是 { completedTasks: Task[] } 不是数组
- 画板文件是 board_{id}.json 不是 .drawnix
2026-02-03 17:21:27 +08:00
liquid 061423a931 feat(gist): add Gist management panel and enhance sync logging
- Introduced a new Gist management panel in the SW debug interface, allowing users to manage Gist configurations and view shard statistics.
- Updated sync services to utilize a unified logging system for better tracking of sync operations, including success and error logging.
- Enhanced error handling and logging in the MediaSyncService and ShardSyncService to provide clearer insights during synchronization processes.
- Bumped app version to 0.5.68 to reflect these changes.
2026-02-03 09:08:48 +08:00
liquid 97332dc7f1 docs: 添加同步模块日志规范
- 更新 CLAUDE.md 规则6,同步模块使用统一日志服务
- 在 CODING_RULES.md 添加详细的同步模块日志规范
- 包含正确/错误示例和 API 说明
2026-02-03 09:07:45 +08:00
liquid 49329c411d chore: bump version to 0.5.68 2026-02-02 22:25:22 +08:00
liquidliang 4e2741c955 docs(claude): 添加新规则 - GitHub Gist API 批量上传大小限制 2026-02-02 20:17:20 +08:00
liquid 163bcee133 fix(sync): enhance manifest decryption error handling
- Improved error handling during manifest decryption to check for local data before deciding to overwrite remote data.
- Added checks to prevent data loss by refusing to overwrite remote data if local data is empty, ensuring safer synchronization.
2026-02-02 09:53:15 +08:00
liquid fedfebd40c chore: update app version to 0.5.67 and adjust build time 2026-02-02 09:26:17 +08:00
liquid 70486b7755 chore: bump version to 0.5.67 2026-02-02 09:16:10 +08:00
liquid 3a93bf08d5 feat(sync): implement soft delete and data recovery features
- Updated SyncManifest to include records for deleted prompts and tasks, enhancing data recovery capabilities.
- Introduced PromptTombstone and TaskTombstone interfaces to track deleted items with metadata such as deletion time and device ID.
- Enhanced data-serializer and sync-engine to support detection and application of deletions, ensuring safe data synchronization.
- Added UI components in SyncSettings for managing deleted items, including a recycle bin for restoring and permanently deleting items.

This update significantly improves the synchronization process by allowing users to recover deleted items while maintaining data integrity.
2026-02-02 09:15:56 +08:00
liquid 27064a500e feat(sync): 任务队列同步下载远程数据时双向合并
- 修改 applySyncData 中的任务合并逻辑,基于 ID 去重
- 使用 updatedAt 时间戳判断保留更新的版本
- 合并完成后自动上传任务数据到远程,确保双向同步
- 添加编码规则:同步数据双向合并
2026-02-02 07:49:49 +08:00
liquid d0eafd68b9 chore: bump version to 0.5.66 2026-02-02 07:16:56 +08:00
liquidliang f33025443d Merge branch 'develop' 2026-02-01 22:22:35 +08:00
ljquan 4b143190a9 Merge pull request #95 from changesydneyai-max/develop
Develop
2026-02-01 22:22:14 +08:00
liquidliang 6c01e7e33b Merge branch '92-sw' into develop 2026-02-01 22:21:32 +08:00
liquidliang a95ddd20b0 docs: 添加异步操作和事件订阅相关规则
- 异步操作不阻塞 UI:远程同步等耗时操作应异步执行
- 关键操作直接调用:不依赖 RxJS 事件订阅触发业务逻辑
2026-02-01 22:19:21 +08:00
liquidliang 8ecc8e7571 docs: 添加 CSS 变量优先级和弹出菜单截断规则
- CLAUDE.md: 更新 createPortal 规则说明,新增组件内颜色使用规范
- CODING_RULES.md: 添加详细的 TDesign CSS 变量优先级问题说明
- CODING_RULES.md: 添加弹出菜单被 overflow 截断的解决方案
2026-02-01 22:19:02 +08:00
liquid a36176ba97 feat(sync): implement deletion sync with recycle bin 2026-02-01 15:07:38 +08:00
liquid 8a95524814 docs: 添加数据安全保护编码规则
- CLAUDE.md: 添加摘要规则 #16 数据安全保护
- CODING_RULES.md: 新增"数据安全规范"章节
  - 破坏性操作前必须进行安全检查
  - 不可逆操作需要用户输入确认文字
  - 使用软删除(Tombstone)支持数据恢复
2026-02-01 15:06:19 +08:00
liquid c0518af55f feat(sync): implement data encryption and synchronization enhancements
- Introduced a new `crypto-service` for AES-256-GCM encryption, allowing secure data storage in Gists.
- Updated `data-serializer` to support both encrypted and plaintext serialization, ensuring backward compatibility.
- Enhanced `sync-engine` to handle encrypted data during synchronization, including custom password support.
- Added batch synchronization functionality in `MediaLibraryGrid` for local media uploads.
- Improved UI in `SyncSettings` for managing encryption passwords, enhancing user experience and security.

This update significantly enhances data security and user interaction with the synchronization features.
2026-02-01 14:57:13 +08:00
liquid da0c37e11c docs: 添加 SW 任务持久化规则和敏感 ID 脱敏说明
- CLAUDE.md: 新增规则14 - 任务数据必须通过 RPC 持久化到 SW
- CLAUDE.md: 规则7 补充 maskId 函数用于敏感 ID 脱敏
- CODING_RULES.md: 添加详细示例说明主线程任务数据持久化流程
2026-02-01 09:53:55 +08:00
liquid 8b0b95bfd7 feat(sw): enhance thumbnail request handling with parameter prioritization
- Introduced a new parameter priority system for thumbnail requests, allowing for `bypass_sw` and `_retry` to take precedence over thumbnail processing.
- Updated logic to ensure thumbnail requests are only processed when neither `bypass_sw` nor `_retry` are present.
- Cleaned up cache key construction by removing control parameters from the original URL for better cache management.

This change improves the efficiency and clarity of thumbnail request handling in the Service Worker.
2026-01-31 23:45:03 +08:00
liquidandClaude 21a666637c chore: clean up debug console logs and fix winbox icon handling
Remove verbose debug logs from main thread, Service Worker, and workflow services to reduce console noise in production. Also fix winbox icon container creation when icon prop changes after window initialization.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2026-01-31 23:10:23 +08:00
liquidandClaude 9abfb3f3cf feat(toolbox): support opening tools via URL parameter and display tool icons in window title
- Add useToolFromUrl hook to handle ?tool=xxx URL parameter
- Auto-maximize and auto-pin tools when opened via URL
- Add icon support to WinBox window title bar via React Portal
- Extend tool-window-service with autoMaximize and autoPin options

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

Co-Authored-By: Claude <noreply@anthropic.com>
2026-01-31 23:00:18 +08:00
liquid 738f8b9b86 feat(app): enhance board ID management via URL parameters and improve user interaction
- Added functions to retrieve and update the board ID from the URL, allowing for seamless board switching without page refresh.
- Updated the app to prioritize the board ID from the URL over the previous state when loading boards.
- Enhanced logging for board switch actions in both the App and ProjectDrawer components.
- Adjusted cursor style in project-drawer.scss for better user experience.
2026-01-31 22:27:24 +08:00
liquid 4b3a7842ee chore: update version and build time, refine toolbar styles, and ensure consistent type exports
- Updated version to 0.5.63 and adjusted build time in version.json.
- Refined styles in unified-toolbar.tsx for consistent button sizes and padding.
- Ensured consistent type exports across various components in the drawnix package.
2026-01-31 22:14:02 +08:00
liquid 24ec69faff fix(chat-drawer): initialize session model from global settings
- Updated the session model state initialization to read the default value from global settings, ensuring consistency with the workflow text model.
- Enhanced the chat handler to use a ref for the temporary model, ensuring the latest model selection is passed during message sending.
2026-01-31 22:02:11 +08:00
liquid 5a3b4a95e8 refactor(task-queue): deduplicate completed tasks and improve preview handling
- Updated completed tasks retrieval to eliminate duplicates by ID using a Set.
- Introduced a mapping from task IDs to preview indices for efficient lookups.
- Enhanced preview click handling to prevent event propagation and ensure correct behavior.
- Adjusted related components to utilize the new mapping for improved performance and clarity.
2026-01-31 21:46:11 +08:00
liquid fbfd0f1329 docs: 添加 SW 重发 Tool Request 延迟规则
问题:页面刷新后 SW claim 工作流时立即重发 pending tool request,
但主线程的 registerToolRequestHandler 可能还没准备好,导致请求失败。

解决:重发时延迟 500ms,等待主线程 handler 准备好。
2026-01-31 21:38:18 +08:00
liquidandClaude d27939f80b feat(sw): 改进工作流恢复机制和错误处理
- 修复工作流恢复时 UI 与 SW 状态不一致导致的错误失败状态
- 保持 AWAITING_CLIENT 错误处理链完整,避免错误属性丢失
- 重构 channel-manager 和 workflow-executor
- 添加崩溃恢复对话框组件
- 拆分 sw-channel 类型定义到独立文件
- 更新文档规则:工作流恢复状态不一致、错误处理链保持完整

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

Co-Authored-By: Claude <noreply@anthropic.com>
2026-01-31 20:53:06 +08:00
liquid a91afda0f4 docs: 更新 postmessage-duplex 规则 (v1.1.0)
- 更新通信模式:broadcast/onBroadcast 用于单向通知
- 更新初始化:enableGlobalRouting 自动管理 channel
- 新增客户端配置:autoReconnect 处理 SW 更新
- 新增任务队列双服务同步规则
2026-01-31 14:09:20 +08:00
liquidandClaude 50c94058af feat: move ai_analyze to SW and improve debug panel logging
- Move ai_analyze tool execution to Service Worker to avoid postMessage
  timeouts; system prompt built in app layer and passed to SW
- Add full response JSON display for LLM API logs (fetch on expand)
- Improve PostMessage logging: use source labels (应用页面/SW) instead
  of direction, filter debug panel messages, support request-response linking
- Add waitForStorageRestore() to ensure RPC handlers return complete data
- Remove syncTasksToClients() in favor of paginated RPC queries
- Better VideoGenerationFailedError detection for business failures
- Clean up debug console.log statements

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

Co-Authored-By: Claude <noreply@anthropic.com>
2026-01-31 09:12:07 +08:00
liquid 070801ca7a feat: implement LLM API log selection and batch actions
- Added UI elements for selecting and batch deleting LLM API logs in sw-debug.html.
- Introduced functions for toggling selection mode, selecting all logs, and batch deleting selected logs in llmapi-logs.js.
- Updated event listeners in app.js to handle new actions related to LLM API logs.
- Enhanced pagination and filtering capabilities for LLM API logs in sw-communication.js and llm-api-logger.ts.
- Implemented server-side deletion of selected logs with appropriate feedback to the user.

This update improves user interaction with LLM API logs, allowing for more efficient management of log entries.
2026-01-31 00:05:48 +08:00