personal memory agent
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Improve transcripts day redirect and segment accessibility

Update the transcripts index route to prefer the most recent journal day with segments before falling back to today. Improve timeline segment indicators with pointer interaction, focus styling, ARIA labeling, and keyboard activation, while keeping the selection range updates consistent with the existing range object shape.

+38 -1
+6 -1
apps/transcripts/routes.py
··· 47 47 48 48 @transcripts_bp.route("/") 49 49 def index() -> Any: 50 - """Redirect to today's transcripts.""" 50 + """Redirect to the most recent day with segments, falling back to today.""" 51 51 today = date.today().strftime("%Y%m%d") 52 + if cluster_segments(today): 53 + return redirect(url_for("app:transcripts.transcripts_day", day=today)) 54 + for day in sorted(day_dirs().keys(), reverse=True): 55 + if cluster_segments(day): 56 + return redirect(url_for("app:transcripts.transcripts_day", day=day)) 52 57 return redirect(url_for("app:transcripts.transcripts_day", day=today)) 53 58 54 59
+32
apps/transcripts/workspace.html
··· 156 156 width: 40px; 157 157 border-radius: 12px; 158 158 box-shadow: 0 1px 1px rgba(0,0,0,.04); 159 + pointer-events: auto; 160 + cursor: pointer; 161 + } 162 + 163 + .tr-seg:focus-visible { 164 + outline: 2px solid var(--accent, #4a9eff); 165 + outline-offset: 1px; 159 166 } 160 167 161 168 .tr-seg-audio { ··· 1397 1404 el.style.top = y(startMin) + 'px'; 1398 1405 el.style.height = Math.max(2, y(endMin) - y(startMin)) + 'px'; 1399 1406 el.style.left = (column === 1 ? 56 : 8) + 'px'; 1407 + // Zero-padded HH:MM label 1408 + const _h = Math.floor(startMin / 60); 1409 + const _m = startMin % 60; 1410 + const _label = `Segment ${String(_h).padStart(2, '0')}:${String(_m).padStart(2, '0')}`; 1411 + el.setAttribute('role', 'button'); 1412 + el.setAttribute('tabindex', '0'); 1413 + el.setAttribute('aria-label', _label); 1414 + el.addEventListener('click', e => { 1415 + e.stopPropagation(); 1416 + const midMin = (startMin + endMin) / 2; 1417 + const start = snap(midMin - DEFAULT_LEN / 2); 1418 + range = { start, end: start + DEFAULT_LEN }; 1419 + renderTimeline(); 1420 + updateZoom(); 1421 + }); 1422 + el.addEventListener('keydown', e => { 1423 + if (e.key === 'Enter' || e.key === ' ') { 1424 + e.preventDefault(); 1425 + const midMin = (startMin + endMin) / 2; 1426 + const start = snap(midMin - DEFAULT_LEN / 2); 1427 + range = { start, end: start + DEFAULT_LEN }; 1428 + renderTimeline(); 1429 + updateZoom(); 1430 + } 1431 + }); 1400 1432 segmentsLane.appendChild(el); 1401 1433 } 1402 1434