Skip to content

emrg: GUI open-session dialog — name-or-id display + last-active time (rant 2026-08-21T11:41:07) - #910

Merged
argszero merged 1 commit into
masterfrom
feature/gui-open-session-name-id-reltime
Aug 21, 2026
Merged

emrg: GUI open-session dialog — name-or-id display + last-active time (rant 2026-08-21T11:41:07)#910
argszero merged 1 commit into
masterfrom
feature/gui-open-session-name-id-reltime

Conversation

@argszero

Copy link
Copy Markdown
Owner

Summary

Fixes rant 2026-08-21T11:41:07 — GUI open-session dialog ("Open Session" → pick project → session list) two improvements:

  1. Name-or-id display: showProjectSessions now renders s.title || s.session_id instead of s.title || _t("app.unnamed") — a titled session shows its title, an untitled session shows its full session id (no truncation, no "unnamed" fallback), consistent with the sidebar name-or-id rule (emrg: GUI session list — scoped highlight + name-or-id display (rants 22:04:02 + 22:04:57) #903).

  2. Last-active time: each session row now shows a relative last-active time (relTime(s.updated_at), e.g. "5 分钟前" / "5 min ago") using the existing help-hint style and the updated_at field already returned by Session.list_sessions. The current-session marker ("当前") is preserved and joined with the time.

Changes

  • emrg/gui/renderer/js/dialogs.jsshowProjectSessions() row rendering (name-or-id + relTime hint)
  • emrg/gui/test/renderer.smoke.test.js — new test: titled → title; untitled → full id (no "未命名"); relTime shown for updated_at; missing updated_at → id only
  • Agent.md — GUI test breakdown synced to real counts (256: renderer smoke 126→127, integration 7→8 — the integration count already lagged by one before this PR)

Verification

  • GUI: npm test — 256 tests, 248 pass, 8 skipped (live daemon owns fixed port), 0 fail
  • Python: uv run pytest tests/ — 987 passed + 1 skipped (incl. doc-count guards)
  • python -m emrg --help + import OK

@argszeroargszero left a comment

Copy link
Copy Markdown
OwnerAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ LGTM — cycle

Fresh review of the open-session dialog changes:

  • showProjectSessions renders s.title || s.session_id (name-or-id, full id, no truncation) per the sidebar rule from #903; removes the _t("app.unnamed") fallback for untitled sessions.
  • Last-active time via relTime(s.updated_at) (returns "" for missing/invalid), joined with the current-session marker using existing help-hint styling.
  • New smoke test covers: titled → title shown; untitled → full session id shown (no "未命名"); relTime text for 5-min and 2-hour updated_at; missing updated_at → id only, no time.
  • Agent.md GUI breakdown synced to real counts (256 total: renderer smoke 126→127, integration 7→8 pre-existing lag).
  • Verified: GUI npm test 256 (248 pass + 8 skipped, live daemon owns port), Python pytest 987 passed + 1 skipped incl. doc-count guards, import + CLI OK. CI test + test-windows PASS.

1/3.

@argszeroargszero left a comment

Copy link
Copy Markdown
OwnerAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ LGTM — cycle

Re-review (head 2ac7f98 unchanged since previous review):

  • showProjectSessions renders s.title || s.session_id — titled sessions show title, untitled sessions show full session id (no truncation, no "未命名" fallback), consistent with the sidebar name-or-id rule (#903).
  • Last-active time: relTime(s.updated_at) returns "" for missing/invalid dates (safe), joined with the current-session marker via marks.join(" · ") in the existing help-hint style.
  • Test covers all three cases: titled (title + 5-min relTime), untitled (full id + 2-hour relTime, no 未命名), and missing updated_at (id only, no time).
  • Agent.md GUI breakdown synced to real node test-runner counts (256: renderer smoke 126→127, integration 7→8 pre-existing lag corrected).
  • Verified locally: GUI npm test 256 (248 pass + 8 skipped, live daemon owns fixed port), Python pytest 987 passed + 1 skipped (incl. doc-count guards), import + CLI OK. CI test + test-windows PASS.

2/3.

@pm25coder

Copy link
Copy Markdown
Collaborator

Independent test report (Contributor, pm25coder):

@argszeroargszero left a comment

Copy link
Copy Markdown
OwnerAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ LGTM — cycle

3rd consecutive review (head 2ac7f98, MERGEABLE/CLEAN, CI test + test-windows PASS):

  • Fresh local verification on the branch: GUI npm test 256 total (248 pass / 0 fail / 8 skipped — live daemon owns fixed port), pytest 987 passed + 1 skipped, import + CLI OK.
  • showProjectSessions renders s.title || s.session_id — titled sessions show title, untitled sessions show the full session id (no truncation, no "未命名" fallback), consistent with the sidebar name-or-id rule (#903).
  • Last-active time via relTime(s.updated_at) (helper exists in utils.js, exposed on window); current-session marker preserved, joined with '·'.
  • Tests cover titled/untitled/missing-updated_at rows incl. negative no-time case; Agent.md GUI counts synced (254→256).

3/3.

@argszero
argszero merged commit 9a46fe0 into masterAug 21, 2026
2 checks passed
@argszero
argszero deleted the feature/gui-open-session-name-id-reltime branch August 21, 2026 04:48
argszero added a commit that referenced this pull request Aug 21, 2026
Co-authored-by: EMRG Evolution <emrg@argszero.dev>
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@argszero@pm25coder