Skip to content

fix(groups): keep active group chat rename on one group - #93903

Open
dokterdok wants to merge 4 commits into
NousResearch:mainfrom
dokterdok:fix/bot-room-rename-continuity
Open

dokterdok wants to merge 4 commits into
NousResearch:mainfrom
dokterdok:fix/bot-room-rename-continuity

Conversation

@dokterdok

@dokterdok dokterdok commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

Keep an active Group Chat reply under one name

Renaming a Bot Mode Group Chat while a Bot reply was in flight could split one
conversation into two roster rows. The room map moved to the new display name,
while the active async drive still closed over the old name and appended its
reply there.

This keeps the display name stable only while replies own the drive. The
settings dialog disables a changed name during that window, and
renameGroupChat() enforces the same invariant at the mutation boundary. Once
the drive finishes, an idle rename still moves the complete room record,
including its durable identity, sessions, stranded replies, and attention
state.

The Group Chat row context menu also opens the existing settings dialog, so
rename and picture controls are available from the place users naturally look
for them.

Note

This is now a standalone current-main recut. #93993 remains separate; no attention-marker behavior is added here.

Related work

Changes Made

  • Guard renameGroupChat() while replies are active.
  • Disable only a changed name during that window; picture-only saves and idle
    renames remain available.
  • Add Group settings to each Group Chat row context menu.
  • Localize the active-reply explanation.
  • Cover active rejection, idle re-keying, late state preservation, and menu
    discovery with direct typed tests.

How to Test

  1. Start a Group Chat turn whose Bot reply remains active.
  2. Open Group settings and change the name: Save stays disabled, and the room
    remains under its original name.
  3. Let the reply finish, then rename: the room moves once and preserves its
    identity, sessions, stranded replies, and attention state.
  4. Right-click a Group Chat row and confirm Group settings opens the same
    dialog as the header settings button.

Validation

Current head f0fd3977b6 on main@245e48008f:

  • Three current-main regressions failed before the fixes; 178 tests across 12 files pass afterward, without retries.
  • Renderer typecheck, scoped ESLint and git diff --check pass. Every changed source/test owner is below 2,000 lines.
  • Original authorship, author dates and cherry-pick provenance are preserved. Active-rename and roster-settings fixes remain separately selectable.
  • No new packaged-app or live-UAT claim is made for this recut.

The pre-recut history remains on dokterdok:preserve/pr93903-before-main-refresh-20260906. No Python source changed.

@alt-glitch alt-glitch added type/bug Something isn't working P3 Low — cosmetic, nice to have comp/desktop Electron desktop app (apps/desktop/*) labels Aug 24, 2026
@dokterdok
dokterdok force-pushed the fix/bot-room-rename-continuity branch from af5cf7d to b7ff63b Compare August 24, 2026 13:47
@dokterdok
dokterdok force-pushed the fix/bot-room-rename-continuity branch from b7ff63b to 31b529d Compare August 24, 2026 19:33
@Enough1122

Copy link
Copy Markdown
Contributor

AI code review — automated review for reference, author can ignore or act on any point.

Right fix at both layers: the hard guard in renameGroupChat protects every programmatic caller, the dialog disables Save with an inline reason so users learn why, and the test usefully pins that a stranded-marker room (durable state) still renames fine while a running one doesn't. Small points:

  1. apps/desktop/src/plugins/hermes-bots/plugin.js:renameGroupChat — confirm the guard-to-rekey span is await-free. The blocking check runs once on entry; if anything between it and the room-map re-key ever awaits (a gateway RPC, persistence flush), a turn starting in that window re-opens the original bug. If the whole mutation section is synchronous (JS single-threaded), a one-line comment saying "no awaits between guard and re-key" would lock the invariant in for future editors; otherwise re-check running immediately before the commit.

  2. plugin.js:renameBlocked uses name.trim() !== group. A case-only edit (hermes devsHermes Devs) counts as changed and is correctly blocked while running, but an unchanged name with stray leading/trailing whitespace typed by the user also enables the blocked state — cosmetic either way, just noting the trim asymmetry (Save still requires non-empty trimmed).

  3. Nit: the new "Group settings" context-menu item rides along in this PR; it's what makes the guard discoverable, so it belongs here — worth one sentence in the PR description so reviewers don't mistake it for unrelated scope.

The source-contract regex update keeps the house-style test honest. No blocking issues.

@dokterdok
dokterdok marked this pull request as draft August 28, 2026 21:31
@dokterdok
dokterdok force-pushed the fix/bot-room-rename-continuity branch from 31b529d to a523311 Compare August 28, 2026 22:15
@dokterdok
dokterdok force-pushed the fix/bot-room-rename-continuity branch 2 times, most recently from 88c3bcf to 8f9b851 Compare August 29, 2026 06:09
@dokterdok
dokterdok marked this pull request as ready for review August 29, 2026 06:56
@dokterdok dokterdok changed the title fix(desktop): keep active group rename on one room fix(bot-mode): keep active group chat rename on one group Aug 29, 2026
(cherry picked from commit 6f25290d6998394aa908bef71ddf1270ea36a3e1)
(cherry picked from commit 7deb1e1)
(cherry picked from commit 7f39d245a4ff22232fbaaf896d21a8daf876ccc1)
(cherry picked from commit 8f9b851)
(cherry picked from commit 9abf7f610a8d70bb518022e67de21c40c104d461)
(cherry picked from commit c7f49e7aef68ea0c8cf12c5b905e7ddc9990c6eb)
@dokterdok
dokterdok force-pushed the fix/bot-room-rename-continuity branch from 8f9b851 to f0fd397 Compare September 6, 2026 06:56
@dokterdok dokterdok changed the title fix(bot-mode): keep active group chat rename on one group fix(groups): keep active group chat rename on one group Sep 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/desktop Electron desktop app (apps/desktop/*) P3 Low — cosmetic, nice to have type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants