Skip to content

fix: workspace member "me" filters now work in dashboard widgets#20266

Open
QuantumByteMaster wants to merge 6 commits intotwentyhq:mainfrom
QuantumByteMaster:fix/dashboard-widget-me-filter
Open

fix: workspace member "me" filters now work in dashboard widgets#20266
QuantumByteMaster wants to merge 6 commits intotwentyhq:mainfrom
QuantumByteMaster:fix/dashboard-widget-me-filter

Conversation

@QuantumByteMaster
Copy link
Copy Markdown

Summary

Fixes #20225

Dashboard graph widgets only passed timeZone in filterValueDependencies when computing the GraphQL operation filter. As a result, isCurrentWorkspaceMemberSelected ("me") filters were silently ignored — the current workspace member ID was undefined.

Regular view filters already use useFilterValueDependencies which provides both timeZone and currentWorkspaceMemberId. This PR replaces the manual { timeZone: userTimezone } object in useGraphWidgetQueryCommon with useFilterValueDependencies(), giving dashboard widgets full feature parity with view filters.

Changed file: packages/twenty-front/src/modules/page-layout/widgets/graph/hooks/useGraphWidgetQueryCommon.ts

Add onError callbacks with enqueueErrorSnackBar to mutations in
workspace invitation hooks (send, delete, resend) and workflow
version step hooks (create, update, delete, edge, duplicate, run step)
so that API failures are clearly surfaced to users instead of
failing silently.

Closes twentyhq#20212
Copy link
Copy Markdown
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 10 files

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 5, 2026

Welcome!

Hello there, congrats on your first PR! We're excited to have you contributing to this project.
By submitting your Pull Request, you acknowledge that you agree with the terms of our Contributor License Agreement.

Generated by 🚫 dangerJS against 8d10e81

@Bonapara
Copy link
Copy Markdown
Member

Bonapara commented May 5, 2026

Can you join a video recording of the before/after?

…ndencies

Graph widgets only passed `timeZone` in `filterValueDependencies`, so
`isCurrentWorkspaceMemberSelected` ("me") filters were silently ignored
when computing the GQL operation filter. Switch to `useFilterValueDependencies`
which includes both `timeZone` and `currentWorkspaceMemberId`, giving
dashboard widgets feature parity with regular view filters.

Fixes twentyhq#20225
@QuantumByteMaster QuantumByteMaster force-pushed the fix/dashboard-widget-me-filter branch from 5594374 to d0e6030 Compare May 5, 2026 08:16
Copy link
Copy Markdown
Contributor

@martmull martmull left a comment

Choose a reason for hiding this comment

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

lgtm thanks

@martmull martmull self-assigned this May 6, 2026
@martmull
Copy link
Copy Markdown
Contributor

martmull commented May 6, 2026

@QuantumByteMaster you need to fix the CI

@QuantumByteMaster
Copy link
Copy Markdown
Author

Fixed the CI — the typecheck was failing because enqueueErrorSnackBar only accepts either apolloError or message, not both. Removed the redundant message fields since the Apollo error already contains the relevant message.
@martmull

@martmull
Copy link
Copy Markdown
Contributor

martmull commented May 6, 2026

@QuantumByteMaster nice, you still have some front storybook and tests failing

@QuantumByteMaster
Copy link
Copy Markdown
Author

@martmull
Fixed the 2 TypeScript errors — was passing both apolloError and message to enqueueErrorSnackBar which violates the discriminated union type, so removed the redundant message field from the 9 affected hooks. Also updated the 3 test files that were failing because of the new onError handler. Everything passes locally now.

The front-sb-test failures for WorkflowEditActionFormBuilder are pre-existing on main, those files weren't touched in this branch.

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.

Workspace member: me filter not available in Dashboards

3 participants