Skip to content

feat(dashboard): add profiles management page#16419

Merged
austinpickett merged 10 commits into
NousResearch:mainfrom
vincez-hms-coder:feat/dashboard-profiles-hms-coder
Apr 30, 2026
Merged

feat(dashboard): add profiles management page#16419
austinpickett merged 10 commits into
NousResearch:mainfrom
vincez-hms-coder:feat/dashboard-profiles-hms-coder

Conversation

@vincez-hms-coder

Copy link
Copy Markdown
Contributor

Summary

  • Add minimal Profiles management page to dashboard
  • Add profile lifecycle REST endpoints and SOUL.md read/write support
  • Add profile i18n labels/helper text and targeted API tests

Test Plan

  • pytest tests/hermes_cli/test_web_server.py -k profile -q
  • cd web && npm run build

@VinceZcrikl

Copy link
Copy Markdown
image

@alt-glitch alt-glitch added type/feature New feature or request P3 Low — cosmetic, nice to have comp/cli CLI entry point, hermes_cli/, setup wizard labels Apr 27, 2026
@vincez-hms-coder

Copy link
Copy Markdown
Contributor Author

Follow-up context from manual QA of the Profiles page:

  • The Profiles list can appear empty when the backend profile listing/serialization path fails before returning usable data to the dashboard. The dashboard should keep the list populated by making the /api/profiles response resilient: prefer the richer hermes_cli.profiles.list_profiles() metadata, but fall back to scanning the profile directories and serialize fields defensively so one bad profile/object does not blank the whole page.
  • The nav/menu label should be shortened from the long/truncated "profiles running multiple agent" wording to profiles : multi agents.

I had briefly opened a separate PR against the old/split web UI repo for this, but this belongs in this hermes-agent dashboard PR instead. I am closing that separate PR to keep the open-source contribution focused here.

vincez-hms-coder and others added 8 commits April 29, 2026 01:39
Copy profile dashboard changes onto a fresh branch under the vincez-hms-coder account.

Includes:
- Profiles dashboard route and sidebar entry
- Profile lifecycle REST endpoints
- SOUL.md read/write support
- i18n labels and helper text updates
- Targeted profile API tests

Test plan:
- pytest tests/hermes_cli/test_web_server.py -k profile -q
- cd web && npm run build

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a minimal “Profiles” management surface to the dashboard and backs it with new REST endpoints for profile lifecycle + SOUL.md editing, while also tightening up dashboard UI imports and adding targeted tests around the new behavior.

Changes:

  • Add dashboard Profiles page (list/create/rename/delete, SOUL.md editor, copy setup command).
  • Add FastAPI REST endpoints for profiles and extend clone behavior to copy skills on --clone.
  • Update i18n + refactor dashboard UI imports away from the @nous-research/ui root barrel, with new regression tests.

Reviewed changes

Copilot reviewed 37 out of 37 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
web/src/plugins/registry.ts Switch UI imports to browser-safe per-component paths.
web/src/plugins/PluginPage.tsx Switch Spinner import to per-component path.
web/src/pages/SkillsPage.tsx Switch UI imports to per-component paths.
web/src/pages/SessionsPage.tsx Switch UI imports to per-component paths.
web/src/pages/ProfilesPage.tsx New Profiles management page UI (CRUD + SOUL.md edit).
web/src/pages/LogsPage.tsx Switch UI imports to per-component paths.
web/src/pages/EnvPage.tsx Switch UI imports to per-component paths.
web/src/pages/CronPage.tsx Switch UI imports to per-component paths; use local H2.
web/src/pages/ConfigPage.tsx Switch UI imports to per-component paths.
web/src/pages/ChatPage.tsx Switch Button import; replace Typography with local component.
web/src/pages/AnalyticsPage.tsx Switch UI imports to per-component paths.
web/src/lib/api.ts Add profiles REST client methods + ProfileInfo type.
web/src/i18n/zh.ts Add Profiles nav + page translations (zh).
web/src/i18n/types.ts Extend translations typing with profiles keys.
web/src/i18n/en.ts Add Profiles nav + page translations (en).
web/src/components/ui/confirm-dialog.tsx Switch Button import to per-component path.
web/src/components/ToolCall.tsx Switch ListItem import to per-component path.
web/src/components/ThemeSwitcher.tsx Switch Button/ListItem imports; use local Typography.
web/src/components/SlashPopover.tsx Switch ListItem import to per-component path.
web/src/components/SidebarFooter.tsx Switch Typography to local component.
web/src/components/PlatformsCard.tsx Switch Badge import to per-component path.
web/src/components/OAuthProvidersCard.tsx Switch UI imports to per-component paths.
web/src/components/OAuthLoginModal.tsx Switch UI imports; use local H2.
web/src/components/NouiTypography.tsx New local Typography/H2 components.
web/src/components/ModelPickerDialog.tsx Switch UI imports to per-component paths.
web/src/components/ModelInfoCard.tsx Switch Spinner import to per-component path.
web/src/components/LanguageSwitcher.tsx Switch Button import; use local Typography.
web/src/components/ChatSidebar.tsx Switch Button/Badge imports to per-component paths.
web/src/components/AutoField.tsx Switch Select/Switch imports to per-component paths.
web/src/App.tsx Add /profiles route + nav item; refactor UI imports; add Users icon.
tests/hermes_cli/test_web_server.py Add API tests for profile endpoints and SOUL.md flows.
tests/hermes_cli/test_profiles.py Ensure clone-config copies source profile skills.
tests/hermes_cli/test_dashboard_profiles_nav_label.py Static assertion on Profiles nav copy in en.ts.
tests/hermes_cli/test_dashboard_browser_safe_imports.py Static check preventing @nous-research/ui root-barrel imports.
hermes_cli/web_server.py Implement minimal profile REST endpoints (list/create/rename/delete + SOUL.md).
hermes_cli/profiles.py Extend --clone behavior to also copy skills from source.
hermes_cli/main.py Update CLI messaging to mention skills are cloned.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread hermes_cli/web_server.py
Comment thread web/src/components/NouiTypography.tsx Outdated
Comment thread tests/hermes_cli/test_web_server.py Outdated
Comment thread tests/hermes_cli/test_dashboard_browser_safe_imports.py Outdated
Comment thread web/src/pages/ProfilesPage.tsx
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a minimal Profiles management feature to the dashboard, backed by new REST endpoints in hermes_cli.web_server and supporting profile lifecycle + SOUL.md editing.

Changes:

  • Add ProfilesPage UI and wire it into dashboard routing + navigation.
  • Add profile REST endpoints (list/create/rename/delete, setup-command, open-terminal, SOUL.md get/put) and extend profile cloning to copy skills.
  • Add i18n strings and targeted pytest coverage; update dashboard imports to avoid @nous-research/ui root barrel.

Reviewed changes

Copilot reviewed 37 out of 37 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
web/src/plugins/registry.ts Switch to browser-safe UI imports
web/src/plugins/PluginPage.tsx Switch Spinner to direct import
web/src/pages/SkillsPage.tsx Switch UI imports to direct paths
web/src/pages/SessionsPage.tsx Switch UI imports to direct paths
web/src/pages/ProfilesPage.tsx New profiles management page UI
web/src/pages/LogsPage.tsx Switch segmented/spinner/switch imports
web/src/pages/EnvPage.tsx Switch UI imports to direct paths
web/src/pages/CronPage.tsx Switch UI imports; use local H2
web/src/pages/ConfigPage.tsx Switch UI imports to direct paths
web/src/pages/ChatPage.tsx Switch Button import; local Typography
web/src/pages/AnalyticsPage.tsx Switch UI imports to direct paths
web/src/lib/api.ts Add profile API methods + ProfileInfo
web/src/i18n/zh.ts Add Profiles nav + page translations
web/src/i18n/types.ts Add profiles translation typings
web/src/i18n/en.ts Add Profiles nav + page translations
web/src/components/ui/confirm-dialog.tsx Switch Button import to direct path
web/src/components/ToolCall.tsx Switch ListItem import to direct path
web/src/components/ThemeSwitcher.tsx Switch UI imports; local Typography
web/src/components/SlashPopover.tsx Switch ListItem import to direct path
web/src/components/SidebarFooter.tsx Use local Typography component
web/src/components/PlatformsCard.tsx Switch Badge import to direct path
web/src/components/OAuthProvidersCard.tsx Switch UI imports to direct paths
web/src/components/OAuthLoginModal.tsx Switch UI imports; local H2
web/src/components/NouiTypography.tsx New local Typography/H2 primitives
web/src/components/ModelPickerDialog.tsx Switch UI imports to direct paths
web/src/components/ModelInfoCard.tsx Switch Spinner import to direct path
web/src/components/LanguageSwitcher.tsx Switch Button import; local Typography
web/src/components/ChatSidebar.tsx Switch Badge/Button to direct imports
web/src/components/AutoField.tsx Switch Select/Switch to direct imports
web/src/App.tsx Add Profiles route/nav; local Typography
tests/hermes_cli/test_web_server.py Add profile endpoint API tests
tests/hermes_cli/test_profiles.py Verify clone-config copies skills
tests/hermes_cli/test_dashboard_profiles_nav_label.py Static test for nav label copy
tests/hermes_cli/test_dashboard_browser_safe_imports.py Enforce no root-barrel UI imports
hermes_cli/web_server.py Add profile management REST endpoints
hermes_cli/profiles.py Clone-config now copies skills too
hermes_cli/main.py Update CLI messaging re: cloned skills

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread hermes_cli/web_server.py Outdated
Comment thread web/src/pages/ProfilesPage.tsx
Comment thread web/src/pages/ProfilesPage.tsx Outdated
Comment thread web/src/components/NouiTypography.tsx Outdated
Merge resolved conflicts in web/src/{i18n/{en,zh,types}.ts,lib/api.ts}
by keeping both this branch's `profiles` additions and upstream's new
`models` page additions.

Copilot review feedback:
- Implement POST /api/profiles/{name}/open-terminal endpoint (already
  present); align Windows branch to `cmd.exe /c start "" <cmd>` so it
  matches the new test and spawns a fresh window instead of /k reusing
  the parent console.
- Move backslash escaping out of the macOS AppleScript f-string
  expression (Python <3.12 disallows backslashes inside f-string
  expression parts).
- Patch `_get_wrapper_dir` via monkeypatch in
  test_profiles_create_creates_wrapper_alias_when_safe so the test no
  longer writes to the real `~/.local/bin`.
- Extend test_dashboard_browser_safe_imports to scan `.ts` files in
  addition to `.tsx`.
- Switch upstream's new ModelsPage.tsx away from the `@nous-research/ui`
  root barrel onto per-component subpaths to satisfy the stricter scan.
- Fix NouiTypography `leading-1.4` -> `leading-[1.4]` so Tailwind
  actually emits the line-height for the `sm` variant.
- Guard ProfilesPage.openSoulEditor against out-of-order responses by
  tracking the latest requested profile via a ref.
- Replace ProfilesPage's hand-rolled setup command with a fetch to
  `/api/profiles/{name}/setup-command` so the copied command always
  matches what the backend would actually run (handles wrapper-alias
  collisions and reserved names correctly).
- Wire SOUL.md textarea label `htmlFor` -> textarea `id` so screen
  readers and clicking the label work as expected.
@vincez-hms-coder

Copy link
Copy Markdown
Contributor Author

Follow-up: rebased on main + addressed Copilot review feedback

Pushed ca7f46be which (a) merges current upstream/main (no longer conflicting) and (b) resolves all Copilot review comments from the prior round.

Conflict resolution

The 4 conflicting files (web/src/i18n/{en,zh,types}.ts, web/src/lib/api.ts) were resolved by keeping both this branch's profiles additions and main's new models page additions — they touched adjacent lines but had no semantic conflict.

Copilot review comments — all addressed

# File Fix
1 hermes_cli/web_server.py POST /api/profiles/{name}/open-terminal was already implemented in the prior round; no further change needed.
2 hermes_cli/web_server.py Windows branch now uses cmd.exe /c start "" <cmd> (matches the test and spawns a new window instead of /k reusing the parent console).
3 tests/hermes_cli/test_web_server.py test_profiles_create_creates_wrapper_alias_when_safe now monkeypatches hermes_cli.profiles._get_wrapper_dir to a tmp_path, so the test no longer writes to the real ~/.local/bin.
4 tests/hermes_cli/test_dashboard_browser_safe_imports.py Static scan now covers both *.tsx and *.ts (so plugins/registry.ts is enforced too).
5 web/src/components/NouiTypography.tsx leading-1.4leading-[1.4] (valid Tailwind arbitrary-value syntax).
6 web/src/pages/ProfilesPage.tsx openSoulEditor now tracks the latest requested profile via a useRef and ignores stale async responses.
7 web/src/pages/ProfilesPage.tsx + web/src/lib/api.ts handleCopyTerminalCommand now fetches GET /api/profiles/{name}/setup-command so the copied command always matches what the backend would actually run (handles wrapper-alias collisions / reserved names correctly).
8 web/src/pages/ProfilesPage.tsx SOUL.md textarea now has an id={\soul-editor-${p.name}`}and thehas a matchinghtmlFor` (a11y + click-to-focus).

Drive-by fixes uncovered while running the test suite

  • Pre-existing SyntaxError in the macOS branch of open_profile_terminal_endpoint — a f'…{command.replace("\\\\", …)}…' had a backslash inside the f-string expression, which Python <3.12 rejects. Hoisted the escape into a local escaped variable; module now parses.
  • web/src/pages/ModelsPage.tsx (added on main between the original PR and now) was importing Button, Spinner, Stats, Badge from the @nous-research/ui root barrel, which violates the (now stricter) browser-safe-import scan. Switched it to per-component subpaths to keep the suite green.

Verification

  • pytest tests/hermes_cli/{test_web_server.py,test_profiles.py,test_dashboard_browser_safe_imports.py,test_dashboard_profiles_nav_label.py}222 passed. The only red tests are 3 in TestPtyWebSocket (KeyError: 'bytes' from starlette's WebSocketTestSession); they reproduce identically on upstream/main, so they are environment / pre-existing on main and unrelated to this PR.
  • cd web && npm run build — clean (tsc passes, Vite produces web_dist/).

Re-requested Copilot review. Happy to address anything else.

@austinpickett austinpickett merged commit 6bc5d72 into NousResearch:main Apr 30, 2026
6 of 7 checks passed
02356abc pushed a commit to 02356abc/hermes-agent that referenced this pull request May 14, 2026
…board-profiles-hms-coder

feat(dashboard): add profiles management page
jsboige pushed a commit to jsboige/hermes-agent that referenced this pull request May 14, 2026
…board-profiles-hms-coder

feat(dashboard): add profiles management page
dannyJ848 pushed a commit to dannyJ848/hermes-agent that referenced this pull request May 17, 2026
…board-profiles-hms-coder

feat(dashboard): add profiles management page
gweeteve pushed a commit to gweeteve/hermes-agent that referenced this pull request Jun 2, 2026
…board-profiles-hms-coder

feat(dashboard): add profiles management page
Egavasyug pushed a commit to Egavasyug/hermes-agent that referenced this pull request Jun 10, 2026
…board-profiles-hms-coder

feat(dashboard): add profiles management page
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/cli CLI entry point, hermes_cli/, setup wizard P3 Low — cosmetic, nice to have type/feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants