Skip to content

Add shortcut on dashboard workspace entity + add shortcuts#15603

Merged
bosiraphael merged 8 commits intomainfrom
add-dashboards-shortcuts-command-menu
Nov 5, 2025
Merged

Add shortcut on dashboard workspace entity + add shortcuts#15603
bosiraphael merged 8 commits intomainfrom
add-dashboards-shortcuts-command-menu

Conversation

@ehconitin
Copy link
Copy Markdown
Contributor

@ehconitin ehconitin requested a review from bosiraphael November 4, 2025 14:31
Copy link
Copy Markdown
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

Greptile Overview

Greptile Summary

This PR adds keyboard shortcut support for navigating to the Dashboards page. On the backend, it adds shortcut: 'D' to the Dashboard workspace entity. On the frontend, it adds the GO_TO_DASHBOARDS navigation action with hotkey G+D, and registers Dashboard in the core object metadata enums.

Key changes:

  • Backend: Added shortcut: 'D' property to DashboardWorkspaceEntity decorator
  • Frontend: Added CoreObjectNamePlural.Dashboard enum value
  • Frontend: Added GO_TO_DASHBOARDS navigation action with G+D hotkey
  • Frontend: Action includes proper permission checks and availability rules

Issue found:

  • The new dashboard action has position: 22, which duplicates the position of the companies action, causing a potential ordering conflict in the action menu

Confidence Score: 3/5

  • Safe to merge after fixing the position conflict, as it's a simple addition with one logical error
  • The implementation follows existing patterns correctly and adds proper permission checks. However, the duplicate position value (22) creates an ordering conflict with the companies action that must be resolved. All other changes are clean and follow the codebase conventions.
  • packages/twenty-front/src/modules/action-menu/actions/record-actions/constants/DefaultRecordActionsConfig.tsx - fix duplicate position value and update subsequent positions

Important Files Changed

File Analysis

Filename Score Overview
packages/twenty-server/src/modules/dashboard/standard-objects/dashboard.workspace-entity.ts 5/5 added shortcut: 'D' property to dashboard entity decorator - simple, safe change
packages/twenty-front/src/modules/action-menu/actions/record-actions/constants/DefaultRecordActionsConfig.tsx 2/5 added dashboard navigation action with hotkey 'G+D', but has duplicate position value (22) that conflicts with companies action

Sequence Diagram

sequenceDiagram
    participant User
    participant UI as Frontend UI
    participant ActionMenu as Action Menu System
    participant Metadata as Object Metadata
    participant Backend as Backend API
    
    Note over Backend: PR adds shortcut='D' to<br/>Dashboard entity
    
    Backend->>Metadata: Sync metadata with shortcut
    
    Note over UI: User presses G+D hotkey
    
    User->>UI: Press G+D
    UI->>ActionMenu: Trigger GO_TO_DASHBOARDS action
    
    ActionMenu->>ActionMenu: Check shouldBeRegistered<br/>(permissions, current object)
    
    ActionMenu->>Metadata: Get CoreObjectNamePlural.Dashboard
    Metadata-->>ActionMenu: 'dashboards'
    
    ActionMenu->>UI: Navigate to /objects/dashboards
    UI-->>User: Display dashboards index page
Loading

4 files reviewed, 1 comment

Edit Code Review Agent Settings | Greptile

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Nov 4, 2025

🚀 Preview Environment Ready!

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

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

Copy link
Copy Markdown
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

@bosiraphael bosiraphael enabled auto-merge (squash) November 5, 2025 13:30
@bosiraphael bosiraphael merged commit 636c564 into main Nov 5, 2025
65 checks passed
@bosiraphael bosiraphael deleted the add-dashboards-shortcuts-command-menu branch November 5, 2025 13:42
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Nov 5, 2025

Thanks @ehconitin for your contribution!
This marks your 244th 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.

3 participants