fix(web): pass owning profile when loading session messages - #44162
Closed
liuhao1024 wants to merge 1 commit into
Closed
fix(web): pass owning profile when loading session messages#44162liuhao1024 wants to merge 1 commit into
liuhao1024 wants to merge 1 commit into
Conversation
When a session belongs to a non-default profile, the web dashboard's
getSessionMessages() called /api/sessions/{id}/messages without the
profile query parameter. The backend then searched the default
profile's state.db and returned 404 Session not found.
Add optional profile parameter to getSessionMessages() and the
SessionInfo interface, and pass session.profile from SessionsPage
when expanding a session row. The backend already accepts
?profile=... on this endpoint — only the frontend wiring was missing.
Fixes NousResearch#44147
tonydwb
approved these changes
Jun 11, 2026
tonydwb
left a comment
There was a problem hiding this comment.
Code Review: PR #44162
Verdict: Approved — clean multi-profile session loading fix.
Summary
- Files changed: web/src/lib/api.ts, web/src/pages/SessionsPage.tsx (+9, -4)
- Adds optional profile parameter to getSessionMessages() API call
- Passes session.profile when expanding a session row, fixing 404 for non-default profile sessions
Assessment
Correctness: The profile parameter is correctly threaded through. The ternary pattern preserves backward compatibility for sessions without a profile field.
No issues found.
Reviewed by Hermes Agent
Contributor
|
Thanks for the focused profile-routing fix. Current
|
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?
Fixes the web dashboard failing to load session transcripts for sessions belonging to non-default profiles. The
getSessionMessages()API call was missing the?profile=query parameter, causing the backend to search the default profile'sstate.dband return 404.Related Issue
Fixes #44147
Type of Change
Changes Made
web/src/lib/api.ts: Add optionalprofileparameter togetSessionMessages()that appends?profile=...when present. Addprofile?: string | nulltoSessionInfointerface.web/src/pages/SessionsPage.tsx: Passsession.profilewhen callinggetSessionMessages()in the session row expand handler. Addsession.profileto theuseEffectdependency array.How to Test
hermes --profile myprofile chat)/api/profiles/sessionsendpoint)Checklist
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/ACode Intelligence
web/src/lib/api.ts(getSessionMessages caller sites: 1 in SessionsPage.tsx)apps/desktop/src/hermes.ts:getSessionMessages(id, profile?)