Skip to content

Release v0.51.227 — Release GU (stage-p11 — keep active New Chat visible in sidebar #3408) - #3461

Merged
nesquena-hermes merged 2 commits into
masterfrom
release/stage-p11
Jun 3, 2026
Merged

nesquena-hermes merged 2 commits into
masterfrom
release/stage-p11

Conversation

@nesquena-hermes

Copy link
Copy Markdown
Collaborator

Release v0.51.227 — Release GU (stage-p11)

Single sidebar bug fix, screenshot-approved + invariant-verified by Nathan (Telegram, 2026-06-03).

Fixed

#3408 — keep the active New Chat visible in the sidebar (@AJV20). The sidebar intentionally filters inactive 0-message sessions, but that filter also hid the currently active blank chat until the user sent the first turn — so starting a New Chat could make the selected row vanish from the list. The active ephemeral session is now injected into the sidebar render rows (only when the server-side list omits it), while inactive empty sessions stay filtered as before. Starting a New Chat from a CLI-filtered sidebar also switches the source filter back to WebUI so the active chat isn't immediately hidden.

Review fixes (Codex, applied inline + regression tests)

  • Search-pollution gate: _ensureActiveSessionRowPresent originally re-injected any active session after the search-merge, so an active conversation with messages that was correctly filtered out by a search query would pollute unrelated search results. Gated the re-injection to Number(activeRow.message_count||0) <= 0 so only the active freshly-created 0-message ephemeral chat is re-added; an active chat with messages stays filtered by search. Added a regression test asserting the gate (and that the old unconditional return is gone).

Live browser verification (the two invariants Nathan required)

Verified in a populated test environment via agent-browser CDP:

  1. No stacking — clicking New Chat 3× keeps exactly ONE "Untitled" row (total rows stay 13, untitled stays 1); each new empty session replaces the prior active one rather than piling up.
  2. Click-away disappears — navigating from an empty New Chat (nothing typed) to an existing conversation drops the row (13→12 rows, 1→0 Untitled); the unsent empty chat vanishes as soon as it's no longer active.

Gates

  • Full suite: 7371 passed, 0 failures.
  • Codex: SAFE TO SHIP — verified the search-pollution fix, the original fix(sidebar): keep active blank chat visible #3408 intent preserved (active 0-message chat survives the zero-message filter), inactive 0-message sessions don't leak, CLI→WebUI filter reset works.
  • ESLint runtime gate + ruff forward gate: clean.

Closes #3408.
Co-authored-by: AJV20 AJV20@users.noreply.github.com

nesquena-hermes added 2 commits June 3, 2026 03:07
@AJV20)

Squashed net diff of #3408. Injects ONLY the active ephemeral session into the
sidebar render rows (when the server list omits it) so a freshly-created New Chat
stays visible/selected before its first turn; inactive empty sessions stay
filtered as before. New Chat also resets a CLI source-filter back to webui so the
active chat isn't immediately hidden.
…#3408 Codex follow-up)

Codex review found _ensureActiveSessionRowPresent re-injected ANY active session
after search-merge — so an active conversation WITH messages that was correctly
filtered out by the search query would pollute unrelated search results. Gate the
reinjection to Number(activeRow.message_count||0)<=0 so only the freshly-created
0-message ephemeral chat is re-added; an active chat with messages stays filtered
by search as before. Added a regression test asserting the gate.
@nesquena-hermes
nesquena-hermes merged commit fdfb935 into master Jun 3, 2026
11 checks passed
SysAdminDoc pushed a commit to SysAdminDoc/hermes-webui that referenced this pull request Jun 26, 2026
…ble in sidebar nesquena#3408) (nesquena#3461)

* fix(sidebar): keep active New Chat visible before first message (nesquena#3408, @AJV20)

Squashed net diff of nesquena#3408. Injects ONLY the active ephemeral session into the
sidebar render rows (when the server list omits it) so a freshly-created New Chat
stays visible/selected before its first turn; inactive empty sessions stay
filtered as before. New Chat also resets a CLI source-filter back to webui so the
active chat isn't immediately hidden.

* fix(sidebar): gate active-row reinjection to 0-message ephemeral only (nesquena#3408 Codex follow-up)

Codex review found _ensureActiveSessionRowPresent re-injected ANY active session
after search-merge — so an active conversation WITH messages that was correctly
filtered out by the search query would pollute unrelated search results. Gate the
reinjection to Number(activeRow.message_count||0)<=0 so only the freshly-created
0-message ephemeral chat is re-added; an active chat with messages stays filtered
by search as before. Added a regression test asserting the gate.

---------

Co-authored-by: nesquena-hermes <[email protected]>
@nesquena-hermes
nesquena-hermes deleted the release/stage-p11 branch June 28, 2026 06:10
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.

1 participant