Add Day Started event to activity log with template name
- On session start, insert a session_start TimerEvent so the action appears in the activity log timeline - Load DailySession.template via selectinload in the timeline query so the template name is available without extra round-trips - _to_timeline_out maps the template name into block_label for session_start events, displaying as "Day started — Template Name" - Add session_start to EVENT_META on the frontend (🏫 icon) - Hide the Edit button for session_start entries since changing their event type to a block-level action doesn't make sense Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -126,6 +126,11 @@ async def start_session(
|
||||
db.add(session)
|
||||
await db.commit()
|
||||
await db.refresh(session)
|
||||
|
||||
# Record session start as a timer event so it appears in the activity log
|
||||
db.add(TimerEvent(session_id=session.id, block_id=None, event_type="session_start"))
|
||||
await db.commit()
|
||||
|
||||
await _broadcast_session(db, session)
|
||||
return session
|
||||
|
||||
|
||||
Reference in New Issue
Block a user