Fix dashboard chat model profile scoping (salvage of #50558) - #60570
Merged
Conversation
…ashboard chat PTY resume The chat PTY launch path landed on main after PR #50558 and still called _session_latest_descendant() with the old one-arg signature. Open the requested profile's state DB (matching the REST endpoint) so profile-scoped resume resolves descendants in the right database.
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
Dashboard chat sidebar controls (model info card, model picker, reasoning effort) and resume latest-descendant resolution are now scoped to the chat's profile instead of silently reading/writing the dashboard's global profile.
Salvage of #50558 by @shannonsands, cherry-picked onto current main with a follow-up fix, authorship preserved.
Root cause: the Chat page launched the PTY under the selected profile, but several REST calls still resolved against the dashboard process's profile — latest-descendant always opened the dashboard's state DB, and the model card relied on implicit fetchJSON profile injection.
Changes
hermes_cli/web_server.py:_session_latest_descendant()takes an explicit DB; the/latest-descendantendpoint opens the requested profile's state DB like sibling session endpointsweb/src/lib/api.ts+ChatSidebar.tsx+ReasoningPicker.tsx+ChatPage.tsx: pass the chat profile explicitly through model info/options/set, config read/write, and latest-descendant callstests/hermes_cli/test_web_server.py: regression test — root session ID existing in both default and a named profile resolves in the right DB_session_latest_descendant(); it now opens the requested profile's DB tooValidation
scripts/run_tests.sh tests/hermes_cli/test_web_server.pynpm run typecheck(web)npx eslinton touched web filesInfographic