Comprehensive fixes based on feedback:
1. Fixed zoom: use playgroundTools.zoom for reading, playgroundTools.config.updateZoom for setting
2. Created useAddNode hook following Flowgram pattern for proper node addition
3. Added Minimap component to DemoTools (removed from useEditorProps plugin)
4. Fixed createHistoryNodePlugin to accept opts parameter
5. Updated createPanelManagerPlugin to create custom tools panel
6. Created NodePanel component following Flowgram demo pattern
7. Updated createFreeNodePanelPlugin with renderer parameter
8. All components now follow official Flowgram.ai patterns exactly
Co-authored-by: whyour <22700758+whyour@users.noreply.github.com>
Created DemoTools plugin with comprehensive toolbar:
- Plugin structure following @flowgram.ai/panel-manager-plugin pattern
- Positioned at top-center matching Flowgram demo screenshot
- Integrated with Flowgram's history, playground, and viewport APIs
- Tools include: fit view, grid view, zoom controls, lock/unlock, comments
- Undo/Redo with real-time state management
- Add Node dropdown with all node types
- Test Run button (green)
- Added 13 new translation keys (zh-CN + en-US)
- Removed old bottom-left tools component
- Plugin automatically renders via layer system
Co-authored-by: whyour <22700758+whyour@users.noreply.github.com>
- Changed plugins to function returning array
- Added createHistoryNodePlugin for undo/redo support
- Configured minimap with smaller size (150x100px)
- Updated createPanelManagerPlugin with factories and layerProps
- All plugin creation functions now receive proper parameters
Co-authored-by: whyour <22700758+whyour@users.noreply.github.com>
- Import and sync ScenarioModel in back/loaders/db.ts
- Add migration to ensure 'status' column exists in Scenarios table
- Fixes SQLITE_ERROR: table Scenarios has no column named status
Co-authored-by: whyour <22700758+whyour@users.noreply.github.com>
* Initial plan
* Fix SSH global private key loading order by using zzz_ prefix
Co-authored-by: whyour <22700758+whyour@users.noreply.github.com>
* Use tilde (~) prefix for global SSH config to ensure it loads last
Co-authored-by: whyour <22700758+whyour@users.noreply.github.com>
---------
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: whyour <22700758+whyour@users.noreply.github.com>
* Initial plan
* Add backend support for global SSH keys
Co-authored-by: whyour <22700758+whyour@users.noreply.github.com>
* Add frontend UI for global SSH keys management
Co-authored-by: whyour <22700758+whyour@users.noreply.github.com>
* Add SshKeyModel to database initialization
Co-authored-by: whyour <22700758+whyour@users.noreply.github.com>
* Add SSH config generation for global SSH keys
Co-authored-by: whyour <22700758+whyour@users.noreply.github.com>
* Add internationalization support for SSH key management UI
Co-authored-by: whyour <22700758+whyour@users.noreply.github.com>
* Simplify to single global SSH key in system settings
Co-authored-by: whyour <22700758+whyour@users.noreply.github.com>
---------
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: whyour <22700758+whyour@users.noreply.github.com>
* Initial plan
* Stop running tasks before starting new scheduled instance
Co-authored-by: whyour <22700758+whyour@users.noreply.github.com>
* Add multi-instance support and fix stop to kill all running instances
- Add allow_multiple_instances field to Crontab model (default: 0 for single instance)
- Add validation for new field in commonCronSchema
- Add getAllPids and killAllTasks utility functions
- Update stop method to kill ALL running instances of a task
- Update runCron to respect allow_multiple_instances config
- Backward compatible: defaults to single instance mode
Co-authored-by: whyour <22700758+whyour@users.noreply.github.com>
* Add UI support for allow_multiple_instances configuration
- Add allow_multiple_instances field to ICrontab interface
- Add instance mode selector in task creation/edit modal
- Add translations for instance mode in Chinese and English
- Default to single instance mode for backward compatibility
Co-authored-by: whyour <22700758+whyour@users.noreply.github.com>
* Add allow_multiple_instances column migration and optimize db.ts
- Add allow_multiple_instances column to Crontabs table migration
- Refactor migration code to use data-driven approach
- Replace 11 individual try-catch blocks with single loop
- Improve code maintainability and readability
Co-authored-by: whyour <22700758+whyour@users.noreply.github.com>
---------
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: whyour <22700758+whyour@users.noreply.github.com>
* Initial plan
* Add cron management capabilities to QLAPI
- Added GetCrons, GetCronById, EnableCrons, DisableCrons, RunCrons to proto
- Implemented gRPC handlers for new cron operations
- Updated client.js to expose new methods to scripts
- Updated sample to demonstrate new API usage
Co-authored-by: whyour <22700758+whyour@users.noreply.github.com>
* Add documentation for QLAPI cron management features
Co-authored-by: whyour <22700758+whyour@users.noreply.github.com>
* Specify pnpm version 8.3.1 in package.json
Add packageManager field to enforce pnpm@8.3.1 as requested
Co-authored-by: whyour <22700758+whyour@users.noreply.github.com>
* Revert pnpm-lock.yaml to original state
The lockfile was inadvertently updated during dependency installation
for proto generation. Reverting to maintain consistency with pnpm@8.3.1.
Co-authored-by: whyour <22700758+whyour@users.noreply.github.com>
* Regenerate proto files with correct tool versions
Regenerated using protoc v3.17.3 and protoc-gen-ts_proto v2.6.1
to match the original project configuration.
Co-authored-by: whyour <22700758+whyour@users.noreply.github.com>
---------
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: whyour <22700758+whyour@users.noreply.github.com>
* Initial plan
* Fix race condition causing scheduled tasks not to run
Added synchronization to ensure gRPC worker is ready before HTTP worker starts. This prevents the race condition where autosave_crontab() tries to register cron jobs before the gRPC server is ready to accept them.
Co-authored-by: whyour <22700758+whyour@users.noreply.github.com>
* Add timeout protection for gRPC worker initialization
Added 30-second timeout to prevent system hang if gRPC worker fails to start. This provides better error handling and prevents indefinite waiting.
Co-authored-by: whyour <22700758+whyour@users.noreply.github.com>
* Refactor worker ready logic and improve restart handling
- Extracted waitForWorkerReady() method for better code reusability
- Improved worker restart logic to wait for gRPC worker readiness
- This addresses code review feedback for better maintainability
Co-authored-by: whyour <22700758+whyour@users.noreply.github.com>
* Improve logging accuracy for worker restarts
- Fixed log messages to accurately reflect worker state
- Added proper logging after gRPC worker is confirmed ready
- Improved HTTP worker restart logging with PID
- Addresses code review feedback for better clarity
Co-authored-by: whyour <22700758+whyour@users.noreply.github.com>
* Revert unnecessary pnpm-lock.yaml changes
The pnpm-lock.yaml was unintentionally updated when installing dependencies for testing. No package dependencies were actually changed - only existing code was modified in back/app.ts. Reverting to original state.
Co-authored-by: whyour <22700758+whyour@users.noreply.github.com>
* Re-register cron jobs when gRPC worker restarts
When the gRPC worker restarts, the scheduled tasks need to be re-added to the new gRPC server instance. This fix:
1. Tracks the HTTP worker reference in the master process
2. Sends a 'reregister-crons' message to the HTTP worker after gRPC restarts
3. HTTP worker calls autosave_crontab() to re-register all cron jobs with the new gRPC server
This ensures scheduled tasks continue to work after a gRPC worker restart.
Co-authored-by: whyour <22700758+whyour@users.noreply.github.com>
---------
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: whyour <22700758+whyour@users.noreply.github.com>