fix: Some new fixes that were discovered by AI reviewers during 2.9-hotfixing#7757
Merged
fix: Some new fixes that were discovered by AI reviewers during 2.9-hotfixing#7757
Conversation
Move hooks and handlers that are only used in ShareAgentFormContent into the child component instead of passing them down as props from the parent. This simplifies the component interface and keeps related logic co-located. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Contributor
Greptile OverviewGreptile SummaryThis PR applies fixes discovered by AI reviewers during 2.9 hotfixing, addressing a critical security issue and several architectural improvements. Key Changes:
Confidence Score: 5/5
Important Files Changed
Sequence DiagramsequenceDiagram
participant User
participant AgentCard
participant ShareAgentModal
participant ShareAgentFormContent
participant API
User->>AgentCard: Click share button
AgentCard->>ShareAgentModal: Open modal (agentId, userIds, groupIds, isPublic)
ShareAgentModal->>ShareAgentFormContent: Render form (agentId)
ShareAgentFormContent->>API: Fetch users (useUsers)
ShareAgentFormContent->>API: Fetch groups (useGroups)
ShareAgentFormContent->>API: Fetch full agent (useAgent)
API-->>ShareAgentFormContent: Return data
ShareAgentFormContent->>User: Display form with current share settings
User->>ShareAgentFormContent: Modify sharing settings
User->>ShareAgentFormContent: Click "Share"
ShareAgentFormContent->>ShareAgentModal: Submit form values
ShareAgentModal->>AgentCard: onShare callback (userIds, groupIds, isPublic)
AgentCard->>API: updateAgentSharedStatus
API-->>AgentCard: Success
AgentCard->>AgentCard: refreshAgent()
AgentCard->>ShareAgentModal: toggle(false)
ShareAgentModal-->>User: Modal closed
|
nmgarza5
approved these changes
Jan 25, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
checkUserIdOwnsAssistantpreviously returned true whenuserIdwas undefined, incorrectly granting ownership to loading / unauthenticated users.userIdbefore granting ownership.ShareAgentModallosing unsaved selections on reopen:userIds,groupIds,isPublic) as required props, soAgentEditorPagecan pass pendingFormikstate whileAgentCardpasses fresh backend data.ShareAgentModalto eliminate prop drilling:useUsers,useGroups,useUser,useAgent,comboBoxOptions,handleClose,handleCopyLink) intoShareAgentFormContentwhere they're actually used, reducing the props interface to just{ agentId?: number }.How Has This Been Tested?
No UI changes; screenshots not required.
Additional Options
Summary by cubic
Refactored agent sharing to use agentId and internal data, and tightened ownership checks to avoid granting access when userId is undefined. Also improved modal behavior and small UI polish.
Bug Fixes
Refactors
Written for commit be9f8a2. Summary will update on new commits.