Skip to content

Commit 8295d28

Browse files
Archithclaude
andcommitted
feat: Add detailed and fun tracking view for candidate sessions
- Added "Tracking Notes & Suspicious Activity" section - Added "Detailed Login & Device Information" with fun visual cards - Each candidate gets a detailed tracking card showing: • 📅 Login Details: Time, duration, session ID • 💻/📱 Device Info: Browser, IP hash, device type • 🌍 Location: City/Country and VPN status • 🔐 VPN Detection: Clear status with trust level • 📝 Tracking Notes: Summary of suspicious activities Visual improvements: - Color-coded cards (green=safe, red=suspicious) - Fun emojis for device types and statuses - Clear VPN/Proxy detection status - Trust level indicators - Session duration tracking This makes tracking data easy and fun to review at a glance! 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 057f534 commit 8295d28

File tree

2 files changed

+133
-2
lines changed

2 files changed

+133
-2
lines changed

index.html

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -434,12 +434,17 @@ <h4>👥 Participant Activity</h4>
434434
</table>
435435
</div>
436436

437-
<h4>⚠️ Security Alerts</h4>
437+
<h4>📋 Tracking Notes & Suspicious Activity</h4>
438438
<div id="security-alerts">
439439
<ul id="security-alerts-list">
440-
<!-- Will be populated dynamically -->
440+
<!-- Will be populated dynamically with tracking notes -->
441441
</ul>
442442
</div>
443+
444+
<h4>🔍 Detailed Login & Device Information</h4>
445+
<div id="detailed-tracking-info">
446+
<!-- Will be populated with fun detailed view -->
447+
</div>
443448
</div>
444449
</div>
445450
</div>

scripts/session-tracking.js

Lines changed: 126 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -488,6 +488,132 @@
488488
}).join('')}
489489
`;
490490
}
491+
492+
// Add detailed tracking information in a fun format
493+
const detailedInfo = document.getElementById('detailed-tracking-info');
494+
if (detailedInfo) {
495+
const candidates = data.participants.filter(p => p.type === 'candidate');
496+
497+
if (candidates.length === 0) {
498+
detailedInfo.innerHTML = '<p style="color: #666; text-align: center;">No candidate tracking data available</p>';
499+
} else {
500+
detailedInfo.innerHTML = candidates.map(candidate => {
501+
const joinTime = new Date(candidate.joinTime);
502+
const lastSeen = new Date(candidate.lastSeen);
503+
const duration = Math.floor((lastSeen - joinTime) / 1000 / 60); // minutes
504+
505+
// Fun device emoji based on device type
506+
const deviceEmoji = candidate.device.toLowerCase().includes('mobile') ? '📱' :
507+
candidate.device.toLowerCase().includes('tablet') ? '📱' : '💻';
508+
509+
// Location emoji based on country
510+
const locationEmoji = '🌍';
511+
512+
// VPN status with emoji
513+
const vpnStatus = candidate.vpn ?
514+
'🔒 VPN/Proxy ACTIVE (Location Hidden)' :
515+
'✅ Direct Connection (No VPN)';
516+
517+
const vpnColor = candidate.vpn ? '#ff6666' : '#00ff00';
518+
519+
// Create tracking notes
520+
const trackingNotes = [];
521+
if (candidate.vpn) {
522+
trackingNotes.push('⚠️ Using VPN to hide real location');
523+
}
524+
if (candidate.fraudIndicators && candidate.fraudIndicators.includes('VPN_DETECTED')) {
525+
trackingNotes.push('🚨 Potential fraud: Location masking detected');
526+
}
527+
528+
// Fun session summary
529+
return `
530+
<div style="background: rgba(0,0,0,0.3);
531+
border: 1px solid #444;
532+
border-radius: 8px;
533+
padding: 15px;
534+
margin-bottom: 15px;">
535+
536+
<h5 style="color: #00ff00; margin: 0 0 10px 0;">
537+
👤 Candidate: ${candidate.userName}
538+
</h5>
539+
540+
<div style="display: grid; grid-template-columns: 1fr 1fr; gap: 10px;">
541+
542+
<div style="background: rgba(0,100,255,0.1); padding: 8px; border-radius: 4px;">
543+
<strong>📅 Login Details:</strong><br>
544+
<small>
545+
• First Login: ${joinTime.toLocaleTimeString()}<br>
546+
• Last Active: ${lastSeen.toLocaleTimeString()}<br>
547+
• Session Duration: ${duration} minutes<br>
548+
• Session ID: ${candidate.userId.substring(0, 8)}...
549+
</small>
550+
</div>
551+
552+
<div style="background: rgba(0,255,0,0.1); padding: 8px; border-radius: 4px;">
553+
<strong>${deviceEmoji} Device Info:</strong><br>
554+
<small>
555+
• Browser: ${candidate.device}<br>
556+
• IP Hash: <code>${candidate.ipHash.substring(0, 12)}...</code><br>
557+
• Type: ${deviceEmoji === '📱' ? 'Mobile Device' : 'Desktop/Laptop'}
558+
</small>
559+
</div>
560+
561+
<div style="background: rgba(255,170,0,0.1); padding: 8px; border-radius: 4px;">
562+
<strong>${locationEmoji} Location:</strong><br>
563+
<small>
564+
• Location: ${candidate.location}<br>
565+
• Status: <span style="color: ${vpnColor}">${vpnStatus}</span>
566+
</small>
567+
</div>
568+
569+
<div style="background: ${candidate.vpn ? 'rgba(255,0,0,0.1)' : 'rgba(0,255,0,0.1)'};
570+
padding: 8px;
571+
border-radius: 4px;">
572+
<strong>🔐 VPN Detection:</strong><br>
573+
<small>
574+
${candidate.vpn ?
575+
`<span style="color: #ff6666;">
576+
• VPN/Proxy: DETECTED ⚠️<br>
577+
• Real Location: HIDDEN<br>
578+
• Trust Level: LOW
579+
</span>` :
580+
`<span style="color: #00ff00;">
581+
• VPN/Proxy: Not Detected ✓<br>
582+
• Location: Verified<br>
583+
• Trust Level: HIGH
584+
</span>`
585+
}
586+
</small>
587+
</div>
588+
589+
</div>
590+
591+
${trackingNotes.length > 0 ? `
592+
<div style="background: rgba(255,0,0,0.1);
593+
padding: 10px;
594+
margin-top: 10px;
595+
border-radius: 4px;
596+
border-left: 3px solid #ff6666;">
597+
<strong>📝 Tracking Notes:</strong><br>
598+
${trackingNotes.map(note => `<small>• ${note}</small>`).join('<br>')}
599+
</div>
600+
` : `
601+
<div style="background: rgba(0,255,0,0.1);
602+
padding: 10px;
603+
margin-top: 10px;
604+
border-radius: 4px;
605+
border-left: 3px solid #00ff00;">
606+
<strong>📝 Tracking Notes:</strong><br>
607+
<small>• ✅ No suspicious activity detected</small><br>
608+
<small>• ✅ Clean session with verified location</small>
609+
</div>
610+
`}
611+
612+
</div>
613+
`;
614+
}).join('');
615+
}
616+
}
491617
});
492618
}
493619
};

0 commit comments

Comments
 (0)