feat: enhance action differentiators, deep video extraction, and full action type parsing

This commit is contained in:
2026-08-23 11:40:26 -07:00
parent fe670fdbec
commit 630936fac3
2 changed files with 261 additions and 37 deletions
+9 -4
View File
@@ -358,7 +358,7 @@
}) : '';
const mediaPath = act.media_local_path || act.video_url || act.image_url;
const isVideo = (act.video_url || mediaPath?.endsWith('.mp4') || act.activity_type === 'video');
const isVideo = (act.video_url || mediaPath?.endsWith('.mp4') || act.activity_type === 'ac_video' || act.activity_type === 'video');
let mediaHtml = '';
if (mediaPath) {
@@ -374,7 +374,7 @@
detailLines.push(`🍽️ <strong>${act.food_type || 'Meal'}</strong>: ${act.amount_eaten || 'Eaten'}`);
}
if (act.nap_start || act.nap_end || act.duration_minutes) {
detailLines.push(`😴 <strong>Nap Duration</strong>: ${act.duration_minutes ? act.duration_minutes + ' mins' : (act.nap_start || '') + ' - ' + (act.nap_end || '')}`);
detailLines.push(`😴 <strong>Nap</strong>: ${act.duration_minutes ? act.duration_minutes + ' mins' : (act.nap_start || '') + ' - ' + (act.nap_end || '')}`);
}
if (act.potty_type) {
detailLines.push(`🚽 <strong>Potty</strong>: ${act.potty_type}`);
@@ -382,16 +382,21 @@
if (act.milestone_name) {
detailLines.push(`🌟 <strong>Milestone</strong>: ${act.milestone_name}`);
}
if (act.attendance_info) {
detailLines.push(`📋 <strong>Attendance</strong>: ${act.attendance_info}`);
}
const displayTitle = act.action_summary || act.title || act.activity_type;
return `
<div class="feed-card">
${mediaHtml}
<div class="card-body">
<div class="card-header">
<span class="type-badge type-${type}">${act.activity_type || type}</span>
<span class="type-badge type-${type}">${act.action_subtype || act.activity_type || type}</span>
<span class="card-time">${formattedDate}</span>
</div>
${act.title ? `<div class="card-title">${act.title}</div>` : ''}
<div class="card-title">${displayTitle}</div>
${act.note ? `<div class="card-note">${act.note}</div>` : ''}
${detailLines.length > 0 ? `<div class="card-details">${detailLines.join('<br>')}</div>` : ''}
<div class="card-footer">