fix(bot-mode): clear resolved Group Chat attention and bind prompts across rename - #105960
Merged
Merged
Conversation
This was referenced Sep 8, 2026
…rify instead of duplicating it into $groupNeedsYou $groupNeedsYou was written by two independent sources: an @user mention (appendGroupChatEntry) and, until now, syncGroupClarify whenever a member blocked on a clarify or approval. Nothing kept the two in sync, so every path that consumed a clarify -- answering it, the server resolving it, disbanding or renaming the room -- left a stale badge lit with nothing behind it, because none of them cleared the copy syncGroupClarify had written. A naive fix (writing false back into $groupNeedsYou on every clarify cleanup path) would have created the opposite bug: clearing an unrelated, still-unresolved @user mention. $groupClarify is already the source of truth for pending clarify/ approval attention. syncGroupClarify no longer writes $groupNeedsYou; a new groupHasPendingClarify(clarifies, group) derives the same signal from a $groupClarify snapshot. It's intentionally pure -- the caller (roster-pane) subscribes to $groupClarify itself via useValue and passes the live snapshot in, so the subscription actually drives the recalculation instead of existing only to force a re-render. A prompt resolving, being answered, or its room being disbanded all self-correct through the existing $groupClarify cleanup paths, with nothing left to keep in sync. Rename needed its own fix: the old clearGroupClarify(oldName) call on rename dropped a clarify-only room's attention entirely, since clarify no longer lives in $groupNeedsYou to be carried over by the existing old->new key swap there. New renameGroupClarify(oldName, newName) re-keys matching mirrors onto the new name in two passes -- unrelated entries first, migrated entries last -- so a stale mirror already stranded at the destination key (left behind by a known, separate in-flight-poll race) can never clobber the just-migrated current prompt. The roster now reads groupNeedsYou[group] || groupHasPendingClarify(...) and subscribes to both stores so either one repaints the row. Tests: multi-clarify sequencing, mention+clarify independence (resolving one must not clear the other), server-side resolution cleanup, rename migration, rename destination-collision (red-green verified against the prior single-pass implementation), a GroupRow badge render test, and a subscription harness using the real stores/useValue/helper end-to-end. (cherry picked from commit e5038f1)
teknium1
force-pushed
the
fix/group-attention-salvage
branch
from
September 8, 2026 20:29
fffacac to
f9993d5
Compare
Contributor
૮ >ﻌ< ა ci reviewran on bc952a7 — fix: integrate group attention with room ordering and workin
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
$groupClarify; keep$groupNeedsYouexclusively for independent mention attention. Resolving the last prompt clears the question cue without losing@userattention.Refs #94726. This is a regular review PR, not authorization to merge or close the tracker/originals.
Salvage and overlap
Preserves @sprmn24's authored commit from #101452, head
e5038f12ccc1a4d1fb56ecc5f0e1a884f1e8b795, then adds class-completion work. Contributor email mapping was already present and verified. Credit @kokhlo's #101591 for independently diagnosing the in-flight rename race; this uses scoped room-record bindings instead of copying its persistent alias map.Read the full source PR thread/reviews/diff and related #101591/#93903/#93993; refreshed the open-PR duplicate sweep. #105909 owns room ordering: the attention change preserves its ordering seam, and the subsequent mechanical roster decomposition keeps every ordering predicate unchanged. No duplicate ordering implementation.
Validation
fffacaca53eb0b906190faca82cda868381228ff: complete hermes-bots suite run serially — 62 files, 579 tests passed; renderer TypeScript, touched-file ESLint, Windows-footgun, compatibility-pointer and whitespace checks passed.442d95a8: all four setup/submit rejection cases formerly emitted stale failure and bot-attention into a live recreated room; final source preserves both stores. Actual disband confirmation clicked. Legacy no-roomId normal turn still deliversCompleted reply; pending/resolved/mention-only roster cues remain 1 / 0 / 1.Follow-up evidence: exact-source report, serial suite, baseline failure, native receipts and shape metrics
Behavior correction and mechanical extraction are separate commits. All touched production functions and new siblings pass the 300-line/CC30 gates; no facade behavior, re-export shims, aliases or generic registries were added.
Evidence report, native harness, logs and before/after screenshots. Hosted screenshots were fetched back and hash-verified. Earlier rejected HMR/fixture runs are excluded.
Review notes
The larger textual diff separates existing round-member/prompt/preparation/polling phases and roster derivation/lifecycle/rendering. Explicit typed component boundaries increase aggregate LOC; this is a shape decomposition, not a net-deletion claim. Roster parity checks preserved 169 predicates, 5 complete effect calls and 19 helper bodies. Existing Node localStorage/Vite and Python invalid-escape warnings are unchanged. No screenshots or probe harnesses are committed. No backend/wire contract change.
Infographic