Skip to content
This repository was archived by the owner on Jul 27, 2026. It is now read-only.

feat(agent-profiles): local Agent Profiles (library, editor, chat picker, live switch) — no cloud/Settings-UX change - #1550

Closed
simonrosenberg wants to merge 36 commits into
mainfrom
feat-agent-profiles-local
Closed

simonrosenberg wants to merge 36 commits into
mainfrom
feat-agent-profiles-local

Conversation

@simonrosenberg

@simonrosenberg simonrosenberg commented Jun 30, 2026 •

Copy link
Copy Markdown
Member

HUMAN:

  • A human has tested these changes.

AGENT:

Local end-to-end run against a real agent-server (ghcr.io/openhands/agent-server:48756c6-main-local-source-minimal on :8010, which exposes /api/agent-profiles), driving the canvas dev server (VITE_MOCK_API=false VITE_BACKEND_BASE_URL=http://localhost:8010) with Playwright:

  • GET /api/agent-profiles → HTTP 200 (returns ClaudeCode, Codex, default profiles).
  • Local backend — /settings/agents renders the AgentProfile library with the live profiles (hasClaudeCode=true, hasProfileWord=true), no redirect; /settings → /settings/agent (settings IA intact, no /agents hub); home (/conversations) chat input shows the AgentProfile picker (chat-input-agent-profile) and not the model picker; 0 page errors.
  • Cloud backend — /settings/agents redirects to /settings/agent (route guard) and the AgentProfile library nav link is absent (a[href="/settings/agents"] count 0). Cloud chat keeps the unchanged ChatInputModel.

Automated gates (all green): npm run typecheck, eslint, prettier --check, npx vitest run (3478 passed / 0 failed, 459 files), npm run build:mock, and check-translation-completeness (15 langs).


Why

Agent Profiles (epic OpenHands/software-agent-sdk#3713, Phase 4) was split across two stacked PRs: #1440 (the additive library + editor substrate, but not human-testable — no chat picker, no live switch) and #1463 (the UX that makes it usable, but bundled with a disruptive information-architecture rework that replaces /settings/* with an /agents hub, removes/rehomes settings pages, renames the sidebar rail, rewrites mobile nav, and drops the backend-selector gear).

This PR ships one self-contained, usable Agent Profiles feature for local backends only, with zero change for cloud users and no change to the existing Settings UX. It supersedes #1440 and #1463.

Summary

  • Adds the AgentProfile library + kind-aware master-detail editor (define a full profile: agent kind, model / LLM-profile ref, MCP selection, condenser; ACP provider/model/launch/auth) with a "What this agent will do" materialize overview and a create-profile (OpenHands/ACP) modal — at the additive route /settings/agents.
  • Adds the home chat-input AgentProfile picker (start a conversation from a profile) and in-conversation live switch — ACP model (set_session_model) / OpenHands LLM profile (/switch_profile).
  • Reverts the feat(agent-profiles): master-detail editor + materialize overview + kind picker (#1456) #1463 IA/hub rework: keeps /settings/*, all settings pages (LLM, Agent, Condenser, Verification, Secrets, App), the sidebar rail, the Customize/Extensions hub, standalone /customize /skills /plugins /mcp, the mobile settings nav, and the backend-selector gear. Verification stays a global toggle, exactly as on main.
  • Cloud-safe: the chat picker resolves to the unchanged ChatInputModel for cloud; the AgentProfile library nav item + route are gated to local backends (the cloud app-server has no /api/agent-profiles surface yet, #3730); conversation-launch-from-profile is gated to local.
  • Bumps @openhands/typescript-client to 1.28.0 (carried from main).

Issue Number

Part of OpenHands/software-agent-sdk#3713 (Phase 4). Supersedes #1440, #1463.

How to Test

  1. Run a local agent-server from SDK main (≥ v1.29.0, exposes /api/agent-profiles) on a port, e.g. :8010.
  2. npm ci && VITE_MOCK_API=false VITE_BACKEND_BASE_URL=http://localhost:8010 npm run dev:frontend, then open the app with a local backend registered.
  3. At Settings → Agent profiles (/settings/agents): create an OpenHands profile and an ACP profile; confirm the kind-aware editor and the "What this agent will do" overview resolve.
  4. On the home screen, use the chat-input agent picker to start a conversation from a profile.
  5. In an OpenHands conversation, switch the LLM profile live; in an ACP conversation, switch the model live.
  6. Cloud regression: with a cloud backend active, confirm the chat input shows the normal model picker, /settings/agents redirects away, and every other /settings/* page renders exactly as on main.

Video/Screenshots

Playwright screenshots captured locally (library page + home picker). See the AGENT evidence above for the asserted outcomes.

Type

  • Bug fix
  • Feature
  • Refactor
  • Breaking change
  • Docs / chore

Notes


🐳 Docker images for this PR

• GHCR package: https://github.com/OpenHands/agent-canvas/pkgs/container/agent-canvas

Component Value
Image ghcr.io/openhands/agent-canvas
Architectures amd64, arm64
Agent Server ghcr.io/openhands/agent-server:1.29.3-python
Automation openhands-automation==1.0.0a13
Commit 64f2dcd7344666133726b437ef06f7c88d60866a

Pull (multi-arch manifest)

# Multi-arch manifest — Docker automatically pulls the correct architecture
docker pull ghcr.io/openhands/agent-canvas:sha-64f2dcd

Run

docker run -it --rm \
  -p 8000:8000 \
  ghcr.io/openhands/agent-canvas:sha-64f2dcd

All tags pushed for this build

ghcr.io/openhands/agent-canvas:sha-64f2dcd-amd64
ghcr.io/openhands/agent-canvas:feat-agent-profiles-local-amd64
ghcr.io/openhands/agent-canvas:pr-1550-amd64
ghcr.io/openhands/agent-canvas:sha-64f2dcd-arm64
ghcr.io/openhands/agent-canvas:feat-agent-profiles-local-arm64
ghcr.io/openhands/agent-canvas:pr-1550-arm64
ghcr.io/openhands/agent-canvas:sha-64f2dcd
ghcr.io/openhands/agent-canvas:feat-agent-profiles-local
ghcr.io/openhands/agent-canvas:pr-1550

About Multi-Architecture Support

  • Each tag (e.g., sha-64f2dcd) is a multi-arch manifest supporting both amd64 and arm64
  • Docker automatically pulls the correct architecture for your platform
  • Individual architecture tags (e.g., sha-64f2dcd-amd64) are also available if needed

simonrosenberg and others added 30 commits June 21, 2026 17:34
Pulls in AgentProfilesClient, the AgentProfile union + summary/diagnostics
types, the ACP provider descriptor, and deriveSwitchPlan — the client
substrate the AgentProfile library + kind-aware editor build on (#3726/#3728).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…P nav lockout

Adds Settings → Agent profiles (/settings/agents): a kind-discriminated
AgentProfile library + editor wired to ts-client's AgentProfilesClient
(#3726), and folds the provider-driven ACP Authentication section into the
editor while filtering env-keyed ACP creds out of the generic Secrets list
(#3728).

- Library: cards (kind badge, referenced LLM profile, Active badge) + ellipsis
  menu (Edit/Duplicate/Set active/Rename/Delete); 409/422 surfaced; the
  backend-seeded default profile is presented as the current setup.
- Editor (extracted from agent-settings ACP logic): OpenHands branch =
  llm_profile_ref picker + mcp_server_refs tri-state multi-select (null=all,
  []=none) + sub-agents / parallel-tool-calls / system-suffix / verification
  sub-form; ACP branch = provider preset + acp_model + session-mode/timeout/
  command + the relocated AcpCredentialsSection.
- Nav lockout dissolved: removed disabledByAcp + acp-route-guard redirect +
  the use-settings-nav-items greying; fixed the dead /settings vs /settings/llm
  LLM-Profiles rename compare. No Settings page greys out for ACP.
- Secrets: getAllAcpReservedSecretNames() (descriptor-derived, no hardcoded
  list) hides ACP cred names from the generic Secrets list; onboarding step
  repointed onto the shared AcpCredentialsSection.
- Provenance: surfaced ConversationInfo.launched_profile {profile_id,revision}
  through the wire deserializer → DirectConversationInfo → toAppConversation →
  AppConversation, for the #3727 chat-input picker.
- Updated ACP unit tests to the ts-client 1.26 registry (CLI versions/model ids).

Closes OpenHands/software-agent-sdk#3726
Closes OpenHands/software-agent-sdk#3728

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
QA flagged that the ACP command hint still told users "API keys go through
the Secrets panel", which contradicts #3728 — provider credentials are now
entered in the editor's Authentication section and reserved ACP secret names
are hidden from the generic Secrets list. Update SETTINGS$AGENT_COMMAND_HINT to
point to the Authentication section, and ONBOARDING$ACP_SECRETS_SUBTITLE to
drop the now-stale "manage anytime under Settings → Secrets" line (all 15
languages).

Addresses all-hands-bot QA review on PR #1440.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…inputs, atomic save

- read launched_agent_profile.agent_profile_id (the actual wire shape) instead
  of the never-emitted launched_profile.profile_id, so launch provenance is no
  longer always null (the #3727 input)
- guard acp_prompt_timeout > 0, floor tool_concurrency_limit, clamp
  critic_threshold to [0,1], floor max_refinement_iterations — avoids 422s from
  values the editor previously sent unvalidated
- save the profile body before renaming so a save failure can't leave a renamed
  profile with a stale body (also fixes the rename-edit 409 mislabel)
- surface the localized 409 (SETTINGS$AGENT_PROFILE_LLM_REFERENCED) when
  deleting an LLM profile referenced by an agent profile
- collapse the dead 422 branch in reportSaveError; correct the stale
  "materialize check" comment

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
… capped copy name, surface dangling MCP refs

- key the ACP credential form + model list + acp_server on an explicit provider
  selection instead of re-detecting the preset from the command text, so adding
  a flag to a built-in command no longer silently flips to "custom", drops the
  typed credentials, and rewrites acp_server
- align create-mode defaults to the SDK source of truth: enable_sub_agents
  false, acp_prompt_timeout 1800, verification critic_mode finish_and_message /
  threshold 0.6
- cap the Duplicate copy name at the 64-char limit so a long source name can't
  produce an invalid (422) name; reuse the existingNames memo
- surface dangling mcp_server_refs in the editor via the previously-unused
  SETTINGS$AGENT_PROFILE_DANGLING_MCP string; drop the now-redundant dead
  materializeProfile service method

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…s panel

ACP provider creds are plain global secrets (env-keyed, riding the global
secret store) — the Authentication section in the agent/profile editor is a
convenience writer over that same store, not a separate one. Hiding them from
Settings → Secrets made the panel misrepresent what's stored and removed the
canonical view/rotate/revoke/delete path; it was also un-implementable cleanly
because the reserved set included generic names (ANTHROPIC_API_KEY,
GOOGLE_CLOUD_PROJECT, …) that collide with secrets a user may set for non-ACP
reasons.

- restore secrets-settings.tsx to list all global secrets (drops the filter)
- drop the now-unused getAllAcpReservedSecretNames + its test
- restore the onboarding subtitle to point users back to Settings → Secrets

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…e flow

Address review feedback: split the body-save and rename into separate
try/catch blocks so a 409 reports the right reason — body save → "limit
reached", rename → "name already exists" — instead of guessing from
mode + name. Replaces reportSaveError with a per-call-site showSaveError.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…ibrary

# Conflicts:
#	src/i18n/translation.json
Wire agent_profile_id (mutually exclusive with agent_settings) through
buildStartConversationRequest, AgentServerConversationService.createConversation,
and useCreateConversation, so an activated AgentProfile actually reaches
conversation start — the launch path the library needs to be functional.

New local conversations default to the active AgentProfile; a profile launch
skips the current-settings ACP tag, encrypted-settings and subscription checks
(the server resolves the profile). Plain creates stay byte-identical to the
legacy agent_settings path. Cloud is unchanged (no /api/agent-profiles yet).

Ported from #1446 so this PR is self-sufficient; excludes the picker UI and the
settings-IA changes (those follow with the chat-input picker / Agents-hub work).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…d picker (#1456)

Rework the AgentProfile editor from a single flat scroll into a kind-aware
master-detail editor and surface the unused materialize endpoint as a
"What this agent will do" overview.

- Master-detail editor: a kind-aware section nav (left) + detail pane.
  Only the sections that apply to the profile's kind render — OpenHands gets
  General/Model/Tools & MCP/Memory/Verification/Personality/Advanced; ACP gets
  General/Provider & Model/Launch/MCP/Authentication. State + save flow are
  extracted into useAgentProfileForm so sections stay presentational.
- "What this agent will do" overview: wires POST /api/agent-profiles/{name}/
  materialize (resolve_agent_profile_dry_run) into a live summary + server-
  resolved diagnostics (validity, dangling MCP refs, missing LLM key) — the
  legibility + QA-oracle panel that nothing rendered before.
- Create flow: a minimal OpenHands/ACP kind picker modal up front; kind is then
  fixed for the profile's life (switch = Duplicate), so the editor opens on the
  chosen kind's sections with built-in defaults.
- Memory section edits the summarizing condenser's trigger size (max_size),
  preserving the rest of the round-tripped condenser config.
- Set-as-default moved into the editor header.

Tools control, a per-profile Skills section, the Agents-hub IA move, and cloud
parity remain follow-ups per the issue's sequencing.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…456)

Implements the navigation layer of #1456 on top of the editor.

- Left rail: "Customize" → "Agents" (◆), pointing at the new /agents hub.
- Agents hub (/agents, reusing the Settings layout): a grouped left nav —
  Profiles (the agent-profile library/editor) + Building blocks (LLM profiles,
  MCP servers, Skills, Plugins, Secrets) — rehoming the existing catalog pages
  under one destination.
- Settings shrinks to Application (+ account/backends); the standalone Agent,
  Condenser, and Verification pages are folded into the profile editor.
- Legacy paths redirect so links/bookmarks don't break: /customize, /mcp,
  /skills, /plugins, /settings/{llm,secrets,agents} → their /agents/* homes;
  /settings/{agent,condenser,verification} → /agents/profiles.

The desktop settings sidebar now renders header/divider rows (mirroring the
mobile drawer) so the hub nav can group its sections.

MCP/Skills/Plugins keep their own full-page ExtensionsNavigation for now and
sit beside the hub at /agents/* (linked from the hub nav); fully merging their
wrapper into the single hub nav is a follow-up.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…enser naming (#1456)

Address review feedback on the IA:

- Single hub panel: MCP servers / Skills / Plugins now render *inside* the
  Agents hub (nested under /agents, sharing its one left nav) instead of their
  own ExtensionsNavigation sub-panel. The now-dead ExtensionsNavigation +
  extensions-hub + extensions-mobile-hub are removed.
- Flat hub nav: dropped the "Profiles" / "Building blocks" group headers — one
  list: Agent profiles · LLM Profiles · MCP servers · Skills · Plugins · Secrets.
- Remove the Settings destination; "Application" is a top-level rail item next
  to Agents/Automate (/application standalone). /settings → /application.
- Keep the global agent page reachable (nav-less) at /settings/agent — the
  conversation-launch path + the mock-LLM ACP e2e drive it directly; the
  earlier redirect broke that e2e.
- Reuse the existing "Condenser" naming (SETTINGS$NAV_CONDENSER / the global
  condenser strings) for the per-profile section instead of inventing "Memory".

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…"Application"→"Settings" (#1456)

- Rail hub item: NAV$AGENTS value → "Agent Settings" (also retitles the hub
  heading, which reuses the same key).
- Rail app-prefs item + the /application page heading reuse the existing
  SIDEBAR$SETTINGS ("Settings") label.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…ced into General (#1456)

Close customizability gaps vs the global Settings pages:

- Condenser: the profile stores a flat condenser config, so surface the same
  knobs the global Condenser page edits — Enable, Max size, Keep first, Max
  tokens — editing the config in place and round-tripping the deeper fields
  (condenser_kind, minimum_progress, hard_context_reset_*) untouched, so nothing
  is lost.
- Remove the "Advanced" section; Enable sub-agents + Parallel tool calls
  (tool_concurrency_limit) move into General (OpenHands only).

Known gaps that need an SDK profile-model change (ts-client 1.26.0 can't store
them on a profile), tracked as follow-ups, NOT closable in canvas alone:
- verification.critic_api_key — absent from ProfileVerificationSettings (it's a
  secret; the profile model is secret-free).
- enable_switch_llm_tool — absent from OpenHandsAgentProfile.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…cation (#1456)

The critic is a global service (endpoint + model + API key), so configure it
globally instead of per-profile — which also removes the need for an SDK
profile-model change to carry critic_api_key.

- Add a "Critic" building block to the Agents hub (/agents/critic), reusing the
  existing schema-driven verification UI (SdkSectionPage over the global
  agent_settings.verification) — full config incl. critic_api_key, exactly like
  the old standalone Verification page on main.
- Remove the per-profile Verification section from the profile editor (and the
  now-unused AgentProfileVerificationFields + the overview's verification row).
  The profile's verification value is still round-tripped on save (never reset),
  just not edited here.

This resolves the critic_api_key half of OpenHands/software-agent-sdk#3856
without an SDK change; enable_switch_llm_tool remains the open SDK gap there.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…gear (#1456)

Settings is now a top-level rail item, so the gear next to the backend selector
at the bottom of the rail is redundant. Removed the NavigationLink to /settings
(and its now-unused settings-match/label/tooltip-placement state + the
NavigationLink/StyledTooltip/useConversationStore imports). The backend selector
and the "Manage backends" menu item are unchanged.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…view tabs (#1456)

On the Critic page the Basic/Advanced/All tabs all showed the same thing: the
verification section has no "major"-prominence fields (so Basic == Advanced) and
the differentiating fields are gated behind "Enable critic", so with the critic
off every tier collapsed to the two toggles.

Add an additive `hideViewToggle` prop to SdkSectionPage (forces a flat "all"
view, hides the Basic/Advanced/All switcher) and use it from the Critic page.
Other settings pages are unaffected (default false).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…dundant view tabs (#1456)"

This reverts commit a91e1b3.
… (#1456)

main calls this panel "Verification" (the /settings/verification page), so the
hub building block should too — not a custom "Critic" name. Renamed the nav
item + route to Verification (/agents/verification), reusing main's
SETTINGS$NAV_VERIFICATION label + SETTINGS$PAGE_VERIFICATION_SUBLINE, and dropped
the now-unused critic strings. Combined with the preceding revert, the panel is
now 100% main's Verification UI (same name, same SdkSectionPage incl. the
Basic/Advanced/All view tabs).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…456)

ACP is much simpler than OpenHands, so the master-detail section nav is overkill.
Render the ACP profile editor as one flat page — the way the global agent page
does — stacking the existing sections (General incl. the profile Name, Provider
& Model, Launch, MCP, Authentication) in a single scroll. OpenHands keeps the
master-detail nav + materialize overview.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…uffix) for now (#1456)

Drop the per-profile Personality section and its system_message_suffix editor
from the OpenHands editor. The stored value is still round-tripped on save (an
edit never drops it), it's just not user-editable for now. Removed the now-unused
section/overview/i18n bits.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…→ "MCP" (#1456)

Two scope trims on the OpenHands editor:
- Remove the Personality section + its system_message_suffix editor. The stored
  value is still round-tripped on save (an edit never drops it); it's just not
  user-editable for now.
- Rename "Tools & MCP" → "MCP servers" (reuse SETTINGS$AGENT_SECTION_MCP) and
  drop the "per-tool control coming soon" note, since we don't expose any tool
  flexibility yet. The section still selects MCP servers.

Removed the now-unused i18n keys (personality + tools-mcp/deferred-note).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…not the model (#1456)

Reviewer feedback (thread): the ACP Authentication api-key field reads like an
LLM key. Reword the section description to make clear these credentials
authenticate the ACP provider/CLI itself (e.g. its API key), not the model named
above — which for ACP is just a string. Copy-only (15 langs).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…ofile) (#3727)

Collapse the two divergent local chat-input pickers (SwitchProfileButton +
the ACP use of ChatInputModel) into one AgentProfile picker. Selecting a
profile starts a NEW conversation launched from it via agent_profile_id (no
live in-conversation switch, per product direction); on the home page it
activates the profile so the next conversation launches from it. Cloud is
unchanged — AgentProfiles are local-first (cloud surface tracked by #3730).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
(cherry picked from commit 7f55c39)
… adapter path

Address review feedback on #1446:
- thread isSwitching into the picker trigger (disabled + aria-busy) so re-opening
  the menu can't fire a second createConversation while one is in flight — the
  menu closes on select, so this was the only double-submit path
- add buildStartConversationRequest unit tests for the agentProfileId path: the
  agent_profile_id XOR agent_settings invariant, ACP server-tag suppression
  (proven against the no-profile case that does stamp it), and secrets_encrypted
  suppression
- note the createConversation positional-params tech debt with a refactor TODO

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
(cherry picked from commit 4953d71)
…bile nav)

Resolves verified findings from the max-effort review of #1463:

- Unify the ACP editor into the same master-detail layout as OpenHands
  (extend renderSection with the ACP cases; drop the flat render). ACP
  profiles now get the "What this agent will do" materialize QA panel,
  dangling-ref / missing-credential warnings, and the section-nav error
  markers — and the previously dead ACP section metadata is now live.
- buildPayload: only send `condenser` when the loaded profile had one or
  the user touched it, so a create (or an edit of a profile with none) no
  longer stamps the frontend's DEFAULT_CONDENSER; let the server seed it.
- Guard falsy-zero / NaN coercions: clearing condenser max_size/keep_first
  falls back to the default instead of 0; the overview renders the default
  instead of "Summarize at NaN events"; and the MCP overview row honors an
  empty server-resolved list ("None") instead of showing "All servers".
- Re-point stale links after the /settings -> Agents-hub migration: the
  chat model picker's LLM link and the AI-config modal's "Advanced settings"
  now go to /agents/llm; "Manage agent profiles" goes to /agents/profiles.
- Restore mobile hub navigation: the /agents index renders a navigable
  section hub on mobile (desktop still drops into Profiles), and the mobile
  top-bar backs /agents/* sub-pages to /agents.
- Telegraph the ACP prompt-timeout default (1800) via a placeholder.
- Restore the feature-flag redirect coverage deleted with settings.test.tsx
  as a new agents-hub clientLoader test.

Gates: typecheck, eslint, prettier, build:mock all green; full vitest green
except 6 pre-existing failures unrelated to this change (conversation-create
signature + agent-server version guard). Validated live in the mock app
(ACP editor nav + overview, route redirects, mobile hub) via Playwright.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…undary

Re-review of 2d8e913 caught a 768px off-by-one I introduced: useBreakpoint(768)
is width<=768, but Tailwind `md` (the boundary that toggles the desktop sidebar
`hidden md:flex` and the hub `md:hidden`) is min-width:768px. So at exactly
768px agents-index rendered the CSS-hidden mobile hub with no redirect → a blank
content pane. Use SIDEBAR_RAIL_COLLAPSE_MAX_WIDTH (767) in agents-index and
agents-hub so the JS mobile cutoff matches the CSS md boundary.

Also migrate the last legacy LLM CTA: the home llm-not-configured banner now
navigates to /agents/llm instead of /settings/llm (dropping a redirect hop).

Validated live (Playwright): w=390/767 show the mobile hub on /agents; w=768/1280
redirect to /agents/profiles with the desktop sidebar + rows (no blank pane).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…profile)

#3727 collapsed the in-conversation pickers into a start-new AgentProfile
picker. Restore live in-conversation switching while keeping the AgentProfile
picker on the home page:

  - cloud:                  model picker (unchanged, #3730)
  - local home:             AgentProfile picker (start-new / activate, #3727)
  - local in an ACP convo:  ChatInputModel — live-switch the running ACP model
                            (set_session_model)
  - local in an OpenHands
    conversation:           new ChatInputLlmProfilePicker — live-switch the
                            running LLM profile (/switch_profile)

New useChatInputLlmProfileState ports the former SwitchProfileButton's
resolution priority (optimistic switch -> stamped profile -> model match ->
account active_profile) and switches via useSwitchLlmProfileAndLog. The new
picker mirrors chat-input-profile-picker (inline pill + overflow MenuContent),
links to /agents/llm, and stays hidden when no LLM profiles exist. chat-input-
actions branches on a single `pickerKind` discriminator (inline + overflow),
with the overflow settings classNames hoisted to shared consts.

Tests: chat-input-actions cases updated (home -> agent picker; in-convo
OpenHands -> llm switcher; in-convo ACP -> model) + new picker + hook unit
tests (resolution priority + live-switch). typecheck/eslint/prettier/build
green. Validated live (Playwright, mock): in-convo OpenHands renders the
LLM-profile switcher and not the start-new picker; home renders the AgentProfile
picker; no page errors.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…ocal

# Conflicts:
#	__tests__/components/features/chat/components/chat-input-model.test.tsx
#	__tests__/components/features/conversation-panel/conversation-card.test.tsx
#	__tests__/components/features/skills/extensions-navigation.test.tsx
#	__tests__/constants/acp-providers.test.ts
#	__tests__/hooks/mutation/use-create-conversation.test.tsx
#	package-lock.json
#	package.json
#	src/components/features/home/llm-not-configured-banner.tsx
#	src/components/features/settings/settings-desktop-sidebar.tsx
#	src/components/features/skills/extensions-navigation.tsx
#	src/hooks/mutation/use-create-conversation.ts
#	src/i18n/translation.json
#	src/routes/mcp.tsx
#	src/routes/skills-plugins.tsx
…anged

Peel the disruptive #1463 information-architecture changes off the
combined feature so this PR ships Agent Profiles for LOCAL backends only
with zero change for cloud users and no change to the existing Settings UX:

- Restore the /settings/* IA: no /agents hub, no legacy redirects; all
  existing Settings pages (LLM, Agent, Condenser, Verification, Secrets,
  App) kept in place. Verification stays a global toggle (same as main).
- Restore the sidebar rail labels/structure, the Customize/Extensions hub,
  the standalone /customize, /skills, /plugins, /mcp routes, the mobile
  settings nav, and the backend-selector Settings gear.
- Keep the new master-detail profile editor + materialize overview + create
  modal, the home chat-input profile picker, and the in-conversation live
  switch (ACP model / OpenHands LLM profile) — re-pointed to /settings/*.
- Gate the AgentProfile library nav item + route to local backends (the
  cloud app-server has no /api/agent-profiles surface yet, #3730).
- Update the chat-picker tests to assert the /settings/* link targets
  (profile library → /settings/agents, LLM profiles → /settings/llm) and
  the model picker's restored /settings link.
- Cover the cloud gate: the AgentProfile library nav item is hidden on
  cloud backends (#3730).
- Prune 13 unused i18n keys left over from the dropped IA hub + folded
  editor sections; regenerate; translation completeness passes (15 langs).
@vercel

vercel Bot commented Jun 30, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
agent-canvas Ready Ready Preview, Comment Jul 1, 2026 2:42pm

Request Review

@simonrosenberg
simonrosenberg marked this pull request as ready for review June 30, 2026 16:20
…cker

The same-model profile-identity mock-LLM e2e asserted the in-conversation
profile name via the now-deleted switch-profile-button. In a local OpenHands
conversation the chat input renders the new ChatInputLlmProfilePicker
(testid chat-input-llm-profile), whose label is the active profile name —
same semantics. Swap both assertions to the new testid.

Note: this spec also depends on UI-created LLM profiles persisting via
the agent-server (activateProfileViaUI). That setup step fails locally with
the latest agent-server (1.29.3) in the mock-LLM stack — reproduced
identically on a clean origin/main checkout — so it is a pre-existing,
environment-specific issue, not introduced here.
…is unresolvable

The agent-server seeds a `default` openhands agent profile (set active) whose
`llm_profile_ref` is a hardcoded "default" that may not exist — on a fresh store
or one configured with only named LLM profiles. Launching from it 404s
("LLM profile 'default' not found"), bricking home conversation creation for
fresh local users.

use-create-conversation now skips `agent_profile_id` and falls back to the
legacy agent_settings launch (which reflects the active LLM) when the resolved
agent profile is an openhands profile whose `llm_profile_ref` isn't a known LLM
profile. ACP profiles carry no llm_profile_ref and are never gated.

This is a defensive mitigation; the seed should mirror the active LLM profile so
the agent profile is honored — tracked in software-agent-sdk#3933 (epic #3713).
@github-actions

github-actions Bot commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

❌ Mock-LLM E2E Tests

59/60 passed · 1 failed

Commit: 64f2dcd7 · Workflow run · Test artifacts

Details
Status Test Duration
✅ automations/mock-llm-automation.spec.ts › mock-LLM automation lifecycle › step 1: setup LLM profile and register automation trajectory 7.3s
✅ automations/mock-llm-automation.spec.ts › mock-LLM automation lifecycle › step 2: create automation and dispatch run via the UI 27.5s
✅ automations/mock-llm-automation.spec.ts › mock-LLM automation lifecycle › step 3: verify automation and run on the automations page 6.1s
✅ automations/mock-llm-preset-automation.spec.ts › preset automation → slash command conversation › automation card sends the correct slash command to a conversation 16.3s
✅ automations/mock-llm-preset-automation.spec.ts › preset automation → slash command conversation › direct slash command from home page triggers skill activation 14.2s
✅ backends/mock-llm-auth-modes.spec.ts › auth mode: fresh install with runtime-injected key › reaches the onboarding modal without pre-seeded localStorage 1.3s
✅ backends/mock-llm-auth-modes.spec.ts › auth mode: non-public key rotation › recovers when localStorage has a stale session API key 5.3s
✅ backends/mock-llm-auth-modes.spec.ts › auth mode: public gate › shows first-run onboarding before the auth screen when no key is configured 1.4s
✅ backends/mock-llm-auth-modes.spec.ts › auth mode: public gate › rejects an incorrect key with an inline error 1.6s
✅ backends/mock-llm-auth-modes.spec.ts › auth mode: public gate › allows access after pasting the correct key 1.8s
✅ backends/mock-llm-auth-modes.spec.ts › auth mode: public gate › skips auth screen for returning user with valid stored key 750ms
✅ backends/mock-llm-auth-modes.spec.ts › auth mode: public gate › re-prompts when the server rotates its key (stale localStorage) 1.5s
✅ backends/mock-llm-cross-connect.spec.ts › cross-connect: frontend-only → backend-only › frontend-only connects to a separate backend-only instance 16.9s
✅ backends/mock-llm-cross-connect.spec.ts › cross-connect: frontend-only → multiple backends › connects to two separate backends and switches between them 20.9s
✅ backends/mock-llm-partial-stack.spec.ts › partial stack: --frontend-only › serves the frontend but returns 503 for backend routes 7.4s
✅ backends/mock-llm-partial-stack.spec.ts › partial stack: --backend-only › serves backend APIs but returns 503 for the frontend root 14.2s
✅ backends/mock-llm-partial-stack.spec.ts › partial stack: port conflict › fails with a clear error when the ingress port is occupied 102ms
✅ backends/mock-llm-partial-stack.spec.ts › partial stack: port conflict › starts successfully on a free port after a conflict 6.0s
✅ conversations/mock-llm-conversation.spec.ts › mock-LLM agent-server conversation › step 1: create an LLM profile pointing at the mock LLM server 6.2s
✅ conversations/mock-llm-conversation.spec.ts › mock-LLM agent-server conversation › step 2: activate the mock-llm profile and verify settings API 6.2s
✅ conversations/mock-llm-conversation.spec.ts › mock-LLM agent-server conversation › step 3: run a conversation with the mock LLM 7.4s
✅ conversations/mock-llm-conversation.spec.ts › mock-LLM agent-server conversation › step 4: resume conversation from sidebar after navigating away 5.8s
❌ conversations/mock-llm-image-upload.spec.ts › mock-LLM image upload › attaching an image embeds it as base64 in the LLM completion call 22.5s
✅ files/mock-llm-files-and-git.spec.ts › files tab, git control bar, and browser tab › step 1: ensure mock LLM profile is configured 7.4s
✅ files/mock-llm-files-and-git.spec.ts › files tab, git control bar, and browser tab › step 2: start conversation and attach workspace metadata 12.5s
✅ files/mock-llm-files-and-git.spec.ts › files tab, git control bar, and browser tab › step 3: git control bar shows workspace pill and git actions 5.4s
✅ files/mock-llm-files-and-git.spec.ts › files tab, git control bar, and browser tab › step 4: files tab defaults to diff view for attached workspace 10.6s
✅ files/mock-llm-files-and-git.spec.ts › files tab, git control bar, and browser tab › step 5: browser tab shows empty state 6.3s
✅ files/mock-llm-files-and-git.spec.ts › files tab, git control bar, and browser tab › step 6: files tab defaults to file-tree view without attached workspace 8.2s
✅ home/mock-llm-folder-workspace.spec.ts › mock-LLM folder browser → workspace → conversation › step 1: browse to a folder, add it as a workspace, and launch a conversation with the correct working_dir 8.6s
✅ mcp/mock-llm-mcp-github.spec.ts › MCP GitHub server install flow › step 1: GitHub card is visible on the MCP marketplace page 5.6s
✅ mcp/mock-llm-mcp-github.spec.ts › MCP GitHub server install flow › step 2: clicking GitHub card opens the install modal with correct fields 6.6s
✅ mcp/mock-llm-mcp-github.spec.ts › MCP GitHub server install flow › step 3: full install flow — fill PAT, submit, verify installed 13.2s
✅ mcp/mock-llm-mcp-github.spec.ts › MCP GitHub server install flow › step 4: installed GitHub server can be deleted 5.8s
✅ mcp/mock-llm-mcp-slack-credentials.spec.ts › MCP Test Connection credential verification (Slack) › install: invalid Slack credentials are blocked with a credential-check error 5.8s
✅ mcp/mock-llm-mcp-slack-credentials.spec.ts › MCP Test Connection credential verification (Slack) › install: a valid token missing only a scope still installs (missing_scope is not a credential failure) 5.9s
✅ mcp/mock-llm-mcp-slack-credentials.spec.ts › MCP Test Connection credential verification (Slack) › install: an older agent server that omits tool_result still installs (compat) 6.0s
✅ mcp/mock-llm-mcp-slack-credentials.spec.ts › MCP Test Connection credential verification (Slack) › edit: Test Connection verifies the stored credentials and surfaces a credential failure 6.2s
✅ mcp/mock-llm-mcp-slack-credentials.spec.ts › MCP Test Connection credential verification (Slack) › edit: Test Connection reports success for valid stored credentials 5.8s
✅ mcp/mock-llm-mcp-slack-credentials.spec.ts › MCP Test Connection credential verification (Slack) › custom (non-catalog) server: Test Connection attaches no verification probe 5.8s
✅ onboarding/mock-llm-onboarding-happy-path.spec.ts › onboarding happy path › completes the full onboarding flow and launches a conversation 4.4s
✅ onboarding/mock-llm-onboarding-regressions.spec.ts › onboarding recent regressions › keeps the modal open on backdrop click and Escape 1.5s
✅ onboarding/mock-llm-onboarding-regressions.spec.ts › onboarding recent regressions › defaults the LLM setup step to OpenAI GPT-5.5 1.6s
✅ regressions/mock-llm-ui-regressions.spec.ts › UI regressions › scopes standalone styles to the agent-server-ui shell 1.3s
✅ regressions/mock-llm-ui-regressions.spec.ts › UI regressions › renders critic results on agent messages and finish actions 1.4s
✅ regressions/mock-llm-ui-regressions.spec.ts › UI regressions › loads older events when scrolling up 1.7s
✅ regressions/mock-llm-ui-regressions.spec.ts › UI regressions › selected workspace persists after navigating away and returning 2.4s
✅ regressions/mock-llm-ui-regressions.spec.ts › UI regressions › cleared sessionStorage yields empty workspace selection 1.3s
✅ settings/mock-llm-acp-agent.spec.ts › mock-LLM ACP agent conversation › step 1: configure ACP agent via Settings → Agent UI 16.2s
✅ settings/mock-llm-acp-agent.spec.ts › mock-LLM ACP agent conversation › step 2: reload and verify ACP settings are persisted in UI 5.6s
✅ settings/mock-llm-acp-agent.spec.ts › mock-LLM ACP agent conversation › step 3: start ACP conversation and verify agent reply 6.7s
✅ settings/mock-llm-acp-agent.spec.ts › mock-LLM ACP agent conversation › step 4: resume ACP conversation from sidebar after navigating away 10.7s
✅ settings/mock-llm-model-switch.spec.ts › mock-LLM /model slash command › step 1: configure LLM, create switch-target profile, register trajectory 13.5s
✅ settings/mock-llm-model-switch.spec.ts › mock-LLM /model slash command › step 2: start conversation, switch profile via /model, verify switch 7.7s
✅ settings/mock-llm-profile-management.spec.ts › active profile deletion + reconciliation › active profile is deletable and reconciliation activates another profile 8.6s
✅ settings/mock-llm-profile-management.spec.ts › same-model profile identity › chat header shows the correct profile when two profiles share the same model 15.9s
✅ settings/mock-llm-profile-management.spec.ts › OpenHands provider hidden base_url preservation › re-saving an OpenHands profile from Basic view preserves hidden base_url 7.4s
✅ skills/mock-llm-skills.spec.ts › skill loading: project, user, and deletion › project skill in workspace/.agents/skills/ triggers on matching keyword 14.5s
✅ skills/mock-llm-skills.spec.ts › skill loading: project, user, and deletion › user skill in ~/.openhands/skills/ triggers on matching keyword 15.7s
✅ skills/mock-llm-skills.spec.ts › skill loading: project, user, and deletion › deleting a user skill removes it from subsequent conversations 15.4s
🔍 Failure details (1)

❌ conversations/mock-llm-image-upload.spec.ts › mock-LLM image upload › attaching an image embeds it as base64 in the LLM completion call

Error: Timeout 15000ms exceeded while waiting on the predicate

Posted by the Mock-LLM E2E workflow · results are deterministic (scripted LLM responses)

@github-actions

github-actions Bot commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

✅ Mock-LLM Docker E2E Test Results

60/60 passed

Commit: 64f2dcd7 · Workflow run · Test artifacts

Details
Status Test Duration
✅ automations/mock-llm-automation.spec.ts › mock-LLM automation lifecycle › step 1: setup LLM profile and register automation trajectory 7.4s
✅ automations/mock-llm-automation.spec.ts › mock-LLM automation lifecycle › step 2: create automation and dispatch run via the UI 31.6s
✅ automations/mock-llm-automation.spec.ts › mock-LLM automation lifecycle › step 3: verify automation and run on the automations page 6.3s
✅ automations/mock-llm-preset-automation.spec.ts › preset automation → slash command conversation › automation card sends the correct slash command to a conversation 17.7s
✅ automations/mock-llm-preset-automation.spec.ts › preset automation → slash command conversation › direct slash command from home page triggers skill activation 13.8s
✅ backends/mock-llm-auth-modes.spec.ts › auth mode: fresh install with runtime-injected key › reaches the onboarding modal without pre-seeded localStorage 1.4s
✅ backends/mock-llm-auth-modes.spec.ts › auth mode: non-public key rotation › recovers when localStorage has a stale session API key 5.4s
✅ backends/mock-llm-auth-modes.spec.ts › auth mode: public gate › shows first-run onboarding before the auth screen when no key is configured 1.4s
✅ backends/mock-llm-auth-modes.spec.ts › auth mode: public gate › rejects an incorrect key with an inline error 1.6s
✅ backends/mock-llm-auth-modes.spec.ts › auth mode: public gate › allows access after pasting the correct key 1.6s
✅ backends/mock-llm-auth-modes.spec.ts › auth mode: public gate › skips auth screen for returning user with valid stored key 1.1s
✅ backends/mock-llm-auth-modes.spec.ts › auth mode: public gate › re-prompts when the server rotates its key (stale localStorage) 1.5s
✅ backends/mock-llm-cross-connect.spec.ts › cross-connect: frontend-only → backend-only › frontend-only connects to a separate backend-only instance 23.8s
✅ backends/mock-llm-cross-connect.spec.ts › cross-connect: frontend-only → multiple backends › connects to two separate backends and switches between them 21.5s
✅ backends/mock-llm-partial-stack.spec.ts › partial stack: --frontend-only › serves the frontend but returns 503 for backend routes 7.3s
✅ backends/mock-llm-partial-stack.spec.ts › partial stack: --backend-only › serves backend APIs but returns 503 for the frontend root 14.1s
✅ backends/mock-llm-partial-stack.spec.ts › partial stack: port conflict › fails with a clear error when the ingress port is occupied 107ms
✅ backends/mock-llm-partial-stack.spec.ts › partial stack: port conflict › starts successfully on a free port after a conflict 6.0s
✅ conversations/mock-llm-conversation.spec.ts › mock-LLM agent-server conversation › step 1: create an LLM profile pointing at the mock LLM server 6.3s
✅ conversations/mock-llm-conversation.spec.ts › mock-LLM agent-server conversation › step 2: activate the mock-llm profile and verify settings API 6.2s
✅ conversations/mock-llm-conversation.spec.ts › mock-LLM agent-server conversation › step 3: run a conversation with the mock LLM 6.6s
✅ conversations/mock-llm-conversation.spec.ts › mock-LLM agent-server conversation › step 4: resume conversation from sidebar after navigating away 5.7s
✅ conversations/mock-llm-image-upload.spec.ts › mock-LLM image upload › attaching an image embeds it as base64 in the LLM completion call 13.4s
✅ files/mock-llm-files-and-git.spec.ts › files tab, git control bar, and browser tab › step 1: ensure mock LLM profile is configured 7.4s
✅ files/mock-llm-files-and-git.spec.ts › files tab, git control bar, and browser tab › step 2: start conversation and attach workspace metadata 12.3s
✅ files/mock-llm-files-and-git.spec.ts › files tab, git control bar, and browser tab › step 3: git control bar shows workspace pill and git actions 5.3s
✅ files/mock-llm-files-and-git.spec.ts › files tab, git control bar, and browser tab › step 4: files tab defaults to diff view for attached workspace 6.0s
✅ files/mock-llm-files-and-git.spec.ts › files tab, git control bar, and browser tab › step 5: browser tab shows empty state 6.3s
✅ files/mock-llm-files-and-git.spec.ts › files tab, git control bar, and browser tab › step 6: files tab defaults to file-tree view without attached workspace 7.7s
✅ home/mock-llm-folder-workspace.spec.ts › mock-LLM folder browser → workspace → conversation › step 1: browse to a folder, add it as a workspace, and launch a conversation with the correct working_dir 7.5s
✅ mcp/mock-llm-mcp-github.spec.ts › MCP GitHub server install flow › step 1: GitHub card is visible on the MCP marketplace page 5.6s
✅ mcp/mock-llm-mcp-github.spec.ts › MCP GitHub server install flow › step 2: clicking GitHub card opens the install modal with correct fields 5.7s
✅ mcp/mock-llm-mcp-github.spec.ts › MCP GitHub server install flow › step 3: full install flow — fill PAT, submit, verify installed 13.1s
✅ mcp/mock-llm-mcp-github.spec.ts › MCP GitHub server install flow › step 4: installed GitHub server can be deleted 5.8s
✅ mcp/mock-llm-mcp-slack-credentials.spec.ts › MCP Test Connection credential verification (Slack) › install: invalid Slack credentials are blocked with a credential-check error 5.8s
✅ mcp/mock-llm-mcp-slack-credentials.spec.ts › MCP Test Connection credential verification (Slack) › install: a valid token missing only a scope still installs (missing_scope is not a credential failure) 5.9s
✅ mcp/mock-llm-mcp-slack-credentials.spec.ts › MCP Test Connection credential verification (Slack) › install: an older agent server that omits tool_result still installs (compat) 5.9s
✅ mcp/mock-llm-mcp-slack-credentials.spec.ts › MCP Test Connection credential verification (Slack) › edit: Test Connection verifies the stored credentials and surfaces a credential failure 5.8s
✅ mcp/mock-llm-mcp-slack-credentials.spec.ts › MCP Test Connection credential verification (Slack) › edit: Test Connection reports success for valid stored credentials 5.9s
✅ mcp/mock-llm-mcp-slack-credentials.spec.ts › MCP Test Connection credential verification (Slack) › custom (non-catalog) server: Test Connection attaches no verification probe 5.8s
✅ onboarding/mock-llm-onboarding-happy-path.spec.ts › onboarding happy path › completes the full onboarding flow and launches a conversation 3.7s
✅ onboarding/mock-llm-onboarding-regressions.spec.ts › onboarding recent regressions › keeps the modal open on backdrop click and Escape 1.6s
✅ onboarding/mock-llm-onboarding-regressions.spec.ts › onboarding recent regressions › defaults the LLM setup step to OpenAI GPT-5.5 1.6s
✅ regressions/mock-llm-ui-regressions.spec.ts › UI regressions › scopes standalone styles to the agent-server-ui shell 1.3s
✅ regressions/mock-llm-ui-regressions.spec.ts › UI regressions › renders critic results on agent messages and finish actions 1.7s
✅ regressions/mock-llm-ui-regressions.spec.ts › UI regressions › loads older events when scrolling up 1.8s
✅ regressions/mock-llm-ui-regressions.spec.ts › UI regressions › selected workspace persists after navigating away and returning 3.0s
✅ regressions/mock-llm-ui-regressions.spec.ts › UI regressions › cleared sessionStorage yields empty workspace selection 1.4s
✅ settings/mock-llm-acp-agent.spec.ts › mock-LLM ACP agent conversation › step 1: configure ACP agent via Settings → Agent UI 13.9s
✅ settings/mock-llm-acp-agent.spec.ts › mock-LLM ACP agent conversation › step 2: reload and verify ACP settings are persisted in UI 5.5s
✅ settings/mock-llm-acp-agent.spec.ts › mock-LLM ACP agent conversation › step 3: start ACP conversation and verify agent reply 6.8s
✅ settings/mock-llm-acp-agent.spec.ts › mock-LLM ACP agent conversation › step 4: resume ACP conversation from sidebar after navigating away 5.7s
✅ settings/mock-llm-model-switch.spec.ts › mock-LLM /model slash command › step 1: configure LLM, create switch-target profile, register trajectory 13.4s
✅ settings/mock-llm-model-switch.spec.ts › mock-LLM /model slash command › step 2: start conversation, switch profile via /model, verify switch 6.7s
✅ settings/mock-llm-profile-management.spec.ts › active profile deletion + reconciliation › active profile is deletable and reconciliation activates another profile 10.4s
✅ settings/mock-llm-profile-management.spec.ts › same-model profile identity › chat header shows the correct profile when two profiles share the same model 15.1s
✅ settings/mock-llm-profile-management.spec.ts › OpenHands provider hidden base_url preservation › re-saving an OpenHands profile from Basic view preserves hidden base_url 7.8s
✅ skills/mock-llm-skills.spec.ts › skill loading: project, user, and deletion › project skill in workspace/.agents/skills/ triggers on matching keyword 13.6s
✅ skills/mock-llm-skills.spec.ts › skill loading: project, user, and deletion › user skill in ~/.openhands/skills/ triggers on matching keyword 13.5s
✅ skills/mock-llm-skills.spec.ts › skill loading: project, user, and deletion › deleting a user skill removes it from subsequent conversations 13.4s

Posted by the Mock-LLM E2E workflow · results are deterministic (scripted LLM responses)

simonrosenberg added a commit that referenced this pull request Jul 1, 2026
…onversation switch

Adds the full chat integration for Agent Profiles (epic #3713, #3727), keeping
the simplified library/editor from the previous commit:

- New-conversation picker (home): an agent-profile toggle replaces the LLM-
  profile toggle. Selecting activates the profile so the next conversation
  launches from it; conversations start via `agent_profile_id` (resolved
  server-side) instead of an inline agent_settings dump.
- Mid-conversation switch, capability-gated by the running agent:
  - OpenHands conversation → live LLM-profile switch (`/switch_profile`).
  - ACP conversation → live model switch (`set_session_model`, existing
    ChatInputModel).
  - Home / cloud fall back to the agent-profile picker / model picker.
- Threads `agent_profile_id` through the conversation-start path
  (buildStartConversationRequest: agent_profile_id XOR agent_settings; skip the
  ACP tag / encrypted-settings / subscription check on the profile path) and
  reads the server's `launched_agent_profile` provenance to mark the current
  profile without settings-matching.
- Replaces the old SwitchProfileButton/context-menu with the new pickers.

Validated end-to-end against a real agent-server (SDK main): starting a
conversation with `agent_profile_id` returns 201 and stamps
`launched_agent_profile { agent_profile_id, revision }`.

Ported from #1550's chat implementation. Gates green: typecheck, eslint,
prettier, i18n (15 langs), vitest (3496 passed).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
simonrosenberg added a commit that referenced this pull request Jul 1, 2026
- Fix mock-LLM E2E regression: the profile-identity spec still targeted the
  removed `switch-profile-button`; point it at the new `chat-input-llm-profile`
  picker (mirrors #1550's e2e update).
- Use the `useRenameAgentProfile` hook in the editor instead of calling the
  service directly (the hook was otherwise dead code; now the rename gets list
  invalidation for free).
- Drop the unreachable in-conversation branch from the home AgentProfile picker:
  the picker only renders on home (a running conversation shows the LLM/model
  picker), so `useChatInputProfileState` is now home-only (activate as launch
  default), and the "start new with profile" hint + its
  CHAT$START_NEW_WITH_PROFILE_HINT key (15 langs) are removed.
- Update the two affected tests.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
simonrosenberg added a commit that referenced this pull request Jul 2, 2026
…e Agent settings form

Adds a Settings → Agent profiles library (local backends only) that mirrors
the LLM-profiles UX: a list of named profiles with a create/edit view that
reuses the existing Agent settings form as the editor — you just add a name
(and, for OpenHands agents, pick an LLM profile).

Deliberately minimal vs the full Phase-4 UX: no chat-input picker, no live
switch, no Settings information-architecture rework. Condenser / verification /
MCP stay global, exactly as on main.

- Data layer: AgentProfilesService + list/save/delete/rename/activate hooks
  wrapping the ts-client AgentProfilesClient (endpoints shipped in
  agent-server v1.29.0).
- Editor: AgentSettingsScreen gains an opt-in `embedded` mode (hides its
  header + global Save, seeds from an override, and reports state via a save
  control) — mirroring how LlmSettingsScreen is embedded in the LLM-profiles
  view. The global Agent settings page is unchanged.
- Library: AgentProfilesLocalView (list/create/edit) + manager/body/row/menu +
  delete modal, at the additive route /settings/agents, gated to local
  backends (cloud has no /api/agent-profiles surface yet, epic #3730).
- Maps the form to AgentProfileSaveInput: OpenHands requires an llm_profile_ref
  (via a picker); ACP stores acp_server/acp_model and the command as a shell
  string. Validated end-to-end against a real agent-server.

Part of OpenHands/software-agent-sdk#3713 (Phase 4). An alternative to the
larger #1550.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
simonrosenberg added a commit that referenced this pull request Jul 2, 2026
…onversation switch

Adds the full chat integration for Agent Profiles (epic #3713, #3727), keeping
the simplified library/editor from the previous commit:

- New-conversation picker (home): an agent-profile toggle replaces the LLM-
  profile toggle. Selecting activates the profile so the next conversation
  launches from it; conversations start via `agent_profile_id` (resolved
  server-side) instead of an inline agent_settings dump.
- Mid-conversation switch, capability-gated by the running agent:
  - OpenHands conversation → live LLM-profile switch (`/switch_profile`).
  - ACP conversation → live model switch (`set_session_model`, existing
    ChatInputModel).
  - Home / cloud fall back to the agent-profile picker / model picker.
- Threads `agent_profile_id` through the conversation-start path
  (buildStartConversationRequest: agent_profile_id XOR agent_settings; skip the
  ACP tag / encrypted-settings / subscription check on the profile path) and
  reads the server's `launched_agent_profile` provenance to mark the current
  profile without settings-matching.
- Replaces the old SwitchProfileButton/context-menu with the new pickers.

Validated end-to-end against a real agent-server (SDK main): starting a
conversation with `agent_profile_id` returns 201 and stamps
`launched_agent_profile { agent_profile_id, revision }`.

Ported from #1550's chat implementation. Gates green: typecheck, eslint,
prettier, i18n (15 langs), vitest (3496 passed).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
simonrosenberg added a commit that referenced this pull request Jul 2, 2026
- Fix mock-LLM E2E regression: the profile-identity spec still targeted the
  removed `switch-profile-button`; point it at the new `chat-input-llm-profile`
  picker (mirrors #1550's e2e update).
- Use the `useRenameAgentProfile` hook in the editor instead of calling the
  service directly (the hook was otherwise dead code; now the rename gets list
  invalidation for free).
- Drop the unreachable in-conversation branch from the home AgentProfile picker:
  the picker only renders on home (a running conversation shows the LLM/model
  picker), so `useChatInputProfileState` is now home-only (activate as launch
  default), and the "start new with profile" hint + its
  CHAT$START_NEW_WITH_PROFILE_HINT key (15 langs) are removed.
- Update the two affected tests.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
simonrosenberg added a commit that referenced this pull request Jul 8, 2026
…e library (local + cloud) (#1571)

* feat(agent-profiles): minimal local Agent Profiles library reusing the Agent settings form

Adds a Settings → Agent profiles library (local backends only) that mirrors
the LLM-profiles UX: a list of named profiles with a create/edit view that
reuses the existing Agent settings form as the editor — you just add a name
(and, for OpenHands agents, pick an LLM profile).

Deliberately minimal vs the full Phase-4 UX: no chat-input picker, no live
switch, no Settings information-architecture rework. Condenser / verification /
MCP stay global, exactly as on main.

- Data layer: AgentProfilesService + list/save/delete/rename/activate hooks
  wrapping the ts-client AgentProfilesClient (endpoints shipped in
  agent-server v1.29.0).
- Editor: AgentSettingsScreen gains an opt-in `embedded` mode (hides its
  header + global Save, seeds from an override, and reports state via a save
  control) — mirroring how LlmSettingsScreen is embedded in the LLM-profiles
  view. The global Agent settings page is unchanged.
- Library: AgentProfilesLocalView (list/create/edit) + manager/body/row/menu +
  delete modal, at the additive route /settings/agents, gated to local
  backends (cloud has no /api/agent-profiles surface yet, epic #3730).
- Maps the form to AgentProfileSaveInput: OpenHands requires an llm_profile_ref
  (via a picker); ACP stores acp_server/acp_model and the command as a shell
  string. Validated end-to-end against a real agent-server.

Part of OpenHands/software-agent-sdk#3713 (Phase 4). An alternative to the
larger #1550.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* feat(agent-profiles): add chat-input agent-profile picker + live in-conversation switch

Adds the full chat integration for Agent Profiles (epic #3713, #3727), keeping
the simplified library/editor from the previous commit:

- New-conversation picker (home): an agent-profile toggle replaces the LLM-
  profile toggle. Selecting activates the profile so the next conversation
  launches from it; conversations start via `agent_profile_id` (resolved
  server-side) instead of an inline agent_settings dump.
- Mid-conversation switch, capability-gated by the running agent:
  - OpenHands conversation → live LLM-profile switch (`/switch_profile`).
  - ACP conversation → live model switch (`set_session_model`, existing
    ChatInputModel).
  - Home / cloud fall back to the agent-profile picker / model picker.
- Threads `agent_profile_id` through the conversation-start path
  (buildStartConversationRequest: agent_profile_id XOR agent_settings; skip the
  ACP tag / encrypted-settings / subscription check on the profile path) and
  reads the server's `launched_agent_profile` provenance to mark the current
  profile without settings-matching.
- Replaces the old SwitchProfileButton/context-menu with the new pickers.

Validated end-to-end against a real agent-server (SDK main): starting a
conversation with `agent_profile_id` returns 201 and stamps
`launched_agent_profile { agent_profile_id, revision }`.

Ported from #1550's chat implementation. Gates green: typecheck, eslint,
prettier, i18n (15 langs), vitest (3496 passed).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* test(agent-profiles): extract + unit-test buildAgentProfileFields mapping

Addresses the code-review feedback that the profile-fields builder — the ACP
"built-in default command → null vs verbatim shell string" branch plus the
schema-driven tool_concurrency_limit coercion — was the most novel logic in the
PR yet had no automated coverage (every test mocked the embedded form away).

- Extracts the closure into a pure exported `buildAgentProfileFields()` in
  agent-settings.tsx; the embedded control now just snapshots state into it.
- Adds 8 unit tests locking the round-trip: ACP built-in-default → null, custom
  command → shell string, custom preset, blank-model → null, OpenHands
  enable_sub_agents passthrough, concurrency coercion (valid / empty / throws).
- Clarifies the service header (client ships in ts-client 1.28.0; the server
  endpoints it targets shipped in agent-server v1.29.0) per the version-doc nit.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* fix(agent-profiles): address review feedback + fix e2e regression

- Fix mock-LLM E2E regression: the profile-identity spec still targeted the
  removed `switch-profile-button`; point it at the new `chat-input-llm-profile`
  picker (mirrors #1550's e2e update).
- Use the `useRenameAgentProfile` hook in the editor instead of calling the
  service directly (the hook was otherwise dead code; now the rename gets list
  invalidation for free).
- Drop the unreachable in-conversation branch from the home AgentProfile picker:
  the picker only renders on home (a running conversation shows the LLM/model
  picker), so `useChatInputProfileState` is now home-only (activate as launch
  default), and the "start new with profile" hint + its
  CHAT$START_NEW_WITH_PROFILE_HINT key (15 langs) are removed.
- Update the two affected tests.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* fix(agent-profiles): correctness fixes from #1571 code review

- switch-llm-profile: run the inline "Switched to" message, #1082 metadata
  persist, and error reporting in mutation-level callbacks so they survive the
  switcher menu unmounting on select
- agent-server-adapter: derive acp_server from agent.acp_server when the
  acpserver tag is absent, so a profile-launched ACP conversation keeps its
  model picker and provider chip
- use-create-conversation: await the LLM-profile list before the
  dangling-llm_profile_ref launch guard so a mid-load send can't launch blind
- chat-input pickers: read switch/activate pending state via useIsMutating so
  the pill button actually disables during an in-flight switch
- use-activate-agent-profile: surface activation errors (drop disableToast) and
  optimistically flip active_agent_profile_id with rollback
- chat-input-actions: fall back to the LLM picker on the home page when the
  backend has no /api/agent-profiles surface

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* fix(agent-profiles): pass embedded props to reused Agent settings form

The profile editor reused AgentSettingsScreen via the route module's default
export. React Router's Vite plugin wraps a route default with
withComponentProps, which invokes it with route props and drops any props a
parent passes — so `embedded`/`onSaveControlChange` never reached it,
`saveControl` stayed null, and the Save button was permanently disabled
(couldn't create or edit a profile at all).

Split the route into a named `AgentSettingsScreen` export (the reusable
component embedded consumers import) plus a thin default `AgentSettingsRoute`
wrapper, mirroring `LlmSettingsRoute`. The local-view now imports the named
export. Updated the unit-test mock to provide the named export (the old mock
only stubbed `default`, which is exactly what masked this at unit level).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* feat(agent-profiles): un-gate Agent Profiles on cloud backends

The cloud enterprise app-server now exposes the same /api/agent-profiles
contract as the local agent-server (OpenHands #15060, epic #3730), so lift
the local-only gating and route cloud calls through the cloud proxy.

Transport:
- cloud/agent-profiles-service.api.ts: CRUD via callCloudProxy (bearer +
  X-Org-Id) against the identical /api/agent-profiles paths; org resolved
  server-side from the session, so no {org_id} segment.
- cloud/org-profiles-service.api.ts: list org LLM profiles at
  /api/organizations/{org_id}/profiles so the editor's llm_profile_ref
  picker works on cloud. Only listing is cloud-routed.
- AgentProfilesService + ProfilesService.listProfiles branch to the cloud
  transport when the active backend is cloud (mirrors SettingsService).

Surfaces un-gated:
- Settings → Agent profiles nav item + route (no more redirect to /settings/agent).
- Home chat-input agent-profile picker (fetch + pickerKind) on cloud.
- Launch-from-profile: cloud AppConversationStartRequest now carries
  agent_profile_id (added to the type + the cloud create request), which the
  backend resolves and stamps as launched_agent_profile.

In-conversation live switch on cloud is intentionally left on the model
picker for now: the cloud backend has no per-conversation profile-switch
endpoint yet and org LLM-profile detail masks the api_key, so a client-side
switch isn't possible — tracked as a follow-up for full parity.

Tests updated for the new nav behavior (agent-profiles shown on both).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* docs(agent-profiles): update useAgentProfiles docstring for cloud support

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* docs(agent-profiles): clarify cloud in-conversation switch is intentionally local-only

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* fix(agent-profiles): preserve acp_server through the wire normalizer

An ACP conversation launched from an agent profile (agent_profile_id) showed
a generic chip and an empty in-conversation model picker: the provider
identity never reached the UI.

Root cause: #1571 taught the conversation adapter to source acp_server from
`agent.acp_server` (SDK #3692) when the `acpserver` tag is absent — which is
exactly the profile-launch case, since that path doesn't stamp the tag. But
`normalizeAgent` (the wire parser feeding the adapter) projected only
`{kind, acp_model, llm}` and dropped `acp_server`, so the adapter's fallback
always saw undefined → acp_server null → no ACP provider → generic chip + no
model list.

Add `acp_server` to the normalizeAgent projection (the type already declared
it). Regression test covers the no-tag / agent-sourced path.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* feat(agent-profiles): make Settings → Agent the profile library

Collapse the two Settings sections ("Agent" global form + "Agent profiles"
library) into a single "Agent" entry that IS the Agent Profile library: it
lists the user's profiles and its create/edit view is the reused Agent
settings form plus a name (the embedded AgentSettingsScreen). The active
profile is the current agent.

- settings-nav: one "Agent" item → /settings/agents (the library).
- /settings/agent redirects to /settings/agents; default settings path +
  ACP route-guard target updated accordingly.

Also derive the ACP-enabled state from the ACTIVE AGENT PROFILE rather than
settings.agent_settings.agent_kind. Activate is pointer-only and never writes
agent_settings, so the global settings are stale when an ACP profile is
active; the nav-disable, home ACP context, useLlmConfigured, and the ACP
route guard now read the active profile (new useActiveAgentProfile hook) and
fall back to settings only while the profile list is loading.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* fix(agent-profiles): gate the LLM-setup banner on the active agent profile's LLM

useLlmConfigured decided "is the LLM ready" from the standalone active LLM
profile, but conversations now launch from the active AGENT profile. For an
OpenHands profile the relevant LLM is the one it references via
llm_profile_ref — not whichever LLM profile happens to be "active". So the
"Your LLM isn't set up" banner could be wrong in both directions (e.g. the
active LLM profile has a key but the agent profile references a keyless one).

Resolve the LLM profile to check from the active agent profile's
llm_profile_ref (openhands), falling back to the active LLM profile only when
there's no ref yet. ACP agent profiles stay always-configured (subprocess
owns its LLM). New unit test covers the discriminating case.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* feat(agent-profiles): relabel LLM profile "Active" → "Default"

The active LLM profile no longer drives new conversations (the active AGENT
profile does) — it's just the default llm_profile_ref seeded into new agent
profiles. Relabel the LLM-profile badge "Active" → "Default" and the row
action "Set as active" → "Set as default" to stop implying it launches
conversations. New i18n keys (SETTINGS$PROFILE_DEFAULT / _SET_DEFAULT, 15
langs). The agent-profile "Active" badge is unchanged — that one IS active.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* feat(onboarding): land the user's choice on the active agent profile

Onboarding configured global agent_settings + an LLM profile (OpenHands) or
ACP secrets, but never touched an AGENT profile — so the active agent profile
stayed the seeded `default` (openhands → ref `default`), disconnected from what
onboarding set up. Result: an OpenHands user who entered a key still hit "LLM
isn't set up" (the active agent profile referenced a keyless profile), and ACP
users never got an ACP agent profile at all.

Add useApplyOnboardingAgentProfile: upsert + activate the well-known `default`
agent profile from the onboarding choice. The OpenHands LLM step now points it
at the LLM profile it just created; the ACP secrets step makes it an ACP
profile for the chosen provider (opus[1m]/valid default, no LLM key needed).

Verified e2e: OpenHands onboarding → default agent profile refs the configured
LLM + banner clears; Claude Code onboarding → default agent profile is
acp/claude-code, active, no LLM required.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* chore: drop unused eslint-disable in onboarding agent-profile hook

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* feat(agent-profiles): gate mutate controls for cloud view-only members

Reuse #1532's org-permission gating for the Agent Profiles UI. Agent
profiles are org-scoped on cloud (bearer + X-Org-Id, edit_org_settings),
so a cloud member previously saw Add/Edit/Delete/Set-active controls that
would 403 server-side — the same flash-then-403 problem #1532 fixed for
LLM profiles.

- Generalize useCanManageLlmProfiles -> useCanManageOrgProfiles (it reads
  the generic edit_org_settings permission; local users always true).
- Thread canManage through AgentProfilesManager -> Body -> Row, mirroring
  LlmProfilesManager: hide the Add button and the row actions menu for
  view-only members.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* docs: fix stale comments surfaced by PR review

Comment-only. No behavior change.

- chat-input-actions.tsx: the pickerKind summary claimed "cloud → model
  picker (cloud has no profile surface)", contradicting the code, which
  uses the AgentProfile picker on cloud home too (#15060). Rewrite to
  match the actual cases; trim the duplicated render-site recap.
- acp-route-guard.ts / settings-nav.tsx / settings.tsx: the ACP redirect
  target moved to /settings/agents (plural) in this PR, but three
  docstrings still said /settings/agent. Update them.

* test(mock-llm-e2e): wire the active agent profile to the mock LLM

Fixes the mock-LLM e2e regression where the home composer stayed blocked
(submit disabled / launcher never ready) so conversation-launching specs
timed out. Conversations now launch from the active AGENT profile (#1571),
and `useLlmConfigured` follows that profile's `llm_profile_ref` — not the
active LLM profile. The specs seed `openhands-onboarded` and configure an
LLM profile the old way, so the seeded "default" agent profile still
pointed at a keyless LLM and the composer never unblocked.

Mirror what onboarding does for a real user: after activating the mock LLM
profile, upsert + activate the "default" agent profile referencing it. Add
a shared `ensureMockLLMAgentProfile` helper (called from ensureMockLLMProfile
and from the conversation spec, which sets up inline).

Verified locally: the full mock-llm-conversation spec passes 4/4 (real
conversation runs against the mock LLM) with this change.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* fix(agent-profiles): address PR #1571 review feedback

Human review (VascoSch92):
- useLlmConfigured: fall back to the active LLM profile when the active agent
  profile's llm_profile_ref is stale/absent, mirroring the launch-time fallback
  in useCreateConversation. Without this the two contradicted each other: launch
  succeeded via the fallback but the hook reported unconfigured and spuriously
  disabled the composer + banner (even inside a running conversation). Adds a
  regression test for the stale-ref scenario.
- Drop the dead launched_profile plumbing (wire parse + types + adapter map):
  it had zero readers (the home picker keys off active_agent_profile_id and the
  in-conversation picker is LLM/model by design), so the "Consumed by the
  picker" comments were misleading.
- Point the remaining /settings/agent links at /settings/agents (ACP model
  context, chat-input model state, chat error re-auth, command menu) so the
  route rename doesn't cost an extra redirect hop.

/codereview-roasted:
- Extract the triple-nested pickerKind ternary into a pure, unit-tested
  resolvePickerKind() helper.
- Document why cloud OpenHands onboarding intentionally does not repoint the
  active agent profile (persistAsProfile is local-only; cloud resolves the
  agent-profile/LLM wiring server-side).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* docs(agent-profiles): scope the profile-launch enrichment gap (#1571 review)

- Document at buildStartConversationRequest that the profile path relies on the
  server/SDK to restore exec tools + public skills (software-agent-sdk#3967),
  and that canvas_ui + the RUNTIME_SERVICES suffix are intentionally canvas-only.
- Point the createConversation positional-args TODO at the tracked issue (#1587).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* fix(agent-profiles): preserve unmodeled fields on edit-save + await profiles at launch

Two fixes from the #1571 review:

Edit-save wiped every profile field the minimal editor doesn't model
(condenser, verification, system_message_suffix, skill/MCP refs, embedded
skills, ACP session mode/timeout): the save endpoint is a whole-profile
overwrite, and the editor posted only its own fields. The save payload now
spreads the stored profile under the edited fields via a pure, kind-aware
mergeAgentProfileSaveInput — a kind switch stays a clean variant replacement
(the server's extra="forbid" union rejects mongrel payloads), and
server-managed identity (id/name/revision) is stripped. The edit fetch now
uses X-Expose-Secrets: encrypted so any skills[].mcp_tools values round-trip
as Fernet tokens instead of persisting the mask literally (same pattern as
the LLM-profile editor).

Launch raced the agent-profiles query: useCreateConversation read the hook's
maybe-unresolved data, so a send fired before the list loaded fell through to
the stale global agent_settings path — which activation (pointer-only) never
updates — and silently launched the wrong agent. The launch now awaits the
list via queryClient.ensureQueryData on the shared query key (mirroring the
LLM-profile ref validation below it), with retry: false so backends without
the surface degrade to the legacy launch immediately. The dangling-llm-ref
downgrade also logs a console.warn so the silent fallback is diagnosable.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* test(acp): drive ACP spec through the Agent Profile editor, not the retired route

Settings → Agent is now the Agent Profile library (#1571): the standalone
/settings/agent form redirects to /settings/agents, whose editor reuses the
same embedded agent-settings-screen form. The ACP mock-llm spec and the
resetToOpenHandsAgentViaUI cleanup helper still navigated the old route and
waited on the retired agent-save-button, so they timed out — and the cleanup
helper's failure (swallowed by afterAll's try/catch) left the "default" agent
profile stuck in ACP mode, poisoning downstream specs that share the backend.

- Add openAgentProfileEditor(page, name): navigate /settings/agents, open the
  named profile's editor via its row action menu (row located by the
  profile-name span[title], mirroring activateProfileViaUI).
- Rewrite resetToOpenHandsAgentViaUI to drive the new editor (switch kind →
  OpenHands, pick an LLM profile, save via save-agent-profile-btn).
- Point ACP spec steps 1 & 2 at the editor; swap agent-save-button →
  save-agent-profile-btn.
- Verify step 1 against GET /api/agent-profiles/default (the new source of
  truth) instead of legacy /api/settings; acp_command is a shell string there
  (ts-client AgentProfile.acp_command: string | null), not a token array.

* fix(build): keep the styling core in one chunk to avoid a tv() init-order crash

This PR's new imports grew/shifted the auto-split `vendor` chunk enough that
Rolldown's size-based splitter (`maxSize`) sliced the styling core apart —
separating a HeroUI component's top-level `tv()` recipe from tailwind-variants'
core within the emitted init order. The recipe then evaluated before
tailwind-variants initialized, throwing `TypeError: s is not a function` at
module load. React Router reported "Error loading route module root-layout,
reloading page", looped, and rendered a blank page — deterministically crashing
the whole app and failing 13 mock-llm-e2e specs (npm + docker) that load the
shell.

Give the styling core (@heroui/react + tailwind-variants + tailwind-merge +
clsx) its own group that is never size-split, so it initializes as a coherent
unit before any consumer's top-level `tv()` call. Verified locally: the home
route renders (was a blank page) with zero console errors.

* test(mock-llm): make LLM-profile setup idempotent and fix stale ACP launch assertion

With the crash fixed, the app renders and a second class of failure surfaced:
specs that call `ensureMockLLMProfile` after the first one deadlocked on a stuck
"Delete Profile" modal, and the ACP spec's payload assertion checked the old
launch shape.

- ensureMockLLMProfile: create the mock LLM profile only when absent instead of
  delete-then-recreate. Once the active agent profile references it (wired right
  after, via ensureMockLLMAgentProfile — #1571), the LLMProfile FK guard rejects
  deletion; the delete-confirm modal then silently stays open and its backdrop
  blocks every later click (`add-llm-profile` timed out across files, home,
  automations, mcp, model-switch, preset-automation). The mock config is
  deterministic, so reusing an existing same-named profile is correct.
  deleteProfileIfExists is unchanged — it still works for the non-referenced
  profiles that other specs delete.
- mock-llm-acp-agent step 3: conversations now launch from the active
  AgentProfile (#1571), so the POST /api/conversations payload carries
  `agent_profile_id` and omits `agent_settings` (mutually exclusive, per
  agent-server-adapter). Assert that shape instead of the retired
  `agent_settings.agent_kind`; the ACP reply-token check still proves the ACP
  agent ran.

* ci: degrade gracefully when the linked SDK reference isn't a PR

"Resolve linked SDK PR" (mock-llm-docker-e2e.yml) greps the PR description
for OpenHands/software-agent-sdk#NNNN or .../pull/NNNN and tries to build
against that PR's branch. GitHub's "#NNNN" shorthand looks identical for
issues and PRs, so a description that links a tracking issue (e.g. #3713)
matches the same regex — and /pulls/{number} 404s for an issue number,
failing the whole job under `bash -e` instead of falling back to the
released SDK version like the "no match" branch already does.

Treat a failed PR lookup the same as "no linked PR found": log and exit 0,
leaving git_ref unset so the job falls through to the released version.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* fix(test): make ensureMockLLMProfile/AgentProfile converge, not skip

Two real e2e failures traced to test-helper bugs surfaced only once #3968
(SDK 1.32.0) let profile-launched conversations actually run:

- ensureMockLLMProfile: the earlier idempotent-reuse fix (deadlock guard
  against the LLMProfile FK constraint) skipped writing the profile's
  config entirely whenever a same-named profile already existed —
  correct for repeat calls with the SAME config, but silently ignored a
  DIFFERENT one. mock-llm-image-upload requests a vision-capable model
  ("openai/gpt-4o") to get past the mock LLM's default; when an earlier
  spec in the same CI run had already created "mock-llm" with the
  default model, the override never applied and the agent replied "the
  currently selected model does not support image understanding" —
  confirmed via the CI screenshot. Fixed by editing the existing profile
  in place (via the LLM settings UI's Edit flow, never deleting it) so
  every call converges on the requested model/apiKey/baseUrl regardless
  of what an earlier test left behind.

- ensureMockLLMAgentProfile: OpenHandsAgentProfile.skill_refs defaults to
  `[]` (none discovered) when omitted from the save payload. Workspace-
  scoped project skills are discovered independently of this and keep
  working, but a profile-launched conversation's agent never sees any
  public/preset skill (e.g. an installed automation's bundled skill)
  without an explicit skill_refs. Set it to `null` (all discovered),
  matching what a real onboarding-seeded profile effectively gets.

mock-llm-model-switch step 2's post-switch reply timeout is left
unaddressed: its trajectory hard-codes one padding turn for "the
agent-server's internal condenser/skill-analysis call before the main
loop" (a documented, historically-fragile assumption per the test's own
comment) — plausibly now off by one now that #3968 lets the agent make
additional real tool-use calls around a /model switch. Fixing this
requires an empirical trajectory-turn count from a real 1.32.0
conversation trace, which needs a CI cycle to observe correctly rather
than guessing blind.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* revert(test): drop skill_refs=null from ensureMockLLMAgentProfile

CI showed this regressed mock-llm-skills.spec.ts (project skill in
workspace/.agents/skills/), which passed before this change: fixed the
narrow preset-automation slash-command skill-activation case at the
cost of breaking a more fundamental, previously-solid #3968 validation
— a net-negative trade, not a clean win.

The shared "default" agent profile backs every spec in the suite;
widening its skill_refs to "all discovered" has global blast radius
across unrelated tests, evidently including some interaction with
project-skill discovery/activation tracking that isn't understood yet.
A fix for preset-automation's specific skill needs to be scoped to that
one profile/test, not applied to the profile every other spec shares.

Keeps the ensureMockLLMProfile edit-in-place fix (proven, isolated,
fixes mock-llm-image-upload with no observed side effects).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* fix(agent-profiles): default new profiles' skill_refs to "all discovered"

OpenHandsAgentProfile.skill_refs defaults to `[]` (none) server-side when
omitted from a save payload. Neither onboarding's profile seed nor the
Settings "Add Agent Profile" editor exposes a skill_refs control, so every
newly-created profile silently gets zero public/user/project skills — a
profile-launched conversation's agent can't activate any of them (#1571
launches conversations from the active agent profile). This is exactly
the mock-llm-preset-automation regression: a slash-command-triggered
skill never activates because the "default" test profile has no
skill_refs, matching what a real user's fresh profile would also hit.

useSaveAgentProfile is the single choke point for every profile save
(onboarding seed + Settings create/edit), so default skill_refs to `null`
("all discovered") there whenever the caller hasn't set it explicitly —
matches what users actually expect (a new agent has access to their
skills unless deliberately scoped down) and requires no SDK change. The
pinned typescript-client doesn't type skill_refs on AgentProfileSaveInput
yet (SDK/wire drift), so this reaches it via an untyped merge; `in`
checks the runtime object since mergeAgentProfileSaveInput's edit-preserve
spread can carry it at runtime despite the missing type.

Re-applies the equivalent default to ensureMockLLMAgentProfile (the e2e
test helper bypasses this hook via a raw fetch) so the test suite mirrors
real behavior.

Verified: full unit suite green (3618 passed), typecheck clean,
agent-profiles-local-view.test.tsx passes unaffected (it mocks
useSaveAgentProfile at the hook boundary, so this change is invisible to
it). Locally reproduced the fix: mock-llm-preset-automation's slash-
command skill-activation test now passes; mock-llm-image-upload
(previously fixed) still passes.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* fix(agent-profiles): self-heal LLM profile stream=true for profile-launched conversations

A profile-launched conversation (agent_profile_id) never sends
agent_settings, so PR #1474's `llm.stream = true` (buildConfiguredOpenHands
AgentSettings, agent-server-adapter.ts) never reaches it — the referenced
LLM profile's stored `stream` field (SDK default: false) is used as-is by
resolve_agent_profile/_build_openhands_settings, with no override, unlike
the legacy path.

The agent-server decides once, at conversation construction, whether to
wire the `on_token` streaming callback — based on whether any of the
agent's LLMs has stream=True at that moment — and never re-evaluates it
afterward (confirmed by reading LocalConversation.switch_llm: it swaps the
LLM but never touches _on_token). So a profile-launched conversation whose
LLM profile was never saved with stream=true gets on_token=None for its
entire lifetime. switchProfile's switch_llm call (unconditionally sending
stream: true, unchanged by this fix) then crashes the next completion with
"Streaming requires an on_token callback", since on_token can never be
(re-)wired post-construction. Confirmed via real agent-server tracebacks in
both mock-llm-e2e and mock-llm-docker-e2e CI runs.

Streaming is a pre-existing, independently-shipped feature (PR #1474) that
must not regress for legacy-launched conversations — ruling out simply
dropping switch_llm's stream:true (would silently disable streaming after
a switch for the one case that works today). And since existing users'
LLM profiles predate this fix, defaulting stream:true only at future
profile-save time (mirroring the skill_refs fix) would still crash on
their first profile-launched conversation post-deploy.

ensureLlmProfileStreams is a migration shim: at the one call site
guaranteed to run for every profile-launched conversation (already
fetching the LLM-profiles list to validate llm_profile_ref exists), check
the referenced LLM profile's full config and, if stream isn't already
true, save it with stream:true — self-healing both new and existing
profiles on first use, memoized per profile name for the session so it's
a no-op read on every subsequent launch. Mirrors the profile-duplicate
flow's exact pattern for round-tripping the encrypted secret
(getProfile(name, "encrypted") + saveProfile(..., include_secrets: true))
so the stored api_key is never clobbered. Touches neither the legacy
agent_settings path nor switch_llm — both keep working exactly as before.

Safe to delete once virtually all users are migrated, or once
resolve_agent_profile forces stream=true for OpenHands profiles upstream
(same category of fix as the skill_refs default — likely the same #3967
umbrella), whichever comes first.

Verified: full unit suite green (3620 passed, +2 new tests exercising
this exact self-heal/no-op branching), typecheck clean. Locally
reproduced the fix: mock-llm-model-switch's on_token crash no longer
occurs; preset-automation and image-upload remain passing.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* docs(agent-profiles): link the skill_refs/streaming shims to their tracking issue

References OpenHands/agent-canvas#1619 (the cleanup-tracking issue for both
workarounds) and the specific upstream SDK issues, so the removal criteria
is discoverable from the code itself, not just the PR description.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* fix(agent-profiles): drop skill_refs/streaming migration shims (SDK #4017 landed)

software-agent-sdk#4017 (PR #4018) fixes both gaps these shims worked
around: OpenHandsAgentProfile.skill_refs now defaults to null (all
discovered) server-side, and the agent-server forces llm.stream=true
for profile-launched conversations. Both shims are now dead code.

Validated end-to-end against the SDK branch (OH_AGENT_SERVER_LOCAL_PATH)
before removing: real HTTP round-trips confirmed skill_refs defaults to
null and the launched agent's LLM streams even though the underlying LLM
profile is stored with stream=false; the full mock-llm-skills.spec.ts and
mock-llm-profile-management.spec.ts suites pass unchanged.

Removes:
- withDefaultSkillRefs (src/hooks/mutation/use-save-agent-profile.ts)
- ensureLlmProfileStreams + its two dedicated tests
  (src/hooks/mutation/use-create-conversation.ts)

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>

* docs(agent-profiles): correct comments for the disabled_skills deny-list

SDK #4017 replaced the profile's skill_refs allow-list (and embedded skills)
with a disabled_skills deny-list. Canvas is already deny-list-native — the
user-level disabled_skills UI exists and the generic profile merge carries the
field automatically — so only two stale comments referencing embedded skills /
skill refs needed correcting. No functional change; the per-profile skill
picker stays out of scope for the minimal editor.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* test(agent-profiles): drop stale skill_refs from fixtures for the deny-list

SDK #4017 replaced the profile's skill_refs allow-list (and embedded skills)
with a disabled_skills deny-list. Update the fixtures/comments that still
referenced the removed fields (they ride untyped through `as unknown` casts /
raw POST bodies, so the generic merge round-trips them regardless):
- merge-agent-profile-save-input.test.ts + agent-profiles-local-view.test.tsx:
  skill_refs -> disabled_skills, drop embedded `skills`, schema_version 3,
  ACP fixtures drop the skill field (ACP has none). Correct the stale
  exposeSecrets/mcp_tools comment (profiles are secret-free now).
- mock-llm-helpers.ts: the omitted-field comment now describes the deny-list.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* test(agent-profiles): profile fixtures use the v1 baseline schema_version

SDK #4017 collapsed the pre-ship AgentProfile schema history to a clean v1
baseline (no v2/v3, no migrations). Update the two profile fixtures to
schema_version: 1 to match the shipped model.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* fix(agent-profiles): launch the `default` profile via agent_settings; stamp the launched LLM ref

The seeded `default` agent profile is the enriched baseline that mirrors global
agent_settings, not a deliberate profile pick. Launching it via `agent_profile_id`
made the server rebuild the agent purely from the profile, dropping the canvas-only
enrichments the profile-resolution path can't carry — the `<RUNTIME_SERVICES>`
system-message suffix, the `canvas_ui` tool, and project-skill loading. Route the
well-known `default` profile through the agent_settings launch instead; named
profiles are deliberate custom configs and keep the profile path. Fixes the
mock-llm-docker-e2e automation RUNTIME_SERVICES failure.

Also from #1571 review:
- Stamp the launched OpenHands profile's `llm_profile_ref` into conversation
  metadata (not the standalone active LLM profile) so the switcher pill names the
  exact profile the conversation runs when the two differ (#1082).
- Add `retry: false` to the LLM-ref validation fetch, matching the sibling
  agent-profiles fetch, so a slow/erroring /api/profiles falls back promptly.

Hoist the well-known name to `WELL_KNOWN_DEFAULT_AGENT_PROFILE_NAME` (shared by the
launch path and onboarding). Re-onboarding intentionally overwrites `default`.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* fix(agent-profiles): gate the LLM-setup banner on the active agent-profile load

`useLlmConfigured` derives `isAcpAgent` and the referenced LLM from the active
agent profile but omitted that query's loading state from `isLoading`. On a cold
cache an ACP agent (which needs no key) briefly read as an unconfigured OpenHands
agent, flashing the "LLM not set up" banner until the profiles query resolved.
Thread the `useActiveAgentProfile` loading signal into the indeterminate state so
consumers render nothing until the active agent profile is known (#1571 review).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* fix(agent-profiles): scope the default→agent_settings launch to OpenHands profiles

The `default`→agent_settings shortcut (which preserves <RUNTIME_SERVICES>/canvas_ui)
must not apply to an ACP `default` profile: activation is pointer-only, so global
agent_settings is stale (still OpenHands) when an ACP profile is active — routing it
via agent_settings launched the wrong agent (mock-llm-acp-agent.spec.ts step 3
expected agent_profile_id, got OpenHands agent_settings). ACP also carries no
<RUNTIME_SERVICES>/canvas_ui enrichment, so there's nothing to preserve. Gate the
shortcut on agent_kind === "openhands"; ACP defaults keep the profile path.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* fix(agent-profiles): address PR #1571 review findings (VascoSch92)

- Gate the default-profile agent_settings downgrade to local backends
  only; cloud always launches from the resolved agent_profile_id.
- Emit an explicit schema-default (not an omitted key) when
  tool_concurrency_limit is cleared, so edit-save actually resets it.
- Restore the tailored "Switched to {name} failed" toast via
  meta.disableToast + a dedicated onError.
- Share one AGENT_PROFILES_RETRY_OPTIONS constant across the launch
  path, redirectIfAcpActive, and useAgentProfiles so retry policy
  can't drift between call sites.
- Fix a stale comment on optimisticActiveProfile's write path.
- Self-heal a dangling llm_profile_ref in the agent-profile editor by
  validating it against the live LLM-profiles list on load.

* fix(agent-profiles): restore cloud in-conversation LLM-profile switching

resolvePickerKind hard-coded cloud conversations to the read-only
model picker, on the premise that cloud has no per-conversation
switch endpoint. That's not true: POST
/api/v1/app-conversations/{id}/switch_profile has existed since
OpenHands#14288 (2026-05-05), predating this PR, and the frontend
plumbing to call it (AgentServerConversationService.switchProfile's
cloud branch) was already implemented and just unreachable.

Cloud OpenHands conversations now resolve to the LLM-profile picker,
same as local, matching how ACP already behaves identically on both
backends. main's old SwitchProfileButton had no cloud gate either, so
this restores previously-working behavior rather than adding new
scope.

---------

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@simonrosenberg

Copy link
Copy Markdown
Member Author

Superseded by #1571, which merged the local+cloud Agent Profiles implementation on 2026-07-08. Closing this older branch to match the epic status and avoid two competing implementation PRs.

This branch was successfully deployed

1 active deployment
Preview — 64f2dcd7 Deployed Jul 1, 2026 by vercel[bot]
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant