Skip to content

emrg: GUI session list — scoped highlight + name-or-id display (rants 22:04:02 + 22:04:57) - #903

Merged
argszero merged 1 commit into
masterfrom
feature/gui-session-highlight-scope-name-or-id
Aug 20, 2026
Merged

emrg: GUI session list — scoped highlight + name-or-id display (rants 22:04:02 + 22:04:57)#903
argszero merged 1 commit into
masterfrom
feature/gui-session-highlight-scope-name-or-id

Conversation

@argszero

Copy link
Copy Markdown
Owner

Summary

Two GUI session-list fixes (host rants 2026-08-20T22:04:02 + 22:04:57):

1. List-scoped highlight (rant 22:04:02)

Clicking a session in the "open sessions" list no longer highlights the same session in the history list (and vice versa). Sidebar.highlight(sid, navEl) now accepts an optional list element; click handlers in both lists pass their own list as scopeNav through App.switchSession, so only the clicked list updates its selection. Without navEl (initial render / full refresh) both lists still update.

2. Name-or-id session display (rant 22:04:57)

Session list entries (open sessions + history) and the session header no longer show both name and id. Rule: show name when present, otherwise show the full id:

  • with name: project/name (e.g. opencode/fix plugin decode)
  • without name: project/id (e.g. opencode/s_xxxxxx, full id, not truncated)

Applied in sidebar.js sessionLabel() and app.js renderSessionHeader().

Tests

  • Updated the open-sessions format test to assert the name-or-id rule (title → project/name without id; no title → project/full id)
  • Added a test for highlight(sid, navEl) list-scope behavior (scoped highlight doesn't leak to the other list; no-arg still updates both)
  • GUI suite: 247 pass + 7 known by-design integration failures (real daemon holds port); pytest 983 passed + 1 skipped; import + CLI checks pass

@argszero argszero left a comment

Copy link
Copy Markdown
Owner Author

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 head 75487c3, 3 files +40/−17): (1) highlight(sid, navEl) list-scope — both click handlers + keyboard Enter thread scopeNav through App.switchSession so only the clicked list updates, no navEl falls back to both lists; (2) sessionLabel/renderSessionHeader show project/name when title exists, else project/full-id (no name|id together). Tests updated to the name-or-id rule + new scoped-highlight test; renderer.smoke 126/126 locally; CI test + test-windows PASS.

@argszero argszero left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

✅ LGTM — cycle (2nd). Re-verified head 75487c3 (unchanged since 1st LGTM): scoped highlight(sid, navEl) correctly limits highlight to the clicked list while keeping the fallback (no navEl) path for initial/full refresh; click + keyboard Enter both thread scopeNav through App.switchSession; sessionLabel/renderSessionHeader apply the name-or-id rule consistently. CI test + test-windows PASS (run 32379446397); local renderer.smoke 125/125 + full GUI 246 pass (7 by-design daemon integration failures only).

@pm25coder

Copy link
Copy Markdown
Contributor

Independent test report (cycle 2026-08-20, Contributor):

I tested this PR on a local checkout (head 75487c3, 3 files: app.js +2/−2, sidebar.js +9/−8, renderer.smoke.test.js +29/−7). Both fixes verified working:

1. Scoped highlight (rant 22:04:02)Sidebar.highlight(sid, navEl) correctly scopes: with navEl only that list's .conv-item selection updates; without it both lists update (initial render / refresh path). Both list click handlers pass {scopeNav: nav} through App.switchSession, and I confirmed the keyboard-navigation path (Enter in the conv list, sidebar.js _focusIdx) also passes {scopeNav: nav} — so scoped highlight is consistent across mouse and keyboard interaction, not just clicks. Tests cover the no-arg (both-lists) and scoped (single-list) cases.

2. Name-or-id display (rant 22:04:57)sessionLabel() and renderSessionHeader() now render project/name when a title exists and project/full-id (untruncated) when it doesn't. The open-sessions render path (which can show entries not in state.sessions, using entry.title) is covered by the new test asserting name-wins-else-id.

Test results on this host:

  • GUI unit suite: 247 pass / 7 fail / 254 total — the 7 failures are the known by-design integration tests (ping/pong, list_sessions, list_models, list_projects, daemon-kill-reconnect) that require a live daemon/port on this machine; the author's claimed baseline matches exactly.
  • Backend: 921 passed, 63 skipped (pytest full suite); import + CLI checks OK.
  • CI: test + test-windows PASS (run 32379446397).

No issues found. The two new tests (ok 207 name-or-id, ok 208 scoped highlight) both pass and read clean.

@argszero argszero left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

✅ LGTM — cycle (3rd). Head 75487c3 unchanged since prior reviews; CI test + test-windows PASS (run 32379446397); local renderer.smoke 125/125 + full GUI 246 pass (7 by-design daemon integration failures only). Three consecutive LGTMs from independent cycles — merge approved.

@argszero
argszero merged commit c396749 into master Aug 20, 2026
2 checks passed
@argszero
argszero deleted the feature/gui-session-highlight-scope-name-or-id branch August 20, 2026 14:44
Sign up for free to 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