Skip to content

Fix dashboard chat model profile scoping (salvage of #50558) - #60570

Merged
teknium1 merged 2 commits into
mainfrom
salvage/50558-chat-profile-scoping
Jul 8, 2026
Merged

Fix dashboard chat model profile scoping (salvage of #50558)#60570
teknium1 merged 2 commits into
mainfrom
salvage/50558-chat-profile-scoping

Conversation

@teknium1

@teknium1 teknium1 commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

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-descendant endpoint opens the requested profile's state DB like sibling session endpoints
  • web/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 calls
  • tests/hermes_cli/test_web_server.py: regression test — root session ID existing in both default and a named profile resolves in the right DB
  • Follow-up commit (ours): the chat PTY launch path landed on main after the PR and still used the old one-arg _session_latest_descendant(); it now opens the requested profile's DB too

Validation

Check Result
scripts/run_tests.sh tests/hermes_cli/test_web_server.py 343 passed, 0 failed
npm run typecheck (web) clean
npx eslint on touched web files 0 errors (1 pre-existing ChatPage warning)

Infographic

chat-profile-scoping

shannonsands and others added 2 commits July 7, 2026 16:39
…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.
@alt-glitch alt-glitch added type/bug Something isn't working comp/dashboard Web dashboard / control panel UI (dashboard/, landing) P3 Low — cosmetic, nice to have labels Jul 8, 2026
@teknium1
teknium1 merged commit 6015ee5 into main Jul 8, 2026
36 checks passed
@teknium1
teknium1 deleted the salvage/50558-chat-profile-scoping branch July 8, 2026 00:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/dashboard Web dashboard / control panel UI (dashboard/, landing) P3 Low — cosmetic, nice to have type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants