From 0e7a39836f4299a45b9d45272ea361f7914694c9 Mon Sep 17 00:00:00 2001 From: Piotr Oleszczyk Date: Tue, 3 Mar 2026 20:29:36 +0100 Subject: [PATCH] refactor(routines): use category and short uuid for recent history representation --- backend/innercontext/api/routines.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/backend/innercontext/api/routines.py b/backend/innercontext/api/routines.py index 7910aa7..a7faddc 100644 --- a/backend/innercontext/api/routines.py +++ b/backend/innercontext/api/routines.py @@ -259,9 +259,13 @@ def _build_recent_history(session: Session) -> str: for s in steps: if s.product_id: p = session.get(Product, s.product_id) - step_names.append(p.name if p else str(s.product_id)) + if p: + short_id = str(p.id)[:8] + step_names.append(f"{_ev(p.category)} [{short_id}]") + else: + step_names.append(f"unknown [{str(s.product_id)[:8]}]") elif s.action_type: - step_names.append(_ev(s.action_type)) + step_names.append(f"action: {_ev(s.action_type)}") lines.append( f" {r.routine_date} {_ev(r.part_of_day).upper()}: {', '.join(step_names)}" )