Fix: Remove duplicate separators in action menus#8509
Merged
Light2Dark merged 2 commits intomarimo-team:mainfrom Feb 28, 2026
Merged
Fix: Remove duplicate separators in action menus#8509Light2Dark merged 2 commits intomarimo-team:mainfrom
Light2Dark merged 2 commits intomarimo-team:mainfrom
Conversation
Empty action groups could lead to consecutive `ContextMenuSeparator` components being rendered in the` CellActionsContextMenu`. This resulted in visual glitches with double separators appearing. To address this, action groups are now pre-filtered. Only non-empty groups (after filtering out hidden or redundant actions) are passed to the renderer, ensuring that separators are correctly placed only between visible action groups.
Empty action groups in the `CellActionsDropdownInternal` component could lead to consecutive `CommandSeparator` components being rendered. This caused visual glitches similar to the context menu. To fix this, action groups are now pre-filtered. Only non-empty groups (after filtering out redundant actions) are passed to the renderer, ensuring separators are correctly placed only between visible action groups.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Light2Dark
approved these changes
Feb 28, 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.
📝 Summary
This PR fixes an issue where duplicate separators could appear in the cell action dropdown and the cell context menu.
When action items within a group are filtered out (e.g., based on context), the group can become empty. The rendering logic did not account for this, causing separators to be rendered between these empty groups, resulting in visible duplicate separators. This was particularly noticeable in setup cells.
Closes #8492
🔍 Description of Changes
The solution is to filter the list of action groups before rendering. This change removes any groups that are empty after their items have been filtered. By ensuring we only iterate over visible, non-empty groups, we can guarantee that separators are only rendered between actual content.
For
CellActionsDropdownInternalinfrontend/src/components/editor/cell/cell-actions.tsx:The similar approach was applied to
CellActionsContextMenuinfrontend/src/components/editor/cell/cell-context-menu.tsx.AI-Assisted Investigation: An AI agent also performed a broad search for the keyword "Separator" across the
frontend/srcdirectory to identify any other components that might have a similar bug pattern. No other instances of this issue were found.📋 Checklist