Service sessions + Home redesign + feedback loop
Service sessions (new slot semantics): - Sidecar maps isServiceSession OR isPlenumSession -> service_session (Excel path also matches 'plenum' in Session Format). - checkin_attendee rejects service sessions; Scan check-in dropdown excludes them. - New _assign_service_session_speakers helper links every registered staff member as a speaker of a service session; both sync RPCs call it (and the API sync now actually types slots from is_service_session). - No material requirement + no mic emoji for service sessions. Home redesign: - Now/Next cards show all concurrent sessions as sub-sections when there's no pick (1/2/3 sessions -> 1/2/3 sub-sections), with a "Nothing scheduled" fallback for empty slots. - My picks today lists every pick (slot order) + empty state. - Demo clock EVENT_DATE fixed to 2026-02-20 (matches seed) so a slot is live at 10:20. Feedback loop: - Attendee pending-feedback pill on Home (checked into an over session, not its speaker, no feedback yet); clears on submit. - Speaker sees rating + AI summary for their own session in the Agenda sheet only after it's over. Migration 20260833000000_service_sessions_feedback.sql. Docs updated.
This commit is contained in:
1 parent
2db22984fc
commit
a5ad9795ee
15 files changed
+878
-105
No files matched your search
@@ -97,7 +97,10 @@ export function Agenda({ openFeedback }: { openFeedback: (sessionId: string) =>
|
||||
const selStatus = selSlot ? slotStatus(selSlot, now) : 'next';
|
||||
const selCheckedIn = selected ? checkins.includes(selected.id) : false;
|
||||
const selISpeaker = selected ? mySpeakerSessions.includes(selected.id) : false;
|
||||
const selNeedsMaterial = selISpeaker && !selected?.material_path;
|
||||
const selIsService = selSlot?.type === 'service_session';
|
||||
// Service sessions have no material requirement (and no mic), so the
|
||||
// pending-material notice never applies to them.
|
||||
const selNeedsMaterial = selISpeaker && !selected?.material_path && !selIsService;
|
||||
|
||||
async function handleUpload(e: React.ChangeEvent<HTMLInputElement>) {
|
||||
const file = e.target.files?.[0];
|
||||
@@ -166,7 +169,9 @@ export function Agenda({ openFeedback }: { openFeedback: (sessionId: string) =>
|
||||
<div className="grow">
|
||||
<div className="title">
|
||||
{s.title}
|
||||
{isMySession && <span className="pill speaker-tag" style={{ marginLeft: 6 }}>🎤 you</span>}
|
||||
{isMySession && !isService && (
|
||||
<span className="pill speaker-tag" style={{ marginLeft: 6 }}>🎤 you</span>
|
||||
)}
|
||||
</div>
|
||||
<div className="meta">
|
||||
{s.room} · {s.speakers}
|
||||
@@ -198,7 +203,7 @@ export function Agenda({ openFeedback }: { openFeedback: (sessionId: string) =>
|
||||
{selected.description}
|
||||
</div>
|
||||
<div className="row" style={{ gap: 8, marginBottom: 14, flexWrap: 'wrap' }}>
|
||||
<span className="pill">🎤 {selected.speakers}</span>
|
||||
<span className="pill">{selIsService ? '' : '🎤 '}{selected.speakers}</span>
|
||||
{selected.capacity && <span className="pill">👥 {selected.capacity}</span>}
|
||||
{selCheckedIn && <span className="pill green">✓ Checked in</span>}
|
||||
</div>
|
||||
@@ -214,6 +219,31 @@ export function Agenda({ openFeedback }: { openFeedback: (sessionId: string) =>
|
||||
</div>
|
||||
)}
|
||||
|
||||
{/* Speaker feedback: visible only after the session is over. */}
|
||||
{selISpeaker && selStatus === 'done' && (
|
||||
<div className="feedback-review">
|
||||
<div className="fr-title">⭐ Your session feedback</div>
|
||||
{selected.average_feedback != null ? (
|
||||
<div className="fr-rating">
|
||||
<span className="fr-stars">
|
||||
{[1, 2, 3, 4, 5].map((n) => (
|
||||
<span key={n} className={n <= Math.round(selected.average_feedback!) ? 'on' : ''}>★</span>
|
||||
))}
|
||||
</span>
|
||||
<span className="fr-num">{selected.average_feedback.toFixed(1)}</span>
|
||||
</div>
|
||||
) : (
|
||||
<div className="muted small">No feedback yet.</div>
|
||||
)}
|
||||
{selected.ai_generated_feedback && (
|
||||
<div className="fr-summary">
|
||||
<div className="muted small" style={{ fontWeight: 700, marginBottom: 4 }}>AI summary</div>
|
||||
<div style={{ lineHeight: 1.5 }}>{selected.ai_generated_feedback}</div>
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
)}
|
||||
|
||||
<div style={{ display: 'flex', flexDirection: 'column', gap: 8 }}>
|
||||
{selStatus === 'done' && selCheckedIn && (
|
||||
<button className="btn primary" onClick={() => openFeedback(selected.id)}>
|
||||
|
||||
Reference in new issue
Block a user