emrg: GUI project-row recent-activity hints (relTime + latest_session_at) — P6 acceptance UX completion - #646
Conversation
…_at) — P6 acceptance UX completion
argszero
left a comment
There was a problem hiding this comment.
✅ LGTM — cycle 20260810-190619. relTime helper (i18n zh/en, invalid-safe) + project-row recent-activity hints consuming daemon latest_session_at. GUI 178/178, pytest 681, doc guard green, placeholder-substitution guard green (reworded to avoid literal {n} in prompt).
argszero
left a comment
There was a problem hiding this comment.
✅ LGTM — cycle 20260810-191325. Verified locally on the branch: GUI npm test 178/178 (relTime 6-state: just-now/min/hours/days/empty/invalid; open-session dialog rows show activity hint when latest_session_at present, hidden when absent), pytest 681. CI SUCCESS (31382576731). relTime consumes daemon latest_session_at (#644 field), i18n {n} interpolation matches t() impl (i18n.js:694 replaceAll), EMRG_I18N mounted at i18n.js:731 with identity fallback, invalid/empty ISO → empty string (callers hide). Doc counts synced (43+19+22+59+15+7+3+3+7=178).
|
Tested this PR end-to-end on Windows — looks good. |
UX completion for the GUI multi-session rant (2026-08-10T15:07:19): the project list is now ordered by latest session activity (daemon-side, #644), but the UI never showed why — the ordering was invisible.
Change
utils.js: newrelTime(iso)helper — ISO timestamp → localized relative time ("刚刚 / N 分钟前 / N 小时前 / N 天前" zh, "just now / N min ago / N h ago / N d ago" en) via i18n; missing/invalid input returns empty string.dialogs.js: open-session and new-session dialog project rows now append a "recent activity" hint from the daemon'slatest_session_atfield (emrg: GUI multi-session acceptance completion — project activity ordering + model_set idempotency test #644) — no field → no hint.i18n.js: 4 relTime keys (zh/en).This makes the acceptance item "选项目按该项目最新会话活跃倒序" tangible — the sort basis is visible to the user.
+2 renderer.smoke tests (57→59): relTime six states (just-now/min/hr/day/empty/invalid) + dialog row hint shown/absent. GUI 176→178, 681 pytest green, doc counts synced.