Skip to content

feat(ui): add agent completion browser alerts - #2413

Draft
sriaradhyula wants to merge 3 commits into
mainfrom
prebuild/feat/browser-agent-notifications
Draft

feat(ui): add agent completion browser alerts#2413
sriaradhyula wants to merge 3 commits into
mainfrom
prebuild/feat/browser-agent-notifications

Conversation

@sriaradhyula

@sriaradhyula sriaradhyula commented Aug 19, 2026

Copy link
Copy Markdown
Member

Description

Adds opt-in agent completion alerts to the CAIPE web UI.

  • Adds authenticated per-user controls for browser notifications and an optional two-note chime under Settings → Notifications.
  • Requests browser permission only after a user turns on the setting or sends a test alert.
  • Emits an alert only when a successful agent turn completes while the CAIPE page is hidden or unfocused.
  • Observes the shared chat store, so the behavior is independent of the selected execution harness.
  • Keeps desktop alerts content-safe: they include the agent name and a generic completion message, but no prompt or response content.
  • Leaves both completion channels disabled by default and preserves the existing release-notes notification setting.

Browser alerts require HTTPS and an open CAIPE tab. A lightweight service worker provides persistent display and click-through handling; this change does not add push delivery for closed-browser notifications.

Type of Change

  • Bugfix
  • New Feature
  • Breaking Change
  • Refactor
  • Documentation
  • Other (please describe)

Pre-release Helm Charts (Optional)

Not applicable; this is a UI-only change.

Checklist

  • I have read the contributing guidelines
  • Existing issues have been referenced (where applicable)
  • I have verified this change is not present in other open pull requests
  • Functionality is documented in the settings UI and code comments
  • All code style checks pass
  • New code contribution is covered by automated tests
  • All new and existing relevant tests pass

Validation

  • npm run lint
  • npx tsc --noEmit
  • npm test -- --runInBand src/lib/__tests__/agent-completion-notifications.test.ts src/components/notifications/__tests__/AgentCompletionNotifier.test.tsx src/components/settings/sections/__tests__/NotificationsSettings.test.tsx src/app/api/__tests__/settings.test.ts — 38 tests passed
  • npm run build

Signed-off-by: Sri Aradhyula <sraradhy@cisco.com>
@github-actions

Copy link
Copy Markdown
Contributor

✅ No proprietary content detected. This PR is clear for review!

@github-actions github-actions Bot added the dev Normal PR to main; uses dev prerelease versioning label Aug 19, 2026
@github-actions

github-actions Bot commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

🧪 CAIPE UI Test Results

All tests passed

🟡 Overall Coverage: 62%

Coverage
lines
statements
functions
branches

📊 Detailed Coverage

Metric Covered Total Percentage
Lines 41251 61005 67.61%
Statements 44040 67306 65.43%
Functions 7713 12680 60.82%
Branches 28076 50796 55.27%

✅ Test Suites

  • ✅ auth-guard.test.tsx - Route protection & authorization
  • ✅ token-expiry-guard.test.tsx - Token expiry handling
  • ✅ dynamic-agent-client.test.ts - Dynamic Agents streaming client
  • ✅ auth-utils.test.ts - Authentication utilities (100% coverage)
  • ✅ auth-config.test.ts - OIDC configuration
📈 Coverage Thresholds
Threshold Target Current Status
Minimum 40% 62% ✅ Pass
Good 60% 62% ✅ Pass
Excellent 80% 62% ⚠️ Below target
⚠️ Areas Needing Tests

High Priority:

  • lib/streaming/* - Core stream event handling
  • store/chat-store.ts - Chat state management
  • store/agent-skills-store.ts - Agent skills
  • lib/api-client.ts - API communication
  • lib/storage-mode.ts - MongoDB/localStorage switching

Medium Priority:

  • components/chat/ChatPanel.tsx - Main chat interface
  • components/agent-builder/* - Agent builder UI
  • lib/mongodb.ts - MongoDB integration

💡 Run locally: make caipe-ui-tests
📦 Full report: Check workflow artifacts

@caipe-ci-release

caipe-ci-release Bot commented Aug 19, 2026

Copy link
Copy Markdown
Contributor
Prebuild Artifacts for `965a9f3` (archived)

Prebuild Artifacts for 965a9f3

Branch: prebuild/feat/browser-agent-notifications
Commit: 965a9f3

Docker Images

Artifact Image Tag Status CI
caipe-ui - - Failed CI

These prebuild artifacts will be automatically cleaned up when the PR is closed or merged.

@caipe-ci-release

caipe-ci-release Bot commented Aug 19, 2026

Copy link
Copy Markdown
Contributor
Prebuild Artifacts for `4ac585e` (archived)

Prebuild Artifacts for 4ac585e

Branch: prebuild/feat/browser-agent-notifications
Commit: 4ac585e

Docker Images

Artifact Image Tag Status CI
caipe-ui ghcr.io/cnoe-io/prebuild/caipe-ui feat-browser-agent-notifications-3 Published CI
Docker pull commands
docker pull ghcr.io/cnoe-io/prebuild/caipe-ui:feat-browser-agent-notifications-3

These prebuild artifacts will be automatically cleaned up when the PR is closed or merged.

Signed-off-by: Sri Aradhyula <sraradhy@cisco.com>
@caipe-ci-release

Copy link
Copy Markdown
Contributor

Prebuild Artifacts for 4551d4f

Branch: prebuild/feat/browser-agent-notifications
Commit: 4551d4f

Docker Images

Artifact Image Tag Status CI
caipe-ui ghcr.io/cnoe-io/prebuild/caipe-ui feat-browser-agent-notifications-4 Published CI
Docker pull commands
docker pull ghcr.io/cnoe-io/prebuild/caipe-ui:feat-browser-agent-notifications-4

These prebuild artifacts will be automatically cleaned up when the PR is closed or merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dev Normal PR to main; uses dev prerelease versioning

Projects

Development

Successfully merging this pull request may close these issues.

1 participant