From 65aa1e48b53da3ad349f2f2bad439d46b517cba9 Mon Sep 17 00:00:00 2001 From: Sonarly Claude Code Date: Mon, 4 May 2026 09:36:28 +0000 Subject: [PATCH] Dashboard filter missing "Me" workspace member option MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit https://sonarly.com/issue/33893?type=bug Dashboard widget filters use a side panel code path that delegates RELATION field filtering to FormFieldInput, which has no "Me" (current workspace member) option, unlike regular views. Fix: Added explicit handling for `FieldMetadataType.RELATION` filter type in `AdvancedFilterSidePanelValueFormInput`, which is the value input component used by dashboard widget filters (both chart and record table widgets). **Problem:** When users set a RELATION filter (e.g., "Account Owner") in dashboard widgets, the side panel filter component fell through to the generic `FormFieldInput` → `FormRelationToOneFieldInput` → `FormSingleRecordPicker`, which is a plain record picker with no "Me" (current workspace member) option. **Fix:** Added a new conditional block before the `FormFieldInput` fallthrough that checks for `FieldMetadataType.RELATION` and renders `ObjectFilterDropdownSearchInput` + `ObjectFilterDropdownRecordSelect` — the same components used by the regular view filter path (`AdvancedFilterDropdownFilterInput`). `ObjectFilterDropdownRecordSelect` automatically shows the "Me" pinned item when the relation target is `workspaceMember` (line 141 of that component: `objectNameSingular === 'workspaceMember'`). The `dropdownInstanceId` is already computed in the component (line 52-53) and the parent `AdvancedFilterSidePanelRecordFilterColumn` already provides the required `ObjectFilterDropdownComponentInstanceContext`, so no additional context setup is needed. Three new imports were added: `ObjectFilterDropdownRecordSelect`, `ObjectFilterDropdownSearchInput`, and `DropdownMenuSeparator` — all existing components already used elsewhere in the codebase. --- .../AdvancedFilterSidePanelValueFormInput.tsx | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/packages/twenty-front/src/modules/object-record/advanced-filter/side-panel/components/AdvancedFilterSidePanelValueFormInput.tsx b/packages/twenty-front/src/modules/object-record/advanced-filter/side-panel/components/AdvancedFilterSidePanelValueFormInput.tsx index c86d1feb586..908e4039d21 100644 --- a/packages/twenty-front/src/modules/object-record/advanced-filter/side-panel/components/AdvancedFilterSidePanelValueFormInput.tsx +++ b/packages/twenty-front/src/modules/object-record/advanced-filter/side-panel/components/AdvancedFilterSidePanelValueFormInput.tsx @@ -3,6 +3,8 @@ import { AdvancedFilterSidePanelValueFormCompositeFieldInput } from '@/object-re import { AdvancedFilterContext } from '@/object-record/advanced-filter/states/context/AdvancedFilterContext'; import { getAdvancedFilterObjectFilterDropdownComponentInstanceId } from '@/object-record/advanced-filter/utils/getAdvancedFilterObjectFilterDropdownComponentInstanceId'; import { shouldShowFilterTextInput } from '@/object-record/advanced-filter/utils/shouldShowFilterTextInput'; +import { ObjectFilterDropdownRecordSelect } from '@/object-record/object-filter-dropdown/components/ObjectFilterDropdownRecordSelect'; +import { ObjectFilterDropdownSearchInput } from '@/object-record/object-filter-dropdown/components/ObjectFilterDropdownSearchInput'; import { useApplyObjectFilterDropdownFilterValue } from '@/object-record/object-filter-dropdown/hooks/useApplyObjectFilterDropdownFilterValue'; import { fieldMetadataItemUsedInDropdownComponentSelector } from '@/object-record/object-filter-dropdown/states/fieldMetadataItemUsedInDropdownComponentSelector'; import { subFieldNameUsedInDropdownComponentState } from '@/object-record/object-filter-dropdown/states/subFieldNameUsedInDropdownComponentState'; @@ -19,6 +21,7 @@ import { } from '@/object-record/record-field/ui/types/FieldMetadata'; import { currentRecordFiltersComponentState } from '@/object-record/record-filter/states/currentRecordFiltersComponentState'; import { RecordFilterOperand } from '@/object-record/record-filter/types/RecordFilterOperand'; +import { DropdownMenuSeparator } from '@/ui/layout/dropdown/components/DropdownMenuSeparator'; import { useAtomComponentSelectorValue } from '@/ui/utilities/state/jotai/hooks/useAtomComponentSelectorValue'; import { useAtomComponentStateValue } from '@/ui/utilities/state/jotai/hooks/useAtomComponentStateValue'; import { stringifyRelativeDateFilter } from '@/views/view-filter-value/utils/stringifyRelativeDateFilter'; @@ -189,6 +192,19 @@ export const AdvancedFilterSidePanelValueFormInput = ({ ); } + if (recordFilter.type === FieldMetadataType.RELATION) { + return ( + <> + + + + + ); + } + const field = { type: recordFilter.type === FieldMetadataType.DATE_TIME &&