mirror of
https://github.com/Studio-Saelix/sencho.git
synced 2026-08-06 17:08:10 +00:00
c91c9ed7fd
- Delete SSHFileAdapter, IFileAdapter, LocalFileAdapter (SSH/SFTP stack)
- Remove ssh2, ssh2-sftp-client dependencies; add http-proxy-middleware, http-proxy
- NodeRegistry: remote nodes no longer use Dockerode TCP; new getProxyTarget() returns {apiUrl, apiToken}
- NodeRegistry.testConnection: remote nodes use HTTP GET /api/auth/check instead of docker.info()
- DatabaseService: Node interface swaps SSH/TLS fields for api_url + api_token; legacy columns preserved for DB compat
- FileSystemService: reverted to clean local-only fs.promises; adapter pattern fully removed
- ComposeService: executeRemote() and SSH log streaming deleted; local-only execution remains
- index.ts: add /api/auth/generate-node-token endpoint (long-lived JWT, scope:node_proxy)
- index.ts: authMiddleware now accepts Bearer token in addition to cookie (Sencho-to-Sencho auth)
- index.ts: remote HTTP proxy middleware intercepts all /api/ requests for remote nodes, strips x-node-id, injects Authorization header, proxies to api_url
- index.ts: WS upgrade handler proxies WebSocket connections for remote nodes via http-proxy wsProxyServer
- NodeManager.tsx: form reduced to Name, API URL, API Token; Generate Node Token button added inline
- NodeContext.tsx: Node interface updated to api_url/api_token
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
8.1 KiB
8.1 KiB
Changelog
All notable changes to this project will be documented in this file. The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
[Unreleased]
- Removed: SSH/SFTP file adapters and remote Docker TCP connections (net negative ~500 lines of code).
- Added: Distributed API proxying using http-proxy-middleware for HTTP and WebSockets.
- Added: Long-lived JWT generation for Sencho-to-Sencho API authentication (
POST /api/auth/generate-node-token). - Changed: Node Manager UI vastly simplified — remote nodes now only require an API URL and Token.
- Fixed: Critical port routing conflict — separated Docker API port (
port) from SSH/SFTP port (ssh_port) in thenodesschema. Previously, a singleportfield served both protocols, causing ECONNREFUSED. - Fixed:
FileSystemServicenow reads the node'scompose_dirfrom the database for remote nodes instead of always using theCOMPOSE_DIRenv var. - Fixed: SSH/SFTP connections in
SSHFileAdapter,ComposeService.executeRemote(), andComposeService.streamLogs()now usessh_port(default 22) instead of Docker APIport. - Added: Full SSH credential fields (SSH Port, Username, Password, Private Key) to the Node Manager Add/Edit forms.
- Added:
ssh_portcolumn to thenodesdatabase table with migration support (default: 22). - Changed: Global
FileSystemServiceandComposeServicesingletons refactored into node-aware instances. - Added:
IFileAdapter,LocalFileAdapter, andSSHFileAdapterto abstract all filesystem interactions for remote node support. - Changed:
MonitorServicenow evaluates limits, fetches metrics, and detects container crashes across all registered nodes concurrently. - Added: Node Context Middleware in Express API to dynamically extract
x-node-idheaders and parse WebSocket query parameters. - Added: Remote Nodes Foundation -
nodestable in SQLite with auto-seeded default local node. - Added:
NodeRegistryservice for managing multiple Docker daemon connections (local socket + TCP). - Added: Node management API endpoints: list, get, create, update, delete, and test connection.
- Added: Settings Hub → Nodes tab with full CRUD UI, connection testing, and Docker info display.
- Added: Node switcher dropdown in sidebar (auto-visible when multiple nodes are configured).
- Added:
NodeContextfor frontend-wide active node state management. - Fixed: Global logs false-positive error misclassifications caused by Docker containers writing INFO logs to STDERR. Replaced naive regex with a robust 3-tier classification engine supporting
level=info,[INFO], andINFOformat standards. - Added: Developer Mode setting to enable true Real-Time (SSE) global log streaming and infinite scroll.
- Added: Configurable polling rates for standard global logs monitoring.
- Added: React Throttle Buffer to prevent UI freezing during heavy real-time log ingestion.
- Fixed: Global Logs aggressive auto-scrolling preventing users from reading log history.
- Fixed: Quiet stacks missing from the Global Logs filter dropdown by fetching the definitive stack list independently.
- Fixed: Global logs misclassifying INFO messages as errors due to naive string matching.
- Changed: Global logs now display chronologically (newest at bottom) with smooth auto-scrolling.
- Changed: Renamed Observability navigation tab to Logs.
- Fixed: TTY container log streams failing to parse globally.
- Fixed: Global logs displaying in UTC instead of local browser timezone.
- Changed: Global Logs UI revamped to use a floating, hover-based action bar to maximize terminal space.
- Fixed: Docker raw byte multiplex headers leaking into global logs stream.
- Changed: Relocated historical CPU/RAM charts to the Home Dashboard and normalized data values (CPU relative to host cores, RAM to GB).
- Added: Dozzle-style Action Bar to Global Logs with multi-select stack filtering, search, and STDOUT/STDERR toggles.
- Added: Centralized observability dashboard tracking 24-hour historical metrics and aggregating global tail logs across all running containers.
- Added: Live Container Logs viewer using Server-Sent Events (SSE) for real-time terminal output.
- Added: Pre-deploy folder collision check to prevent silent configuration overwrites in the App Store.
- Added: UI subtitle during deployment to reassure users during long image downloads.
- Changed: Standardized manual stack deletion to use the Two-Stage Teardown (Compose Down -> File Wipe) to prevent ghost networks.
- Fixed: Atomic Rollback failure where non-empty directories caused silent file system errors.
- Added: Two-Stage Teardown mechanism to ensure
docker compose downsweeps up ghost networks before deployment files are deleted.
Deprecated
- (Planned) Port 2375 (TCP) fallback support; future releases may require SSH-only for Node config.
Fixed
- Fixed backend MonitorService crash (
Cannot read properties of undefined (reading 'cpu_usage')) occurring when Docker containers lacked CPU telemetry during transition states. - Handled UI deleted nodes ghost API calls by intercepting 404 errors globally in API and forcing the UI to resync to the default Node context.
- Hardened
nodeContextMiddlewarein Express to intercept queries to invalid or deleted Node IDs gracefully instead of bubbling to Docker API 500 crashes. - Hardened Remote Node connection testing (
docker.info()) to explicitly validate expected Docker API daemon properties instead of merely checking string length. - Caught Unhandled SFTP Promise Rejections in Node registry gracefully returning empty arrays to prevent frontend loading UI stalls.
- Fixed horizontal UI overflowing in Node Manager settings on smaller resolutions.
- Fixed: Docker API parsing bug where HTML string responses from misconfigured ports were counted as containers.
- Fixed: Stack list crashing when SFTP connections fail by gracefully catching SSH errors and returning empty arrays.
Changed
- Changed: Expanded Node Manager UI width and added horizontal scrollbars for better data visibility.
- Added: Smart Error Parser with telemetry-ready rule IDs to translate cryptic Docker output.
- Added: Post-Deploy Health Probe to catch immediate container crashes that slip past Compose.
- Changed: Rollback engine respects a
canSilentlyRollbackflag to protect user-authored configurations. - Changed: Removed rigid volume sanitization, allowing full user control over bind paths.
- Added: Editable Host Volumes in the deployment UI.
- Added: Custom Environment Variable injection tool.
- Fixed: ScrollArea UI height rendering and dynamic browser timezone detection.
- Changed: Rebranded "Templates" to "App Store" across the UI.
- Added: Advanced deployment configuration panel (Editable Ports and Environment Variables) with smart defaults.
- Fixed: Implemented smart image fallbacks for broken registry logos and added expandable descriptions.
- Added: Atomic Deployments: Failed App Store deployments now automatically roll back and delete their orphaned folders.
- Fixed: Global dark mode scrollbar styling to eliminate blinding white native scrollbars.
- Fixed: Input overlap UI bug in the App Store deployment panel.
Added
- Added: Official LinuxServer.io API integration as the default Template Registry.
- Added: Rich metadata display in the App Store (Architectures, Documentation links, GitHub repository links).
- Added: Dynamic Template Registry URL support via global settings, defaulting to LinuxServer.io templates.
- Fixed: Smart Volume Sanitizer to automatically rewrite messy Portainer bind mounts into clean, relative paths (Sencho 1:1 path rule).
- Git Flow branching strategy and branch protection.
- GitHub Actions CI pipeline for automated TypeScript build verification.
- Added: Automated Docker Hub CI/CD pipeline for the
devandlatesttags. - Added: App Templates (App Store) with One-Click deployment, utilizing Portainer v2 JSON registries and auto-generating compose files.