fix(desktop): refresh active session for external messages - #53592
Closed
yungchentang wants to merge 1 commit into
Closed
fix(desktop): refresh active session for external messages#53592yungchentang wants to merge 1 commit into
yungchentang wants to merge 1 commit into
Conversation
yungchentang
force-pushed
the
fix/desktop-active-session-refresh-53563
branch
from
June 27, 2026 11:15
09dbdb9 to
d5d92b4
Compare
yungchentang
marked this pull request as ready for review
June 27, 2026 11:16
19 tasks
19 tasks
Contributor
|
Thanks for the focused Desktop investigation and regression coverage. Automated hermes-sweeper review found that the requested behavior is already implemented on current
This satisfies the Signal/gateway externally appended-message case described here, without needing the PR's older hook-based implementation. |
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
Fixes #53563.
Hermes Desktop now reacts when the currently open persisted session row is refreshed with additional externally appended messages. This covers Signal/gateway sessions whose sidebar metadata updates while the active chat timeline still has an older transcript loaded.
Root cause
The messaging sidebar slice used an
id/title-only equality check, so Signal rows whoselast_active,message_count, or preview changed could keep the same atom reference. Even when the session list refreshed, the active chat state did not observe that metadata change and did not rehydrate the open transcript.Changes
useActiveSessionExternalRefreshto watch the selected stored session row across recents and messaging slices.Validation
npm run test:ui -- use-active-session-external-refresh.test.tsx use-session-state-cache.test.tsxnpm run typechecknpx eslint src/app/desktop-controller.tsx src/app/session/hooks/use-active-session-external-refresh.ts src/app/session/hooks/use-active-session-external-refresh.test.tsxnpx prettier --check src/app/desktop-controller.tsx src/app/session/hooks/use-active-session-external-refresh.ts src/app/session/hooks/use-active-session-external-refresh.test.tsxgit diff --cached --check