Task #53
open16..6
0%
Description
- Handover — YDB FluentSupport Tools v16.6
Status: Working / accepted
Current safe baseline: `v16.6`
Plugin folder:
```text
wp-content/plugins/ydb-fluentsupport-tools/
```
Current zip:
```text
ydb-fluentsupport-tools-v16-6-blue-forward-slide-conflict.zip
```
- 1. Purpose of the plugin
The plugin extends FluentSupport without modifying FluentSupport core/pro files.
It currently handles:
```text
1. Agent ticket collision / presence badge
2. Forward ticket by email
3. Agent signature replacement marker
4. Support portal layout improvements
5. FluentSupport frontend hash-route protection
```
- 2. Current accepted behavior
- A. Forward ticket button
The Forward ticket button is visible in the ticket view.
Current behavior:
```text
Position: bottom-right
Color: blue
Text: Forward ticket
```
It opens a modal with:
```text
To
CC
Forwarding note / message
Include internal notes checkbox
Send button
```
Confirmed working:
```text
Email sends successfully
CC works
Modal closes after successful send
Small success message appears
Email goes through wp_mail(), so FluentSMTP handles delivery
```
Relevant files:
```text
includes/ticket-forward.php
assets/js/ticket-forward.js
```
- B. Conflict / collision badge
The conflict badge appears when more than one agent is watching the same ticket.
Current behavior:
```text
Position: bottom-left
Color: red
Text: Ticket already open / by {agent}
Animation: slides in from the left when appearing
```
Important: v16.4 caused unstable behavior, including delayed badge display, disappearing badge, and inconsistent visibility between agents.
The stable collision logic was restored in v16.5 from the older good plugin, then v16.6 only adjusted styling/animation.
Relevant files:
```text
includes/concurrency.php
assets/js/concurrency.js
```
- 3. Version history
- v13 — safe portal/concurrency baseline
Accepted behavior:
```text
Custom red concurrency badge
Native FluentSupport People Watching badge hidden
Portal width adjusted to 80%
Server-side single-active-ticket-per-user cleanup
Hash-route guard for /support-agent-portal/
```
- v14 — agent signature marker
Added working email signature replacement via:
```text
[[YDB_AGENT_SIGNATURE]]
```
Used because FluentSupport’s normal `{{agent.signature}}` did not work in the agent-started ticket email flow on this installation.
Relevant file:
```text
includes/agent-signature-smartcode.php
```
- v16.3 — forward ticket by email
Added working forward-ticket feature.
Confirmed:
```text
To works
CC works
Forwarded email received
Ticket transcript included
Modal closes after successful send
```
- v16.4 — bad collision version
Do not use as baseline.
Problem:
```text
Collision handling became unstable
Badge appeared late
Badge disappeared by itself
Not reliable for all agents
```
- v16.5 — restored good collision handling
Restored stable files from previous good plugin:
```text
assets/js/concurrency.js
includes/concurrency.php
```
Kept the working forward-ticket feature.
- v16.6 — current accepted version
Final accepted visual change:
```text
Forward button: blue, bottom-right
Conflict badge: red, bottom-left, slide-in animation
```
User confirmed:
```text
Everything looks like working.
```
- 4. Important implementation notes
- Do not modify FluentSupport core
All changes must stay inside:
```text
wp-content/plugins/ydb-fluentsupport-tools/
```
Do not edit:
```text
FluentSupport core plugin
FluentSupport Pro plugin
FluentSMTP plugin
```
- Collision handling is sensitive
The conflict badge logic depends on:
```text
Heartbeat interval
Transient TTL
Leave signal on ticket change
Single-active-ticket-per-user cleanup
Ticket hash route detection
```
Because v16.4 broke this behavior, future changes to collision should be minimal and tested carefully with two different agents/browsers.
- Forwarding uses WordPress mail
Ticket forwarding sends via:
```php
wp_mail()
```
Therefore the actual delivery path is:
```text
YDB FluentSupport Tools
→ wp_mail()
→ FluentSMTP
→ configured SMTP / Microsoft / other mail provider
```
- 5. Current limitations
Not implemented yet:
```text
Forward attachments
Forward selected message only
Log “ticket forwarded to...” as an internal FluentSupport note
Move button into FluentSupport native toolbar
Advanced permission controls
```
Internal notes are not included by default, which is correct and safer.
- 6. Recommended next possible improvements
Safest next improvement:
```text
v16.7 — Log forwarding action inside ticket history
```
Example internal note:
```text
Ticket forwarded by Maurizio to user@example.com, CC another@example.com.
```
Later improvements:
```text
v16.8 — Include attachments
v16.9 — Forward selected message only
v17 — Better native toolbar placement
```
- 7. Current baseline to keep
Use this as the current safe starting point:
```text
ydb-fluentsupport-tools-v16-6-blue-forward-slide-conflict.zip
```
Do not restart from:
```text
v16.4
```
because that was the unstable collision version.
Files