Fix ran_today: compare phase to 'idle' default instead of bool()

ORBDailyStateRow.phase defaults to 'idle' even when no DB row exists,
so bool(daily.phase) was True for brand-new sessions, hiding the
'지금 시작' button. Fix: ran_today = phase not in ('idle', '', None).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
main
I Luk Kim 4 months ago
parent 76a5d70004
commit 1d97595607

@ -55,7 +55,9 @@ def list_sessions() -> dict[str, Any]:
results = []
for s in sessions:
daily = state.get_daily_state(s.session_id, today)
ran_today = bool(daily.phase) # phase is set by engine on first run
# phase starts as "idle" (default); engine sets it to "orb_detection"
# or beyond when it actually runs today
ran_today = daily.phase not in ("idle", "", None)
results.append({
"session_id": s.session_id,
"session_name": s.session_name,

Loading…
Cancel
Save