DON AI CHATBOT 4.0.0 — LIVE VISITORS + PROACTIVE CHAT
=======================================================

WHAT IS NEW
-----------
1. New WordPress admin page: ChatDigi AI Chats → Live Visitors.
2. Visitors appear before they send a chat message.
3. Live activity includes:
   - Current page and page title
   - Previous pages in the same session
   - Visible page section / heading
   - Scroll depth and time on page
   - Approximate city, region, and country
   - Device, browser, operating system, and referrer
   - Last clicked public link/button
   - Active, idle, chat-open, and offline status
4. The administrator can send a proactive greeting.
5. The visitor's chat opens automatically when the greeting arrives.
6. Human takeover activates immediately and the AI pauses.
7. WordPress toast and browser notifications announce new visitors.
8. Optional modern HTML email alerts announce visitors who remain on the site.
9. Live visitor controls were added to AI Chat Settings.

PRIVACY / SAFETY
----------------
The tracker does not record the visitor's screen, passwords, form field contents,
credit-card details, or private typing. It records page navigation, public page
sections/headings, scroll percentage, and clicks on public links/buttons.

RECOMMENDED TEST
----------------
1. Replace the old plugin with this version and keep it activated.
2. Open WordPress Admin → ChatDigi AI Chats → Live Visitors.
3. Click Enable Browser Notifications.
4. Open the public website in a private/incognito browser window.
5. Browse two or three pages and scroll through different sections.
6. Confirm the page journey updates in WordPress.
7. Select the visitor, edit the greeting, and click Send Greeting & Open Chat.
8. Confirm the chat opens automatically in the private browser.
9. Reply as the visitor and confirm the AI does not answer while Admin Active.
10. End the chat and confirm the normal summary email still arrives.

SETTINGS
--------
WordPress Admin → ChatDigi AI Chats → Settings → Live Visitors & Proactive Chat

- Enable live visitor tracking
- Enable/disable arrival email alerts
- Arrival email delay (default: 30 seconds)
- Offline timeout (default: 60 seconds)
- Default proactive greeting

NOTES
-----
- Location is approximate and depends on IP geolocation availability.
- Browser notifications require permission and work while WordPress Admin is open.
- Email alerts use the notification destination already selected in settings.
- Existing chat history, API key, knowledge base, and settings remain in WordPress.

EMAIL NOTIFICATION UPDATE — VERSION 4.0.1
-----------------------------------------
1. Trigger a Live Visitor email and confirm the first action under the header is:
   “View Visitor Live & Start Chat”.
2. Start a new visitor chat and confirm the first action under the header is:
   “View Live Chat / Join”.
3. End a chat and confirm the first action under the header is:
   “View Full Conversation”.
4. Confirm all emails use the same dark-indigo SaaS header, status badge,
   rounded information cards, top action buttons, and direct-link fallback.
5. In Gmail, expand or group repeated notifications and confirm the top action
   remains above the visitor details and transcript.

CHAT SOUND + BROWSER TITLE UPDATE — VERSION 4.0.2
--------------------------------------------------
- Visitor messages play a short original sent tone.
- AI and administrator replies play a brighter two-note incoming chat tone.
- The browser tab displays a temporary sent confirmation and flashes for unread replies.
- Opening the chat restores the website page title.
- Proactive administrator greetings open the widget, sound the incoming alert, and update the tab title.
- The WordPress live-chat screen also confirms sent administrator replies with sound and title feedback.
- Browser autoplay rules require one visitor interaction before audio can play; unread title alerts still work immediately.

RESTART ENDED CONVERSATIONS — VERSION 4.0.3
--------------------------------------------
- An ended conversation remains connected to the same visitor session while the visitor stays on the site.
- The WordPress conversation screen shows Restart Conversation after a chat ends.
- Restarting preserves the full transcript and activates administrator takeover.
- The administrator can then send a new message to reopen the visitor's widget.
- Live Visitors shows Restart Chat & Send Message for ended conversations.
- The visitor sees a clear conversation-restarted notice and can continue replying.
- The visitor may choose Start New Chat to intentionally create a separate fresh session.
- Ending the restarted conversation can send a new updated transcript email.
