fix(desktop): scope messaging sidebar sessions to active profile - #528
Open
hashbender wants to merge 1 commit into
Open
fix(desktop): scope messaging sidebar sessions to active profile#528hashbender wants to merge 1 commit into
hashbender wants to merge 1 commit into
Conversation
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.
What does this PR do?
The messaging sidebar (Telegram, Discord, Slack, etc.) always fetched sessions with
profile='all', ignoring the active profile switcher. When a user switched profiles in the desktop app, local recents updated correctly, but the messaging platform sections continued showing chats from every profile — so the Telegram sidebar appeared "stuck" on a single profile's chats.This fix passes
profileScopetolistAllProfileSessionsin bothrefreshMessagingSessionsandloadMoreMessagingForPlatform, matching the existing pattern used byrefreshSessionsfor local recents.Related Issue
Fixes NousResearch#56631
Type of Change
Changes Made
apps/desktop/src/app/session/hooks/use-session-list-actions.ts: ChangedrefreshMessagingSessionsandloadMoreMessagingForPlatformto scope the session fetch to the activeprofileScopeinstead of hardcoding'all'. AddedprofileScopeto bothuseCallbackdependency arrays so they re-fetch when the user switches profiles.apps/desktop/src/hermes.test.ts: Added test verifyinglistAllProfileSessionsforwards a specific profile name in the API request path.How to Test
local,remote,default), each with Telegram enabledlocal) in the app's profile switcherlocalprofileremote— the sidebar should update to show onlyremoteprofile's Telegram chatsnpx vitest run apps/desktop/src/hermes.test.ts --reporter=verboseChecklist
Code
fix(scope):,feat(scope):, etc.)pytest tests/ -qand all tests passDocumentation & Housekeeping
docs/, docstrings) — or N/Acli-config.yaml.exampleif I added/changed config keys — or N/ACONTRIBUTING.mdorAGENTS.mdif I changed architecture or workflows — or N/AScreenshots / Logs
N/A — the fix is a 3-line behavioral change in session fetch scope (plus comments and dependency arrays). The
listAllProfileSessionsAPI already supports per-profile filtering; the call sites just weren't using it.Mirror-of: NousResearch#56635
NousResearch#56635