Commit Graph

48 Commits

Author SHA1 Message Date
SaelixCode 94018d167f fix(remote): repair stats, bash exec, and Open App for remote nodes
- Generic WebSockets (stats, exec) now connect to /ws?nodeId= instead of
  the bare root so the upgrade handler detects the remote node and proxies
  the WS connection to the correct remote Sencho instance.
- Vite dev proxy gains ws:true on /api and a new /ws entry so WebSocket
  upgrades reach localhost:3000 during npm run dev.
- Backend WS message handler falls back to the default local node when the
  nodeId in a proxied message doesn't exist in the local DB.
- Open App button now extracts the hostname from the remote node's api_url
  instead of using window.location.hostname.
2026-03-19 22:45:00 -04:00
SaelixCode d64d23fc50 feat(system): background image update checker with stack badges
Adds an ImageUpdateService that queries OCI registry manifest endpoints
every 6 hours to compare remote digests against local RepoDigests.
Results are cached in a new stack_update_status SQLite table. A pulsing
blue dot badge appears in the stack sidebar for stacks with updates
available. Manual refresh available via POST /api/image-updates/refresh
with a 10-minute rate limit.
2026-03-19 21:28:48 -04:00
SaelixCode 04c770c198 feat(ui): Phase 57 - remote context UX (Option A) + network layer fixes
Task 1 - Network layer fixes:
- AppStoreView: replace raw fetch() with apiFetch() on /templates and
  /templates/deploy so x-node-id header is injected for proxy routing
- GlobalObservabilityView: replace raw fetch() with apiFetch() on
  /stacks and /logs/global
- HostConsole: append ?nodeId= to WebSocket URL so the upgrade handler
  correctly routes the PTY session to the active remote node

Task 2 - Scoped context two-tier UX (Option A / Portainer-style):
- EditorLayout: add a context pill in the top header bar showing the
  active node name (pulsing blue for remote, green for local)
- HostConsole: header now reads "Host Console - [Node Name]"
- ResourcesView: title now reads "Resources Hub - [Node Name]" for remote
- GlobalObservabilityView: floating node badge in top-left corner for remote
- AppStoreView: deploy sheet shows "Deploying to: [Node Name]" badge
- SettingsModal: remote nodes only see System Limits + Developer tabs;
  global-only tabs (Account, Appearance, Notifications, Nodes) are hidden;
  header subtitle shows remote node name
2026-03-19 20:39:57 -04:00
SaelixCode ee9311ad03 fix: dashboard cards and stacks list do not update on remote node switch
- HomeDashboard: both polling useEffects now depend on activeNode?.id so
  intervals restart and stale local-node data is cleared immediately on
  node switch; added res.ok guard before calling res.json() to prevent
  error objects being written into stats/systemStats state
- EditorLayout: refreshStacks now guards res.ok before parsing the JSON
  body and iterates a typed fileList instead of the raw response value,
  preventing SyntaxError/TypeError when proxy returns a non-JSON response
  for an unreachable remote node
2026-03-19 16:43:07 -04:00
SaelixCode eb0c0263c7 fix: Distributed API UI & metrics polish + DEP0060 suppression
Add Node modal — type selector & state reset:
- Restored a Local/Remote <Select> dropdown in renderFormFields so users can
  explicitly choose the node type instead of it defaulting silently to 'remote'.
- Switching type clears api_url and api_token so no stale remote credentials
  carry over if a user switches from Remote to Local mid-form.
- Replaced the static "Add Remote Node" title with a dynamic one that reflects
  the currently selected type ("Add Local Node" / "Add Remote Node").
- onOpenChange now resets formData to defaultFormData whenever the dialog
  opens, preventing stale values from a previous session leaking in.

Remote connection details — real metrics:
- testRemoteConnection previously returned hard-coded '-' for containers,
  images, and cpus after a successful auth/check ping.
- Now fires three parallel requests (Promise.allSettled) after auth passes:
    /api/stats          → containers total + running count
    /api/system/stats   → cpu.cores
    /api/system/images  → image list length
- Each field falls back to '-' gracefully if an endpoint is unavailable,
  so a slow or older remote instance never breaks the connection test.

DEP0060 util._extend suppression:
- http-proxy@1.18.1 calls util._extend when createProxyServer() is first
  invoked at runtime (NOT at import time). A process.emitWarning override
  placed before the proxy instantiations intercepts only DEP0060 without
  suppressing any other warnings. No package version changes needed.

Also includes linter/formatter normalisation across multiple files.
2026-03-19 16:06:47 -04:00
SaelixCode fddd855624 fix: Distributed API proxy memory leak, node switcher refresh, and copy button
Proxy memory leak (MaxListenersExceededWarning + DEP0060):
createProxyMiddleware was instantiated inside the request handler on every
single API call. Each new instance registered fresh 'close' listeners on the
HTTP server and re-ran the http-proxy util._extend deprecated path. After ~10
requests the MaxListeners threshold was breached. Fix: declare ONE global
remoteNodeProxy at startup using the router option to dynamically resolve the
target URL per request. Listeners are registered once. ECONNREFUSED errors are
caught in the on.error handler and returned as structured 502 JSON.

Node switcher "nothing happens":
EditorLayout had a single useEffect([], []) that called refreshStacks() once
on mount. Changing the active node updated NodeContext state and localStorage
but nothing re-triggered the stack list fetch. Fix: split into two effects —
notifications polling (no dependency) and a stack-refresh effect keyed on
activeNode?.id. When the node changes, stale editor/container/file state is
cleared and the stacks for the new node are fetched.

Copy button silently failing:
navigator.clipboard.writeText() throws DOMException in non-HTTPS / non-localhost
contexts (e.g. http://192.168.x.x). The uncaught async exception silently
swallowed the success toast and state update. Fix: wrapped in try/catch with
an execCommand('copy') textarea fallback and a final error toast if both fail.
2026-03-19 15:34:04 -04:00
SaelixCode 8c51198468 feat: Remote Nodes Wiring & SSH Adapters 2026-03-18 12:55:30 -04:00
SaelixCode 02e1ebe1b6 feat: Remote Nodes Foundation (Strategy B) - Add nodes table with auto-seeded default local node in DatabaseService - Create NodeRegistry service for multi-instance Docker daemon connections - Add 6 Node management API endpoints (CRUD + test connection) - Create NodeManager component with table UI and connection testing - Add NodeContext for frontend-wide active node state management - Add node switcher dropdown to sidebar (visible when >1 node) - Add Nodes tab to Settings Hub 2026-03-18 11:45:04 -04:00
SaelixCode 9af0f85749 fix: refine log level parsing and implement bottom auto-scroll 2026-03-06 23:07:17 -05:00
SaelixCode a4a5365da1 feat: implement centralized logging and historical metrics dashboard 2026-03-06 21:05:23 -05:00
SaelixCode b765403dcf feat: implement real-time container log streaming via SSE 2026-03-06 15:41:06 -05:00
SaelixCode 44acfd7d90 feat: polish app store ui and add advanced deployment configuration 2026-03-05 14:06:31 -05:00
SaelixCode 1676dc22df feat: implement app templates storefront and deployment engine 2026-03-04 14:26:07 -05:00
SaelixCode b3521a078b feat: add Docker API endpoints for managing images, volumes, and networks; implement Resources view in editor 2026-03-04 11:17:16 -05:00
SaelixCode b45553c927 feat: refactor authentication handling and migrate config to database 2026-03-04 09:05:03 -05:00
SaelixCode 386de2c76f refactor: remove redundant pro tip from environment tab in editor 2026-03-03 19:33:04 -05:00
SaelixCode 594bec6d91 feat: update environment file selection logic and enhance editor UI with helpful tips 2026-03-03 19:18:32 -05:00
SaelixCode 13ef241d02 feat: enhance environment file handling by resolving multiple env files and adding selection functionality in the editor 2026-03-03 19:13:28 -05:00
SaelixCode ed1a60bee0 feat: implement dynamic env file resolution and enhance error handling in stack operations 2026-03-03 15:25:05 -05:00
SaelixCode ccf6ed4bc8 refactor: rename isActionLoading to loadingAction for clarity and consistency 2026-03-03 12:47:41 -05:00
SaelixCode 10a483a0a6 feat: await command execution in stack management endpoints and update container stats display based on state 2026-03-03 12:06:19 -05:00
SaelixCode 3161d59abf feat: add save and deploy functionality to EditorLayout component 2026-03-03 11:51:48 -05:00
SaelixCode 2b96b08c04 feat: update stack deployment endpoint and enhance deployment functionality 2026-03-03 11:41:44 -05:00
SaelixCode 07f4d18a22 Add logo to branding header in EditorLayout component 2026-02-27 14:29:09 -05:00
SaelixCode 6bbd9b6484 feat: add notification deletion functionality in API and EditorLayout 2026-02-27 12:47:16 -05:00
SaelixCode f4700ebfc9 feat: enhance API error handling and improve alert message formatting 2026-02-27 12:22:10 -05:00
SaelixCode 91cafb49f9 refactor: update journal mode comment for DatabaseService and optimize CPU state check in EditorLayout 2026-02-27 11:10:35 -05:00
SaelixCode b95838ae9c feat: remove unused alert management code and optimize notification fetching interval 2026-02-27 10:17:33 -05:00
SaelixCode 0899fc0d64 feat: update alert configuration button text from "Configure Alerts" to "Create Alert" 2026-02-27 00:14:36 -05:00
SaelixCode c6eb9d76e7 feat: add Notification Settings Modal and Stack Alert Sheet components
- Implemented NotificationSettingsModal for configuring notification agents (Discord, Slack, Webhook) and global settings.
- Added StackAlertSheet for managing stack-specific alert rules with metrics, thresholds, and cooldowns.
- Introduced reusable UI components: DropdownMenu, Popover, Select, Sheet, Slider, and Switch.
- Enhanced Tabs component by removing unnecessary client directive.
2026-02-26 23:09:47 -05:00
SaelixCode ba7853b2b3 feat: enhance item hover effects in Command component for improved user interaction 2026-02-26 20:07:09 -05:00
SaelixCode fcf0c9f983 feat: add HostConsole component for interactive terminal access and integrate into EditorLayout 2026-02-26 19:52:43 -05:00
SaelixCode 4932d90e4a feat: add HoverCard component and integrate it into EditorLayout for enhanced container status display 2026-02-26 18:41:10 -05:00
SaelixCode 5fe416f941 feat: add frontend index.html and Vite logo; enhance system stats API with network metrics
- Created a new index.html file for the frontend with theme handling and linked assets.
- Added a Vite logo SVG to the public directory.
- Updated the system stats API to include network statistics (rxBytes, txBytes, rxSec, txSec).
- Enhanced the EditorLayout component to display network I/O rates for containers.
- Modified HomeDashboard to show host network statistics with appropriate formatting.
2026-02-26 14:43:45 -05:00
SaelixCode 9b9d4de620 feat: enhance container badge display with tooltip for status details 2026-02-26 11:07:03 -05:00
SaelixCode ba986021cd feat: enhance container status display with tooltip for detailed information 2026-02-26 10:50:13 -05:00
SaelixCode 7ce0409ee3 feat: add xterm search and serialize addons, enhance terminal component with search functionality and download logs feature 2026-02-25 23:38:11 -05:00
SaelixCode 36335ee5ab feat: improved EditorLayout component for managing Docker Compose stacks, editing files, and monitoring containers. 2026-02-25 23:30:24 -05:00
SaelixCode 46e6aedfd0 feat: Improved frontend UI components with shadcn 2026-02-25 22:33:51 -05:00
SaelixCode aeb3d6e812 feat: implement initial frontend application with Monaco editor, Docker Compose stack management, and container monitoring. 2026-02-25 14:18:10 -05:00
SaelixCode ac6b8e2849 feat: Initialize core frontend application, editor layout, and integrate UI components including alert dialogs and toasts. 2026-02-25 10:18:59 -05:00
SaelixCode cdecbba59a feat: Implement a comprehensive Docker Compose stack management UI with file editing, deployment, container monitoring, and interactive bash access. 2026-02-24 19:48:56 -05:00
SaelixCode d5fac02da3 feat: Implement Docker Compose stack management, container monitoring, and interactive bash terminal with new frontend and backend services. 2026-02-22 14:40:54 -05:00
SaelixCode 280090bd2b feat: Initialize core backend server with authentication, WebSocket, and Docker integration, and add initial frontend editor layout. 2026-02-21 15:58:53 -05:00
SaelixCode 18c51f083e feat: Implement web-based Docker Compose stack management with file editing, deployment, container monitoring, and terminal access. 2026-02-21 15:05:05 -05:00
SaelixCode ad8c663629 refactor: update ComposeService and DockerController for improved path handling and environment variable management; enhance EditorLayout for dynamic button rendering based on stack state 2026-02-20 22:20:34 -05:00
SaelixCode 800d47845f refactor: migrate to directory-based stack structure
- Updated ComposeService to run docker commands from stack-specific directories, ensuring relative paths resolve correctly.
- Refactored FileSystemService to manage stacks as directories, including methods for creating, updating, and deleting stacks.
- Implemented automatic migration of existing flat-file stacks to the new directory structure on server startup.
- Adjusted API routes to use stack names instead of filenames, simplifying stack management.
- Modified frontend components to align with the new stack naming conventions and removed unnecessary file extensions.
2026-02-20 19:45:45 -05:00
unknown 293f9cef26 Initial commit: Sencho V1 complete with Auth and Dockerization 2026-02-20 18:39:32 -05:00