Skip to content

Conversation

@ehconitin
Copy link
Contributor

before -

CleanShot.2026-01-22.at.23.15.07.mp4

after -

CleanShot.2026-01-22.at.23.14.09.mp4

Copy link
Contributor

@cubic-dev-ai cubic-dev-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.

No issues found across 1 file

@ehconitin ehconitin requested a review from Devessier January 22, 2026 17:50
@greptile-apps
Copy link
Contributor

greptile-apps bot commented Jan 22, 2026

Greptile Summary

Fixed empty side menu bug when editing rich text widgets by adding closeCommandMenu() fallback for widget types that don't have dedicated settings pages. The PR adds explicit return statements after navigation calls for IFRAME and GRAPH widget types, then closes the command menu for all other widget types (including STANDALONE_RICH_TEXT). This prevents the empty side menu from appearing when editing widgets without special configuration pages.

  • Added closeCommandMenu() call as fallback for unhandled widget types
  • Added explicit return statements after navigation calls for control flow clarity
  • Properly included closeCommandMenu in the useCallback dependency array

Confidence Score: 5/5

  • This PR is safe to merge with minimal risk
  • The fix is straightforward and addresses a clear UI bug. The change adds proper control flow with explicit returns and a fallback that closes the command menu for widget types without dedicated settings pages. The dependency array is correctly updated, and the logic is clean and maintainable.
  • No files require special attention

Important Files Changed

Filename Overview
packages/twenty-front/src/modules/page-layout/hooks/useEditPageLayoutWidget.ts Added explicit return statements after navigation calls and closeCommandMenu() as fallback for unhandled widget types

Sequence Diagram

sequenceDiagram
    participant User
    participant Component
    participant useEditPageLayoutWidget
    participant CommandMenu
    participant PageLayoutState

    User->>Component: Click edit on rich text widget
    Component->>useEditPageLayoutWidget: handleEditWidget({widgetId, widgetType: STANDALONE_RICH_TEXT})
    useEditPageLayoutWidget->>PageLayoutState: setPageLayoutEditingWidgetId(widgetId)
    
    alt widgetType === IFRAME
        useEditPageLayoutWidget->>CommandMenu: navigatePageLayoutCommandMenu(iFrame settings)
        useEditPageLayoutWidget-->>Component: return (early exit)
    else widgetType === GRAPH
        useEditPageLayoutWidget->>CommandMenu: navigatePageLayoutCommandMenu(graph settings)
        useEditPageLayoutWidget-->>Component: return (early exit)
    else other widget types (STANDALONE_RICH_TEXT, etc)
        useEditPageLayoutWidget->>CommandMenu: closeCommandMenu()
        Note over useEditPageLayoutWidget,CommandMenu: NEW: Closes empty side menu for unhandled types
        useEditPageLayoutWidget-->>Component: return
    end
Loading

@github-actions
Copy link
Contributor

🚀 Preview Environment Ready!

Your preview environment is available at: http://bore.pub:7691

This environment will automatically shut down when the PR is closed or after 5 hours.

@Devessier Devessier self-assigned this Jan 22, 2026
@Devessier
Copy link
Contributor

Great! I will review tomorrow. Thank you.

Copy link
Contributor

@bosiraphael bosiraphael left a comment

Choose a reason for hiding this comment

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

LGTM

@ehconitin ehconitin added this pull request to the merge queue Jan 23, 2026
Merged via the queue into main with commit cb9fe60 Jan 23, 2026
69 checks passed
@ehconitin ehconitin deleted the fix-rich-text-editor-empty-side-menu-bug branch January 23, 2026 09:38
@twenty-eng-sync
Copy link

Hey @ehconitin! After you've done the QA of your Pull Request, you can mark it as done here. Thank you!

1 similar comment
@twenty-eng-sync
Copy link

Hey @ehconitin! After you've done the QA of your Pull Request, you can mark it as done here. Thank you!

@github-actions
Copy link
Contributor

Thanks @ehconitin for your contribution!
This marks your 305th PR on the repo. You're top 1% of all our contributors 🎉
See contributor page - Share on LinkedIn - Share on Twitter

Contributions

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants