Skip to content

feat(settings): add the personal Agent Context page behind a feature flag (OHE-3745) - #754

Merged
hieptl merged 2 commits into
mainfrom
hieptl/ohe-3456-agent-context-page
Oct 27, 2026
Merged

hieptl merged 2 commits into
mainfrom
hieptl/ohe-3456-agent-context-page

Conversation

@hieptl

@hieptl hieptl commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

HUMAN:

  • A human has tested these changes.

AGENT:


Why

The personal Agent page carries an "Agent Context" section with the Enable Persistent Memory toggle. With agent behaviour moving to Agent Profiles (OHE-3456), that toggle needs a home of its own, matching the dedicated Agent Context section in Agent Canvas, which is unreachable inside OHE.

Summary

  • New SaaS-only route /settings/agent-context with the Enable Persistent Memory switch and a Save button; it saves enable_memory_context through the existing settings endpoint, as the Agent page did.
  • New Agent Context item in Personal Settings, right after Agent, shown when enable_agent_context_page (or enable_agent_profiles_page) is on; it is OpenHands-only (disabledByAcp) like the inline section it replaces.
  • With the flag on, the Agent page no longer renders the inline section (a move, not a copy). With the flag off, the Agent page and navigation are exactly as today. OSS is unchanged.

Issue Number

OHE-3745, part of OHE-3456. Stacked on #1007 (the flags).

How to Test

From frontend/:

npx vitest run __tests__/routes/settings.test.tsx __tests__/routes/agent-settings.test.tsx __tests__/hooks/use-settings-nav-items.test.tsx
npm run lint
npm run check-translation-completeness

All pass locally. Manually, on SaaS or OHE with OH_WEB_CLIENT_FEATURE_FLAGS_ENABLE_AGENT_CONTEXT_PAGE=true:

  1. Open Settings. Under Personal Settings, Agent Context appears right after Agent, and the Agent page no longer shows the memory toggle.
  2. Open it, toggle Enable Persistent Memory, click Save Changes. A "Settings saved" toast appears and the toggle keeps its state after a reload.
  3. With the flag unset, the item is gone, /settings/agent-context redirects away, and the Agent page shows the toggle as before.

Video/Screenshots

To be added after manual testing.

Type

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

Notes

  • Frontend only. No backend, migration or config changes beyond the flags in the base PR.
  • Existing tests were not extended for the flag-on state.

Enterprise server image for this PR:

ghcr.io/openhands/enterprise-server:sha-4181692

@github-actions

github-actions Bot commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

Coverage report

This PR does not seem to contain any modification to coverable code.

…files pages (OHE-3744)

Two env-backed web-client feature flags, both default off:

- enable_agent_context_page (ENABLE_AGENT_CONTEXT_PAGE) shows the dedicated
  Agent Context settings page.
- enable_agent_profiles_page (ENABLE_AGENT_PROFILES_PAGE) replaces the
  personal Agent page with Agent Profiles, and implies the Agent Context
  page since the Agent page hosted the memory toggle.

isSettingsPageHidden hides /settings/agent-context and /settings/agents
unless the matching flag is on, so the nav item and the route redirect
share one rule. No visible change while both flags are off.
…flag (OHE-3745)

Moves the "Enable Persistent Memory" toggle out of Settings > Agent into
its own Personal Settings item, /settings/agent-context (SaaS only),
shown when enable_agent_context_page (or enable_agent_profiles_page) is
on. The page saves enable_memory_context through the existing settings
endpoint. With the flag on, the Agent page no longer renders the inline
section; with it off, the Agent page is unchanged. The item is
OpenHands-only (disabledByAcp), as the inline section was.
@hieptl
hieptl force-pushed the hieptl/ohe-3456-agent-context-page branch from 57f5308 to 4181692 Compare October 24, 2026 08:38
@hieptl hieptl changed the title feat(settings): add the personal Agent Context page (OHE-3456) feat(settings): add the personal Agent Context page behind a feature flag (OHE-3745) Oct 24, 2026
@hieptl
hieptl changed the base branch from main to hiep/ohe-3744-agent-profiles-feature-flags-for-the-agent-context-and-agent October 24, 2026 08:41
@hieptl
hieptl marked this pull request as ready for review October 26, 2026 15:53

@tofarr tofarr left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🍰

Base automatically changed from hiep/ohe-3744-agent-profiles-feature-flags-for-the-agent-context-and-agent to main October 27, 2026 11:19
@hieptl
hieptl merged commit 5b27551 into main Oct 27, 2026
27 of 28 checks passed
@hieptl
hieptl deleted the hieptl/ohe-3456-agent-context-page branch October 27, 2026 11:20
hieptl added a commit that referenced this pull request Oct 27, 2026
Resolve the conflicts with main after #753, #1007 and #754 were squash-merged:

- routes.ts, routes/settings.tsx: keep main's text and re-add the
  /settings/agents route and SAAS_ONLY_PATHS entry.
- i18n/translation.json: main's file plus the 32 keys only this branch adds;
  declaration.ts regenerated with make-i18n.
- constants/settings-nav.tsx: drop the Agent Context item the auto-merge
  duplicated, keeping main's copy after the new Agent Profiles item.
hieptl added a commit that referenced this pull request Oct 27, 2026
…storage-api-and

Resolves the conflicts with the merged Agent Profiles work (#753, #754,
#755, #763, #1007, #1010, #1011) by keeping both sides: both feature
flags and their nav-hiding rules, both LLM-profile delete guards and
rename cascades in org_profiles, and the Model Router launch hydration
after main's SDK-based Agent Profile resolution in saas_settings_store.
The user-menu test keeps the isSettingsPageHidden filter, which covers
main's hard-coded agent-page set as well as the Model Router page.

Semantic follow-ups: re-add the resolve_profile_llm import main dropped
from saas_settings_store (the router hydration still uses it), and
renumber the Model Router migration from 199 to 201 chaining off main's
200 (main now holds 199 and 200), and move the alembic head pinned by
main's agent-profile upgrade test from 200 to 201 accordingly.
@openhands-release-bot openhands-release-bot Bot added the released: 1.81.0 Shipped in 1.81.0 label Oct 28, 2026
@openhands-release-bot

Copy link
Copy Markdown
Contributor

🚀 Released in 1.81.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

released: 1.81.0 Shipped in 1.81.0 type: feat A new feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants