Commit Graph

2530 Commits

Author SHA1 Message Date
rcourtman 8963d69764 feat: add metrics store point limiting and mock improvements
- Add point limiting to metrics queries
- Improve mock metrics history for testing
- Add monitor enhancements
2026-01-22 22:29:56 +00:00
rcourtman c2f43c995e feat: enhance history charts with maxPoints and source tracking
- Add maxPoints param for backend point limiting
- Add source field to track data origin (store/memory/live)
- Simplify GuestDrawer by removing split view toggle
- Improve chart rendering and responsiveness
2026-01-22 22:29:41 +00:00
rcourtman 66f645085a refactor: rebrand AI to Pulse in user-facing text
- AI Assistant → Pulse Assistant
- AI Patrol → Pulse Patrol
- AI Insights → Pulse Insights
- AI Cost & Usage → Pulse Cost & Usage
- AI Intelligence Summary → Pulse Intelligence Summary
- AI Permission Level → Pulse Permission Level
- AI commands enabled → Pulse commands enabled
- AI features → Pulse features

Internal file names and code comments unchanged (describe technology)
2026-01-22 22:27:27 +00:00
rcourtman 8d82c7d8d8 style: replace purple AI gradients with Pulse blue
- Changed chat header, send button from violet to blue-600
- Updated user message bubbles from purple to blue
- Changed empty state icon to neutral gray/blue
- Converted AI context row animations from purple to blue-500
- Toggle bar now uses bg-blue-600
2026-01-22 22:27:04 +00:00
rcourtman 422efdde61 Restore UI improvements and refine Docker/Hosts display
- Restore 'mini' mode for StackedDiskBar.
- Restore layout fixes (fixed table layout, mobile columns) for Docker and Hosts tables.
- Remove 'Ask AI' and AI context selection features.
- Docker: Use compact 'Cube' icon for Podman pods to prevent name obstruction.
- Docker: Show concise image names (strip registry URL).
- Backend: Include pending fixes for AI providers.
2026-01-22 18:03:35 +00:00
rcourtman defe298ddd Refactor: AI provider and executor multi-tenancy support
- Updated AI providers and tests for context/tenant awareness
- Refactored tool executor for multi-tenant state handling
- Added new tests for Docker control and update tools
2026-01-22 16:51:45 +00:00
rcourtman f378a36a5e Feat: Docker Unified Table and frontend UI improvements
- Implemented Docker Unified Table and Cluster Services view
- Improved date/time formatting utilities
- Updated agent tests for multi-tenancy support in Pulse Unified Agent
2026-01-22 16:43:41 +00:00
rcourtman 5f56efa88a Refactor: Core monitoring and update managers multi-tenancy
- Updated monitoring reload and metrics history to be tenant-aware
- Refactored update manager and checksum validation for multi-tenancy
- Enhanced test coverage for agent updates and metrics storage
2026-01-22 16:43:24 +00:00
rcourtman 798f6a8deb Refactor: Update AI tools and tests for multi-tenancy
- Refactored tool execution to handle tenant-scoped contexts
- Added new tests for infrastructure, control, and kubernetes tools
- Improved test coverage for agentic chat and approval store
2026-01-22 16:43:08 +00:00
rcourtman f2541b0d6c Refactor: Multi-tenancy support for API and License handlers
- Updated LicenseHandlers and LicenseService to be context/tenant aware
- Refactored API router and middleware to support tenant-scoped license checks
- Updated associated tests for context-aware handlers
2026-01-22 16:42:39 +00:00
rcourtman 267d5f97e5 Support: Fix OpenAI tool schema error by ensuring properties field is always present
- Removed omitempty from InputSchema.Properties
- Ensures OpenAI accepts tools with no input parameters
2026-01-22 16:41:57 +00:00
rcourtman 85f171290b Support: Add Kubernetes monitoring options to agent installers
- Added --kube-include-all-pods and --kube-include-all-deployments flags
- Added --help support to install.sh
- Moved root check in install.sh to allow viewing help as non-root
2026-01-22 16:41:40 +00:00
rcourtman 8ffec7c124 Support: Fix audit log permissions and improve UI empty state
- Updated server installer to ensure correct permissions for audit directory
- Added descriptive empty state and filter clearing to AuditLogPanel
2026-01-22 16:41:18 +00:00
rcourtman 351bd0539e feat(dev): add file backup watcher status to dev-check 2026-01-22 14:27:14 +00:00
rcourtman c743bd2c30 feat(dev): add optional file backup watcher to hot-dev
When scripts/watch-backup.sh exists (gitignored, local only), hot-dev
automatically starts a file watcher that backs up source files on every
save to ~/.pulse-backups/. Protects against accidental data loss from
git checkout or other mishaps, regardless of what tool makes the change.
2026-01-22 14:25:21 +00:00
rcourtman 1b2885c484 fix(ui): restore morning changes to GuestDrawer and DockerUnifiedTable
Recovered from git reflog commits c75972d5 and 0a00e201:
- GuestDrawer: drawer controls layout improvements
- DockerUnifiedTable: column width fixes, removed unused version badge code
2026-01-22 14:08:31 +00:00
rcourtman 25567204f1 fix(ui): add missing onClick prop to GuestRow
The recovered GuestRow component was missing the onClick prop that
Dashboard.tsx expects for row click handling to open the guest drawer.
2026-01-22 14:04:00 +00:00
rcourtman ffbcefee44 feat(ui): restore Docker and dashboard improvements
Recovered from git dangling commits (codex snapshots):
- DockerHostSummaryTable: Add StackedContainerBar for container counts
- DockerUnifiedTable: Column width improvements, AI integration
- GuestDrawer: Improved controls layout and styling
- GuestRow: Minor improvements
- StackedDiskBar: Refactored implementation
- HostsOverview: Layout updates
- NodeSummaryTable: Improvements
- animations.css: Add AI context row highlight styling
- types/nodes.ts: Additional type definitions
2026-01-22 13:53:02 +00:00
rcourtman 8412cc7ddb fix: env overrides and OS-aware test improvements
- Add PBS/PMG polling interval environment variable overrides in config.go
- Fix temp path expectation in detect_root_test.go using filepath.Join
- Use EvalSymlinks for symlink target comparison in self_update_test.go
- Add Linux-only skip for MAC fallback test in agent_new_test.go
- Add OS-aware RAID/SMART assertions in agent_metrics_test.go
2026-01-22 13:49:05 +00:00
rcourtman ad4acf1222 chore: add frontend utilities and metrics documentation
- Add useResizeObserver and useTooltip React hooks
- Add utility functions for anomaly colors, error extraction, text width, and threshold colors
- Add METRICS_DATA_FLOW.md documentation
- Ignore SQLite temp files (*.db-shm, *.db-wal)
2026-01-22 13:48:41 +00:00
rcourtman 289d95374f feat: add multi-tenancy foundation (directory-per-tenant)
Implements Phase 1-2 of multi-tenancy support using a directory-per-tenant
strategy that preserves existing file-based persistence.

Key changes:
- Add MultiTenantPersistence manager for org-scoped config routing
- Add TenantMiddleware for X-Pulse-Org-ID header extraction and context propagation
- Add MultiTenantMonitor for per-tenant monitor lifecycle management
- Refactor handlers (ConfigHandlers, AlertHandlers, AIHandlers, etc.) to be
  context-aware with getConfig(ctx)/getMonitor(ctx) helpers
- Add Organization model for future tenant metadata
- Update server and router to wire multi-tenant components

All handlers maintain backward compatibility via legacy field fallbacks
for single-tenant deployments using the "default" org.
2026-01-22 13:39:06 +00:00
rcourtman 31989803f0 Remove unused version badge code 2026-01-22 09:47:26 +00:00
rcourtman 0a00e20172 Improve Docker table column layout and image display
- Show short image name (image:tag) instead of full registry path
- Remove redundant version badges since tag is now visible
- Add minimum width to container names to prevent over-compression
- Make pod and host badges more compact with tighter padding
- Rebalance column widths (resource 18%, image 12%)
2026-01-22 09:45:33 +00:00
rcourtman c75972d57c Fix mock metrics history and guest drawer controls 2026-01-22 09:39:53 +00:00
rcourtman 6e2cae2363 feat(ui): add history chart components for guest drawer
- HistoryChart: single metric visualization (CPU, memory, disk)
- UnifiedHistoryChart: combined multi-metric view
- Support for time range selection (1h to 90d)
- Responsive charts with proper dark mode support
- Fix corrupted tools_query_test.go from stash merge
2026-01-22 00:46:52 +00:00
rcourtman 2e0da42a81 chore: reliability and maintenance improvements
Host agent:
- Add SHA256 checksum verification for downloaded binaries
- Verify checksum file matches expected bundle filename

WebSocket:
- Add write failure tracking with graceful disconnection
- Increase write deadline to 30s for large state payloads
- Better handling for slow clients (Raspberry Pi, slow networks)

Monitoring:
- Remove unused temperature proxy imports
- Add monitor polling improvements
- Expand test coverage

Other:
- Update package.json dependencies
- Fix generate-release-notes.sh path handling
- Minor reporting engine cleanup
2026-01-22 00:45:04 +00:00
rcourtman f1c2d7c12c docs: add logging overrides to configuration reference
Document LOG_FILE, LOG_MAX_SIZE, LOG_MAX_AGE, and LOG_COMPRESS
environment variables for log file configuration.
2026-01-22 00:44:33 +00:00
rcourtman a55bdb7a3a feat(api): security and metrics history improvements
- Require admin + settings:write scope for setup-script-url endpoint
- Add license enforcement for long-term metrics (30d/90d require Pro)
- Add downsampling step calculation for metrics history queries
- Add isContainerSSHRestricted helper for SSH restriction checks
- Clean up temperature proxy references from config handlers
- Minor OIDC and rate limit improvements
2026-01-22 00:44:12 +00:00
rcourtman f293f41499 refactor: consolidate AI tools tests
- Remove executor_test.go (tests moved to specific tool test files)
- Refactor infrastructure, patrol, profiles, and query tests
- Add query tool enhancements for better resource filtering
2026-01-22 00:43:41 +00:00
rcourtman 633eea83db refactor: remove deprecated config fields
- Remove unused envconfig tags (BackendHost, FrontendHost, etc.)
- Remove APITokenEnabled (infer from token count)
- Remove IframeEmbeddingAllow, Port, Debug, ConcurrentPolling
- Clean up temperature proxy comments from ClusterEndpoint
- Simplify API token diagnostic to use config field directly
2026-01-22 00:43:27 +00:00
rcourtman 0aa6e94b39 feat(ui): inline guest drawer on row click
- Add onClick handler to GuestRow component
- Toggle GuestDrawer inline below clicked row
- Show metrics history charts within the drawer
- Click row again or close button to collapse
2026-01-22 00:43:10 +00:00
rcourtman 28eb30cb9a fix(ui): refresh alert config on WebSocket reconnection
Fixes issue where alert toggle appears disabled after connection loss.
- Add websocket_reconnected event to event bus
- Emit event when WebSocket successfully reconnects
- App subscribes and refreshes alert activation state on reconnection
2026-01-22 00:42:56 +00:00
rcourtman c8b6cbfc6d feat(pro): long-term metrics history (30d/90d)
- Add FeatureLongTermMetrics license feature for Pro tier
- Implement tiered storage in metrics store (raw, minute, hourly, daily)
- Add covering index for unified history query performance
- Seed mock data for 90 days with appropriate aggregation tiers
- Update PULSE_PRO.md to document the feature
- 7-day history remains free, 30d/90d requires Pro license
2026-01-22 00:42:41 +00:00
rcourtman bb47e1831c security: SSRF protection for webhook URLs
- Add DNS resolution validation to block webhooks to internal IPs
- Validate hostname resolves before accepting webhook URL
- Block metadata endpoints (AWS, GCP, Azure)
- Block localhost, private IPs, and reserved ranges
- Add context timeout for DNS lookups (2s)
2026-01-22 00:42:23 +00:00
rcourtman d50ee66604 Fix TypeScript type error in GuestDrawer metricsResource
Add explicit ResourceType typing to metricsResource function
to fix type mismatch with HistoryChart/UnifiedHistoryChart props.
2026-01-22 00:31:41 +00:00
rcourtman 222c88f33c chore: Mac-compatible dev scripts
- hot-dev.sh: Fix hostname -I for macOS, use ifconfig instead
- hot-dev.sh: Fix PULSE_AUDIT_DIR for mock mode
- hot-dev.sh: Use PULSE_REPOS_DIR for Pro module detection
- dev-check.sh: Fix pgrep -c (not supported on macOS)
- dev-check.sh: Use /tmp/pulse-debug.log on macOS instead of journalctl
- Update internal/api docs to use env var paths
2026-01-22 00:30:15 +00:00
rcourtman 272b67b913 Disable alerts overview links when alerts off 2026-01-21 23:03:04 +00:00
rcourtman ccc32083ba security: fix seroval vulnerabilities (CVE-2025-*)
Override seroval to ^1.4.1 to fix 8 high-severity vulnerabilities:
- Remote Code Execution via JSON Deserialization
- Prototype Pollution via JSON Deserialization
- Denial of Service via Array/RegExp serialization

seroval is a transitive dependency from solid-js which pins ~1.3.0.
2026-01-21 19:38:29 +00:00
rcourtman 643bc04dd9 fix(ui): prevent Agent badge from overlapping uptime column
Add overflow handling to the Name column cell and badges container
to prevent PVE/Agent/cluster badges from overflowing into adjacent
columns on narrower xl screens.

Related to #1141
2026-01-21 19:07:30 +00:00
rcourtman 61bb582d82 fix: disk-exclude now works with device paths and disk I/O
- Add MatchesDiskExclude() to check both device path and mountpoint
- Add MatchesDeviceExclude() for device-only matching
- Update collectDisks to check device in addition to mountpoint
- Update collectDiskIO to respect disk exclusions
- Patterns like /dev/sda, sda, or /mnt/backup all work now

Related to #1142
2026-01-21 19:03:05 +00:00
rcourtman c44cb5af5b fix: use pure Go SQLite driver for arm64 compatibility
Switch from mattn/go-sqlite3 (CGO) to modernc.org/sqlite (pure Go)
for auth, audit, and notification queue storage. This enables SQLite
functionality on arm64 Docker images which are built with CGO_ENABLED=0.

Related to #1140
2026-01-21 18:58:23 +00:00
rcourtman b030584248 fix(frontend): fix TypeScript errors in Settings components
- ConfiguredNodeTables.tsx: remove unused hostAgent variable and
  findMatchingHostAgent function
- NodeModal.tsx: remove unused createMemo import and fix undefined
  temperatureToggleDisabled reference by using inline prop check
2026-01-21 12:09:55 +00:00
rcourtman 098f645b34 chore: update Docker configs and installer
- Dockerfile: remove sensor proxy build target
- docker-compose.yml: remove proxy service configuration
- install.sh: simplify installer without proxy
- updates/manager.go: minor updates
2026-01-21 12:03:52 +00:00
rcourtman 925815c3e7 test: update config and monitoring tests after proxy removal
Remove references to sensor proxy config fields in test cases.
2026-01-21 12:03:30 +00:00
rcourtman 7599915b8f refactor(api): remove sensor proxy config from API handlers
- config_handlers.go: remove proxy configuration endpoints
- system_settings.go: remove proxy-related settings
- rate_limit_config.go: update rate limit configuration
- Update related test files
2026-01-21 12:02:46 +00:00
rcourtman 98d5a5684a chore(scripts): update build and install scripts
- build-release.sh: remove sensor proxy binary build
- install-docker.sh: simplify agent installation
- hot-dev.sh, cleanup.sh: remove proxy references
- validate-release.sh: update validation checks
2026-01-21 12:02:03 +00:00
rcourtman 9d574355bf feat(frontend): update Settings UI after sensor proxy removal
- ConfiguredNodeTables.tsx: remove proxy-related status columns
- DiagnosticsPanel.tsx: update diagnostics display
- NodeModal.tsx: remove sensor proxy config options
- ProxmoxAgentNodesPanel.tsx: simplify node configuration
- config.ts, nodes.ts: remove proxy-related type definitions
2026-01-21 12:01:41 +00:00
rcourtman 0ca6001bad docs: update documentation after sensor proxy deprecation
Update docs to reflect the simplified temperature monitoring architecture:
- Remove references to pulse-sensor-proxy throughout
- Update TEMPERATURE_MONITORING.md to focus on unified agent approach
- Update CONFIGURATION.md, DEPLOYMENT_MODELS.md, FAQ.md
- Remove SECURITY_CHANGELOG.md (proxy-specific security notes)
- Clarify current recommended setup in various guides
2026-01-21 12:00:59 +00:00
rcourtman 7049f5b43c refactor: simplify temperature monitoring after sensor proxy removal
Remove proxy-related temperature code paths:
- temperature.go: remove proxy client integration and fallback logic
- config.go: remove SensorProxyEnabled and related config fields
- monitor.go: remove proxy client initialization and state

Temperature monitoring now relies solely on the unified agent approach.
2026-01-21 12:00:28 +00:00
rcourtman d306e02151 fix: remove unused imports and obsolete tests in API handlers
- diagnostics.go: remove unused path/filepath and syscall imports
- router.go: remove unused errors import
- diagnostics_test.go: remove tests for deleted functions
  (normalizeHostForComparison, matchInstanceNameByHost)

These changes fix build errors after sensor proxy removal.
2026-01-21 11:59:41 +00:00