-
-
Notifications
You must be signed in to change notification settings - Fork 14.6k
Fixed PWA settings not appear #12200
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
@TonyGeez is attempting to deploy a commit to the LobeHub OSS Team on Vercel. A member of the Team first needs to authorize it. |
Reviewer's GuideAdds a settings icon to the mobile chat header that navigates to the correct agent settings page using the active agent ID, restores missing Agent Settings tab content on mobile/PWA, and configures pnpm to only build a defined set of native/heavy dependencies. Sequence diagram for opening agent settings from mobile chat headersequenceDiagram
actor User
participant MobileHeader
participant AgentStore
participant Router
User->>MobileHeader: Tap Settings icon
MobileHeader->>AgentStore: get activeAgentId
AgentStore-->>MobileHeader: activeAgentId
alt activeAgentId exists
MobileHeader->>Router: navigate /agent/{activeAgentId}/settings
Router-->>User: Render AgentSettings page
else activeAgentId missing
MobileHeader-->>User: No navigation (no-op)
end
Updated class diagram for AgentSettingsContent tab renderingclassDiagram
class AgentSettingsContent {
ReactNode loadingSkeleton
ChatSettingsTabs tab
ReactNode~ReactNode~ children
+render()
}
class ChatSettingsTabs {
<<enumeration>>
Meta
Prompt
Opening
Chat
Modal
TTS
}
class AgentMeta {
+render()
}
class AgentPrompt {
+render()
}
class AgentOpening {
+render()
}
class AgentChat {
+render()
}
class AgentModal {
+render()
}
class AgentTTS {
+render()
}
AgentSettingsContent --> ChatSettingsTabs : uses tab
AgentSettingsContent --> AgentMeta : renders when tab Meta
AgentSettingsContent --> AgentPrompt : renders when tab Prompt
AgentSettingsContent --> AgentOpening : renders when tab Opening
AgentSettingsContent --> AgentChat : renders when tab Chat
AgentSettingsContent --> AgentModal : renders when tab Modal
AgentSettingsContent --> AgentTTS : renders when tab TTS
Class diagram for MobileHeader settings navigation logicclassDiagram
class MobileHeader {
+boolean open
+handleOpenSettings()
+render()
}
class AgentStore {
+string activeAgentId
}
class QueryRouteHook {
+push(path, query, replace)
}
class RouterNavigateHook {
+navigate(path)
}
class ChatHeaderComponent {
+onBackClick()
+right
}
MobileHeader --> AgentStore : reads activeAgentId
MobileHeader --> QueryRouteHook : uses onBackClick
MobileHeader --> RouterNavigateHook : uses navigate to settings
MobileHeader --> ChatHeaderComponent : configures right actions
File-Level Changes
Possibly linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
TestGru AssignmentSummary
Tip You can |
There was a problem hiding this 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:
- Consider hiding or disabling the settings icon when
activeAgentIdis falsy so the button never becomes a no-op in edge cases where no agent is active. - It may be worth standardizing on a single navigation mechanism in this component (either
useQueryRouteoruseNavigate) to keep routing behavior consistent and easier to maintain.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- Consider hiding or disabling the settings icon when `activeAgentId` is falsy so the button never becomes a no-op in edge cases where no agent is active.
- It may be worth standardizing on a single navigation mechanism in this component (either `useQueryRoute` or `useNavigate`) to keep routing behavior consistent and easier to maintain.Help me be more useful! Please click π or π on each comment and I'll use the feedback to improve your reviews.
π» Change Type
π Related Issue
π Description of Change
-Added Settings icon button to the right side of the mobile chat header to access chat model settings (agent profile) on mobile/PWA
Added missing tab content for Meta, Prompt, and TTS tabs that were not rendering on mobile/PWA.
Navigation Fix: Used activeAgentId from agent store instead of session store activeId to correctly navigate to settings page with proper agent ID
π§ͺ How to Test
Tested locally
πΈ Screenshots / Videos
π Additional Information
Files changed:
Summary by Sourcery
Fix mobile/PWA agent settings visibility and navigation while tightening PNPMβs built-dependencies configuration.
Bug Fixes:
Enhancements:
Build: