58 Commits
Author SHA1 Message Date
Shayne Wong e566f514c7 feat: add support for GPT Image 2.5 models with extended quality options and new UI components
- Introduced new image model picker component for selecting models and qualities.
- Updated image model utilities to handle new models and quality options.
- Implemented backend logic for validating image model options and handling requests.
- Added tests for image model selection, quality handling, and API interactions.
- Adjusted existing tests to accommodate new model features and ensure compatibility.
2026-09-10 19:23:50 +08:00
Z1rconium ecde9fa8e7 feat: enhance dialog and overlay animations with new motion transitions
- Introduced new motion transitions for dialogs and overlays to improve user experience.
- Added `overlayIn`, `overlayOut`, `dialogIn`, and `dialogOut` animations in motion.ts.
- Updated various components (AccessGate, ConfirmDialog, EditGalleryDialog, etc.) to utilize the new animations.
- Ensured accessibility and usability with reduced motion preferences.
- Enhanced visual feedback for user interactions with overlays and dialogs.
2026-08-30 16:13:30 +08:00
Z1rconium 424e50b0ee feat: 添加 Cloudflare Turnstile 人机验证功能,增强访问安全性 2026-08-26 15:42:02 +08:00
Z1rconium 3e628e7ece feat: enhance prompt form with background options and improve UI components
- Added background options ('auto', 'opaque', 'transparent') to the prompt form.
- Updated the EditSourcePicker component for improved styling and user experience.
- Refactored the GalleryGrid component to utilize Lucide icons for better visual consistency.
- Enhanced the PromptForm layout for better organization and clarity.
- Introduced a new gallery job events handling mechanism for improved job status management.
- Updated translations for new background options in English and Chinese.
- Improved the theme store initialization to prevent flash of incorrect theme on load.
- Adjusted tests to validate new background options and UI changes.
2026-08-26 12:45:39 +08:00
Z1rconium e91901bbe3 feat: 更新访问控制相关配置,修改 ACCESS_KEY_COOKIE_NAME 和 IMPORT_MAX_COMPRESSION_RATIO,增强安全性 2026-08-20 21:18:18 +08:00
Z1rconium 5838ecb9b5 feat: 移除 ADMIN_KEY 相关功能,简化访问控制逻辑 2026-08-20 17:07:08 +08:00
Z1rconium 573fbb9c80 chore: bump version to v1.4.3 2026-08-20 08:57:19 +08:00
Z1rconium ff91463e31 Add error context files for failed Playwright tests in gallery.spec.ts
- Created error context files for multiple failed tests related to gallery functionality.
- Each file includes instructions, test info, and detailed error logs to assist in debugging.
- Tests covered include:
  - AI batch analysis using SSE without status polling
  - Thumbnails ready state handling
  - Batch upload cancellation and result retention
  - Selection of filtered results through a batch token
  - Handling legacy responses without filenames
  - Metadata retention without reverse prompt action
2026-08-15 13:45:58 +08:00
Z1rconium af0d763295 feat: 更新 NodeImage 上传功能,支持返回文件名并处理认证错误;更新版本至 v1.4.1 2026-08-13 21:32:21 +08:00
Z1rconium 2d68d7c99f chore: release v1.4.0 2026-08-12 22:07:49 +08:00
Z1rconium 7b0bc6b203 feat: integrate NodeImage upload functionality
- Add settings drawer test for saving NodeImage API key reference.
- Update mock API to include NodeImage settings and upload handling.
- Implement gallery tests for uploading images to NodeImage and handling results.
- Create NodeImage integration module with API client for image uploads.
- Define schemas for NodeImage upload responses.
- Add contract tests for NodeImage upload success and error handling.
- Implement NodeImage result dialog component for displaying upload results.
- Create settings section for NodeImage configuration in the UI.
- Introduce Svelte store for managing NodeImage upload results.
2026-08-12 20:48:45 +08:00
Z1rconium 8b686f2a6f feat: add ADMIN_KEY for enhanced security and access management
- Introduced ADMIN_KEY in .env.example and README.md for settings management step-up.
- Updated app_state.py to enforce ADMIN_KEY validation and log warnings if it matches ACCESS_KEY.
- Refactored access.py to utilize database operations for access failure tracking and lockout management.
- Enhanced prompt.py and settings.py to support asynchronous operations and validation.
- Implemented async validation for R2 endpoint URLs and upstream URLs across various modules.
- Added database schema for access failures and corresponding migration.
- Updated tests to cover new ADMIN_KEY functionality and access lockout persistence.
- Adjusted docker-compose.yml to include ADMIN_KEY environment variable.
2026-08-12 13:47:14 +08:00
Z1rconium f67bf95345 chore: release v1.3.5 2026-08-11 16:56:07 +08:00
Z1rconium 5d8f038aba feat: update version format in VERSION and docker-compose.yml 2026-08-03 10:47:08 +08:00
Z1rconium 955f583cda feat: update versioning and improve response format handling in job queue 2026-08-01 22:24:15 +08:00
Z1rconium 856d6aa5ca Refactor job execution and database operations for improved performance and reliability
- Introduced asynchronous database operation handling in job_executor.py to prevent blocking the event loop.
- Replaced synchronous calls with async counterparts in job scheduling and job queue services.
- Added a new blocking.py module to manage bounded executors for database and image processing tasks.
- Enhanced runtime metrics collection with new runtime_metrics.py for better observability.
- Updated Docker configuration to include new environment variables for performance tuning.
- Improved test coverage for performance regressions and database connection handling.
- Adjusted version check logic to utilize process caching for efficiency.
2026-07-30 23:08:08 +08:00
Z1rconium 2b0ac2dbf0 feat: add prompt snippet search request model
fix: update assistant health check to conditionally use API key

refactor: change gallery cache control to private and no-store

fix: update gallery job response to include cache control

feat: implement import upload reservation release in gallery jobs

fix: enhance job webhook URL validation for signing secret length

feat: add sensitive text redaction for webhook service errors

test: enhance contract tests for CSRF protection and secret registry

chore: update docker image to version 1.3.3

feat: extend API key source options in common types

feat: add secret ID field to various settings types

feat: implement admin access gate in workspace settings

refactor: update gallery store to use new search body structure

feat: add CDN signing secret handling for media URLs

feat: implement secret registry for managing sensitive values

test: add tests for secret registry functionality and error handling
2026-07-20 14:58:04 +08:00
Z1rconium 49b8d4ed8a feat: enhance Lightbox component with loading states and error handling for original images
- Added loading and error handling for original images in the Lightbox component.
- Introduced thumbnail previews while the original image loads.
- Updated translations for loading and error messages in English and Chinese.
- Added an end-to-end test to verify Lightbox behavior during image loading.
- Created a design system configuration file for consistent UI components.
- Documented design principles and product overview in new markdown files.
2026-07-18 10:06:54 +08:00
Z1rconium 36a4236538 feat: add gallery filter and pagination components, enhance settings sections, and implement lazy loading for components
- Introduced `GalleryFilterToolbar` for filtering gallery items based on various criteria.
- Added `GalleryPagination` for navigating through gallery pages.
- Created settings sections for AI Assistant, Prompt Optimizer, and R2 Backup with appropriate input fields and health check functionality.
- Implemented lazy loading utility to handle component loading with retry logic.
- Enhanced existing tests to cover new features and ensure UI consistency across viewports.
2026-07-14 11:22:56 +08:00
Z1rconium 2eaef562cc chore: release v1.3.0 2026-07-13 22:03:07 +08:00
Z1rconium bddebe1e41 chore: release v1.2.1 2026-07-12 20:44:12 +08:00
Z1rconium 55957862b2 Refactor overall configuration handling and enhance security measures
- Removed unused function `get_generate_job_webhooks` from `generate.py`.
- Updated `update_overall_config` to use `normalize_secret_override` for better secret handling.
- Integrated `load_api_settings` in multiple settings routes to ensure fresh configurations are loaded.
- Enhanced `OverallConfig` to enforce secret management and added new configuration options for import limits.
- Improved validation for private IPs in `validators.py` to block non-global address space.
- Added new functions in `storage.py` for managing auxiliary state cleanup and generate job webhook handling.
- Implemented error sanitization for upstream error messages in `upstream_client.py`.
- Added tests for new functionality including import entry limits and generate job webhook persistence.
- Updated Docker Compose to include new environment variables for import limits.
2026-07-12 20:10:21 +08:00
Z1rconium ae7bc7c6cb chore: prepare v1.2.0 release 2026-07-05 23:17:28 +08:00
Z1rconium ee56cd4f60 feat: update assistant job diagnose request to exclude prompt by default
- Changed `include_prompt` in `AssistantJobDiagnoseRequest` to `False` by default.
- Added tests for AI assistant request concurrency limit and response field truncation.
- Enhanced batch analysis job handling with concurrency limits and error handling.
- Updated Docker configuration to include new environment variables for concurrency and batch limits.
- Refactored frontend components to manage loading states and abort signals for assistant requests.
- Improved E2E tests for prompt optimizer drag functionality and bounding box checks.
2026-07-05 16:13:10 +08:00
Z1rconium 79f6831efd feat: add AI Assistant integration with prompt rewriting, checking, and optimization features
- Implemented backend functionality for AI Assistant in `assistant_client.py`, including JSON request handling and response parsing.
- Created a new Svelte component `AiAssistantPanel.svelte` for user interaction with the AI Assistant, allowing prompt rewriting, checking, and optimization.
- Developed a Svelte store `assistant.ts` to manage state and API interactions for the AI Assistant features, including loading states and error handling.
2026-07-02 22:44:15 +08:00
Z1rconium aeea85bbdc chore: update application image version to v1.1.2 in environment and docker-compose files 2026-06-27 22:51:05 +08:00
Z1rconium 46ed584878 chore: release v1.1.0 2026-06-21 23:14:12 +08:00
Z1rconium a7e857d23a chore: release v1.0.7 2026-06-20 17:54:03 +08:00
Z1rconium 61e8e12aef feat: implement logging configuration with retention and rotation, update environment settings for logs 2026-06-19 20:14:08 +08:00
Z1rconium 2a486355b8 feat: add R2_ENDPOINT_HOST_ALLOWLIST for custom R2-compatible endpoints and update related configurations 2026-06-19 10:43:38 +08:00
Z1rconium f45424b4f6 feat(gallery): improve large gallery UX 2026-06-12 23:12:38 +08:00
Z1rconium 89c1abbe67 feat: update Docker Compose configuration to streamline service setup and remove unused nginx container 2026-06-08 22:52:24 +08:00
Z1rconium af4751526a feat: enhance gallery functionality with cursor-based pagination and public URLs
- Added cursor-based pagination support in the gallery API, allowing for efficient navigation through large datasets.
- Introduced public image and thumbnail base URLs for easier access to generated images and thumbnails.
- Updated gallery entry schema to include optional image_url and thumbnail_url fields.
- Modified frontend components to utilize new image_url and thumbnail_url properties for improved image handling.
- Implemented tests to ensure the correctness of pagination and public URL features.
- Refactored storage and repository layers to support new functionality while maintaining backward compatibility.
2026-06-06 18:12:04 +08:00
Z1rconium 89afb8c5b4 feat: add R2 sync concurrency configuration and improve sync performance
- Introduced R2_SYNC_CONCURRENCY setting to control concurrent R2 HEAD/upload workers.
- Updated overall_config.py and settings.py to include new concurrency setting.
- Enhanced r2_sync.py to utilize ThreadPoolExecutor for concurrent processing of remote keys.
- Implemented batching for local sync candidates to optimize uploads.
- Added database support for tracking R2 sync state with new r2_sync_state table.
- Created functions to manage R2 sync state and determine changes for incremental sync.
- Updated frontend gallery actions to support native file saving for large downloads.
- Added tests to validate R2 sync state filtering and incremental candidate detection.
2026-06-05 13:33:33 +08:00
Z1rconium 29ee284696 Enhance SSE connection management and observability metrics
- Implement SQLite-backed SSE connection limiter to enforce global and per-IP subscriber caps.
- Update metrics snapshot to include worker-specific metrics and runtime coordination data.
- Add new database tables for managing SSE slots and worker metric snapshots.
- Introduce functions for acquiring, refreshing, and releasing SSE slots with appropriate error handling.
- Enhance observability metrics to track worker snapshots and connection states.
- Update overall configuration to include new Granian runtime parameters.
- Add tests for SSE slot management and background lease completion to ensure proper functionality.
2026-06-04 22:48:28 +08:00
Z1rconium 88216d7b1d feat: implement image job unit management and worker heartbeat tracking
- Added new database tables for image job units and worker heartbeats.
- Introduced functions to create, update, and manage image job units.
- Implemented heartbeat tracking for workers to monitor active units.
- Updated gallery and generate routers to handle multi-worker scenarios.
- Enhanced settings to configure image job unit lease and polling intervals.
- Modified Docker Compose to include new environment variables for image job management.
2026-06-03 19:33:29 +08:00
Z1rconium 417d4084b1 feat: add support for NGINX acceleration, configure aiohttp connection limits, and update Docker setup 2026-06-02 23:36:19 +08:00
Z1rconium 3331c2b5ce feat: add R2 sync interval configuration and scheduled sync functionality 2026-06-01 09:18:43 +08:00
Z1rconium 190f380db7 feat: enhance R2 backup functionality with improved settings persistence and environment variable support 2026-05-30 18:02:27 +08:00
Z1rconium 3b08bf4125 feat: add R2 backup configuration and sync functionality 2026-05-29 23:10:24 +08:00
Z1rconium 5f4ee8f815 feat: add R2 backup functionality and sync feature
- Implemented R2 backup settings in the frontend, including UI elements for configuration and health checks.
- Added sync functionality for gallery images to Cloudflare R2, including progress tracking and error handling.
- Enhanced the backend with R2 sync logic, including health checks and object management.
- Updated tests to cover new R2 sync features and ensure proper functionality.
- Added boto3 dependency for R2 integration.
2026-05-29 22:28:26 +08:00
Z1rconium e18587d415 Refactor environment variable handling and improve security for sensitive data
- Introduced functions for resolving and validating environment variable references.
- Updated API key, SOCKS5 proxy, and webhook URL handling to prefer environment variable references over plaintext.
- Added a configuration option to allow plaintext secrets with appropriate validation.
- Enhanced security by setting strict permissions on data directories and database files.
- Updated tests to ensure proper handling of environment variables and plaintext secrets.
- Modified frontend to clear prompt filter in gallery URL state management.
2026-05-28 11:07:15 +08:00
Z1rconium e647997514 Refactor API URL validation and enhance image upload handling
- Updated the prompt optimizer endpoint validation to normalize the API URL.
- Refactored health API URL validation to use a new normalization function and removed unnecessary checks.
- Changed image upload validation to utilize a new header-based validation method.
- Introduced new settings for maximum JSON body size and image pixel limits.
- Enhanced the image validation process to handle Pillow image limits and added checks for unsupported formats.
- Updated request models to enforce stricter validation rules and added field length constraints.
- Improved error handling for oversized JSON requests and invalid image uploads.
- Modified Nginx configuration to include security headers and proxy settings.
- Updated Docker Compose to include new environment variables for public origin and allowed hosts.
2026-05-28 10:26:08 +08:00
Z1rconium 799da97cb8 feat: increase default timeout for Prompt Optimizer to 60 seconds and update related settings 2026-05-27 13:08:01 +08:00
Z1rconium 0e843afa87 feat: implement AI Prompt Optimizer and Prompt Helper functionality
- Added a new endpoint for optimizing prompts at /api/prompt/optimize.
- Created a prompt optimizer client to handle requests to the external optimizer API.
- Introduced a PromptHelperPanel component for users to append common prompt tags.
- Defined prompt tag categories and their respective tags for enhanced user experience.
- Updated backend schemas to include prompt optimization request and response models.
- Enhanced settings management to support prompt optimizer configurations.
- Implemented frontend logic to utilize the new prompt optimizer and helper features.
- Added comprehensive documentation for the new functionality and its usage.
2026-05-20 21:05:59 +08:00
Z1rconium b921eac36d feat: add MAX_UPSTREAM_JSON_MB configuration; implement response size limits and improve job broadcasting 2026-05-16 22:31:13 +08:00
Z1rconium d0d4d8fffb feat: add MAX_PENDING_EDIT_SOURCE_MB configuration; implement cleanup for stale edit source files and manage pending edit source bytes 2026-05-16 17:58:27 +08:00
Z1rconium 1c6663adba Refactor webhook delivery logic, enhance environment variable handling, and improve image processing components
- Refactored `deliver_webhook` function in `webhook_service.py` to improve error handling and retry logic.
- Updated `docker-compose.yml` to allow dynamic configuration of `MAX_FILE_SIZE_MB` environment variable.
- Added new environment variables related to proxy settings in `ambient.d.ts` for SvelteKit.
- Enhanced error handling in `apiFetch` function in `client.ts` to include action context in thrown errors.
- Optimized `formatBeijingTime` function in `format.ts` by caching the date formatter.
- Simplified the main page layout in `+page.svelte` by integrating `PromptForm` and `EditSourcePicker` components.
- Introduced new `image_files.py` and `thumbnails.py` repositories for handling image file operations and thumbnail generation.
- Created `EditSourcePicker` and `PromptForm` components to streamline user input handling in the frontend.
- Added `ToastHost` component for displaying toast notifications in the UI.
2026-05-14 17:14:10 +08:00
Z1rconium 2c8febabcd feat: add upstream SOCKS5 proxy support for API calls
- Introduced functionality to configure a global SOCKS5 proxy for upstream API requests.
- Added validation and normalization for SOCKS5 proxy URLs.
- Updated settings model to include upstream SOCKS5 proxy configuration.
- Enhanced API settings persistence to handle SOCKS5 proxy values.
- Modified API request handling to utilize the configured SOCKS5 proxy.
- Implemented masking for sensitive SOCKS5 proxy credentials in responses.
- Updated frontend components to manage and display SOCKS5 proxy settings.
- Added tests to ensure proper handling of SOCKS5 proxy configurations and validations.
2026-05-12 23:33:42 +08:00
Z1rconium 9a940e1363 Add backend requirements and Nginx configuration
- Created requirements-dev.txt for development dependencies including httpx and pytest.
- Established requirements.txt for backend dependencies such as FastAPI, Uvicorn, and Pydantic.
- Added nginx.conf to configure Nginx for serving the application, including API proxying and health check handling.
2026-05-09 15:41:02 +08:00