New tab, separate from the Reports dropdown (which stays tied to actual calendar-month/campaign-approval data), covering what the new campaign plan cares about that the old reporting never tracked: - theme_tracker.py: per-post theme classification (Failure Analysis / Standardization / WaveGate), same hand-tagged pattern as MANUAL_CONTENT_TYPES. Powers a Theme Performance chart showing each theme's Real Eng % across the whole campaign, not just its lead month - the explicit ask was to see if a theme keeps earning engagement even when a different theme is leading that month. - conversation_tracker.py: logs every real conversation (a comment from an actual person) through to resolution (open -> replied -> followed_up -> closed). Exists because the old campaign's two real conversations, Sabine Brock on 20/08 and Dr. Debnath on 08/09, were both left open with no reply and no follow-up - this makes that visible instead of silent. An "N open" badge flags anything still needing a reply. Both data sources start empty and render a clean "nothing logged yet" state - nothing to log until the campaign is approved and posts start going up, but the tooling is ready. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
46 lines
1.6 KiB
Python
46 lines
1.6 KiB
Python
"""Tracks each real conversation (a comment thread from a real person, not the team's
|
|
own activity) through to resolution, for the new engagement-response campaign (Nov
|
|
2026 onward, pending approval). The old campaign's two real conversations (Sabine
|
|
Brock on 20/08, Dr. Arunangshu Debnath on 08/09) were both left open with no reply
|
|
and no follow-up - this exists so that doesn't happen again silently.
|
|
|
|
A conversation starts the moment a real person comments. State moves forward as the
|
|
team acts on it:
|
|
open - comment received, no reply sent yet
|
|
replied - TXproducts replied (should happen within 24h per the campaign plan)
|
|
followed_up - a 1-week follow-up was sent after the conversation went quiet
|
|
closed - resolved either way (they replied back and it wrapped up, or the
|
|
follow-up got no further response and it's being treated as done)
|
|
|
|
Add an entry the same day a real comment comes in, update its state as it moves
|
|
along - this is a log, not something computed from the LinkedIn export (LinkedIn
|
|
gives no reply-timestamp data at all, this is entirely hand-tracked).
|
|
"""
|
|
|
|
STATE_COLORS = {
|
|
"open": "#d43f3a",
|
|
"replied": "#FFA726",
|
|
"followed_up": "#2d6a9f",
|
|
"closed": "#52C41A",
|
|
}
|
|
|
|
STATE_LABELS = {
|
|
"open": "Open — needs a reply",
|
|
"replied": "Replied",
|
|
"followed_up": "Followed up",
|
|
"closed": "Closed",
|
|
}
|
|
|
|
# {
|
|
# "post_date": "2026-11-03",
|
|
# "theme": "Failure Analysis",
|
|
# "person": "Jane Doe",
|
|
# "comment_date": "2026-11-03",
|
|
# "state": "open",
|
|
# "reply_date": None,
|
|
# "followup_date": None,
|
|
# "notes": "",
|
|
# },
|
|
CONVERSATIONS = [
|
|
]
|