Skip to content

fix(desktop): scope messaging sidebar sessions to active profile - #528

Open
hashbender wants to merge 1 commit into
mainfrom
mirror/pr-56635
Open

fix(desktop): scope messaging sidebar sessions to active profile#528
hashbender wants to merge 1 commit into
mainfrom
mirror/pr-56635

Conversation

@hashbender

Copy link
Copy Markdown
Owner

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 profileScope to listAllProfileSessions in both refreshMessagingSessions and loadMoreMessagingForPlatform, matching the existing pattern used by refreshSessions for local recents.

Related Issue

Fixes NousResearch#56631

Type of Change

  • 🐛 Bug fix (non-breaking change that fixes an issue)
  • ✨ New feature (non-breaking change that adds functionality)
  • 🔒 Security fix
  • 📝 Documentation update
  • ✅ Tests (adding or improving test coverage)
  • ♻️ Refactor (no behavior change)
  • 🎯 New skill (bundled or hub)

Changes Made

  • apps/desktop/src/app/session/hooks/use-session-list-actions.ts: Changed refreshMessagingSessions and loadMoreMessagingForPlatform to scope the session fetch to the active profileScope instead of hardcoding 'all'. Added profileScope to both useCallback dependency arrays so they re-fetch when the user switches profiles.
  • apps/desktop/src/hermes.test.ts: Added test verifying listAllProfileSessions forwards a specific profile name in the API request path.

How to Test

  1. Configure Hermes with multiple profiles (e.g., local, remote, default), each with Telegram enabled
  2. Open the desktop app and verify the Telegram sidebar shows chats from all profiles initially
  3. Switch to a specific profile (e.g., local) in the app's profile switcher
  4. The Telegram sidebar should now show only chats from the local profile
  5. Switch to remote — the sidebar should update to show only remote profile's Telegram chats
  6. Switch back to "All profiles" — the sidebar should show chats from all profiles again
  7. Should pass: npx vitest run apps/desktop/src/hermes.test.ts --reporter=verbose

Checklist

Code

  • I've read the Contributing Guide
  • My commit messages follow Conventional Commits (fix(scope):, feat(scope):, etc.)
  • I searched for existing PRs to make sure this isn't a duplicate
  • My PR contains only changes related to this fix/feature (no unrelated commits)
  • I've run pytest tests/ -q and all tests pass
  • I've added tests for my changes (required for bug fixes, strongly encouraged for features)
  • I've tested on my platform: macOS 26.4.1 arm64

Documentation & Housekeeping

  • I've updated relevant documentation (README, docs/, docstrings) — or N/A
  • I've updated cli-config.yaml.example if I added/changed config keys — or N/A
  • I've updated CONTRIBUTING.md or AGENTS.md if I changed architecture or workflows — or N/A
  • I've considered cross-platform impact (Windows, macOS) per the compatibility guide — or N/A
  • I've updated tool descriptions/schemas if I changed tool behavior — or N/A

Screenshots / Logs

N/A — the fix is a 3-line behavioral change in session fetch scope (plus comments and dependency arrays). The listAllProfileSessions API already supports per-profile filtering; the call sites just weren't using it.


Mirror-of: NousResearch#56635
NousResearch#56635

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.

Desktop app Telegram sidebar ignores active profile and always shows remote chats

1 participant