[FRONT COMPONENTS] Add loader to command menu items#18165
[FRONT COMPONENTS] Add loader to command menu items#18165charlesBochet merged 4 commits intomainfrom
Conversation
Greptile SummaryAdded loader to command menu items when headless front component actions are running, and introduced Confidence Score: 4/5
Important Files Changed
Sequence DiagramsequenceDiagram
participant User
participant HeadlessFrontComponentAction
participant Recoil as isHeadlessFrontComponentMountedFamilySelector
participant ActionListItem
participant CommandMenuItem
participant FrontComponent
participant SDK as closeSidePanel API
User->>HeadlessFrontComponentAction: Click action
HeadlessFrontComponentAction->>Recoil: Check isMounted
alt Component already mounted
Recoil-->>HeadlessFrontComponentAction: true
HeadlessFrontComponentAction->>ActionListItem: disabled=true
ActionListItem->>CommandMenuItem: Show Loader
Note over User,CommandMenuItem: Action blocked, loader visible
else Component not mounted
Recoil-->>HeadlessFrontComponentAction: false
HeadlessFrontComponentAction->>HeadlessFrontComponentAction: closeActionMenu()
HeadlessFrontComponentAction->>FrontComponent: onClick() mount component
FrontComponent->>SDK: Execute action
SDK->>SDK: closeSidePanel() if needed
end
Last reviewed commit: 211e383 |
Additional Comments (2)
|
There was a problem hiding this comment.
1 issue found across 12 files
Prompt for AI agents (all issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="packages/twenty-front/src/modules/command-menu-item/hooks/useCommandMenuItemFrontComponentActions.tsx">
<violation number="1" location="packages/twenty-front/src/modules/command-menu-item/hooks/useCommandMenuItemFrontComponentActions.tsx:86">
P2: Non-headless command menu actions now use `Action` defaults, which closes the side panel on execution. If the intent is to preserve the previous behavior (no side-panel close for non-headless items), pass `closeSidePanelOnCommandMenuListActionExecution={false}` explicitly to avoid this regression.</violation>
</file>
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.
| closeSidePanelOnCommandMenuListActionExecution={isHeadless} | ||
| /> | ||
| ) : ( | ||
| <Action onClick={handleClick} /> |
There was a problem hiding this comment.
P2: Non-headless command menu actions now use Action defaults, which closes the side panel on execution. If the intent is to preserve the previous behavior (no side-panel close for non-headless items), pass closeSidePanelOnCommandMenuListActionExecution={false} explicitly to avoid this regression.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At packages/twenty-front/src/modules/command-menu-item/hooks/useCommandMenuItemFrontComponentActions.tsx, line 86:
<comment>Non-headless command menu actions now use `Action` defaults, which closes the side panel on execution. If the intent is to preserve the previous behavior (no side-panel close for non-headless items), pass `closeSidePanelOnCommandMenuListActionExecution={false}` explicitly to avoid this regression.</comment>
<file context>
@@ -76,11 +77,13 @@ const buildActionFromItem = ({
- closeSidePanelOnCommandMenuListActionExecution={isHeadless}
/>
+ ) : (
+ <Action onClick={handleClick} />
),
};
</file context>
| <Action onClick={handleClick} /> | |
| <Action onClick={handleClick} closeSidePanelOnCommandMenuListActionExecution={false} /> |
|
Hey @bosiraphael! After you've done the QA of your Pull Request, you can mark it as done here. Thank you! |
PR description
closeSidePanelto the front component host api.Video QA
CleanShot.2026-02-23.at.10.14.51.mp4