feat(web): add profile switcher — ProfilePickerDialog, sidebar cards, and PTY reconnect - #33739
Closed
RobinAngele wants to merge 6 commits into
Closed
feat(web): add profile switcher — ProfilePickerDialog, sidebar cards, and PTY reconnect#33739RobinAngele wants to merge 6 commits into
RobinAngele wants to merge 6 commits into
Conversation
RobinAngele
force-pushed
the
feat/profile-switcher-frontend
branch
from
May 28, 2026 09:49
798c8aa to
4f0138f
Compare
RobinAngele
force-pushed
the
feat/profile-switcher-frontend
branch
from
May 28, 2026 12:59
4f0138f to
10f30c5
Compare
RobinAngele
force-pushed
the
feat/profile-switcher-frontend
branch
from
May 28, 2026 14:37
10f30c5 to
7d16aab
Compare
RobinAngele
force-pushed
the
feat/profile-switcher-frontend
branch
from
May 28, 2026 15:29
7d16aab to
d7364a1
Compare
RobinAngele
force-pushed
the
feat/profile-switcher-frontend
branch
from
May 28, 2026 16:11
12567ae to
4fded33
Compare
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.
Frontend companion to #33056 (backend — merge first).
Adds the full profile switcher UI: a modal ProfilePickerDialog, two profile cards in the chat sidebar (read-only active + clickable picker), config-gated feature flags, and channel-bump wiring so the PTY reconnects under the new profile without a page reload.
What's added
web/src/components/ProfilePickerDialog.tsx (+196 lines, new file)
Modal dialog portaled to document.body. Lists all profiles (sorted: default first, then alphabetical), highlights the active one with a checkmark, shows loading/error/empty states. Calls api.activateProfile(name) on selection, then signals the parent to reconnect the PTY. Keyboard-accessible (Esc to close, backdrop click).
web/src/lib/api.ts (+8 lines)
web/src/components/ChatSidebar.tsx (+60 / -2 lines)
web/src/App.tsx (+21 lines)
web/src/pages/ChatPage.tsx (+17 / -5 lines)
Data flow
ProfilePickerDialog
→ api.activateProfile(name) // POST to backend, writes sticky file
→ onProfileActivated(name)
→ ChatSidebar.handleProfileActivated()
→ onProfileActivated() (prop)
→ App.bumpChannel() // channelBumpKey++
→ ChatPage channel memo re-computes
→ PTY WebSocket reconnects
→ _resolve_chat_argv() reads ~/.hermes/active_profile
→ HERMES_HOME = ~/.hermes/profiles/
Testing (after #33056 is deployed)
curl localhost:9119/api/active-profile # → {"name":"default"}
curl -X POST localhost:9119/api/profiles/acronyc/activate
cat ~/.hermes/active_profile # → acronyc
Open dashboard → sidebar shows active profile + clickable picker → PTY reconnects without page reload.
Dependencies
Related