Skip to content

πŸ› fix: add advace config back in agent/group profiles#11727

Merged
ONLY-yours merged 2 commits intonextfrom
fix/addAdvaceConfigBack
Jan 23, 2026
Merged

πŸ› fix: add advace config back in agent/group profiles#11727
ONLY-yours merged 2 commits intonextfrom
fix/addAdvaceConfigBack

Conversation

@ONLY-yours
Copy link
Copy Markdown
Member

@ONLY-yours ONLY-yours commented Jan 23, 2026

πŸ’» Change Type

fix: LOBE-4025

  • ✨ feat
  • πŸ› fix
  • ♻️ refactor
  • πŸ’„ style
  • πŸ‘· build
  • ⚑️ perf
  • βœ… test
  • πŸ“ docs
  • πŸ”¨ chore

πŸ”— Related Issue

πŸ”€ Description of Change

πŸ§ͺ How to Test

  • Tested locally
  • Added/updated tests
  • No tests needed

πŸ“Έ Screenshots / Videos

Before After
... ...

πŸ“ Additional Information

Summary by Sourcery

Restore and enhance advanced configuration access for both individual agents and agent groups via a dedicated settings modal from their profile editors.

New Features:

  • Add an advanced settings modal for agent profiles with tabbed chat, opening, and model configuration.
  • Add an advanced settings modal for group profiles that maps group config and metadata into the shared AgentSettings UI.

Bug Fixes:

  • Reintroduce access to advanced configuration in agent and group profile pages via an explicit advanced settings button.

Enhancements:

  • Improve opening questions input layout to be full-width and better integrated in the advanced settings form.

@vercel
Copy link
Copy Markdown

vercel bot commented Jan 23, 2026

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

Project Deployment Review Updated (UTC)
lobehub Building Building Preview, Comment Jan 23, 2026 7:23am

Request Review

@dosubot dosubot bot added the size:L This PR changes 100-499 lines, ignoring generated files. label Jan 23, 2026
@sourcery-ai
Copy link
Copy Markdown
Contributor

sourcery-ai bot commented Jan 23, 2026

Reviewer's Guide

Reintroduces and standardizes the advanced settings UI for both agent and group profiles by adding a reusable modal-based AgentSettings layout, wiring it to existing stores, and fixing small layout issues in the opening questions form.

Sequence diagram for opening advanced settings from agent profile

sequenceDiagram
  actor User
  participant ProfileEditor
  participant AgentStore
  participant AgentSettingsModal
  participant AgentSettingsContent
  participant AgentSettingsFeature

  User->>ProfileEditor: clickAdvancedSettingsButton
  ProfileEditor->>AgentStore: setState(showAgentSetting=true)
  AgentStore-->>AgentSettingsModal: showAgentSetting=true
  AgentSettingsModal->>AgentSettingsContent: render
  AgentSettingsContent->>AgentStore: get activeAgentId
  AgentSettingsContent->>AgentStore: get currentAgentConfig
  AgentSettingsContent->>AgentStore: get currentAgentMeta
  User->>AgentSettingsFeature: editConfigAndMeta
  AgentSettingsFeature->>AgentSettingsContent: onConfigChange(config)
  AgentSettingsContent->>AgentStore: optimisticUpdateAgentConfig(agentId, config)
  AgentSettingsFeature->>AgentSettingsContent: onMetaChange(meta)
  AgentSettingsContent->>AgentStore: optimisticUpdateAgentMeta(agentId, meta)
  User->>AgentSettingsModal: close
  AgentSettingsModal->>AgentStore: setState(showAgentSetting=false)
Loading

Sequence diagram for opening advanced settings from group profile

sequenceDiagram
  actor User
  participant GroupProfile
  participant AgentSettingsModal
  participant AgentSettingsContent
  participant AgentGroupStore
  participant AgentSettingsFeature

  User->>GroupProfile: clickAdvancedSettingsButton
  GroupProfile->>GroupProfile: setShowAgentSetting(true)
  GroupProfile-->>AgentSettingsModal: open=true
  AgentSettingsModal->>AgentSettingsContent: render
  AgentSettingsContent->>AgentGroupStore: get activeGroupId
  AgentSettingsContent->>AgentGroupStore: get currentGroup
  User->>AgentSettingsFeature: editOpeningSettings
  AgentSettingsFeature->>AgentSettingsContent: onConfigChange(config)
  AgentSettingsContent->>AgentGroupStore: updateGroupConfig(groupConfig)
  AgentSettingsFeature->>AgentSettingsContent: onMetaChange(meta)
  AgentSettingsContent->>AgentGroupStore: updateGroup(groupId, meta)
  User->>AgentSettingsModal: close
  AgentSettingsModal->>GroupProfile: onCancel
  GroupProfile->>GroupProfile: setShowAgentSetting(false)
Loading

Class diagram for new AgentSettings components in agent and group profiles

classDiagram
  class ProfileEditor {
    +ProfileEditor()
  }

  class GroupProfile {
    +GroupProfile()
  }

  class AgentSettingsModalAgent {
    +AgentSettingsModalAgent()
    +render()
  }

  class AgentSettingsModalGroup {
    +AgentSettingsModalGroup(open)
    +onCancel()
    +render()
  }

  class AgentSettingsContentAgent {
    -agentId
    -isInbox
    -config
    -meta
    -tab
    +AgentSettingsContentAgent()
    +updateAgentConfig(config)
    +updateAgentMeta(meta)
  }

  class AgentSettingsContentGroup {
    -groupId
    -currentGroup
    -tab
    +AgentSettingsContentGroup()
    +updateGroupConfig(config)
    +updateGroupMeta(meta)
  }

  class AgentStore {
    +activeAgentId
    +showAgentSetting
    +currentAgentConfig
    +currentAgentMeta
    +optimisticUpdateAgentConfig(agentId, config)
    +optimisticUpdateAgentMeta(agentId, meta)
    +setState(partialState)
  }

  class AgentGroupStore {
    +activeGroupId
    +currentGroup
    +updateGroupConfig(groupConfig)
    +updateGroup(groupId, meta)
  }

  class AgentSettingsFeature {
    +AgentSettingsFeature(config, id, loading, meta, onConfigChange, onMetaChange, tab)
  }

  class MenuComponent {
    +MenuComponent(items, onClick, selectable, selectedKeys)
  }

  ProfileEditor --> AgentSettingsModalAgent : uses
  GroupProfile --> AgentSettingsModalGroup : uses

  AgentSettingsModalAgent --> AgentSettingsContentAgent : renders
  AgentSettingsModalGroup --> AgentSettingsContentGroup : renders

  AgentSettingsContentAgent --> AgentStore : readsAndWrites
  AgentSettingsContentGroup --> AgentGroupStore : readsAndWrites

  AgentSettingsContentAgent --> AgentSettingsFeature : composes
  AgentSettingsContentGroup --> AgentSettingsFeature : composes

  AgentSettingsContentAgent --> MenuComponent : uses
  AgentSettingsContentGroup --> MenuComponent : uses

  AgentStore <.. ProfileEditor : selectorUsage
  AgentGroupStore <.. GroupProfile : selectorUsage
Loading

File-Level Changes

Change Details Files
Add advanced settings modal and trigger button to agent profile editor, wired to agent store state.
  • Inject theme via useTheme and store-based showAgentSetting flag into ProfileEditor component.
  • Add an "advancedSettings" text button with Settings2Icon next to the model selector that toggles showAgentSetting in the agent store.
  • Render a new AgentSettings modal component at the bottom of the ProfileEditor tree so it overlays the profile page when opened.
src/app/[variants]/(main)/agent/profile/features/ProfileEditor/index.tsx
src/app/[variants]/(main)/agent/profile/features/AgentSettings/index.tsx
src/app/[variants]/(main)/agent/profile/features/AgentSettings/Content.tsx
Introduce advanced settings modal for group profiles backed by the group store and limited to opening configuration.
  • Add local showAgentSetting state and theme usage in GroupProfile to control the advanced settings modal visibility and styling.
  • Add an "advancedSettings" Settings2Icon button in the group header actions to open the modal.
  • Render a new AgentSettings modal component that wraps a Content layout, converting group config/meta into the shape expected by AgentSettings and persisting only opening-related fields via updateGroupConfig/updateGroup.
  • Provide a side menu and header in the group AgentSettings content that currently exposes only the Opening tab using the shared AgentSettings feature component.
src/app/[variants]/(main)/group/profile/features/GroupProfile/index.tsx
src/app/[variants]/(main)/group/profile/features/AgentSettings/index.tsx
src/app/[variants]/(main)/group/profile/features/AgentSettings/Content.tsx
Create a shared agent advanced settings modal layout for individual agents, including tabbed configuration and optimistic store updates.
  • Read active agent id, inbox status, current config, and meta from the agent store with equality checks to avoid unnecessary rerenders.
  • Build a side menu with Chat, Opening (non-inbox only), and Modal tabs using ChatSettingsTabs and localized labels.
  • Render the shared AgentSettings feature component with current config/meta and wire onConfigChange/onMetaChange to optimistic update functions in the agent store.
  • Wrap the content in a height-constrained, scrollable modal using the new AgentSettings index component.
src/app/[variants]/(main)/agent/profile/features/AgentSettings/index.tsx
src/app/[variants]/(main)/agent/profile/features/AgentSettings/Content.tsx
Fix layout and full-width behavior of opening questions input and remove unused form spread props from AgentOpening.
  • Make the OpeningQuestions main Flexbox and inner container full-width and apply width: 100% to Space.Compact so the input spans the modal width.
  • Add flex: 1 style to the Input so it grows to fill remaining horizontal space.
  • Remove the spread of FORM_STYLE props from AgentOpening Tabs component, likely to avoid layout conflicts in the new modal context.
src/features/AgentSetting/AgentOpening/OpeningQuestions.tsx
src/features/AgentSetting/AgentOpening/index.tsx

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@gru-agent
Copy link
Copy Markdown
Contributor

gru-agent bot commented Jan 23, 2026

TestGru Assignment

Summary

Link CommitId Status Reason
Detail 88463fe 🚫 Skipped No files need to be tested {"src/app/[variants]/(main)/agent/profile/features/AgentSettings/Content.tsx":"File path does not match include patterns.","src/app/[variants]/(main)/agent/profile/features/AgentSettings/index.tsx":"File path does not match include patterns.","src/app/[variants]/(main)/agent/profile/features/ProfileEditor/index.tsx":"File path does not match include patterns.","src/app/[variants]/(main)/group/profile/features/AgentSettings/Content.tsx":"File path does not match include patterns.","src/app/[variants]/(main)/group/profile/features/AgentSettings/index.tsx":"File path does not match include patterns.","src/app/[variants]/(main)/group/profile/features/GroupProfile/index.tsx":"File path does not match include patterns.","src/features/AgentSetting/AgentOpening/OpeningQuestions.tsx":"File path does not match include patterns.","src/features/AgentSetting/AgentOpening/index.tsx":"File path does not match include patterns."}

History Assignment

Tip

You can @gru-agent and leave your feedback. TestGru will make adjustments based on your input

@dosubot dosubot bot added the πŸ› Bug label Jan 23, 2026
Copy link
Copy Markdown
Contributor

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Hey - I've left some high level feedback:

  • The agent and group AgentSettings modals share nearly identical modal configuration (height, width, body styles); consider extracting a shared wrapper component or config to avoid duplication and keep them in sync.
  • In the group AgentSettings/Content, tab is stored in useState but never updated; if the tab is always fixed to Opening, you can replace it with a constant to simplify the component.
  • The agent profile uses a global showAgentSetting flag in the store while the group profile uses local useState for the same concern; consider standardizing how the advanced settings modal visibility is managed for consistency.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- The agent and group `AgentSettings` modals share nearly identical modal configuration (height, width, body styles); consider extracting a shared wrapper component or config to avoid duplication and keep them in sync.
- In the group `AgentSettings/Content`, `tab` is stored in `useState` but never updated; if the tab is always fixed to `Opening`, you can replace it with a constant to simplify the component.
- The agent profile uses a global `showAgentSetting` flag in the store while the group profile uses local `useState` for the same concern; consider standardizing how the advanced settings modal visibility is managed for consistency.

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click πŸ‘ or πŸ‘Ž on each comment and I'll use the feedback to improve your reviews.

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

πŸ’‘ Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 88463fef94

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with πŸ‘.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +126 to +130
<Settings
config={agentConfig}
id={groupId}
loading={false}
meta={agentMeta}
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Avoid agent-store loading gate for group settings

The group profile now renders the shared AgentSettings component, but that component’s content is gated by useAgentStore(agentSelectors.isAgentConfigLoading) (see src/features/AgentSetting/AgentSettingsContent.tsx). In a group profile session where activeAgentId is unset (fresh load or after clearing agent state), isAgentConfigLoading stays true and the modal will only show the skeleton even though agentConfig/agentMeta are provided here. The loading={false} you pass is ignored by AgentSettingsContent, so users can’t reach Opening settings unless an unrelated agent is active.

Useful? React with πŸ‘Β / πŸ‘Ž.

@codecov
Copy link
Copy Markdown

codecov bot commented Jan 23, 2026

Codecov Report

βœ… All modified and coverable lines are covered by tests.
βœ… Project coverage is 74.18%. Comparing base (f45f508) to head (88463fe).
⚠️ Report is 27 commits behind head on next.

Additional details and impacted files
@@           Coverage Diff           @@
##             next   #11727   +/-   ##
=======================================
  Coverage   74.18%   74.18%           
=======================================
  Files        1194     1194           
  Lines       95149    95149           
  Branches    13006    13006           
=======================================
  Hits        70587    70587           
  Misses      24472    24472           
  Partials       90       90           
Flag Coverage Ξ”
app 67.24% <ΓΈ> (ΓΈ)
database 91.44% <ΓΈ> (ΓΈ)
packages/agent-runtime 90.20% <ΓΈ> (ΓΈ)
packages/context-engine 85.39% <ΓΈ> (ΓΈ)
packages/conversation-flow 92.28% <ΓΈ> (ΓΈ)
packages/file-loaders 88.66% <ΓΈ> (ΓΈ)
packages/memory-user-memory 69.68% <ΓΈ> (ΓΈ)
packages/model-bank 100.00% <ΓΈ> (ΓΈ)
packages/model-runtime 86.72% <ΓΈ> (ΓΈ)
packages/prompts 79.33% <ΓΈ> (ΓΈ)
packages/python-interpreter 92.90% <ΓΈ> (ΓΈ)
packages/ssrf-safe-fetch 0.00% <ΓΈ> (ΓΈ)
packages/utils 93.25% <ΓΈ> (ΓΈ)
packages/web-crawler 95.62% <ΓΈ> (ΓΈ)

Flags with carried forward coverage won't be shown. Click here to find out more.

Components Coverage Ξ”
Store 68.02% <ΓΈ> (ΓΈ)
Services 50.59% <ΓΈ> (ΓΈ)
Server 67.81% <ΓΈ> (ΓΈ)
Libs 41.13% <ΓΈ> (ΓΈ)
Utils 93.82% <ΓΈ> (ΓΈ)
πŸš€ New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • πŸ“¦ JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@ONLY-yours ONLY-yours merged commit 403175f into next Jan 23, 2026
49 of 51 checks passed
@ONLY-yours ONLY-yours deleted the fix/addAdvaceConfigBack branch January 23, 2026 08:39
@lobehubbot
Copy link
Copy Markdown
Member

lobehubbot commented Jan 23, 2026

❀️ Great PR @ONLY-yours ❀️

The growth of the project is inseparable from user feedback and contributions. Thanks for your contribution! If you are interested in the LobeHub developer community, please join our Discord and then DM @arvinxx or @canisminor1990. They will invite you to our private developer channel. We are discussing lobe-chat development and sharing AI newsletters from around the world.


This comment was translated by Claude.

Original Content

❀️ Great PR @ONLY-yours ❀️

The growth of project is inseparable from user feedback and contribution, thanks for your contribution! If you are interesting with the lobehub developer community, please join our discord and then dm @arvinxx or @canisminor1990. They will invite you to our private developer channel. We are talking about the lobe-chat development or sharing ai newsletter around the world.

lobehubbot pushed a commit that referenced this pull request Jan 23, 2026
## [Version&nbsp;2.0.0-next.347](v2.0.0-next.346...v2.0.0-next.347)
<sup>Released on **2026-01-23**</sup>

#### πŸ› Bug Fixes

- **misc**: Add advace config back in agent/group profiles.

#### πŸ’„ Styles

- **misc**: Move plugin store button outside scroll container.

<br/>

<details>
<summary><kbd>Improvements and Fixes</kbd></summary>

#### What's fixed

* **misc**: Add advace config back in agent/group profiles, closes [#11727](#11727) ([403175f](403175f))

#### Styles

* **misc**: Move plugin store button outside scroll container, closes [#11728](#11728) ([c484d1a](c484d1a))

</details>

<div align="right">

[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top)

</div>
@lobehubbot
Copy link
Copy Markdown
Member

πŸŽ‰ This PR is included in version 2.0.0-next.347 πŸŽ‰

The release is available on:

Your semantic-release bot πŸ“¦πŸš€

JamieStivala pushed a commit to jaworldwideorg/OneJA-Bot that referenced this pull request Jan 23, 2026
### [Version&nbsp;1.153.1](v1.153.0...v1.153.1)
<sup>Released on **2026-01-23**</sup>

#### πŸ› Bug Fixes

- **misc**: Add advace config back in agent/group profiles, fixed the group topic copy not right.

#### πŸ’„ Styles

- **misc**: Move plugin store button outside scroll container.

<br/>

<details>
<summary><kbd>Improvements and Fixes</kbd></summary>

#### What's fixed

* **misc**: Add advace config back in agent/group profiles, closes [lobehub#11727](https://github.com/jaworldwideorg/OneJA-Bot/issues/11727) ([403175f](403175f))
* **misc**: Fixed the group topic copy not right, closes [lobehub#11730](https://github.com/jaworldwideorg/OneJA-Bot/issues/11730) ([282c1fb](282c1fb))

#### Styles

* **misc**: Move plugin store button outside scroll container, closes [lobehub#11728](https://github.com/jaworldwideorg/OneJA-Bot/issues/11728) ([c484d1a](c484d1a))

</details>

<div align="right">

[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top)

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

Labels

πŸ› Bug released on @next size:L This PR changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants