Commit Graph

1973 Commits

Author SHA1 Message Date
rcourtman e7d6d2f1ec Polish: Standardize API calls to use apiClient 2025-12-23 12:19:39 +00:00
rcourtman 50bebd5b8c Polish: Fix duplicate import in Settings.tsx 2025-12-23 12:17:03 +00:00
rcourtman 0c7aecca29 Polish: Fix notification arguments in APITokenManager 2025-12-23 12:16:12 +00:00
rcourtman 4ef52cedb6 Polish: Standardize notifications in remaining components 2025-12-23 12:16:02 +00:00
rcourtman 6ebdc5f465 Polish: Consistent notifications in Settings modals 2025-12-23 12:15:23 +00:00
rcourtman 363f5f2318 Polish: Consistent notifications in FirstRunSetup.tsx 2025-12-23 12:15:00 +00:00
rcourtman dd7893700b Polish: Consistent notifications in Settings.tsx 2025-12-23 12:14:47 +00:00
rcourtman b0c1909831 Polish: Fix notification arguments in Alerts.tsx 2025-12-23 12:14:27 +00:00
rcourtman 4f8ed2e422 Polish: Add warning to notificationStore 2025-12-23 12:14:08 +00:00
rcourtman 13426d35a3 Polish: Consistent notifications in Alerts.tsx 2025-12-23 12:13:45 +00:00
rcourtman a2146fb41f Polish: Fix duplicate import in NodeModal 2025-12-23 12:13:11 +00:00
rcourtman 268c0ed7c3 Polish: Remove unused toast imports and finalize notifications 2025-12-23 12:12:57 +00:00
rcourtman c7ce4a2974 Polish: Consistent notifications in PBS setup and scripts 2025-12-23 12:12:34 +00:00
rcourtman 9e06b23b44 Polish: Standardize manual setup notifications 2025-12-23 12:12:10 +00:00
rcourtman 705d74423e Polish: Consistent notifications in Quick Setup 2025-12-23 12:11:54 +00:00
rcourtman 095ba3d85c Polish: Fix agent command generation logic in NodeModal 2025-12-23 12:11:08 +00:00
rcourtman b3f751a41d Polish: Usage of NodesAPI in NodeModal 2025-12-23 12:10:43 +00:00
rcourtman 6205fa19f5 Polish: Standardize agent command API usage 2025-12-23 12:09:57 +00:00
rcourtman 704514f149 Polish: Consistent API usage in UnifiedAgents 2025-12-23 12:06:43 +00:00
rcourtman 42799e274a Polish: Fix remaining window.showToast in UnifiedAgents loop 2025-12-23 12:03:49 +00:00
rcourtman dfffa12002 Polish: refactor UnifiedAgents to use notificationStore 2025-12-23 12:00:43 +00:00
rcourtman 74df78d4d1 Refine v5 release: UI consistency and logging cleanup 2025-12-23 11:58:23 +00:00
rcourtman 9d8945a120 feat(ui): Use inline copy buttons in agent setup for consistency. Related to #874 2025-12-23 10:32:47 +00:00
rcourtman b342581606 fix: Update tier display name test for Pro Intelligence rename 2025-12-23 10:11:45 +00:00
rcourtman 56be1ceb5c ux: Add step numbers to agent setup flow. Related to #872
- Step 1: Generate API token (with blue circle)
- Step 2: Installation commands (with green circle when unlocked)
- Shows locked preview of Step 2 before token generation, making it clear
  that installation commands will appear after generating a token
- Addresses user feedback about the unclear agent creation flow
2025-12-23 09:44:28 +00:00
rcourtman b3b87bda76 fix: Correct misleading 'button above' text in node setup. Related to #873
The copy button is visually positioned to the right of the code block,
not above it. Changed to 'Click the copy button' for clarity.
2025-12-23 09:41:38 +00:00
rcourtman 925c7ed5b6 feat: Add Connection URL override for agent installation. Related to #874 2025-12-23 09:40:01 +00:00
rcourtman d190e81c70 fix: Prevent re-migration of deleted env-based API tokens
When a user deletes an API token that was migrated from .env, track
the hash in a suppression list to prevent it from being re-migrated
on the next restart.

Changes:
- Add SuppressedEnvMigrations field to Config
- Add env_token_suppressions.json persistence
- Check suppression list during env token migration
- Record suppressed hash when deleting "Migrated from .env" tokens
- Update RemoveAPIToken to return the removed record

Related to #871
2025-12-23 05:10:47 +00:00
rcourtman 8952c9c8a0 feat(license): rename premium tier to Pro Intelligence 2025-12-23 00:30:55 +00:00
rcourtman e4ec73a4cb feat(ai): add finding validation layer to reduce patrol noise
- Add validateAIFindings() that cross-checks AI findings against actual metrics
- Filter out low-confidence findings (CPU <50%, memory <60%, disk <70%)
- Always allow critical findings, backup issues, and reliability findings through
- Update AI system prompt with stricter thresholds and explicit noise examples
- Add 'before creating a finding' checklist for AI (the 3am test)
- Update AI.md docs with clear value proposition and expectations
- Add comprehensive tests for the validation layer

This ensures paying users get immediate value without noise.
2025-12-22 23:28:09 +00:00
rcourtman baa5f8cf6a chore: AI patrol and baseline improvements
- Enhanced patrol finding display in Alerts.tsx
- Improved baseline store with better error handling
- Added clean thinking test coverage
- Updated patrol logic for better finding management
2025-12-22 23:12:11 +00:00
rcourtman 0001d1cbbc feat: add PBS datastores to unified Storage view (#869)
PBS datastores are now displayed in the Storage overview alongside PVE
storage. Each PBS datastore is converted to a Storage entry with:
- type: 'pbs'
- content: 'backup'
- shared: true
- active: based on PBS instance status

This provides a complete picture of all storage resources in one view
while keeping detailed PBS info in the dedicated PBS section.

Closes #869
2025-12-22 22:12:04 +00:00
rcourtman 16b383ced9 fix: use configured Guest URLs for PVE/PBS/PMG navigation (#870)
- Fix PVE nodes: buildNodeUrl in ProxmoxNodesSection.tsx now prioritizes
  guestURL over host (was ignoring guestURL entirely)
- Add PBS support: GuestURL field added to PBSInstance config, model,
  and API handlers
- Add PMG support: GuestURL field added to PMGInstance config, model,
  and API handlers
- Update NodeSummaryTable to use guestURL for PBS nodes
- Frontend types updated for PBS/PMG guestURL support

The Guest URL setting in node configuration now works correctly across
all node types. When set, it takes priority over the Host URL when
clicking on node names to navigate to the Proxmox/PBS/PMG web UI.

Closes #870
2025-12-22 22:05:25 +00:00
rcourtman 86e9ce9f20 fix: default mock mode to false 2025-12-22 21:47:07 +00:00
rcourtman 2dfacfff18 chore: gitignore .gemini/ folder 2025-12-22 21:46:18 +00:00
rcourtman 039cac0e39 fix: prevent demo findings from being persisted to disk 2025-12-22 21:45:07 +00:00
rcourtman 16d43c06d7 Add clean separation between mock and real AI findings
- Add IsMockResource() helper to detect mock data resources by naming patterns
- Filter out heuristic findings from mock resources when PULSE_MOCK_MODE is off
- Mock findings still appear when demo mode is enabled
- Ensures users don't see mock data findings in production
2025-12-22 20:23:15 +00:00
rcourtman b0a278cc33 Fix demo mode detection to use PULSE_MOCK_MODE env var
The AI demo/mock findings were using a non-existent MOCK_ENABLED
env var. Changed to PULSE_MOCK_MODE which is the actual env var
used by the mock data system.
2025-12-22 20:09:56 +00:00
rcourtman d3d4379de6 fix(ci): restore arm64 Docker builds in publish workflow
The staging images in preflight are intentionally amd64-only for speed,
but the publish workflow was just copying them instead of building
multi-arch. Now builds linux/amd64,linux/arm64 from source at publish.

Related to #868
2025-12-22 20:03:39 +00:00
rcourtman e5bdd6b9f0 Unify AI patrol system: add Kubernetes analysis, enhance Docker/Podman detection
- Add AnalyzeKubernetes to PatrolConfig and enable by default
- Add analyzeKubernetesCluster() for K8s heuristic analysis
  - Detect offline clusters, nodes not ready, CrashLoopBackOff pods
  - Detect failed/pending pods and unavailable deployments
- Add K8s clusters to LLM context in buildInfrastructureSummary()
- Add kubernetes_cluster as valid resource type in AI prompt

- Enhance analyzeDockerHost() for Docker/Podman
  - Podman-aware messaging based on runtime
  - Add unhealthy container detection (health checks)
  - Add exited container with error detection
  - Add high CPU detection (>90%)
  - Add stale host detection (10+ minutes)
  - Tiered severity for restarts (>10 = critical)

- Add 20 new tests for K8s and Docker analysis
2025-12-22 18:03:46 +00:00
rcourtman 4c686ae26d feat: add CLI commands for mock mode management
New commands:
  pulse mock enable   - Enable mock mode
  pulse mock disable  - Disable mock mode
  pulse mock status   - Show current status

Makes it easy to toggle between mock and real data without
manually editing config files.
2025-12-22 17:26:57 +00:00
rcourtman 221d24360f feat: add demo AI findings for mock mode
When MOCK_ENABLED=true, Pulse now injects realistic AI patrol
findings to showcase the AI features without requiring actual
LLM API calls. This enables the demo instance to demonstrate:

- Critical/warning/info findings with realistic content
- Patrol run history
- Actionable recommendations

Also includes refinements to dismissal logic from earlier work:
- Only 'not_an_issue' creates permanent suppression
- 'expected_behavior' and 'will_fix_later' just acknowledge
2025-12-22 17:16:26 +00:00
rcourtman 3ba84e1e8f feat: make Docker host names clickable in container table
When a Docker host has a custom URL configured (e.g., Portainer link),
the host name in the container table's group headers is now a clickable
link that opens the URL in a new tab. A link icon appears next to the
host name to indicate it's clickable.

Related to #860
2025-12-22 15:05:34 +00:00
rcourtman 794bef1d73 docs: update AI.md with v5 patrol and finding management features
- Added finding management section (resolve, dismiss, suppress)
- Documented patrol service and severity levels
- Added AI-assisted remediation capabilities
- Added Ollama tool/function calling support note
- Added new troubleshooting tips for findings persistence
2025-12-22 14:43:56 +00:00
rcourtman 0469700da9 fix: clean up debug logging and fix flaky encryption test
1. Fixed TestNewConfigPersistenceFailsWhenEncryptedDataPresentWithoutKey
   - Test was picking up real encryption key from /etc/pulse during migration
   - Now temporarily moves system key during test for proper isolation
   - Uses t.Cleanup to ensure key is restored even on failure

2. Cleaned up console.log statements in production code
   - Dashboard.tsx: replaced console.log with logger.debug for metadata events
   - CompleteStep.tsx: removed verbose agent detection debug logs

These changes reduce log noise in production while maintaining debug
capability in development mode.
2025-12-22 14:35:48 +00:00
rcourtman a4fccccec2 fix: reduce WebSocket reconnection log noise in host agent
Addresses #866 - agents were logging 'WebSocket connection failed' warnings
even during normal reconnection scenarios (server restart, network blip, etc).

Changes:
- Normal close errors (1000, 1001, connection reset) now log at Debug level
- Only log Warning after 3+ consecutive failures
- Changed 'Connecting to Pulse' from Info to Debug to reduce noise
- Successful connections still log at Info level

The WebSocket is only used for AI command execution, not metrics, so
transient disconnections don't affect monitoring functionality.
2025-12-22 14:11:23 +00:00
rcourtman 288fb9a101 fix: persist finding dismissal state across restarts
User feedback fields (DismissedReason, UserNote, TimesRaised, Suppressed, Source)
were not being saved to disk, causing 'expected behavior' dismissals to be lost
after Pulse restarted.

- Add missing fields to AIFindingRecord in persistence.go
- Update FindingsPersistenceAdapter to save/load these fields
- Add comprehensive tests for dismissal persistence round-trip

Fixes issue where Frigate storage warning kept reappearing despite being
marked as expected behavior.
2025-12-22 11:18:43 +00:00
rcourtman c64c8b88e2 fix: Add missing guest filtering props to ThresholdsTable tests 2025-12-22 10:26:53 +00:00
rcourtman 53ea1fbee2 test: Add unit tests for guest tag filtering 2025-12-22 10:24:39 +00:00
rcourtman b5b98f577d feat: Add guest filtering by tag and name prefix via Alert Configuration. Resolves #863 2025-12-22 10:03:12 +00:00