Standards alignment: Document .js tools deviation, fix port 3030, enhance tool documentation

This commit is contained in:
2026-01-14 12:47:22 +00:00
parent 2c384eb734
commit 534016e9d5
6 changed files with 226 additions and 4 deletions
+12
View File
@@ -1,6 +1,18 @@
/**
* User Alert System
* Monitors shared notes and alerts when someone shares a note with the current user
*
* @module UserAlertSystem
* @description Standalone utility for monitoring PocketBase note collection changes.
* Watches for notes shared with current user and triggers desktop notifications and
* audio alerts. Exports UserAlertSystem class for instantiation with PocketBase instance.
* @usage Instantiate with PocketBase instance: new UserAlertSystem(pb, userEmail, userName).
* Call watchForSharedNotes() to start monitoring.
* @dependencies PocketBase instance (passed in constructor). Browser APIs: Notifications,
* Web Audio API, DOM manipulation.
* @integration Used in index.html to provide real-time alert functionality for shared notes
* @gotchas Requires user permission for desktop notifications. Audio context may be blocked
* on some browsers until user gesture. Track alertedNotes Set to prevent duplicate alerts.
*/
export class UserAlertSystem {