From 76a5f8bdee860eb498bc1ce1ea77eb3627800782 Mon Sep 17 00:00:00 2001 From: EMRG Evolution Date: Thu, 13 Aug 2026 16:18:15 +0800 Subject: [PATCH] emrg: TUI status bar shows full session id when session name exists MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Host rant 2026-08-13T16:14:12: _format_status_left truncated the session id to 8 chars (sid[:8]) whenever a session title was present, while the no-title form always showed the full id — inconsistent. Show the full session id in both forms. --- emrg/client/app.py | 2 +- tests/test_app_status_left.py | 11 ++++++++--- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/emrg/client/app.py b/emrg/client/app.py index 80622bf..c873f03 100644 --- a/emrg/client/app.py +++ b/emrg/client/app.py @@ -37,7 +37,7 @@ def _format_status_left(title: str, sid: str, model: str = "") -> str: ver = getattr(emrg, "__version__", "dev") parts = [f"v{ver}"] if title: - parts.append(f"{title} ({sid[:8]})") + parts.append(f"{title} ({sid})") else: parts.append(sid) if model: diff --git a/tests/test_app_status_left.py b/tests/test_app_status_left.py index ee78ab8..cacb9b3 100644 --- a/tests/test_app_status_left.py +++ b/tests/test_app_status_left.py @@ -39,9 +39,14 @@ def test_no_model_omits_brackets(self): out = _format_status_left("main", "s_260727", "") assert "[" not in out - def test_sid_truncated_to_8_chars(self): - """Long session ids are truncated to 8 chars in the title form.""" + def test_sid_full_in_title_form(self): + """Full session id is shown in the title form (rant 2026-08-13T16:14:12). + + Host request: when a session name exists, the status bar must show the + complete session id (previously truncated to 8 chars, inconsistent with + the no-title form which always showed the full id). + """ from emrg.client.app import _format_status_left out = _format_status_left("main", "s_260727abcdef", "") - assert "main (s_260727)" in out + assert "main (s_260727abcdef)" in out