:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.
Python ab-testingai-analyticsanalyticscdpdata-warehouseexperimentsfeature-flagsjavascriptproduct-analyticspythonreactsession-replaysurveystypescriptweb-analytics
feat(conversations): add recent tickets dashboard widget (#80678)
Matt Pua3c04034d8a13
diff --git a/.agents/skills/manage-dashboard-widgets/references/checklist-new-widget-type.md b/.agents/skills/manage-dashboard-widgets/references/checklist-new-widget-type.mdindex 7b7b4f60aa5c..830b06581593 100644--- a/.agents/skills/manage-dashboard-widgets/references/checklist-new-widget-type.md+++ b/.agents/skills/manage-dashboard-widgets/references/checklist-new-widget-type.md@@ -251,4 +251,4 @@ Capture when a user follows a widget link _into_ the product — the other half</Link>```-Shipped examples: `SurveyResultsWidget.tsx` (`dashboard widget open survey clicked`), `ExperimentResultsWidget.tsx` (`dashboard widget open experiment clicked`).+Shipped examples: `SurveyResultsWidget.tsx` (`dashboard widget open survey clicked`), `ExperimentResultsWidget.tsx` (`dashboard widget open experiment clicked`), and `ConversationsWidget.tsx` (`dashboard widget open support ticket clicked`).diff --git a/.agents/skills/manage-dashboard-widgets/references/composition.md b/.agents/skills/manage-dashboard-widgets/references/composition.mdindex 8e805603f7c3..bde6a56efe32 100644--- a/.agents/skills/manage-dashboard-widgets/references/composition.md+++ b/.agents/skills/manage-dashboard-widgets/references/composition.md@@ -89,6 +89,8 @@ Render order inside `WidgetCard` (matches `InsightCard`):Date range display is derived in `WidgetCardHeader` from `config.dateRange` + resolved catalog `headerMeta` (via `dateFilterToText`). Product type chip text comes from `getDashboardWidgetGroupLabel(groupId)`.+When a saved view or product collection replaces the date range, add a `TopHeading` slot in `widgets/registry.tsx`. The slot renders `CardTopHeadingRow` with the group label and resolved saved-view name. Reuse the product's project-scoped saved-view cache. Load it only when a persisted saved-view ID needs a label. Add the slot to the widget Storybook wrapper and test the resolved heading.+## Loading ownershipThe widget `Component` receives `loading` from scene logic and must early-return with `WidgetLoadingState`. The shell (`DashboardWidgetItem` → composed `WidgetCardBody`) does not show skeletons for widget body content.diff --git a/frontend/snapshots.yml b/frontend/snapshots.ymlindex 6e38d8908292..357bbb4ee88b 100644--- a/frontend/snapshots.yml+++ b/frontend/snapshots.yml@@ -4647,9 +4647,9 @@ snapshots:products-alerts-shared-components--quiet-hours--light:hash: v1.k794b7964.d562af4f5d4b2eb1566f5f378227e08f8743c6fab8ceb709d19c7bde3f80d8be.SFC4RHmaGUHYuisvesHu5mP7lE-6I5qKkIGFJCxlRwoproducts-dashboards--dashboard-states--dark:- hash: v1.k794b7964.16e1dfc15f7384bcf2178a225e73758df16a4bb955eba508dc654a34b8391dec.u7x3cnoFaVb9qcFaKnleXbkDFbZl_viSBTQo691rL30+ hash: v1.k794b7964.cc591635f83447f7bcfb802062302b8b1bbcd51826110b12fa0f68d4830dcfd3.CIgt_KxCyQRgbn7DPF4MDXc5JBlSxbaCPS0Snyx3cRsproducts-dashboards--dashboard-states--light:- hash: v1.k794b7964.00fec221d645558662e3314e28692b2e9fe71f5e756087697b4135d0fe6ae99d.EmfLAn77j18frZIvs_lvm2x4t1W_aPwelPt__Gfb5WE+ hash: v1.k794b7964.c55a0dcbaa20af97089a736ec14d2c4afaf842e84dab0e0513724c83d98f397e.km1y2gzWWxk5gGoUNawY4PcOeNKTC4WGL5XBZEaO1qMproducts-dashboards--list--dark:hash: v1.k794b7964.3d68918107c5c8cfa0abd6a423e2b1281b69eb3d742804b082203d761ecdfbe0.AtRNgQNXLCJgYv-Ig3hni4iK_kblu_uYEtyS1ovZGEsproducts-dashboards--list--light:@@ -4675,9 +4675,9 @@ snapshots:products-dashboards-add-insight-to-dashboard-modal--with-more-insight-types--light:hash: v1.k794b7964.6c001db5555f48832f11ae8d9dcc535dff4e22044bb6dfce15db3a2a522f1fa9.GQCxp64JkEqDCNEeSD6gPtc5rwlzjHFJ-QnZu4lRipsproducts-dashboards-dashboard-widgets-overview--all-widget-types--dark:- hash: v1.k794b7964.13f00aedac1799254b70e1e4edd7ff333fa2b3d865eb78254a74dffa528720e1.29UTjX66xGn1Dw1q9VMwBL2PT4QfMvyaKKUFLTyDwvk+ hash: v1.k794b7964.27ab8862dbf358dc2df0893273abcafe7006824040c987dfc4cf5d0c9a80195b.BkMUYotGDlaTPnWgagssWf_ncly914WbuPPwE-hphjsproducts-dashboards-dashboard-widgets-overview--all-widget-types--light:- hash: v1.k794b7964.a58b9994202c2838ff9806eb36bd536b2d840bfe3016bb00deb477bd4fe92b1e.zDmnz_xipce4t8fvNhpb-YuONwlqxR0n4MVVDHy3IpA+ hash: v1.k794b7964.51bbf943e0b71a1288c60cb614d891527a5d7f158dcdfbd56fbc259bb3e3e22a.iCf_qZPuEOIvfqIGh5iOCBWGzrUAVdHm3xe_XNNNO3cproducts-dashboards-dashboard-widgets-widget-types-activity-recent-events--default--dark:hash: v1.k794b7964.c69d28ef03335511de9b7dd75d5ad1c0458272d5d8f340083cdb86acc3b3c888.KB3MNhE9xEjVSl9hmVpz2jLC0IAmOTvaVZBmrl3pNKsproducts-dashboards-dashboard-widgets-widget-types-activity-recent-events--default--light:@@ -4806,6 +4806,30 @@ snapshots:hash: v1.k794b7964.157ece6a208752da8f398061271c7f53a50f171c8b7d644350e5bce3525cc1c2.k0_rq377Z0gc71Y2o5IKoOf-_HHF2hqgLt0jU6ltab4products-dashboards-dashboard-widgets-widget-types-session-replay-recent-recordings-widget-settings--default--light:hash: v1.k794b7964.9aead420de584ee54a57eb52344452181d38a1da1fcf3f3b8fb3b556bdf5bf0a.EXJprQ5mrtU-P03Pgtd-xW3uAZmbZK6opnsE9XED0lk+ products-dashboards-dashboard-widgets-widget-types-support-recent-tickets--empty--dark:+ hash: v1.k794b7964.f7fb52e66b729223c36c6d77396b421378e155dea826f25b10ffb56280b67101.4I0hq4aCzO-L20oAN99litvVrqn4YM6y8uC368DeCo8+ products-dashboards-dashboard-widgets-widget-types-support-recent-tickets--empty--light:+ hash: v1.k794b7964.34dad7ab04d06d2b83b9c5f913ec324498664a90da45a0c5fb2134b836c74934.IG6YXN3wgIUI9_j81FDUh5sJ7UW5Rb59qCilVvND_r8+ products-dashboards-dashboard-widgets-widget-types-support-recent-tickets--loading--dark:+ hash: v1.k794b7964.98c81b40327f642c4c84e8209d215d96028542d643cf70e26be2c23a9521b352.YUQmDjUi-3p3fGulsmXzp1U7EPY71iufUP_F5eCxDzc+ products-dashboards-dashboard-widgets-widget-types-support-recent-tickets--loading--light:+ hash: v1.k794b7964.9ffb00576b8540a26ff01ffb3d599b8d3a9c3a5c0d07051580d0c22f3b26fc40.g2iQbYSB4SdiJTJC8vq0bJ0qLh6P3jswZm0H6zysl3E+ products-dashboards-dashboard-widgets-widget-types-support-recent-tickets--populated--dark:+ hash: v1.k794b7964.b698ef0bd9888650d9838388f2993fd3c8362ed68f9182356c813bbc9f8b172e.lLzi-qdo0bFp84LnyxBCjZNqNVG64mX-gxjtx_Wlw8w+ products-dashboards-dashboard-widgets-widget-types-support-recent-tickets--populated--light:+ hash: v1.k794b7964.616bbac3b6935f3eb2b84799ecb96f2dc223a1159e54764afe1ecf535089b08d.ax0Re-jrqoE8hpb2fmMl0Tc3W-AbBvj8Url5lI71NgE+ products-dashboards-dashboard-widgets-widget-types-support-recent-tickets--saved-view--dark:+ hash: v1.k794b7964.c5da86ba4efbb6fe891dddb72607dd50d544bb650d75ef38dd16aa1d1d916ef4.E0dw0fzgKdORB_wwz-Tgzn6JWscScCwPXnlRrgfZSpo+ products-dashboards-dashboard-widgets-widget-types-support-recent-tickets--saved-view--light:+ hash: v1.k794b7964.449ea989fcb5a648522b53294187b0fbd3fe9e8c89e493a1ede28d9cbb404612.fJjN4BN46mnkpbJlZF7_XenJmTw4Dg7HaNPFRWpsE4M+ products-dashboards-dashboard-widgets-widget-types-support-recent-tickets--setup-unavailable--dark:+ hash: v1.k794b7964.f6437c6e79da694e9059b48d310125320979d46dfba2a083dfc260dda69ae5ff.lP5W-nzWpHS8cKn3JYOVylt0aO4rxWAx_7lEORoLsIA+ products-dashboards-dashboard-widgets-widget-types-support-recent-tickets--setup-unavailable--light:+ hash: v1.k794b7964.21a45dc4ae3bfbaf43d5a4613ceb24347d27e05335a2d4971037f296c46d8abc.43pv6zvEYNM3F_WBQbVBJqpLkMc2kyacmPnTns8lWRc+ products-dashboards-dashboard-widgets-widget-types-support-recent-tickets-widget-settings--default--dark:+ hash: v1.k794b7964.2dbe63f46c8713b5381e433e783eef4aa02be7f7a7b951735e769081e2402c86.uc4SZM_3WcEyUfaKti-MmdsVdoAFf8Gxvqq0DijV5nQ+ products-dashboards-dashboard-widgets-widget-types-support-recent-tickets-widget-settings--default--light:+ hash: v1.k794b7964.2f3ba83ebf9b8e9859539a7be871d0c9177674633adeaa8731b0064b747e1ecf.lj6BOvmm0WihOcqcdVrmX9hgKP8hwIN6nH6TkGcJBdoproducts-dashboards-dashboard-widgets-widget-types-surveys-survey-results--default--dark:hash: v1.k794b7964.1e3ffed914508498dabcde95ee60a7850fc93d3cf146777e986eaa42e824bae6.9TWCCISCV2s7RaydRaXd5kdh65STgxeAGHpxoL2iegAproducts-dashboards-dashboard-widgets-widget-types-surveys-survey-results--default--light:diff --git a/frontend/src/lib/api.ts b/frontend/src/lib/api.tsindex 711af4df0191..451caa36b7ad 100644--- a/frontend/src/lib/api.ts+++ b/frontend/src/lib/api.ts@@ -7103,6 +7103,7 @@ const api = {data: Partial<{status: stringescalation_reason: string+ assignee: { type: 'user' | 'role'; id: string | number } | null}>): Promise<any> {return await new ApiRequest().conversationsTicket(ticketId).update({ data })diff --git a/frontend/src/lib/components/ProductIntroduction/ProductIntroduction.tsx b/frontend/src/lib/components/ProductIntroduction/ProductIntroduction.tsxindex 1306e718fcde..4d430617dc73 100644--- a/frontend/src/lib/components/ProductIntroduction/ProductIntroduction.tsx+++ b/frontend/src/lib/components/ProductIntroduction/ProductIntroduction.tsx@@ -44,6 +44,7 @@ export type ProductIntroductionProps = {actionElementOverride?: JSX.ElementdocsURL?: stringcustomHog?: React.ComponentType<{ className?: string }>+ hogClassName?: stringclassName?: string/*** Default hides the hog below `md`. Use `responsive` to keep the hog visible on small screens with a vertical@@ -93,6 +94,7 @@ export const ProductIntroduction = ({actionElementOverride,docsURL,customHog: CustomHog,+ hogClassName,className,hogLayout = 'default',useMainContentContainerQueries = false,@@ -169,7 +171,8 @@ export const ProductIntroduction = ({? useMainContentContainerQueries? 'block w-56 sm:w-60 lg:w-70 mb-4 @min-[48rem]/main-content:mb-0': 'block w-56 sm:w-60 lg:w-70 mb-4 md:mb-0'- : 'w-60 lg:w-70 mb-4 hidden md:block'+ : 'w-60 lg:w-70 mb-4 hidden md:block',+ hogClassName)}><HogComponent className="w-full h-full" />diff --git a/posthog/settings/web.py b/posthog/settings/web.pyindex 9ec3f2f3d4dc..e14c814de74d 100644--- a/posthog/settings/web.py+++ b/posthog/settings/web.py@@ -841,6 +841,7 @@ SPECTACULAR_SETTINGS = {"ExperimentResultsWidgetTypeEnum": ["experiment_results"],"SurveyResultsWidgetTypeEnum": ["survey_results"],"LogsListWidgetTypeEnum": ["logs_list"],+ "ConversationsRecentTicketsWidgetTypeEnum": ["conversations_recent_tickets"],"OrderByEnum": ["latest", "earliest"],"PropertyGroupTypeEnum": ["cohort", "person", "group"],"ExistenceOperatorEnum": ["is_set", "is_not_set"],diff --git a/products/conversations/frontend/components/Assignee/AssigneeMultiSelect.tsx b/products/conversations/frontend/components/Assignee/AssigneeMultiSelect.tsxindex 71b312cc6767..208f52a7fd2f 100644--- a/products/conversations/frontend/components/Assignee/AssigneeMultiSelect.tsx+++ b/products/conversations/frontend/components/Assignee/AssigneeMultiSelect.tsx@@ -22,9 +22,11 @@ function isSameEntry(a: AssigneeFilterEntry, b: AssigneeFilterEntry): boolean {export function AssigneeMultiSelect({value,onChange,+ emptyLabel = 'All assignees',}: {value: AssigneeFilterEntry[]onChange: (value: AssigneeFilterEntry[]) => void+ emptyLabel?: string}): JSX.Element {const { search, filteredRoles, filteredMembers, currentUserMember, rolesLoading, membersLoading } =useValues(assigneeSelectLogic)@@ -150,15 +152,15 @@ export function AssigneeMultiSelect({active={showPopover}{...clearFilterButtonProps(value.length > 0 ? () => onChange([]) : null, 'Clear assignee filter')}>- <TriggerLabel value={value} />+ <TriggerLabel value={value} emptyLabel={emptyLabel} /></LemonButton></LemonDropdown>)}-function TriggerLabel({ value }: { value: AssigneeFilterEntry[] }): JSX.Element {+function TriggerLabel({ value, emptyLabel }: { value: AssigneeFilterEntry[]; emptyLabel: string }): JSX.Element {if (value.length === 0) {- return <>All assignees</>+ return <>{emptyLabel}</>}if (value.length > 1) {return <>{value.length} assignees</>diff --git a/products/conversations/frontend/components/Assignee/AssigneeSelect.test.tsx b/products/conversations/frontend/components/Assignee/AssigneeSelect.test.tsxnew file mode 100644index 000000000000..d165032a768d--- /dev/null+++ b/products/conversations/frontend/components/Assignee/AssigneeSelect.test.tsx@@ -0,0 +1,66 @@+import '@testing-library/jest-dom'++import { cleanup, fireEvent, render, screen } from '@testing-library/react'+import { useActions } from 'kea'+import type { ReactElement, ReactNode } from 'react'++import { AssigneeSelect } from './AssigneeSelect'++jest.mock('kea', () => ({ ...jest.requireActual('kea'), useActions: jest.fn() }))+jest.mock('@posthog/lemon-ui', () => ({+ ...jest.requireActual('@posthog/lemon-ui'),+ LemonDropdown: ({+ children,+ onVisibilityChange,+ }: {+ children: ReactNode+ onVisibilityChange?: (visible: boolean) => void+ }): JSX.Element => (+ <div>+ <button onClick={() => onVisibilityChange?.(true)}>Open assignee dropdown</button>+ {children}+ </div>+ ),+}))+jest.mock('./AssigneeDisplay', () => ({+ AssigneeResolver: ({ children }: { children: (props: { assignee: null }) => ReactElement }): ReactElement =>+ children({ assignee: null }),+}))+jest.mock('./AssigneeDropdown', () => ({+ AssigneeDropdown: (): JSX.Element => <div />,+}))++describe('AssigneeSelect', () => {+ const ensureAssigneeTypesLoaded = jest.fn()++ afterEach(() => {+ cleanup()+ ensureAssigneeTypesLoaded.mockClear()+ })++ function renderAssigneeSelect(loadOnOpen = false): void {+ render(+ <AssigneeSelect assignee={null} onChange={jest.fn()} loadOnOpen={loadOnOpen}>+ {() => <button>Assignee</button>}+ </AssigneeSelect>+ )+ }++ it('loads assignee types when mounted by default', () => {+ ;(useActions as jest.Mock).mockReturnValue({ ensureAssigneeTypesLoaded, setSearch: jest.fn() })++ renderAssigneeSelect()++ expect(ensureAssigneeTypesLoaded).toHaveBeenCalledTimes(1)+ })++ it('loads assignee types when the dropdown opens when configured for lazy loading', () => {+ ;(useActions as jest.Mock).mockReturnValue({ ensureAssigneeTypesLoaded, setSearch: jest.fn() })++ renderAssigneeSelect(true)++ expect(ensureAssigneeTypesLoaded).not.toHaveBeenCalled()+ fireEvent.click(screen.getByText('Open assignee dropdown'))+ expect(ensureAssigneeTypesLoaded).toHaveBeenCalledTimes(1)+ })+})diff --git a/products/conversations/frontend/components/Assignee/AssigneeSelect.tsx b/products/conversations/frontend/components/Assignee/AssigneeSelect.tsxindex 455660b773d3..ca14c5433d3e 100644--- a/products/conversations/frontend/components/Assignee/AssigneeSelect.tsx+++ b/products/conversations/frontend/components/Assignee/AssigneeSelect.tsx@@ -13,11 +13,13 @@ export const AssigneeSelect = ({onChange,children,disabledReason,+ loadOnOpen = false,}: {assignee: TicketAssigneeonChange: (assignee: TicketAssignee) => voidchildren: (assignee: Assignee, isOpen: boolean) => JSX.ElementdisabledReason?: string+ loadOnOpen?: boolean}): JSX.Element => {const { setSearch, ensureAssigneeTypesLoaded } = useActions(assigneeSelectLogic)const [showPopover, setShowPopover] = useState(false)@@ -29,8 +31,10 @@ export const AssigneeSelect = ({}useEffect(() => {- ensureAssigneeTypesLoaded()- }, [ensureAssigneeTypesLoaded])+ if (!loadOnOpen) {+ ensureAssigneeTypesLoaded()+ }+ }, [ensureAssigneeTypesLoaded, loadOnOpen])if (disabledReason) {return (@@ -47,7 +51,12 @@ export const AssigneeSelect = ({closeOnClickInside={false}visible={showPopover}matchWidth={false}- onVisibilityChange={(visible) => setShowPopover(visible)}+ onVisibilityChange={(visible) => {+ setShowPopover(visible)+ if (visible && loadOnOpen) {+ ensureAssigneeTypesLoaded()+ }+ }}overlay={<AssigneeDropdown assignee={assignee} onChange={_onChange} />}><div>diff --git a/products/conversations/frontend/components/ConversationsDisabledBanner.tsx b/products/conversations/frontend/components/ConversationsDisabledBanner.tsxindex cff6c13118b5..4de548a9b128 100644--- a/products/conversations/frontend/components/ConversationsDisabledBanner.tsx+++ b/products/conversations/frontend/components/ConversationsDisabledBanner.tsx@@ -1,9 +1,52 @@+import posthog from 'posthog-js'+import { IconOpenSidebar } from '@posthog/icons'import { LemonBanner, LemonButton } from '@posthog/lemon-ui'import { SupportHeroHog } from 'lib/components/hedgehogs'import { urls } from 'scenes/urls'+type SupportActivationButtonProps = {+ source: 'support_empty_state' | 'dashboard_widget'+ className?: string+ widgetType?: string+ widgetId?: string+ dashboardId?: number | null+ onClick?: () => void+}++export function SupportActivationButton({+ source,+ className,+ widgetType,+ widgetId,+ dashboardId,+ onClick,+}: SupportActivationButtonProps): JSX.Element {+ return (+ <LemonButton+ className={className ?? 'hidden @md:flex'}+ type="primary"+ to={urls.supportSettings()}+ onClick={() => {+ sessionStorage.setItem(+ 'support_activation_source',+ JSON.stringify({ source, widget_type: widgetType, widget_id: widgetId, dashboard_id: dashboardId })+ )+ posthog.capture('support activation started', {+ source,+ widget_type: widgetType,+ widget_id: widgetId,+ dashboard_id: dashboardId,+ })+ onClick?.()+ }}+ >+ Enable+ </LemonButton>+ )+}+export function ConversationsDisabledBanner(): JSX.Element {return (<LemonBanner type="info" hideIcon={true}>@@ -36,9 +79,7 @@ export function ConversationsDisabledBanner(): JSX.Element {</li></ul><div className="flex items-center gap-x-4 gap-y-2 flex-wrap">- <LemonButton className="hidden @md:flex" type="primary" to={urls.supportSettings()}>- Enable- </LemonButton>+ <SupportActivationButton source="support_empty_state" /><LemonButtontype="tertiary"sideIcon={<IconOpenSidebar className="w-4 h-4" />}diff --git a/products/conversations/frontend/components/SlaDisplay.test.tsx b/products/conversations/frontend/components/SlaDisplay.test.tsxnew file mode 100644index 000000000000..a4afbc3da543--- /dev/null+++ b/products/conversations/frontend/components/SlaDisplay.test.tsx@@ -0,0 +1,19 @@+import { getSlaState } from './SlaDisplay'++describe('getSlaState', () => {+ beforeEach(() => {+ jest.useFakeTimers().setSystemTime(new Date('2026-08-11T12:00:00Z'))+ })++ afterEach(() => {+ jest.useRealTimers()+ })++ it.each([+ ['breached', '2026-08-11T11:59:00Z', 'breached'],+ ['at risk', '2026-08-11T12:30:00Z', 'at-risk'],+ ['on track', '2026-08-11T13:00:00Z', 'on-track'],+ ])('returns %s for an SLA due at %s', (_label, slaDueAt, expectedState) => {+ expect(getSlaState(slaDueAt)).toBe(expectedState)+ })+})diff --git a/products/conversations/frontend/components/SlaDisplay.tsx b/products/conversations/frontend/components/SlaDisplay.tsxindex 648685bf9880..c58505da4a6a 100644--- a/products/conversations/frontend/components/SlaDisplay.tsx+++ b/products/conversations/frontend/components/SlaDisplay.tsx@@ -3,31 +3,46 @@ import clsx from 'clsx'import { TZLabel } from 'lib/components/TZLabel'import { dayjs } from 'lib/dayjs'+export type SlaState = 'breached' | 'at-risk' | 'on-track'++export function getSlaState(slaDueAt: string): SlaState {+ const diffMs = dayjs(slaDueAt).diff(dayjs())++ if (diffMs < 0) {+ return 'breached'+ }+ if (diffMs < 60 * 60 * 1000) {+ return 'at-risk'+ }+ return 'on-track'+}+export function SlaDisplay({slaDueAt,className,+ showPopover = true,}: {slaDueAt?: string | nullclassName?: string+ showPopover?: boolean}): JSX.Element | null {if (!slaDueAt) {return null}const due = dayjs(slaDueAt)- const diffMs = due.diff(dayjs())- const breached = diffMs < 0- const atRisk = !breached && diffMs < 60 * 60 * 1000+ const slaState = getSlaState(slaDueAt)return (<TZLabeltime={due}+ showPopover={showPopover}className={clsx('font-medium',{- 'text-danger': breached,- 'text-warning': atRisk,- 'text-success': !breached && !atRisk,+ 'text-danger': slaState === 'breached',+ 'text-warning': slaState === 'at-risk',+ 'text-success': slaState === 'on-track',},className)}diff --git a/products/conversations/frontend/scenes/settings/supportSettingsLogic.ts b/products/conversations/frontend/scenes/settings/supportSettingsLogic.tsindex dce2287c455b..40c537315f39 100644--- a/products/conversations/frontend/scenes/settings/supportSettingsLogic.ts+++ b/products/conversations/frontend/scenes/settings/supportSettingsLogic.ts@@ -1,5 +1,6 @@import { MakeLogicType, actions, afterMount, connect, kea, listeners, path, reducers, selectors } from 'kea'import { loaders } from 'kea-loaders'+import posthog from 'posthog-js'import api from 'lib/api'import { FEATURE_FLAGS } from 'lib/constants'@@ -1638,7 +1639,7 @@ export const supportSettingsLogic = kea<supportSettingsLogicType>([lemonToast.error('Failed to save repository selection')}},- updateCurrentTeamSuccess: () => {+ updateCurrentTeamSuccess: ({ payload }) => {actions.setGreetingInputValue(null)actions.setIdentificationFormTitleValue(null)actions.setIdentificationFormDescriptionValue(null)@@ -1646,6 +1647,12 @@ export const supportSettingsLogic = kea<supportSettingsLogicType>([actions.setSlackTicketEmojiValue(null)actions.setSlackBotIconUrlValue(null)actions.setSlackBotDisplayNameValue(null)+ if (payload?.conversations_enabled) {+ const storedSource = sessionStorage.getItem('support_activation_source')+ const source = storedSource ? JSON.parse(storedSource) : { source: 'support_settings' }+ posthog.capture('support activation completed', source)+ sessionStorage.removeItem('support_activation_source')+ }},})),afterMount(({ values, actions }) => {diff --git a/products/dashboards/backend/api/dashboard.py b/products/dashboards/backend/api/dashboard.pyindex 09e46a664ede..3ef4274ac30a 100644--- a/products/dashboards/backend/api/dashboard.py+++ b/products/dashboards/backend/api/dashboard.py@@ -138,6 +138,7 @@ from products.dashboards.backend.widget_registry import (get_widget_registry_entry,validate_widget_config,)+from products.dashboards.backend.widget_specs.configs import CONVERSATIONS_RECENT_TICKETS_WIDGET_TYPEfrom products.mcp_analytics.backend.dashboard_templates import get_mcp_analytics_default_templatefrom products.notifications.backend.facade.api import (NotificationData,@@ -822,16 +823,20 @@ class SharedDashboardWidgetMetadataSerializer(serializers.ModelSerializer):allow_blank=True,help_text="Optional markdown description shown on the dashboard tile when enabled.",)- config = DashboardWidgetConfigField(- required=False,- help_text="Widget-specific configuration JSON for this widget type.",- )+ config = serializers.SerializerMethodField(help_text="Public-safe configuration for this widget type.")class Meta:model = DashboardWidgetfields = ["id", "widget_type", "name", "description", "config"]read_only_fields = ["id", "widget_type", "name", "description", "config"]+ @extend_schema_field(DashboardWidgetConfigField(required=False))+ def get_config(self, widget: DashboardWidget) -> dict[str, Any]:+ config = dict(widget.config)+ if widget.widget_type == CONVERSATIONS_RECENT_TICKETS_WIDGET_TYPE:+ config.pop("search", None)+ return config+class DashboardTileSerializer(serializers.ModelSerializer):id: serializers.IntegerField = serializers.IntegerField(required=False)diff --git a/products/dashboards/backend/api/test/test_dashboard_widgets.py b/products/dashboards/backend/api/test/test_dashboard_widgets.pyindex 050f878cbd84..13782ec86477 100644--- a/products/dashboards/backend/api/test/test_dashboard_widgets.py+++ b/products/dashboards/backend/api/test/test_dashboard_widgets.py@@ -1128,7 +1128,11 @@ class TestDashboardWidgets(APIBaseTest):@override_settings(IN_UNIT_TESTING=True)def test_shared_dashboard_tile_serializer_omits_widget_payload(self) -> None:dashboard_id, _ = self.dashboard_api.create_dashboard({"name": "dash"})- _, dashboard_json = self.dashboard_api.create_widget_tile(dashboard_id, config={"limit": 10})+ _, dashboard_json = self.dashboard_api.create_widget_tile(+ dashboard_id,+ widget_type="conversations_recent_tickets",+ config={"limit": 10, "search": "sensitive ticket text"},+ )tile = DashboardTile.objects.get(id=dashboard_json["tiles"][0]["id"])class ViewShim:@@ -1143,8 +1147,9 @@ class TestDashboardWidgets(APIBaseTest):shared_widget = DashboardTileSerializer(tile, context=shared_context).data["widget"]assert shared_widget is not Noneassert set(shared_widget.keys()) == {"id", "widget_type", "name", "description", "config"}- assert shared_widget["widget_type"] == "error_tracking_list"+ assert shared_widget["widget_type"] == "conversations_recent_tickets"assert shared_widget["config"]["limit"] == 10+ assert "search" not in shared_widget["config"]class TestDashboardWidgetsBatchUpdate(APIBaseTest):diff --git a/products/dashboards/backend/widget_availability.py b/products/dashboards/backend/widget_availability.pyindex a62b3f596700..058a35273850 100644--- a/products/dashboards/backend/widget_availability.py+++ b/products/dashboards/backend/widget_availability.py@@ -22,6 +22,8 @@ def is_widget_availability_requirement_met(requirement: str, team: Team) -> bool# reads as not-enabled here. We avoid the events-received check to keep this off# the hot widget-add path (no ClickHouse query).return bool(team.autocapture_exceptions_opt_in)+ if requirement == "conversations_enabled":+ return bool(team.conversations_enabled)return Nonediff --git a/products/dashboards/backend/widget_specs/configs.py b/products/dashboards/backend/widget_specs/configs.pyindex 5c3c5469ed23..72f3cceb2883 100644--- a/products/dashboards/backend/widget_specs/configs.py+++ b/products/dashboards/backend/widget_specs/configs.py@@ -1,11 +1,13 @@from __future__ import annotationsfrom typing import Annotated, Literal, Self+from uuid import UUID-from pydantic import BaseModel, ConfigDict, Field, field_validator, model_validator+from pydantic import BaseModel, ConfigDict, Field, WithJsonSchema, field_validator, model_validatorfrom posthog.schema import PropertyOperator+from products.conversations.backend.models.constants import Channel, Priority, Statusfrom products.dashboards.backend.constants import (ACTIVITY_EVENTS_DEFAULT_LIMIT,ACTIVITY_EVENTS_MAX_PROPERTY_FILTER_VALUES,@@ -33,6 +35,7 @@ EXPERIMENTS_LIST_WIDGET_TYPE = "experiments_list"EXPERIMENT_RESULTS_WIDGET_TYPE = "experiment_results"SURVEY_RESULTS_WIDGET_TYPE = "survey_results"LOGS_LIST_WIDGET_TYPE = "logs_list"+CONVERSATIONS_RECENT_TICKETS_WIDGET_TYPE = "conversations_recent_tickets"ActivityEventsPropertyKey = Annotated[str,@@ -59,6 +62,18 @@ LogsOrderBy = Literal["latest", "earliest"]LogSeverityLevel = Literal["trace", "debug", "info", "warn", "error", "fatal"]# How log timestamps render on the tile: in UTC, or in each viewer's local timezone.LogsTimezone = Literal["UTC", "local"]+ConversationsTicketStatus = Annotated[+ str,+ WithJsonSchema({"type": "string", "enum": [*Status.values, "all"]}),+]+ConversationsTicketPriority = Annotated[+ str,+ WithJsonSchema({"type": "string", "enum": list(Priority.values)}),+]+ConversationsTicketChannel = Annotated[+ str,+ WithJsonSchema({"type": "string", "enum": [*Channel.values, "all"]}),+]class WidgetAssigneeFilter(BaseModel):@@ -67,6 +82,31 @@ class WidgetAssigneeFilter(BaseModel):id: str | inttype: WidgetAssigneeType+ @model_validator(mode="before")+ @classmethod+ def validate_id(cls, value: object) -> object:+ if not isinstance(value, dict):+ return value++ assignee_id = value.get("id")+ assignee_type = value.get("type")+ if isinstance(assignee_id, bool) or not isinstance(assignee_id, str | int):+ raise ValueError("Assignee id must be a user ID or role UUID.")+ if assignee_type == "user":+ try:+ int(assignee_id)+ except ValueError as err:+ raise ValueError("User assignee id must be an integer.") from err+ if assignee_type == "role":+ try:+ UUID(str(assignee_id))+ except ValueError as err:+ raise ValueError("Role assignee id must be a UUID.") from err+ return value+++ConversationsAssigneeFilter = Literal["me", "unassigned"] | WidgetAssigneeFilter+class ActivityEventsPropertyFilter(BaseModel):model_config = ConfigDict(extra="forbid")@@ -236,3 +276,67 @@ class LogsListWidgetConfig(WidgetDateRangeConfigBase):if not isinstance(value, str):raise ValueError("savedViewId must be a string.")return value+++class ConversationsRecentTicketsWidgetConfig(BaseModel):+ model_config = ConfigDict(extra="forbid")++ limit: WidgetLimit = Field(default=DEFAULT_WIDGET_LIST_LIMIT, description="Maximum number of tickets to return.")+ status: ConversationsTicketStatus = Field(default="all", description="Ticket status filter.")+ priorities: list[ConversationsTicketPriority] = Field(+ default_factory=list,+ description="Only show tickets with these priorities. Empty shows all priorities.",+ )+ channel: ConversationsTicketChannel = Field(default="all", description="Ticket channel filter.")+ assignees: list[ConversationsAssigneeFilter] = Field(+ default_factory=list,+ max_length=100,+ description=(+ "Only show tickets assigned to these users or roles. 'me' means the requesting user and 'unassigned' "+ "means tickets without an assignment. Empty shows all assignees."+ ),+ )+ search: str = Field(+ default="",+ max_length=200,+ description="Search requester name or email, ticket subject, message text, or ticket number.",+ )+ savedViewId: str | None = Field(+ default=None,+ max_length=12,+ description=(+ "short_id of a saved Support view to use as the source. When set, the saved view owns the ticket "+ "filters; the widget still sorts by most recently updated and applies its limit."+ ),+ )++ @field_validator("status")+ @classmethod+ def validate_status(cls, value: str) -> str:+ if value not in {*Status.values, "all"}:+ raise ValueError("Ticket status filter is invalid.")+ return value++ @field_validator("priorities")+ @classmethod+ def validate_priorities(cls, values: list[str]) -> list[str]:+ invalid_values = set(values).difference(Priority.values)+ if invalid_values:+ raise ValueError("Ticket priority filter is invalid.")+ return values++ @field_validator("channel")+ @classmethod+ def validate_channel(cls, value: str) -> str:+ if value not in {*Channel.values, "all"}:+ raise ValueError("Ticket channel filter is invalid.")+ return value++ @field_validator("savedViewId", mode="before")+ @classmethod+ def validate_saved_view_id(cls, value: object) -> str | None:+ if value is None or value == "":+ return None+ if not isinstance(value, str):+ raise ValueError("savedViewId must be a string.")+ return valuediff --git a/products/dashboards/backend/widget_specs/registry.py b/products/dashboards/backend/widget_specs/registry.pyindex aa8ac806ea47..8455c79ab790 100644--- a/products/dashboards/backend/widget_specs/registry.py+++ b/products/dashboards/backend/widget_specs/registry.py@@ -9,6 +9,7 @@ from rest_framework.exceptions import ValidationError as DRFValidationErrorfrom products.dashboards.backend.widget_specs.configs import (ACTIVITY_EVENTS_LIST_WIDGET_TYPE,+ CONVERSATIONS_RECENT_TICKETS_WIDGET_TYPE,ERROR_TRACKING_LIST_WIDGET_TYPE,EXPERIMENT_RESULTS_WIDGET_TYPE,EXPERIMENTS_LIST_WIDGET_TYPE,@@ -16,6 +17,7 @@ from products.dashboards.backend.widget_specs.configs import (SESSION_REPLAY_LIST_WIDGET_TYPE,SURVEY_RESULTS_WIDGET_TYPE,ActivityEventsListWidgetConfig,+ ConversationsRecentTicketsWidgetConfig,ErrorTrackingListWidgetConfig,ExperimentResultsWidgetConfig,ExperimentsListWidgetConfig,@@ -32,6 +34,7 @@ DashboardWidgetType = Literal["experiment_results","survey_results","logs_list",+ "conversations_recent_tickets",]__all__ = [@@ -109,6 +112,9 @@ def _load_widget_specs() -> dict[str, WidgetSpec]:from products.dashboards.backend.widgets.activity_events_list import ( # noqa: PLC0415run_activity_events_list_widget,)+ from products.dashboards.backend.widgets.conversations_recent_tickets import ( # noqa: PLC0415+ run_conversations_recent_tickets_widget,+ )from products.dashboards.backend.widgets.error_tracking_list import run_error_tracking_list_widget # noqa: PLC0415from products.dashboards.backend.widgets.experiment_results import run_experiment_results_widget # noqa: PLC0415from products.dashboards.backend.widgets.experiments_list import run_experiments_list_widget # noqa: PLC0415@@ -226,6 +232,21 @@ def _load_widget_specs() -> dict[str, WidgetSpec]:form_fields=("limit", "dateRange", "wrapLines", "timezone"),filter_fields=("severityLevels", "serviceNames"),),+ CONVERSATIONS_RECENT_TICKETS_WIDGET_TYPE: WidgetSpec(+ widget_type=CONVERSATIONS_RECENT_TICKETS_WIDGET_TYPE,+ config_model=ConversationsRecentTicketsWidgetConfig,+ query_fn=run_conversations_recent_tickets_widget,+ required_scopes=("ticket:read",),+ group_id="conversations",+ group_label="Support",+ label="Recent tickets",+ description="Most recently updated support tickets.",+ required_product_access="ticket",+ product_access_denied_message="You do not have access to support tickets.",+ availability_requirements=("conversations_enabled",),+ form_fields=("limit",),+ filter_fields=("status", "priorities", "channel", "assignees", "search"),+ ),}diff --git a/products/dashboards/backend/widgets/conversations_recent_tickets.py b/products/dashboards/backend/widgets/conversations_recent_tickets.pynew file mode 100644index 000000000000..38edb0d71ee4--- /dev/null+++ b/products/dashboards/backend/widgets/conversations_recent_tickets.py@@ -0,0 +1,118 @@+from __future__ import annotations++from typing import Any++from posthog.models.team import Team+from posthog.models.user import User+from posthog.rbac.user_access_control import UserAccessControl++from products.conversations.backend.api.ticket_filters import apply_ticket_filters, parse_stored_view_filters+from products.conversations.backend.models import Ticket, TicketView+from products.dashboards.backend.constants import MAX_WIDGET_RESULT_LIMIT+from products.dashboards.backend.widget_specs.configs import CONVERSATIONS_RECENT_TICKETS_WIDGET_TYPE+from products.dashboards.backend.widget_specs.registry import validate_widget_config+from products.dashboards.backend.widgets.list_widget import ListWidgetPage, run_list_widget+++def _string_trait(ticket: Ticket, key: str) -> str | None:+ value = ticket.anonymous_traits.get(key)+ return value if isinstance(value, str) else None+++def _serialize_ticket(ticket: Ticket) -> dict[str, Any]:+ assignment = getattr(ticket, "assignment", None)+ assignee = None+ if assignment is not None:+ assignee = {+ "user": (+ {"id": assignment.user.id, "name": assignment.user.first_name or assignment.user.email}+ if assignment.user+ else None+ ),+ "role": ({"id": assignment.role.id, "name": assignment.role.name} if assignment.role else None),+ }+ return {+ "id": str(ticket.id),+ "ticket_number": ticket.ticket_number,+ "channel_source": ticket.channel_source,+ "status": ticket.status,+ "priority": ticket.priority,+ "assignee": assignee,+ "updated_at": ticket.updated_at.isoformat(),+ "last_message_text": ticket.last_message_text,+ "unread_team_count": ticket.unread_team_count,+ "email_subject": ticket.email_subject,+ "requester_name": _string_trait(ticket, "name"),+ "requester_email": ticket.email_from or _string_trait(ticket, "email") or ticket.distinct_id,+ "sla_due_at": ticket.sla_due_at.isoformat() if ticket.sla_due_at else None,+ }+++def run_conversations_recent_tickets_widget(+ team: Team,+ config: dict[str, Any],+ user: User | None = None,+ *,+ include_total_count: bool = True,+) -> dict[str, Any]:+ typed_config = validate_widget_config(CONVERSATIONS_RECENT_TICKETS_WIDGET_TYPE, config)+ limit = typed_config["limit"]++ queryset = (+ Ticket.objects.filter(team=team)+ .select_related("assignment", "assignment__user", "assignment__role")+ .only(+ "id",+ "ticket_number",+ "channel_source",+ "status",+ "priority",+ "updated_at",+ "last_message_text",+ "unread_team_count",+ "email_subject",+ "email_from",+ "anonymous_traits",+ "distinct_id",+ "sla_due_at",+ "assignment__user__id",+ "assignment__user__first_name",+ "assignment__user__email",+ "assignment__user__is_active",+ "assignment__role__id",+ "assignment__role__name",+ )+ )+ if user is not None:+ queryset = UserAccessControl(user=user, team=team).filter_queryset_by_access_level(queryset)+ saved_view_id = typed_config.get("savedViewId")+ saved_view = TicketView.objects.filter(team=team, short_id=saved_view_id).first() if saved_view_id else None+ if saved_view is not None:+ filters = parse_stored_view_filters(saved_view.filters)+ else:+ filters = {}+ if typed_config["status"] != "all":+ filters["status"] = [typed_config["status"]]+ if typed_config["priorities"]:+ filters["priority"] = typed_config["priorities"]+ if typed_config["channel"] != "all":+ filters["channel"] = typed_config["channel"]+ if typed_config["assignees"]:+ filters["assignee"] = typed_config["assignees"]+ if typed_config["search"]:+ filters["search"] = typed_config["search"]+ filters["sorting"] = {"columnKey": "updated_at", "order": -1}+ queryset = apply_ticket_filters(queryset, filters, team=team, user=user)++ def fetch_page(page_limit: int) -> ListWidgetPage:+ rows = list(queryset[: page_limit + 1])+ return ListWidgetPage(results=rows[:page_limit], has_more=len(rows) > page_limit, next_offset=page_limit)++ return run_list_widget(+ limit=limit,+ count_cap=MAX_WIDGET_RESULT_LIMIT,+ include_total_count=include_total_count,+ fetch_page=fetch_page,+ transform_row=_serialize_ticket,+ log_key="conversations_recent_tickets_widget_total_count_failed",+ )diff --git a/products/dashboards/backend/widgets/test_conversations_recent_tickets.py b/products/dashboards/backend/widgets/test_conversations_recent_tickets.pynew file mode 100644index 000000000000..19cf2c697843--- /dev/null+++ b/products/dashboards/backend/widgets/test_conversations_recent_tickets.py@@ -0,0 +1,171 @@+from datetime import datetime, timedelta++from freezegun import freeze_time+from posthog.test.base import BaseTest++from django.utils import timezone++from parameterized import parameterized++from posthog.models import Team++from products.conversations.backend.models import Ticket, TicketAssignment, TicketView+from products.dashboards.backend.widget_availability import get_widget_feature_enabled+from products.dashboards.backend.widget_specs.registry import get_widget_registry_entry, validate_widget_config+++@freeze_time("2026-08-10 12:00:00")+class TestConversationsRecentTicketsWidget(BaseTest):+ @parameterized.expand(+ [+ ("invalid_user", {"type": "user", "id": "not-a-user-id"}),+ ("invalid_role", {"type": "role", "id": "not-a-role-id"}),+ ("boolean", {"type": "user", "id": True}),+ ]+ )+ def test_rejects_invalid_assignee_ids(self, _name: str, assignee: dict[str, str | bool]) -> None:+ with self.assertRaises(Exception):+ validate_widget_config("conversations_recent_tickets", {"assignees": [assignee]})++ def test_saved_view_id_validation_matches_ticket_view_short_id(self) -> None:+ validated = validate_widget_config("conversations_recent_tickets", {"savedViewId": "123456789012"})+ assert validated["savedViewId"] == "123456789012"++ with self.assertRaises(Exception):+ validate_widget_config("conversations_recent_tickets", {"savedViewId": "1234567890123"})++ def _ticket(+ self,+ number: int,+ status: str,+ updated_at_offset: int,+ *,+ priority: str | None = None,+ channel_source: str = "widget",+ anonymous_traits: dict[str, str] | None = None,+ sla_due_at: datetime | None = None,+ ) -> Ticket:+ ticket = Ticket.objects.create(+ team=self.team,+ ticket_number=number,+ widget_session_id=f"session-{number}",+ distinct_id=f"person-{number}",+ status=status,+ priority=priority,+ channel_source=channel_source,+ anonymous_traits=anonymous_traits or {},+ last_message_text=f"Message {number}",+ sla_due_at=sla_due_at,+ )+ Ticket.objects.filter(pk=ticket.pk).update(updated_at=timezone.now() + timedelta(minutes=updated_at_offset))+ ticket.refresh_from_db()+ return ticket++ def test_returns_recently_updated_tickets_with_status_filter(self) -> None:+ older_open = self._ticket(1, "open", 1)+ self._ticket(2, "resolved", 3)+ newer_open = self._ticket(3, "open", 2)++ entry = get_widget_registry_entry("conversations_recent_tickets")+ assert entry is not None+ result = entry["query_fn"](+ self.team,+ {"limit": 10, "status": "open"},+ self.user,+ )++ assert [row["id"] for row in result["results"]] == [str(newer_open.id), str(older_open.id)]++ def test_composes_priority_channel_assignee_and_requester_search_filters(self) -> None:+ sla_due_at = timezone.now() + timedelta(hours=4)+ matching = self._ticket(+ 1,+ "open",+ 1,+ priority="high",+ channel_source="email",+ anonymous_traits={"name": "Jordan Lee", "email": "[email protected]"},+ sla_due_at=sla_due_at,+ )+ TicketAssignment.objects.create(ticket=matching, user=self.user)+ self._ticket(+ 2,+ "open",+ 2,+ priority="low",+ channel_source="email",+ anonymous_traits={"email": "[email protected]"},+ )++ entry = get_widget_registry_entry("conversations_recent_tickets")+ assert entry is not None+ with self.assertNumQueries(1):+ result = entry["query_fn"](+ self.team,+ {+ "limit": 10,+ "status": "all",+ "priorities": ["high"],+ "channel": "email",+ "assignees": [{"type": "user", "id": self.user.id}],+ "search": "[email protected]",+ },+ None,+ )++ assert [row["id"] for row in result["results"]] == [str(matching.id)]+ assert result["results"][0]["assignee"]["user"]["id"] == self.user.id+ assert result["results"][0]["requester_name"] == "Jordan Lee"+ assert result["results"][0]["requester_email"] == "[email protected]"+ assert result["results"][0]["sla_due_at"] == sla_due_at.isoformat()++ def test_saved_view_owns_filters_and_keeps_recent_ordering(self) -> None:+ older_high = self._ticket(1, "open", 1, priority="high")+ self._ticket(2, "resolved", 3, priority="high")+ newer_high = self._ticket(3, "open", 2, priority="high")+ view = TicketView.objects.create(+ team=self.team,+ name="High priority open tickets",+ filters={+ "status": ["open"],+ "priority": ["high"],+ "sorting": {"columnKey": "ticket_number", "order": 1},+ },+ )++ entry = get_widget_registry_entry("conversations_recent_tickets")+ assert entry is not None+ result = entry["query_fn"](+ self.team,+ {"limit": 10, "status": "resolved", "savedViewId": view.short_id},+ self.user,+ )++ assert [row["id"] for row in result["results"]] == [str(newer_high.id), str(older_high.id)]++ def test_missing_or_cross_team_saved_view_falls_back_to_direct_filters(self) -> None:+ matching = self._ticket(1, "open", 1)+ self._ticket(2, "resolved", 2)+ other_team = Team.objects.create(organization=self.organization, name="Other team")+ other_view = TicketView.objects.create(+ team=other_team,+ name="Other project view",+ filters={"status": ["resolved"]},+ )++ entry = get_widget_registry_entry("conversations_recent_tickets")+ assert entry is not None+ result = entry["query_fn"](+ self.team,+ {"limit": 10, "status": "open", "savedViewId": other_view.short_id},+ self.user,+ )++ assert [row["id"] for row in result["results"]] == [str(matching.id)]++ def test_reports_conversations_availability(self) -> None:+ self.team.conversations_enabled = False+ assert get_widget_feature_enabled("conversations_recent_tickets", self.team) is False++ self.team.conversations_enabled = True+ assert get_widget_feature_enabled("conversations_recent_tickets", self.team) is Truediff --git a/products/dashboards/frontend/components/DashboardLoadingState/DashboardLoadingState.tsx b/products/dashboards/frontend/components/DashboardLoadingState/DashboardLoadingState.tsxindex 11267bacdcb1..096af3dc8ff1 100644--- a/products/dashboards/frontend/components/DashboardLoadingState/DashboardLoadingState.tsx+++ b/products/dashboards/frontend/components/DashboardLoadingState/DashboardLoadingState.tsx@@ -17,7 +17,7 @@ export function DashboardLoadingState(): JSX.Element {</div><div className="grid grid-cols-1 gap-4 lg:grid-cols-2">{Array.from({ length: 8 }, (_, index) => (- <div key={index} className="border rounded bg-surface-primary p-4 min-h-64">+ <div key={index} className="border rounded bg-surface-primary p-4 min-h-96"><div className="flex items-center justify-between gap-4 mb-6"><LemonSkeleton className="h-4 w-2/5" /><LemonSkeleton className="h-8 w-8 rounded" />diff --git a/products/dashboards/frontend/components/DashboardWidgetItem/DashboardWidgetItem.test.tsx b/products/dashboards/frontend/components/DashboardWidgetItem/DashboardWidgetItem.test.tsxindex 1847e5a35ee4..6fd55041a4e6 100644--- a/products/dashboards/frontend/components/DashboardWidgetItem/DashboardWidgetItem.test.tsx+++ b/products/dashboards/frontend/components/DashboardWidgetItem/DashboardWidgetItem.test.tsx@@ -27,6 +27,7 @@ jest.mock('lib/utils/accessControlUtils', () => ({jest.mock('../../widgetProductAccess', () => ({userHasDashboardWidgetProductAccess: jest.fn(() => true),+ userCanMutateConversationsTicketsOnDashboard: jest.fn(() => true),userCanMutateErrorTrackingIssuesOnDashboard: jest.fn(() => true),}))diff --git a/products/dashboards/frontend/components/DashboardWidgetItem/DashboardWidgetItem.tsx b/products/dashboards/frontend/components/DashboardWidgetItem/DashboardWidgetItem.tsxindex b53fd042a4c8..430dc0a11ef3 100644--- a/products/dashboards/frontend/components/DashboardWidgetItem/DashboardWidgetItem.tsx+++ b/products/dashboards/frontend/components/DashboardWidgetItem/DashboardWidgetItem.tsx@@ -24,6 +24,7 @@ import {} from '../../widget_types/catalog'import { useWidgetAvailability } from '../../widget_types/widgetAvailability'import {+ userCanMutateConversationsTicketsOnDashboard,userCanMutateErrorTrackingIssuesOnDashboard,userHasDashboardWidgetProductAccess,} from '../../widgetProductAccess'@@ -188,6 +189,7 @@ function DashboardWidgetItemContent({}: undefined,canMutateErrorTrackingIssues: userCanMutateErrorTrackingIssuesOnDashboard(!!canEditDashboard),+ canMutateConversationsTickets: userCanMutateConversationsTicketsOnDashboard(!!canEditDashboard),onUpdateConfig: canUpdateWidgetTileConfig? async (config) => {await onUpdateWidgetTile({ config })diff --git a/products/dashboards/frontend/components/WidgetAvailabilitySetupPrompt/WidgetAvailabilitySetupPrompt.tsx b/products/dashboards/frontend/components/WidgetAvailabilitySetupPrompt/WidgetAvailabilitySetupPrompt.tsxindex 792e053dee6b..caa2d4342f29 100644--- a/products/dashboards/frontend/components/WidgetAvailabilitySetupPrompt/WidgetAvailabilitySetupPrompt.tsx+++ b/products/dashboards/frontend/components/WidgetAvailabilitySetupPrompt/WidgetAvailabilitySetupPrompt.tsx@@ -2,6 +2,10 @@ import posthog from 'posthog-js'import { LemonButton } from '@posthog/lemon-ui'+import { cn } from 'lib/utils/css-classes'++import { SupportActivationButton } from 'products/conversations/frontend/components/ConversationsDisabledBanner'+import type { WidgetAvailabilityConfig } from '../../widget_types/widgetAvailability'import { WIDGET_AVAILABILITY_PRESENTATION } from '../../widget_types/widgetAvailability'import { WidgetCardContent } from '../WidgetCard/WidgetCardBody'@@ -23,11 +27,17 @@ export function WidgetAvailabilitySetupPrompt({dashboardId,}: WidgetAvailabilitySetupPromptProps): JSX.Element {const presentation = WIDGET_AVAILABILITY_PRESENTATION[availability.requirement]+ const isSupport = availability.requirement === 'conversations_enabled'return (- <WidgetCardContent className={className}>+ <WidgetCardContent+ className={cn(className, availability.compactSetupPrompt && 'flex items-center justify-center')}+ ><WidgetCardProductIntroductionstacked+ hogClassName={availability.compactSetupPrompt ? 'w-16 sm:w-16 lg:w-16 mb-0' : undefined}+ introductionClassName={availability.compactSetupPrompt ? 'border-none mb-0 mt-0 p-2' : undefined}+ contentClassName={availability.compactSetupPrompt ? 'max-w-2xl' : undefined}className="border-none mb-0 mt-0 p-4"productName={presentation.productName}productKey={presentation.productKey}@@ -38,20 +48,38 @@ export function WidgetAvailabilitySetupPrompt({docsURL={availability.docsHref}actionElementOverride={<div className="flex flex-col items-center gap-4">- <LemonButton- type="primary"- to={presentation.settingsUrl}- onClick={() => {- posthog.capture('dashboard widget cross product activated', {- widget_type: widgetType,- widget_id: widgetId,- dashboard_id: dashboardId,- cta: availability.requirement,- })- }}- >- {availability.setupActionLabel}- </LemonButton>+ {isSupport ? (+ <SupportActivationButton+ source="dashboard_widget"+ className="flex"+ widgetType={widgetType}+ widgetId={widgetId}+ dashboardId={dashboardId}+ onClick={() => {+ posthog.capture('dashboard widget cross product activated', {+ widget_type: widgetType,+ widget_id: widgetId,+ dashboard_id: dashboardId,+ cta: availability.requirement,+ })+ }}+ />+ ) : (+ <LemonButton+ type="primary"+ to={presentation.settingsUrl}+ onClick={() => {+ posthog.capture('dashboard widget cross product activated', {+ widget_type: widgetType,+ widget_id: widgetId,+ dashboard_id: dashboardId,+ cta: availability.requirement,+ })+ }}+ >+ {availability.setupActionLabel}+ </LemonButton>+ )}</div>}/>diff --git a/products/dashboards/frontend/components/WidgetCard/WidgetCardBody.tsx b/products/dashboards/frontend/components/WidgetCard/WidgetCardBody.tsxindex 4c496fb430dd..03c3d4af3841 100644--- a/products/dashboards/frontend/components/WidgetCard/WidgetCardBody.tsx+++ b/products/dashboards/frontend/components/WidgetCard/WidgetCardBody.tsx@@ -236,6 +236,7 @@ export const WIDGET_LIST_COUNT_ISSUES: WidgetListCountNoun = { singular: 'issue'export const WIDGET_LIST_COUNT_RECORDINGS: WidgetListCountNoun = { singular: 'recording', plural: 'recordings' }export const WIDGET_LIST_COUNT_EXPERIMENTS: WidgetListCountNoun = { singular: 'experiment', plural: 'experiments' }export const WIDGET_LIST_COUNT_LOGS: WidgetListCountNoun = { singular: 'log line', plural: 'log lines' }+export const WIDGET_LIST_COUNT_TICKETS: WidgetListCountNoun = { singular: 'ticket', plural: 'tickets' }export function formatWidgetListCountFooter(shown: number,diff --git a/products/dashboards/frontend/components/WidgetCard/index.ts b/products/dashboards/frontend/components/WidgetCard/index.tsindex 291d243e60b2..704a8132672e 100644--- a/products/dashboards/frontend/components/WidgetCard/index.ts+++ b/products/dashboards/frontend/components/WidgetCard/index.ts@@ -13,6 +13,7 @@ export {WIDGET_LIST_COUNT_ISSUES,WIDGET_LIST_COUNT_LOGS,WIDGET_LIST_COUNT_RECORDINGS,+ WIDGET_LIST_COUNT_TICKETS,WidgetLoadingState,} from './WidgetCardBody'export {diff --git a/products/dashboards/frontend/components/WidgetCard/widgetCardStoryFixtures.tsx b/products/dashboards/frontend/components/WidgetCard/widgetCardStoryFixtures.tsxindex 259847539008..a3e79dce4863 100644--- a/products/dashboards/frontend/components/WidgetCard/widgetCardStoryFixtures.tsx+++ b/products/dashboards/frontend/components/WidgetCard/widgetCardStoryFixtures.tsx@@ -120,3 +120,15 @@ export function withSessionReplayProjectState(enabled: boolean): Decorator {return <Story />}}++/** Configured = Support enabled for the project. Unconfigured = availability setup prompt. */+export function withConversationsProjectState(enabled: boolean): Decorator {+ return (Story: React.ComponentType): JSX.Element => {+ teamLogic.mount()+ teamLogic.actions.loadCurrentTeamSuccess({+ ...MOCK_DEFAULT_TEAM,+ conversations_enabled: enabled,+ })+ return <Story />+ }+}diff --git a/products/dashboards/frontend/components/WidgetCard/widgetOverviewStoryFixtures.ts b/products/dashboards/frontend/components/WidgetCard/widgetOverviewStoryFixtures.tsindex 41ffe5f8c486..2cfce4755a08 100644--- a/products/dashboards/frontend/components/WidgetCard/widgetOverviewStoryFixtures.ts+++ b/products/dashboards/frontend/components/WidgetCard/widgetOverviewStoryFixtures.ts@@ -1,6 +1,7 @@import type { DashboardWidgetCatalogKey } from '../../widget_types/catalog'import { getDashboardWidgetCatalogEntry } from '../../widget_types/catalog'import { activityEventsSampleEvents } from '../../widgets/activity/activityEventsSampleData'+import type { ConversationsWidgetTicket } from '../../widgets/conversations/conversationsWidgetUtils'import { logsWidgetSampleLogLines } from '../../widgets/logs/logsWidgetSampleData'export type WidgetOverviewDemoState = {@@ -152,6 +153,101 @@ export const sessionReplaySampleRecordings = [},]+export const conversationsSampleTickets: ConversationsWidgetTicket[] = [+ {+ id: 'ticket-1',+ ticket_number: 124,+ channel_source: 'email',+ status: 'new',+ priority: 'critical',+ assignee: null,+ updated_at: '2026-05-26T13:58:00Z',+ last_message_text:+ "I can't invite a teammate to our project. The invite link opens, but the page returns to the project settings without adding them.",+ unread_team_count: 1,+ email_subject: null,+ requester_name: 'Jordan Lee',+ requester_email: '[email protected]',+ sla_due_at: '2026-05-26T14:30:00Z',+ },+ {+ id: 'ticket-2',+ ticket_number: 123,+ channel_source: 'slack',+ status: 'open',+ priority: 'high',+ assignee: { user: null, role: { id: 'role-support', name: 'Support team' } },+ updated_at: '2026-05-26T09:15:00Z',+ last_message_text: 'Thanks, that restored the dashboard.',+ unread_team_count: 0,+ email_subject: null,+ requester_name: 'Morgan Chen',+ requester_email: '[email protected]',+ sla_due_at: '2026-05-26T13:30:00Z',+ },+ {+ id: 'ticket-3',+ ticket_number: 121,+ channel_source: 'widget',+ status: 'pending',+ priority: 'medium',+ assignee: null,+ updated_at: '2026-05-25T14:00:00Z',+ last_message_text: 'The Android SDK reports duplicate screen views',+ unread_team_count: 1,+ email_subject: null,+ requester_name: null,+ requester_email: '[email protected]',+ sla_due_at: '2026-05-28T10:00:00Z',+ },+ {+ id: 'ticket-4',+ ticket_number: 119,+ channel_source: 'email',+ status: 'resolved',+ priority: 'low',+ assignee: { user: { id: 2, name: 'Alex Kim' }, role: null },+ updated_at: '2026-05-24T18:30:00Z',+ last_message_text: 'That fixed the authorized domain. Thank you!',+ unread_team_count: 0,+ email_subject: 'Update the authorized domain',+ requester_name: 'Taylor Brooks',+ requester_email: '[email protected]',+ sla_due_at: null,+ },+ {+ id: 'ticket-5',+ ticket_number: 118,+ channel_source: 'widget',+ status: 'open',+ priority: 'low',+ assignee: { user: { id: 2, name: 'Alex Kim' }, role: null },+ updated_at: '2026-05-25T11:20:00Z',+ last_message_text:+ 'We are still evaluating the new billing flow. Can you explain how usage limits apply when several teams send events to the same project?',+ unread_team_count: 2,+ email_subject: 'Question about usage limits',+ requester_name: 'Pat Garcia',+ requester_email: '[email protected]',+ sla_due_at: '2026-05-28T10:00:00Z',+ },+ {+ id: 'ticket-6',+ ticket_number: 117,+ channel_source: 'email',+ status: 'on_hold',+ priority: 'medium',+ assignee: { user: null, role: { id: 'role-support', name: 'Support team' } },+ updated_at: '2026-05-24T18:30:00Z',+ last_message_text: "We'll review the export and follow up.",+ unread_team_count: 0,+ email_subject: 'Requested audit log export',+ requester_name: 'Robin Patel',+ requester_email: '[email protected]',+ sla_due_at: null,+ },+]+export const experimentsSampleListRows = [{id: 101,@@ -437,6 +533,19 @@ export function getWidgetOverviewDemoState(catalogKey: DashboardWidgetCatalogKeytotalCountCapped: true,},}+ case 'conversations_recent_tickets':+ return {+ title: defaultTitle,+ description: catalogEntry.description,+ showDescription: true,+ config: defaultConfig,+ loading: false,+ result: {+ results: conversationsSampleTickets,+ hasMore: true,+ totalCount: 12,+ },+ }default: {const exhaustiveCheck: never = catalogKeyreturn exhaustiveCheckdiff --git a/products/dashboards/frontend/components/WidgetCardProductIntroduction/WidgetCardProductIntroduction.tsx b/products/dashboards/frontend/components/WidgetCardProductIntroduction/WidgetCardProductIntroduction.tsxindex 8672f2fbd08e..383d3e9a232f 100644--- a/products/dashboards/frontend/components/WidgetCardProductIntroduction/WidgetCardProductIntroduction.tsx+++ b/products/dashboards/frontend/components/WidgetCardProductIntroduction/WidgetCardProductIntroduction.tsx@@ -12,6 +12,7 @@ type WidgetCardProductIntroductionProps = Omit<> & {/** Hog above copy at all tile widths (disables responsive side-by-side layout). */stacked?: boolean+ introductionClassName?: string}/**@@ -23,6 +24,7 @@ export function WidgetCardProductIntroduction({className,contentClassName,stacked,+ introductionClassName,...props}: WidgetCardProductIntroductionProps): JSX.Element | null {const isStacked = stacked ?? className?.includes('WidgetCardProductIntroduction--stacked')@@ -37,6 +39,7 @@ export function WidgetCardProductIntroduction({><ProductIntroduction{...props}+ className={introductionClassName}contentClassName={cn('max-w-none', contentClassName)}hogLayout={isStacked ? 'vertical' : 'responsive'}/>diff --git a/products/dashboards/frontend/components/WidgetRuntimeAvailabilityGuard/WidgetRuntimeAvailabilityGuard.test.tsx b/products/dashboards/frontend/components/WidgetRuntimeAvailabilityGuard/WidgetRuntimeAvailabilityGuard.test.tsxindex ff1fe1228028..c63f45a61200 100644--- a/products/dashboards/frontend/components/WidgetRuntimeAvailabilityGuard/WidgetRuntimeAvailabilityGuard.test.tsx+++ b/products/dashboards/frontend/components/WidgetRuntimeAvailabilityGuard/WidgetRuntimeAvailabilityGuard.test.tsx@@ -2,7 +2,8 @@ import { MOCK_DEFAULT_TEAM } from 'lib/api.mock'import '@testing-library/jest-dom'-import { cleanup, render, screen } from '@testing-library/react'+import { cleanup, fireEvent, render, screen } from '@testing-library/react'+import posthog from 'posthog-js'import { initKeaTests } from '~/test/init'@@ -17,6 +18,14 @@ const availability: WidgetAvailabilityConfig = {docsHref: 'https://posthog.com/docs/error-tracking/installation',}+const supportAvailability: WidgetAvailabilityConfig = {+ requirement: 'conversations_enabled',+ unavailableTitle: 'Keep customer conversations close to your product data',+ unavailableReason: 'Triage and respond to customer questions with the context you need to solve them.',+ setupActionLabel: 'Enable',+ docsHref: 'https://posthog.com/docs/support',+}+describe('WidgetRuntimeAvailabilityGuard', () => {afterEach(() => {cleanup()@@ -78,4 +87,35 @@ describe('WidgetRuntimeAvailabilityGuard', () => {expect(screen.getByText('Custom setup for exception_autocapture')).toBeInTheDocument()expect(screen.queryByText('Widget body')).not.toBeInTheDocument()})++ it('tracks Support activation from the widget setup state', () => {+ initKeaTests(true, { ...MOCK_DEFAULT_TEAM, conversations_enabled: false })+ jest.mocked(posthog.capture).mockClear()++ render(+ <WidgetRuntimeAvailabilityGuard+ availability={supportAvailability}+ widgetType="conversations_recent_tickets"+ widgetId="widget-1"+ dashboardId={1}+ >+ <div>Widget body</div>+ </WidgetRuntimeAvailabilityGuard>+ )++ fireEvent.click(screen.getByText('Enable'))++ expect(posthog.capture).toHaveBeenCalledWith('support activation started', {+ source: 'dashboard_widget',+ widget_type: 'conversations_recent_tickets',+ widget_id: 'widget-1',+ dashboard_id: 1,+ })+ expect(posthog.capture).toHaveBeenCalledWith('dashboard widget cross product activated', {+ widget_type: 'conversations_recent_tickets',+ widget_id: 'widget-1',+ dashboard_id: 1,+ cta: 'conversations_enabled',+ })+ })})diff --git a/products/dashboards/frontend/generated/api.schemas.ts b/products/dashboards/frontend/generated/api.schemas.tsindex 6ac6c02f42d2..c13144bfcc44 100644--- a/products/dashboards/frontend/generated/api.schemas.ts+++ b/products/dashboards/frontend/generated/api.schemas.ts@@ -415,6 +415,7 @@ export interface DashboardFiltersOpenApiApi {/*** * `activity_events_list` - activity_events_list+ * * `conversations_recent_tickets` - conversations_recent_tickets* * `error_tracking_list` - error_tracking_list* * `experiment_results` - experiment_results* * `experiments_list` - experiments_list@@ -427,6 +428,7 @@ export type DashboardPatchWidgetOpenApiWidgetTypeEnumApi =export const DashboardPatchWidgetOpenApiWidgetTypeEnumApi = {ActivityEventsList: 'activity_events_list',+ ConversationsRecentTickets: 'conversations_recent_tickets',ErrorTrackingList: 'error_tracking_list',ExperimentResults: 'experiment_results',ExperimentsList: 'experiments_list',@@ -798,6 +800,73 @@ export interface LogsListWidgetConfigApi {savedViewId?: string | null}+/**+ * Ticket status filter.+ */+export type ConversationsRecentTicketsWidgetConfigApiStatus =+ (typeof ConversationsRecentTicketsWidgetConfigApiStatus)[keyof typeof ConversationsRecentTicketsWidgetConfigApiStatus]++export const ConversationsRecentTicketsWidgetConfigApiStatus = {+ New: 'new',+ Open: 'open',+ Pending: 'pending',+ OnHold: 'on_hold',+ Resolved: 'resolved',+ All: 'all',+} as const++export type ConversationsRecentTicketsWidgetConfigApiPrioritiesItem =+ (typeof ConversationsRecentTicketsWidgetConfigApiPrioritiesItem)[keyof typeof ConversationsRecentTicketsWidgetConfigApiPrioritiesItem]++export const ConversationsRecentTicketsWidgetConfigApiPrioritiesItem = {+ Low: 'low',+ Medium: 'medium',+ High: 'high',+ Critical: 'critical',+} as const++/**+ * Ticket channel filter.+ */+export type ConversationsRecentTicketsWidgetConfigApiChannel =+ (typeof ConversationsRecentTicketsWidgetConfigApiChannel)[keyof typeof ConversationsRecentTicketsWidgetConfigApiChannel]++export const ConversationsRecentTicketsWidgetConfigApiChannel = {+ Widget: 'widget',+ Email: 'email',+ Slack: 'slack',+ Teams: 'teams',+ Github: 'github',+ All: 'all',+} as const++export interface ConversationsRecentTicketsWidgetConfigApi {+ /**+ * Maximum number of tickets to return.+ * @minimum 1+ * @maximum 25+ */+ limit?: number+ /** Ticket status filter. */+ status?: ConversationsRecentTicketsWidgetConfigApiStatus+ /** Only show tickets with these priorities. Empty shows all priorities. */+ priorities?: ConversationsRecentTicketsWidgetConfigApiPrioritiesItem[]+ /** Ticket channel filter. */+ channel?: ConversationsRecentTicketsWidgetConfigApiChannel+ /**+ * Only show tickets assigned to these users or roles. 'me' means the requesting user and 'unassigned' means tickets without an assignment. Empty shows all assignees.+ * @maxItems 100+ */+ assignees?: ('me' | 'unassigned' | WidgetAssigneeFilterApi)[]+ /**+ * Search requester name or email, ticket subject, message text, or ticket number.+ * @maxLength 200+ */+ search?: string+ /** short_id of a saved Support view to use as the source. When set, the saved view owns the ticket filters; the widget still sorts by most recently updated and applies its limit. */+ savedViewId?: string | null+}+export type DashboardWidgetConfigApi =| ActivityEventsListWidgetConfigApi| ErrorTrackingListWidgetConfigApi@@ -806,6 +875,7 @@ export type DashboardWidgetConfigApi =| ExperimentResultsWidgetConfigApi| SurveyResultsWidgetConfigApi| LogsListWidgetConfigApi+ | ConversationsRecentTicketsWidgetConfigApiexport interface DashboardPatchWidgetOpenApiApi {/** Existing widget row ID when updating a widget tile via dashboard PATCH. */@@ -813,6 +883,7 @@ export interface DashboardPatchWidgetOpenApiApi {/** Widget type identifier (cannot be changed on update).** * `activity_events_list` - activity_events_list+ * * `conversations_recent_tickets` - conversations_recent_tickets* * `error_tracking_list` - error_tracking_list* * `experiment_results` - experiment_results* * `experiments_list` - experiments_list@@ -9091,6 +9162,31 @@ export interface LogsListWidgetAddRequestOpenApiApi {config: LogsListWidgetConfigApi}+export type ConversationsRecentTicketsWidgetAddRequestOpenApiApiWidgetType =+ (typeof ConversationsRecentTicketsWidgetAddRequestOpenApiApiWidgetType)[keyof typeof ConversationsRecentTicketsWidgetAddRequestOpenApiApiWidgetType]++export const ConversationsRecentTicketsWidgetAddRequestOpenApiApiWidgetType = {+ ConversationsRecentTickets: 'conversations_recent_tickets',+} as const++export interface ConversationsRecentTicketsWidgetAddRequestOpenApiApi {+ /**+ * Optional custom display name for the widget tile.+ * @maxLength 400+ * @nullable+ */+ name?: string | null+ /** Optional markdown description shown when show_description is enabled. */+ description?: string+ /** Optional react-grid-layout positions keyed by breakpoint (sm, xs). */+ layouts?: _WidgetTileLayoutsOpenApiApi+ /** Whether to show the description on the dashboard tile. */+ show_description?: boolean+ widget_type: ConversationsRecentTicketsWidgetAddRequestOpenApiApiWidgetType+ /** Configuration for the recent tickets widget. */+ config: ConversationsRecentTicketsWidgetConfigApi+}+export type AddDashboardWidgetRequestApi =| ActivityEventsListWidgetAddRequestOpenApiApi| ErrorTrackingListWidgetAddRequestOpenApiApi@@ -9099,13 +9195,14 @@ export type AddDashboardWidgetRequestApi =| ExperimentResultsWidgetAddRequestOpenApiApi| SurveyResultsWidgetAddRequestOpenApiApi| LogsListWidgetAddRequestOpenApiApi+ | ConversationsRecentTicketsWidgetAddRequestOpenApiApi/*** OpenAPI-only batch-add schema with widget_type-discriminated config shapes for agents.*/export interface AddDashboardWidgetsBatchRequestOpenApiApi {/**- * Widget tiles to add atomically. Supported widget_type values: activity_events_list, error_tracking_list, experiment_results, experiments_list, logs_list, session_replay_list, survey_results. Use dashboard-widget-catalog-list for per-type config_schema documentation. (1–10 per request).+ * Widget tiles to add atomically. Supported widget_type values: activity_events_list, conversations_recent_tickets, error_tracking_list, experiment_results, experiments_list, logs_list, session_replay_list, survey_results. Use dashboard-widget-catalog-list for per-type config_schema documentation. (1–10 per request).* @minItems 1* @maxItems 10*/@@ -9278,6 +9375,29 @@ export interface LogsListWidgetUpdateRequestOpenApiApi {config?: LogsListWidgetConfigApi}+export type ConversationsRecentTicketsWidgetUpdateRequestOpenApiApiWidgetType =+ (typeof ConversationsRecentTicketsWidgetUpdateRequestOpenApiApiWidgetType)[keyof typeof ConversationsRecentTicketsWidgetUpdateRequestOpenApiApiWidgetType]++export const ConversationsRecentTicketsWidgetUpdateRequestOpenApiApiWidgetType = {+ ConversationsRecentTickets: 'conversations_recent_tickets',+} as const++export interface ConversationsRecentTicketsWidgetUpdateRequestOpenApiApi {+ /** ID of the widget tile to update. Use dashboard-get to look up widget tile IDs. */+ tile_id: number+ /**+ * New display name for the widget. Empty string or null clears it; omit to leave unchanged.+ * @maxLength 400+ * @nullable+ */+ name?: string | null+ /** New markdown description for the widget. Omit to leave unchanged. */+ description?: string+ widget_type: ConversationsRecentTicketsWidgetUpdateRequestOpenApiApiWidgetType+ /** New configuration for the recent tickets widget. Omit to leave unchanged. */+ config?: ConversationsRecentTicketsWidgetConfigApi+}+export type UpdateDashboardWidgetRequestApi =| ActivityEventsListWidgetUpdateRequestOpenApiApi| ErrorTrackingListWidgetUpdateRequestOpenApiApi@@ -9286,6 +9406,7 @@ export type UpdateDashboardWidgetRequestApi =| ExperimentResultsWidgetUpdateRequestOpenApiApi| SurveyResultsWidgetUpdateRequestOpenApiApi| LogsListWidgetUpdateRequestOpenApiApi+ | ConversationsRecentTicketsWidgetUpdateRequestOpenApiApi/*** OpenAPI-only batch-update schema with widget_type-discriminated config shapes for agents.@@ -9495,6 +9616,27 @@ export interface LogsListWidgetCatalogEntryOpenApiApi {live: boolean}+export type ConversationsRecentTicketsWidgetCatalogEntryOpenApiApiWidgetType =+ (typeof ConversationsRecentTicketsWidgetCatalogEntryOpenApiApiWidgetType)[keyof typeof ConversationsRecentTicketsWidgetCatalogEntryOpenApiApiWidgetType]++export const ConversationsRecentTicketsWidgetCatalogEntryOpenApiApiWidgetType = {+ ConversationsRecentTickets: 'conversations_recent_tickets',+} as const++export interface ConversationsRecentTicketsWidgetCatalogEntryOpenApiApi {+ widget_type: ConversationsRecentTicketsWidgetCatalogEntryOpenApiApiWidgetType+ group_id: string+ group_label: string+ label: string+ description: string+ /** OpenAPI config shape for this widget type (documentation; matches batch-add/PATCH schemas). */+ readonly config_schema: ConversationsRecentTicketsWidgetConfigApi+ /** @nullable */+ required_product_access?: string | null+ /** Whether tiles of this type self-update in real time after load. Live tiles show a fixed real-time window and cannot apply test-account filtering to the stream, so their config takes neither dateRange nor filterTestAccounts. */+ live: boolean+}+export type WidgetCatalogEntryApi =| ActivityEventsListWidgetCatalogEntryOpenApiApi| ErrorTrackingListWidgetCatalogEntryOpenApiApi@@ -9503,6 +9645,7 @@ export type WidgetCatalogEntryApi =| ExperimentResultsWidgetCatalogEntryOpenApiApi| SurveyResultsWidgetCatalogEntryOpenApiApi| LogsListWidgetCatalogEntryOpenApiApi+ | ConversationsRecentTicketsWidgetCatalogEntryOpenApiApiexport interface WidgetCatalogResponseApi {/** Registered dashboard widget types available when dashboard-widgets is enabled. */@@ -9609,6 +9752,16 @@ export const LogsListWidgetTypeEnumApi = {LogsList: 'logs_list',} as const+/**+ * * `conversations_recent_tickets` - conversations_recent_tickets+ */+export type ConversationsRecentTicketsWidgetTypeEnumApi =+ (typeof ConversationsRecentTicketsWidgetTypeEnumApi)[keyof typeof ConversationsRecentTicketsWidgetTypeEnumApi]++export const ConversationsRecentTicketsWidgetTypeEnumApi = {+ ConversationsRecentTickets: 'conversations_recent_tickets',+} as const+export type DashboardTemplatesListParams = {/*** Omit for all templates. When set, filter by featured flag; parsed with str_to_bool (same as other API query booleans).diff --git a/products/dashboards/frontend/generated/api.zod.ts b/products/dashboards/frontend/generated/api.zod.tsindex bc52d603b05d..1fdc2339b555 100644--- a/products/dashboards/frontend/generated/api.zod.ts+++ b/products/dashboards/frontend/generated/api.zod.ts@@ -258,6 +258,18 @@ export const dashboardsPartialUpdateBodyTilesItemWidgetOneConfigOneSevenLimitMaxexport const dashboardsPartialUpdateBodyTilesItemWidgetOneConfigOneSevenOrderByDefault = `latest`export const dashboardsPartialUpdateBodyTilesItemWidgetOneConfigOneSevenWrapLinesDefault = falseexport const dashboardsPartialUpdateBodyTilesItemWidgetOneConfigOneSevenTimezoneDefault = `UTC`+export const dashboardsPartialUpdateBodyTilesItemWidgetOneConfigOneEightLimitDefault = 10+export const dashboardsPartialUpdateBodyTilesItemWidgetOneConfigOneEightLimitMax = 25++export const dashboardsPartialUpdateBodyTilesItemWidgetOneConfigOneEightStatusDefault = `all`+export const dashboardsPartialUpdateBodyTilesItemWidgetOneConfigOneEightChannelDefault = `all`+export const dashboardsPartialUpdateBodyTilesItemWidgetOneConfigOneEightAssigneesMax = 100++export const dashboardsPartialUpdateBodyTilesItemWidgetOneConfigOneEightSearchDefault = ``+export const dashboardsPartialUpdateBodyTilesItemWidgetOneConfigOneEightSearchMax = 200++export const dashboardsPartialUpdateBodyTilesItemWidgetOneConfigOneEightSavedViewIdOneMax = 12+export const dashboardsPartialUpdateBodyTilesItemWidgetOneNameMax = 400export const dashboardsPartialUpdateBodyDeleteInsightsDefault = false@@ -316,6 +328,7 @@ export const DashboardsPartialUpdateBody = /* @__PURE__ */ zodwidget_type: zod.enum(['activity_events_list',+ 'conversations_recent_tickets','error_tracking_list','experiment_results','experiments_list',@@ -324,11 +337,11 @@ export const DashboardsPartialUpdateBody = /* @__PURE__ */ zod'survey_results',]).describe(- '\* `activity_events_list` - activity_events_list\n\* `error_tracking_list` - error_tracking_list\n\* `experiment_results` - experiment_results\n\* `experiments_list` - experiments_list\n\* `logs_list` - logs_list\n\* `session_replay_list` - session_replay_list\n\* `survey_results` - survey_results'+ '\* `activity_events_list` - activity_events_list\n\* `conversations_recent_tickets` - conversations_recent_tickets\n\* `error_tracking_list` - error_tracking_list\n\* `experiment_results` - experiment_results\n\* `experiments_list` - experiments_list\n\* `logs_list` - logs_list\n\* `session_replay_list` - session_replay_list\n\* `survey_results` - survey_results').optional().describe(- 'Widget type identifier (cannot be changed on update).\n\n\* `activity_events_list` - activity_events_list\n\* `error_tracking_list` - error_tracking_list\n\* `experiment_results` - experiment_results\n\* `experiments_list` - experiments_list\n\* `logs_list` - logs_list\n\* `session_replay_list` - session_replay_list\n\* `survey_results` - survey_results'+ 'Widget type identifier (cannot be changed on update).\n\n\* `activity_events_list` - activity_events_list\n\* `conversations_recent_tickets` - conversations_recent_tickets\n\* `error_tracking_list` - error_tracking_list\n\* `experiment_results` - experiment_results\n\* `experiments_list` - experiments_list\n\* `logs_list` - logs_list\n\* `session_replay_list` - session_replay_list\n\* `survey_results` - survey_results'),config: zod.union([@@ -927,6 +940,73 @@ export const DashboardsPartialUpdateBody = /* @__PURE__ */ zod'short_id of a saved logs view to use as the source. When set, the saved view owns the date range, severity, service, and property filters; only orderBy and limit still apply.'),}),+ zod.object({+ limit: zod+ .number()+ .min(1)+ .max(dashboardsPartialUpdateBodyTilesItemWidgetOneConfigOneEightLimitMax)+ .default(+ dashboardsPartialUpdateBodyTilesItemWidgetOneConfigOneEightLimitDefault+ )+ .describe('Maximum number of tickets to return.'),+ status: zod+ .enum(['new', 'open', 'pending', 'on_hold', 'resolved', 'all'])+ .default(+ dashboardsPartialUpdateBodyTilesItemWidgetOneConfigOneEightStatusDefault+ )+ .describe('Ticket status filter.'),+ priorities: zod+ .array(zod.enum(['low', 'medium', 'high', 'critical']))+ .optional()+ .describe(+ 'Only show tickets with these priorities. Empty shows all priorities.'+ ),+ channel: zod+ .enum(['widget', 'email', 'slack', 'teams', 'github', 'all'])+ .default(+ dashboardsPartialUpdateBodyTilesItemWidgetOneConfigOneEightChannelDefault+ )+ .describe('Ticket channel filter.'),+ assignees: zod+ .array(+ zod.union([+ zod.enum(['me', 'unassigned']),+ zod.object({+ id: zod.union([zod.string(), zod.number()]),+ type: zod.enum(['user', 'role']),+ }),+ ])+ )+ .max(+ dashboardsPartialUpdateBodyTilesItemWidgetOneConfigOneEightAssigneesMax+ )+ .optional()+ .describe(+ "Only show tickets assigned to these users or roles. 'me' means the requesting user and 'unassigned' means tickets without an assignment. Empty shows all assignees."+ ),+ search: zod+ .string()+ .max(dashboardsPartialUpdateBodyTilesItemWidgetOneConfigOneEightSearchMax)+ .default(+ dashboardsPartialUpdateBodyTilesItemWidgetOneConfigOneEightSearchDefault+ )+ .describe(+ 'Search requester name or email, ticket subject, message text, or ticket number.'+ ),+ savedViewId: zod+ .union([+ zod+ .string()+ .max(+ dashboardsPartialUpdateBodyTilesItemWidgetOneConfigOneEightSavedViewIdOneMax+ ),+ zod.null(),+ ])+ .optional()+ .describe(+ 'short_id of a saved Support view to use as the source. When set, the saved view owns the ticket filters; the widget still sorts by most recently updated and applies its limit.'+ ),+ }),]).optional().describe("Widget-specific configuration. Shape depends on the tile's widget_type."),@@ -1167,6 +1247,20 @@ export const dashboardsWidgetsBatchCreateBodyWidgetsItemSevenConfigOneLimitMax =export const dashboardsWidgetsBatchCreateBodyWidgetsItemSevenConfigOneOrderByDefault = `latest`export const dashboardsWidgetsBatchCreateBodyWidgetsItemSevenConfigOneWrapLinesDefault = falseexport const dashboardsWidgetsBatchCreateBodyWidgetsItemSevenConfigOneTimezoneDefault = `UTC`+export const dashboardsWidgetsBatchCreateBodyWidgetsItemEightNameMax = 400++export const dashboardsWidgetsBatchCreateBodyWidgetsItemEightConfigOneLimitDefault = 10+export const dashboardsWidgetsBatchCreateBodyWidgetsItemEightConfigOneLimitMax = 25++export const dashboardsWidgetsBatchCreateBodyWidgetsItemEightConfigOneStatusDefault = `all`+export const dashboardsWidgetsBatchCreateBodyWidgetsItemEightConfigOneChannelDefault = `all`+export const dashboardsWidgetsBatchCreateBodyWidgetsItemEightConfigOneAssigneesMax = 100++export const dashboardsWidgetsBatchCreateBodyWidgetsItemEightConfigOneSearchDefault = ``+export const dashboardsWidgetsBatchCreateBodyWidgetsItemEightConfigOneSearchMax = 200++export const dashboardsWidgetsBatchCreateBodyWidgetsItemEightConfigOneSavedViewIdOneMax = 12+export const dashboardsWidgetsBatchCreateBodyWidgetsMax = 10export const DashboardsWidgetsBatchCreateBody = /* @__PURE__ */ zod@@ -2149,12 +2243,128 @@ export const DashboardsWidgetsBatchCreateBody = /* @__PURE__ */ zod}).describe('Configuration for the recent logs widget.'),}),+ zod.object({+ name: zod+ .string()+ .max(dashboardsWidgetsBatchCreateBodyWidgetsItemEightNameMax)+ .nullish()+ .describe('Optional custom display name for the widget tile.'),+ description: zod+ .string()+ .optional()+ .describe('Optional markdown description shown when show_description is enabled.'),+ layouts: zod+ .object({+ sm: zod+ .object({+ x: zod+ .number()+ .optional()+ .describe('Column position in the dashboard grid (0-indexed).'),+ y: zod+ .number()+ .optional()+ .describe('Row position in the dashboard grid (0-indexed).'),+ w: zod+ .number()+ .optional()+ .describe('Width in grid columns. The desktop grid is 12 columns wide.'),+ h: zod.number().optional().describe('Height in grid rows.'),+ })+ .optional()+ .describe(+ 'Layout for the standard (desktop) breakpoint. The grid is 12 columns wide.'+ ),+ xs: zod+ .object({+ x: zod+ .number()+ .optional()+ .describe('Column position in the dashboard grid (0-indexed).'),+ y: zod+ .number()+ .optional()+ .describe('Row position in the dashboard grid (0-indexed).'),+ w: zod+ .number()+ .optional()+ .describe('Width in grid columns. The desktop grid is 12 columns wide.'),+ h: zod.number().optional().describe('Height in grid rows.'),+ })+ .optional()+ .describe('Layout for the small (mobile) breakpoint. The grid is 1 column wide.'),+ })+ .optional()+ .describe('Optional react-grid-layout positions keyed by breakpoint (sm, xs).'),+ show_description: zod+ .boolean()+ .optional()+ .describe('Whether to show the description on the dashboard tile.'),+ widget_type: zod.enum(['conversations_recent_tickets']),+ config: zod+ .object({+ limit: zod+ .number()+ .min(1)+ .max(dashboardsWidgetsBatchCreateBodyWidgetsItemEightConfigOneLimitMax)+ .default(dashboardsWidgetsBatchCreateBodyWidgetsItemEightConfigOneLimitDefault)+ .describe('Maximum number of tickets to return.'),+ status: zod+ .enum(['new', 'open', 'pending', 'on_hold', 'resolved', 'all'])+ .default(dashboardsWidgetsBatchCreateBodyWidgetsItemEightConfigOneStatusDefault)+ .describe('Ticket status filter.'),+ priorities: zod+ .array(zod.enum(['low', 'medium', 'high', 'critical']))+ .optional()+ .describe('Only show tickets with these priorities. Empty shows all priorities.'),+ channel: zod+ .enum(['widget', 'email', 'slack', 'teams', 'github', 'all'])+ .default(dashboardsWidgetsBatchCreateBodyWidgetsItemEightConfigOneChannelDefault)+ .describe('Ticket channel filter.'),+ assignees: zod+ .array(+ zod.union([+ zod.enum(['me', 'unassigned']),+ zod.object({+ id: zod.union([zod.string(), zod.number()]),+ type: zod.enum(['user', 'role']),+ }),+ ])+ )+ .max(dashboardsWidgetsBatchCreateBodyWidgetsItemEightConfigOneAssigneesMax)+ .optional()+ .describe(+ "Only show tickets assigned to these users or roles. 'me' means the requesting user and 'unassigned' means tickets without an assignment. Empty shows all assignees."+ ),+ search: zod+ .string()+ .max(dashboardsWidgetsBatchCreateBodyWidgetsItemEightConfigOneSearchMax)+ .default(dashboardsWidgetsBatchCreateBodyWidgetsItemEightConfigOneSearchDefault)+ .describe(+ 'Search requester name or email, ticket subject, message text, or ticket number.'+ ),+ savedViewId: zod+ .union([+ zod+ .string()+ .max(+ dashboardsWidgetsBatchCreateBodyWidgetsItemEightConfigOneSavedViewIdOneMax+ ),+ zod.null(),+ ])+ .optional()+ .describe(+ 'short_id of a saved Support view to use as the source. When set, the saved view owns the ticket filters; the widget still sorts by most recently updated and applies its limit.'+ ),+ })+ .describe('Configuration for the recent tickets widget.'),+ }),])).min(1).max(dashboardsWidgetsBatchCreateBodyWidgetsMax).describe(- 'Widget tiles to add atomically. Supported widget_type values: activity_events_list, error_tracking_list, experiment_results, experiments_list, logs_list, session_replay_list, survey_results. Use dashboard-widget-catalog-list for per-type config_schema documentation. (1–10 per request).'+ 'Widget tiles to add atomically. Supported widget_type values: activity_events_list, conversations_recent_tickets, error_tracking_list, experiment_results, experiments_list, logs_list, session_replay_list, survey_results. Use dashboard-widget-catalog-list for per-type config_schema documentation. (1–10 per request).'),}).describe('OpenAPI-only batch-add schema with widget_type-discriminated config shapes for agents.')@@ -2223,6 +2433,20 @@ export const dashboardsUpdateWidgetsBatchBodyWidgetsItemSevenConfigOneLimitMax =export const dashboardsUpdateWidgetsBatchBodyWidgetsItemSevenConfigOneOrderByDefault = `latest`export const dashboardsUpdateWidgetsBatchBodyWidgetsItemSevenConfigOneWrapLinesDefault = falseexport const dashboardsUpdateWidgetsBatchBodyWidgetsItemSevenConfigOneTimezoneDefault = `UTC`+export const dashboardsUpdateWidgetsBatchBodyWidgetsItemEightNameMax = 400++export const dashboardsUpdateWidgetsBatchBodyWidgetsItemEightConfigOneLimitDefault = 10+export const dashboardsUpdateWidgetsBatchBodyWidgetsItemEightConfigOneLimitMax = 25++export const dashboardsUpdateWidgetsBatchBodyWidgetsItemEightConfigOneStatusDefault = `all`+export const dashboardsUpdateWidgetsBatchBodyWidgetsItemEightConfigOneChannelDefault = `all`+export const dashboardsUpdateWidgetsBatchBodyWidgetsItemEightConfigOneAssigneesMax = 100++export const dashboardsUpdateWidgetsBatchBodyWidgetsItemEightConfigOneSearchDefault = ``+export const dashboardsUpdateWidgetsBatchBodyWidgetsItemEightConfigOneSearchMax = 200++export const dashboardsUpdateWidgetsBatchBodyWidgetsItemEightConfigOneSavedViewIdOneMax = 12+export const dashboardsUpdateWidgetsBatchBodyWidgetsMax = 10export const DashboardsUpdateWidgetsBatchBody = /* @__PURE__ */ zod@@ -2918,6 +3142,81 @@ export const DashboardsUpdateWidgetsBatchBody = /* @__PURE__ */ zod.optional().describe('New configuration for the recent logs widget. Omit to leave unchanged.'),}),+ zod.object({+ tile_id: zod+ .number()+ .describe('ID of the widget tile to update. Use dashboard-get to look up widget tile IDs.'),+ name: zod+ .string()+ .max(dashboardsUpdateWidgetsBatchBodyWidgetsItemEightNameMax)+ .nullish()+ .describe(+ 'New display name for the widget. Empty string or null clears it; omit to leave unchanged.'+ ),+ description: zod+ .string()+ .optional()+ .describe('New markdown description for the widget. Omit to leave unchanged.'),+ widget_type: zod.enum(['conversations_recent_tickets']),+ config: zod+ .object({+ limit: zod+ .number()+ .min(1)+ .max(dashboardsUpdateWidgetsBatchBodyWidgetsItemEightConfigOneLimitMax)+ .default(dashboardsUpdateWidgetsBatchBodyWidgetsItemEightConfigOneLimitDefault)+ .describe('Maximum number of tickets to return.'),+ status: zod+ .enum(['new', 'open', 'pending', 'on_hold', 'resolved', 'all'])+ .default(dashboardsUpdateWidgetsBatchBodyWidgetsItemEightConfigOneStatusDefault)+ .describe('Ticket status filter.'),+ priorities: zod+ .array(zod.enum(['low', 'medium', 'high', 'critical']))+ .optional()+ .describe('Only show tickets with these priorities. Empty shows all priorities.'),+ channel: zod+ .enum(['widget', 'email', 'slack', 'teams', 'github', 'all'])+ .default(dashboardsUpdateWidgetsBatchBodyWidgetsItemEightConfigOneChannelDefault)+ .describe('Ticket channel filter.'),+ assignees: zod+ .array(+ zod.union([+ zod.enum(['me', 'unassigned']),+ zod.object({+ id: zod.union([zod.string(), zod.number()]),+ type: zod.enum(['user', 'role']),+ }),+ ])+ )+ .max(dashboardsUpdateWidgetsBatchBodyWidgetsItemEightConfigOneAssigneesMax)+ .optional()+ .describe(+ "Only show tickets assigned to these users or roles. 'me' means the requesting user and 'unassigned' means tickets without an assignment. Empty shows all assignees."+ ),+ search: zod+ .string()+ .max(dashboardsUpdateWidgetsBatchBodyWidgetsItemEightConfigOneSearchMax)+ .default(dashboardsUpdateWidgetsBatchBodyWidgetsItemEightConfigOneSearchDefault)+ .describe(+ 'Search requester name or email, ticket subject, message text, or ticket number.'+ ),+ savedViewId: zod+ .union([+ zod+ .string()+ .max(+ dashboardsUpdateWidgetsBatchBodyWidgetsItemEightConfigOneSavedViewIdOneMax+ ),+ zod.null(),+ ])+ .optional()+ .describe(+ 'short_id of a saved Support view to use as the source. When set, the saved view owns the ticket filters; the widget still sorts by most recently updated and applies its limit.'+ ),+ })+ .optional()+ .describe('New configuration for the recent tickets widget. Omit to leave unchanged.'),+ }),])).min(1)diff --git a/products/dashboards/frontend/generated/widget-config-property-keys.json b/products/dashboards/frontend/generated/widget-config-property-keys.jsonindex a3f0ae334cae..82a90ed6015a 100644--- a/products/dashboards/frontend/generated/widget-config-property-keys.json+++ b/products/dashboards/frontend/generated/widget-config-property-keys.json@@ -40,6 +40,15 @@"severityLevels","timezone","wrapLines"+ ],+ "conversations_recent_tickets": [+ "assignees",+ "channel",+ "limit",+ "priorities",+ "savedViewId",+ "search",+ "status"]},"configPropertyTrees": {@@ -419,6 +428,38 @@"savedViewId": {"$type": "string"}+ },+ "conversations_recent_tickets": {+ "limit": {+ "$type": "integer"+ },+ "status": {+ "$enum": ["all", "new", "on_hold", "open", "pending", "resolved"]+ },+ "priorities": {+ "$array": {+ "$enum": ["critical", "high", "low", "medium"]+ }+ },+ "channel": {+ "$enum": ["all", "email", "github", "slack", "teams", "widget"]+ },+ "assignees": {+ "$array": {+ "id": {+ "$types": ["integer", "string"]+ },+ "type": {+ "$enum": ["role", "user"]+ }+ }+ },+ "search": {+ "$type": "string"+ },+ "savedViewId": {+ "$type": "string"+ }}}}diff --git a/products/dashboards/frontend/generated/widget-config-schemas/conversationsRecentTicketsWidgetConfig.zod.ts b/products/dashboards/frontend/generated/widget-config-schemas/conversationsRecentTicketsWidgetConfig.zod.tsnew file mode 100644index 000000000000..d6dc6fb7c5f6--- /dev/null+++ b/products/dashboards/frontend/generated/widget-config-schemas/conversationsRecentTicketsWidgetConfig.zod.ts@@ -0,0 +1,63 @@+/**+ * Generated by orval v8.14.0 🍺+ * Do not edit manually.+ * PostHog API - 1 ops+ * OpenAPI spec version: 1.0.0+ */+import { z as zod } from 'zod'++import { WidgetAssigneeFilter } from './widgetAssigneeFilter.zod'++export const conversationsRecentTicketsWidgetConfigLimitDefault = 10+export const conversationsRecentTicketsWidgetConfigLimitMax = 25++export const conversationsRecentTicketsWidgetConfigStatusDefault = `all`+export const conversationsRecentTicketsWidgetConfigChannelDefault = `all`+export const conversationsRecentTicketsWidgetConfigAssigneesMax = 100++export const conversationsRecentTicketsWidgetConfigSearchDefault = ``+export const conversationsRecentTicketsWidgetConfigSearchMax = 200++export const conversationsRecentTicketsWidgetConfigSavedViewIdOneMax = 12++export const ConversationsRecentTicketsWidgetConfig = /* @__PURE__ */ zod.object({+ limit: zod+ .number()+ .min(1)+ .max(conversationsRecentTicketsWidgetConfigLimitMax)+ .default(conversationsRecentTicketsWidgetConfigLimitDefault)+ .describe('Maximum number of tickets to return.'),+ status: zod+ .enum(['new', 'open', 'pending', 'on_hold', 'resolved', 'all'])+ .default(conversationsRecentTicketsWidgetConfigStatusDefault)+ .describe('Ticket status filter.'),+ priorities: zod+ .array(zod.enum(['low', 'medium', 'high', 'critical']))+ .optional()+ .describe('Only show tickets with these priorities. Empty shows all priorities.'),+ channel: zod+ .enum(['widget', 'email', 'slack', 'teams', 'github', 'all'])+ .default(conversationsRecentTicketsWidgetConfigChannelDefault)+ .describe('Ticket channel filter.'),+ assignees: zod+ .array(zod.union([zod.enum(['me', 'unassigned']), WidgetAssigneeFilter]))+ .max(conversationsRecentTicketsWidgetConfigAssigneesMax)+ .optional()+ .describe(+ "Only show tickets assigned to these users or roles. 'me' means the requesting user and 'unassigned' means tickets without an assignment. Empty shows all assignees."+ ),+ search: zod+ .string()+ .max(conversationsRecentTicketsWidgetConfigSearchMax)+ .default(conversationsRecentTicketsWidgetConfigSearchDefault)+ .describe('Search requester name or email, ticket subject, message text, or ticket number.'),+ savedViewId: zod+ .union([zod.string().max(conversationsRecentTicketsWidgetConfigSavedViewIdOneMax), zod.null()])+ .optional()+ .describe(+ 'short_id of a saved Support view to use as the source. When set, the saved view owns the ticket filters; the widget still sorts by most recently updated and applies its limit.'+ ),+})++export type ConversationsRecentTicketsWidgetConfig = zod.input<typeof ConversationsRecentTicketsWidgetConfig>+export type ConversationsRecentTicketsWidgetConfigOutput = zod.output<typeof ConversationsRecentTicketsWidgetConfig>diff --git a/products/dashboards/frontend/generated/widget-configs.zod.ts b/products/dashboards/frontend/generated/widget-configs.zod.tsindex 8780080db0b6..57906e669279 100644--- a/products/dashboards/frontend/generated/widget-configs.zod.ts+++ b/products/dashboards/frontend/generated/widget-configs.zod.ts@@ -4,6 +4,7 @@import { z as zod } from 'zod'import { ActivityEventsListWidgetConfig } from './widget-config-schemas/activityEventsListWidgetConfig.zod'+import { ConversationsRecentTicketsWidgetConfig as ConversationsRecentTicketsWidgetConfigComponent } from './widget-config-schemas/conversationsRecentTicketsWidgetConfig.zod'import { ErrorTrackingListWidgetConfig } from './widget-config-schemas/errorTrackingListWidgetConfig.zod'import { ExperimentResultsWidgetConfig as ExperimentResultsWidgetConfigComponent } from './widget-config-schemas/experimentResultsWidgetConfig.zod'import { ExperimentsListWidgetConfig } from './widget-config-schemas/experimentsListWidgetConfig.zod'@@ -13,6 +14,8 @@ import { SurveyResultsWidgetConfig as SurveyResultsWidgetConfigComponent } fromimport { WidgetFilterEntry } from './widget-config-schemas/widgetFilterEntry.zod'export const activityEventsWidgetConfigSchema = /* @__PURE__ */ ActivityEventsListWidgetConfig+export const conversationsRecentTicketsWidgetConfigSchema =+ /* @__PURE__ */ ConversationsRecentTicketsWidgetConfigComponentexport const errorTrackingWidgetConfigSchema = /* @__PURE__ */ ErrorTrackingListWidgetConfigexport const experimentResultsWidgetConfigSchema = /* @__PURE__ */ ExperimentResultsWidgetConfigComponentexport const experimentsWidgetConfigSchema = /* @__PURE__ */ ExperimentsListWidgetConfig@@ -22,6 +25,7 @@ export const surveyResultsWidgetConfigSchema = /* @__PURE__ */ SurveyResultsWidgexport const widgetFilterEntrySchema = /* @__PURE__ */ WidgetFilterEntryexport type ActivityEventsWidgetConfig = zod.infer<typeof activityEventsWidgetConfigSchema>+export type ConversationsRecentTicketsWidgetConfig = zod.infer<typeof conversationsRecentTicketsWidgetConfigSchema>export type ErrorTrackingWidgetConfig = zod.infer<typeof errorTrackingWidgetConfigSchema>export type ExperimentResultsWidgetConfig = zod.infer<typeof experimentResultsWidgetConfigSchema>export type ExperimentsWidgetConfig = zod.infer<typeof experimentsWidgetConfigSchema>@@ -40,6 +44,10 @@ export const activityEventsWidgetFormSchema = activityEventsWidgetConfigSchema.pfilterTestAccounts: true,})+export const conversationsRecentTicketsWidgetFormSchema = conversationsRecentTicketsWidgetConfigSchema.pick({+ limit: true,+})+export const errorTrackingWidgetFormSchema = errorTrackingWidgetConfigSchema.pick({limit: true,orderBy: true,diff --git a/products/dashboards/frontend/generated/widget-form-fields.json b/products/dashboards/frontend/generated/widget-form-fields.jsonindex 8c9dbf889d55..8cbdb9227406 100644--- a/products/dashboards/frontend/generated/widget-form-fields.json+++ b/products/dashboards/frontend/generated/widget-form-fields.json@@ -7,6 +7,13 @@"formFields": ["limit", "dateRange", "filterTestAccounts"],"live": false},+ "conversations_recent_tickets": {+ "configSchemaExport": "conversationsRecentTicketsWidgetConfigSchema",+ "configTypeExport": "ConversationsRecentTicketsWidgetConfig",+ "formSchemaExport": "conversationsRecentTicketsWidgetFormSchema",+ "formFields": ["limit"],+ "live": false+ },"error_tracking_list": {"configSchemaExport": "errorTrackingWidgetConfigSchema","configTypeExport": "ErrorTrackingWidgetConfig",diff --git a/products/dashboards/frontend/types.ts b/products/dashboards/frontend/types.tsindex 6658cb052f6b..278d0a379759 100644--- a/products/dashboards/frontend/types.ts+++ b/products/dashboards/frontend/types.ts@@ -1,4 +1,10 @@/*** Product RBAC for gated widget types. New types: extend union here — see products/dashboards/CONTRIBUTING.md.*/-export type DashboardWidgetProductAccess = 'error_tracking' | 'session_recording' | 'experiment' | 'survey' | 'logs'+export type DashboardWidgetProductAccess =+ | 'error_tracking'+ | 'session_recording'+ | 'experiment'+ | 'survey'+ | 'logs'+ | 'ticket'diff --git a/products/dashboards/frontend/widgetProductAccess.ts b/products/dashboards/frontend/widgetProductAccess.tsindex 6d1a16244ef8..b38fa103985f 100644--- a/products/dashboards/frontend/widgetProductAccess.ts+++ b/products/dashboards/frontend/widgetProductAccess.ts@@ -11,6 +11,7 @@ const WIDGET_PRODUCT_ACCESS_CHECKS = {experiment: () => userHasAccess(AccessControlResourceType.Experiment, AccessControlLevel.Viewer),survey: () => userHasAccess(AccessControlResourceType.Survey, AccessControlLevel.Viewer),logs: () => userHasAccess(AccessControlResourceType.Logs, AccessControlLevel.Viewer),+ ticket: () => userHasAccess(AccessControlResourceType.Ticket, AccessControlLevel.Viewer),} satisfies Record<DashboardWidgetProductAccess, () => boolean>export function userHasDashboardWidgetProductAccess(productAccess: DashboardWidgetProductAccess | undefined): boolean {@@ -24,3 +25,7 @@ export function userHasDashboardWidgetProductAccess(productAccess: DashboardWidgexport function userCanMutateErrorTrackingIssuesOnDashboard(canEditDashboard: boolean): boolean {return canEditDashboard || userHasAccess(AccessControlResourceType.ErrorTracking, AccessControlLevel.Editor)}++export function userCanMutateConversationsTicketsOnDashboard(canEditDashboard: boolean): boolean {+ return canEditDashboard || userHasAccess(AccessControlResourceType.Ticket, AccessControlLevel.Editor)+}diff --git a/products/dashboards/frontend/widget_types/catalog.ts b/products/dashboards/frontend/widget_types/catalog.tsindex b974e5e2db8e..6938f3b93e4e 100644--- a/products/dashboards/frontend/widget_types/catalog.ts+++ b/products/dashboards/frontend/widget_types/catalog.ts@@ -9,6 +9,7 @@ import { ActivityTab } from '~/types'import {activityEventsWidgetConfigSchema,+ conversationsRecentTicketsWidgetConfigSchema,errorTrackingWidgetConfigSchema,experimentResultsWidgetConfigSchema,experimentsWidgetConfigSchema,@@ -19,6 +20,7 @@ import {import type { DashboardWidgetProductAccess } from '../types'import { isLiveDashboardWidgetType } from '../widgets/live/liveWidgetTypes'import { ActivityEventsWidgetPreview } from '../widgets/previews/ActivityEventsWidgetPreview'+import { ConversationsWidgetPreview } from '../widgets/previews/ConversationsWidgetPreview'import { ErrorTrackingWidgetPreview } from '../widgets/previews/ErrorTrackingWidgetPreview'import {ExperimentResultsWidgetPreview,@@ -86,6 +88,7 @@ export const DASHBOARD_WIDGET_GROUP_LABELS = {experiments: 'Experiments',surveys: 'Surveys',logs: 'Logs',+ conversations: 'Support',} as const satisfies Record<string, string>export function getDashboardWidgetGroupLabel(groupId: string): string {@@ -100,6 +103,7 @@ export const DASHBOARD_WIDGET_GROUP_ICONS = {experiments: IconFlask,surveys: IconMessage,logs: IconList,+ conversations: IconMessage,} as const satisfies Record<keyof typeof DASHBOARD_WIDGET_GROUP_LABELS, ComponentType<{ className?: string }>>export function getDashboardWidgetGroupIcon(groupId: string): ComponentType<{ className?: string }> | undefined {@@ -176,6 +180,29 @@ export type DashboardWidgetCatalogEntry = {/** New widget types: add here. See products/dashboards/CONTRIBUTING.md. */export const DASHBOARD_WIDGET_CATALOG = {+ conversations_recent_tickets: {+ groupId: 'conversations',+ label: 'Recent tickets',+ description: 'Most recently updated support tickets.',+ headerTitle: 'Recent tickets',+ headerMeta: { showDateRange: false },+ defaultConfig: conversationsRecentTicketsWidgetConfigSchema.parse({}),+ defaultLayout: { w: 6, h: 6, minW: 3, minH: 4 },+ productAccess: 'ticket',+ titleHref: urls.supportTickets(),+ sharedPlaceholder: {+ title: 'Recent tickets',+ message: 'Log in to PostHog to see recent support tickets from this dashboard.',+ },+ availability: {+ requirement: 'conversations_enabled',+ unavailableTitle: 'Keep customer conversations close to your product data',+ unavailableReason: 'Triage and respond to customer questions with the context you need to solve them.',+ setupActionLabel: 'Enable',+ docsHref: 'https://posthog.com/docs/support',+ compactSetupPrompt: true,+ },+ },error_tracking_list: {groupId: 'error_tracking',label: 'Top issues',@@ -308,6 +335,7 @@ export type DashboardWidgetCatalogKey = keyof typeof DASHBOARD_WIDGET_CATALOG/** New widget types: add preview components here. See products/dashboards/CONTRIBUTING.md. */export const DASHBOARD_WIDGET_PREVIEWS: Record<DashboardWidgetCatalogKey, () => JSX.Element> = {+ conversations_recent_tickets: ConversationsWidgetPreview,activity_events_list: ActivityEventsWidgetPreview,error_tracking_list: ErrorTrackingWidgetPreview,session_replay_list: SessionReplayWidgetPreview,diff --git a/products/dashboards/frontend/widget_types/widgetAvailability.test.ts b/products/dashboards/frontend/widget_types/widgetAvailability.test.tsindex d4adf5260191..98e41835ccef 100644--- a/products/dashboards/frontend/widget_types/widgetAvailability.test.ts+++ b/products/dashboards/frontend/widget_types/widgetAvailability.test.ts@@ -40,4 +40,19 @@ describe('widgetAvailability', () => {}).isAvailable).toBe(false)})++ it('evaluates conversations_enabled requirement', () => {+ expect(+ isWidgetAvailabilityRequirementMet('conversations_enabled', {+ ...MOCK_DEFAULT_TEAM,+ conversations_enabled: false,+ })+ ).toBe(false)+ expect(+ isWidgetAvailabilityRequirementMet('conversations_enabled', {+ ...MOCK_DEFAULT_TEAM,+ conversations_enabled: true,+ })+ ).toBe(true)+ })})diff --git a/products/dashboards/frontend/widget_types/widgetAvailability.ts b/products/dashboards/frontend/widget_types/widgetAvailability.tsindex d694c01175ca..808d296c70ee 100644--- a/products/dashboards/frontend/widget_types/widgetAvailability.ts+++ b/products/dashboards/frontend/widget_types/widgetAvailability.ts@@ -7,7 +7,10 @@ import { ProductKey } from '~/queries/schema/schema-general'import type { TeamPublicType, TeamType } from '~/types'/** New catalog-driven setup requirements: add here — CONTRIBUTING.md */-export type WidgetAvailabilityRequirementId = 'exception_autocapture' | 'session_replay_enabled'+export type WidgetAvailabilityRequirementId =+ | 'exception_autocapture'+ | 'session_replay_enabled'+ | 'conversations_enabled'export type WidgetAvailabilityPresentation = {productName: string@@ -32,6 +35,12 @@ export const WIDGET_AVAILABILITY_PRESENTATION: Record<WidgetAvailabilityRequiremthingName: 'session recording',settingsUrl: urls.settings('environment-replay'),},+ conversations_enabled: {+ productName: 'Support',+ productKey: ProductKey.CONVERSATIONS,+ thingName: 'support ticket',+ settingsUrl: urls.supportTickets(),+ },}export type WidgetAvailabilityConfig = {@@ -45,6 +54,8 @@ export type WidgetAvailabilityConfig = {setupActionLabel: string/** Optional docs link for a secondary CTA. */docsHref?: string+ /** Use compact spacing when the setup prompt must fit a short widget tile. */+ compactSetupPrompt?: boolean}export type WidgetAvailabilityStatus = {@@ -62,6 +73,8 @@ export function isWidgetAvailabilityRequirementMet(return !!team?.autocapture_exceptions_opt_incase 'session_replay_enabled':return !!team?.session_recording_opt_in+ case 'conversations_enabled':+ return !!team?.conversations_enableddefault: {const _exhaustive: never = requirementreturn _exhaustivediff --git a/products/dashboards/frontend/widgets/AddWidgetModal.test.tsx b/products/dashboards/frontend/widgets/AddWidgetModal.test.tsxindex bce741c054ce..dbbd58d4a90d 100644--- a/products/dashboards/frontend/widgets/AddWidgetModal.test.tsx+++ b/products/dashboards/frontend/widgets/AddWidgetModal.test.tsx@@ -75,11 +75,26 @@ describe('AddWidgetModal', () => {expect(screen.getByText(/Bring context from your different PostHog products into one dashboard/i)).toBeInTheDocument()- expect(screen.getByText('Error tracking')).toBeInTheDocument()+ expect(screen.getByText('Error tracking', { selector: 'h5' })).toBeInTheDocument()expect(screen.getByLabelText('Top issues')).toBeInTheDocument()expect(screen.getByText(/Ranked list of the most impactful error tracking issues/i)).toBeInTheDocument()})+ it('shows alphabetized badges for each widget product section', () => {+ renderAddWidgetModal()++ const badges = screen.getByTestId('dashboard-widget-product-badges')+ expect(Array.from(badges.children).map((badge) => badge.textContent)).toEqual([+ 'Activity',+ 'Error tracking',+ 'Experiments',+ 'Logs',+ 'Session replay',+ 'Support',+ 'Surveys',+ ])+ })+it('allows multi-select checkbox behavior within grouped layout', async () => {renderAddWidgetModal()@@ -141,17 +156,17 @@ describe('AddWidgetModal', () => {expect(screen.getByLabelText('Top issues')).toBeInTheDocument()- await userEvent.click(screen.getByText('Error tracking'))+ await userEvent.click(screen.getByText('Error tracking', { selector: 'h5' }))expect(screen.queryByLabelText('Top issues')).not.toBeInTheDocument()- await userEvent.click(screen.getByText('Error tracking'))+ await userEvent.click(screen.getByText('Error tracking', { selector: 'h5' }))expect(screen.getByLabelText('Top issues')).toBeInTheDocument()})it('resets collapsed sections when the modal is reopened', async () => {const logic = renderAddWidgetModal()- await userEvent.click(screen.getByText('Error tracking'))+ await userEvent.click(screen.getByText('Error tracking', { selector: 'h5' }))expect(logic.values.addWidgetCollapsedGroups).toContain('error_tracking')logic.actions.setAddWidgetModalOpen(true)diff --git a/products/dashboards/frontend/widgets/AddWidgetModal.tsx b/products/dashboards/frontend/widgets/AddWidgetModal.tsxindex 8e4c1c2d057e..480c6129e4c6 100644--- a/products/dashboards/frontend/widgets/AddWidgetModal.tsx+++ b/products/dashboards/frontend/widgets/AddWidgetModal.tsx@@ -8,6 +8,7 @@ import { IconChevronDown, IconChevronRight, IconLightBulb } from '@posthog/iconsimport { LemonButton } from 'lib/lemon-ui/LemonButton'import { LemonDivider } from 'lib/lemon-ui/LemonDivider'import { LemonModal } from 'lib/lemon-ui/LemonModal'+import { LemonTag } from 'lib/lemon-ui/LemonTag'import { Link } from 'lib/lemon-ui/Link'import { dashboardLogic } from 'scenes/dashboard/dashboardLogic'import { teamLogic } from 'scenes/teamLogic'@@ -103,7 +104,27 @@ export function AddWidgetModal({ isOpen, onClose, loading, onAdd }: AddWidgetModisOpen={isOpen}onClose={onClose}title="Add widget"- description="Bring context from your different PostHog products into one dashboard."+ description={+ <>+ <span>Bring context from your different PostHog products into one dashboard.</span>+ <span className="mt-2 flex flex-wrap gap-2" data-attr="dashboard-widget-product-badges">+ {[...DASHBOARD_WIDGET_CATALOG_GROUPS]+ .sort((a, b) => a.groupLabel.localeCompare(b.groupLabel))+ .map((group) => {+ const GroupIcon = getDashboardWidgetGroupIcon(group.groupId)++ return (+ <LemonTag key={group.groupId} type="muted">+ <span className="flex items-center gap-1.5">+ {GroupIcon ? <GroupIcon className="size-4" /> : null}+ {group.groupLabel}+ </span>+ </LemonTag>+ )+ })}+ </span>+ </>+ }width={1200}footer={<>diff --git a/products/dashboards/frontend/widgets/conversations/ConversationsWidget.stories.tsx b/products/dashboards/frontend/widgets/conversations/ConversationsWidget.stories.tsxnew file mode 100644index 000000000000..3121c0d9fc77--- /dev/null+++ b/products/dashboards/frontend/widgets/conversations/ConversationsWidget.stories.tsx@@ -0,0 +1,219 @@+import type { Meta, StoryObj } from '@storybook/react'+import { useState } from 'react'++import { mswDecorator } from '~/mocks/browser'+import { DashboardPlacement } from '~/types'++import { WidgetCard } from '../../components/WidgetCard/WidgetCard'+import { WidgetCardBody } from '../../components/WidgetCard/WidgetCardBody'+import { WidgetCardHeader, widgetCardShouldHideMoreButton } from '../../components/WidgetCard/WidgetCardHeader'+import {+ mockMoreOverlay,+ withConversationsProjectState,+ widgetStorybookParameters,+ widgetTileFrameDecorator,+} from '../../components/WidgetCard/widgetCardStoryFixtures'+import { WidgetRuntimeAvailabilityGuard } from '../../components/WidgetRuntimeAvailabilityGuard/WidgetRuntimeAvailabilityGuard'+import { getDashboardWidgetCatalogEntry, getDashboardWidgetGroupLabel } from '../../widget_types/catalog'+import { useWidgetAvailability } from '../../widget_types/widgetAvailability'+import type { DashboardWidgetComponentProps } from '../registry'+import {+ ConversationsWidget,+ ConversationsWidgetTopHeading,+ type ConversationsWidgetTicket,+} from './ConversationsWidget'+import { ConversationsWidgetTileFilters } from './ConversationsWidgetTileFilters'++const CATALOG = getDashboardWidgetCatalogEntry('conversations_recent_tickets')!+const DEFAULT_CONFIG = CATALOG.defaultConfig as Record<string, unknown>+const savedViewsApiDecorator = mswDecorator({+ get: {+ '/api/projects/:team_id/conversations/views/': () => [+ 200,+ {+ count: 3,+ results: [+ { short_id: 'urgent-unassigned', name: 'Urgent and unassigned' },+ { short_id: 'needs-reply', name: 'Needs a reply' },+ { short_id: 'breached-sla', name: 'Breached SLA' },+ ],+ },+ ],+ },+})++function StoryTile(props: DashboardWidgetComponentProps): JSX.Element {+ const { isAvailable } = useWidgetAvailability(CATALOG.availability)+ const [config, setConfig] = useState(props.config)++ return (+ <WidgetCard className="h-full">+ <WidgetCardHeader+ layout={CATALOG.headerLayout}+ title=""+ defaultTitle={CATALOG.headerTitle ?? CATALOG.label}+ titleHref={CATALOG.titleHref}+ widgetTypeLabel={getDashboardWidgetGroupLabel(CATALOG.groupId)}+ config={config}+ headerMeta={CATALOG.headerMeta}+ TopHeading={ConversationsWidgetTopHeading}+ description={CATALOG.description}+ showDescription+ loading={props.loading}+ shouldHideMoreButton={widgetCardShouldHideMoreButton(DashboardPlacement.Dashboard, false)}+ moreButtonOverlay={mockMoreOverlay}+ />+ {isAvailable ? (+ <ConversationsWidgetTileFilters tileId={props.tileId} config={config} onUpdateConfig={setConfig} />+ ) : null}+ <WidgetCardBody>+ <WidgetRuntimeAvailabilityGuard availability={CATALOG.availability}>+ <ConversationsWidget {...props} config={config} />+ </WidgetRuntimeAvailabilityGuard>+ </WidgetCardBody>+ </WidgetCard>+ )+}++const meta: Meta<typeof StoryTile> = {+ title: 'Products/Dashboards/Dashboard Widgets/Widget types/Support/Recent tickets',+ component: StoryTile,+ parameters: { layout: 'padded', ...widgetStorybookParameters },+ decorators: [savedViewsApiDecorator, ...widgetTileFrameDecorator],+ args: {+ tileId: 1,+ config: DEFAULT_CONFIG,+ loading: false,+ result: null,+ onUpdateConfig: () => undefined,+ onRefresh: () => undefined,+ },+}+export default meta+type Story = StoryObj<typeof StoryTile>+const tickets: ConversationsWidgetTicket[] = [+ {+ id: 'ticket-1',+ ticket_number: 124,+ channel_source: 'email',+ status: 'new',+ priority: 'critical',+ assignee: null,+ updated_at: '2026-05-26T13:58:00Z',+ last_message_text:+ "I can't invite a teammate to our project. The invite link opens, but the page returns to the project settings without adding them.",+ unread_team_count: 1,+ email_subject: null,+ requester_name: 'Jordan Lee',+ requester_email: '[email protected]',+ sla_due_at: '2026-05-26T14:30:00Z',+ },+ {+ id: 'ticket-2',+ ticket_number: 123,+ channel_source: 'slack',+ status: 'open',+ priority: 'high',+ assignee: { user: null, role: { id: 'role-support', name: 'Support team' } },+ updated_at: '2026-05-26T09:15:00Z',+ last_message_text: 'Thanks, that restored the dashboard.',+ unread_team_count: 0,+ email_subject: null,+ requester_name: 'Morgan Chen',+ requester_email: '[email protected]',+ sla_due_at: '2026-05-26T13:30:00Z',+ },+ {+ id: 'ticket-3',+ ticket_number: 121,+ channel_source: 'widget',+ status: 'pending',+ priority: 'medium',+ assignee: null,+ updated_at: '2026-05-25T14:00:00Z',+ last_message_text: 'The Android SDK reports duplicate screen views',+ unread_team_count: 1,+ email_subject: null,+ requester_name: null,+ requester_email: '[email protected]',+ sla_due_at: '2026-05-28T10:00:00Z',+ },+ {+ id: 'ticket-4',+ ticket_number: 119,+ channel_source: 'email',+ status: 'resolved',+ priority: 'low',+ assignee: { user: { id: 2, name: 'Alex Kim' }, role: null },+ updated_at: '2026-05-24T18:30:00Z',+ last_message_text: 'That fixed the authorized domain. Thank you!',+ unread_team_count: 0,+ email_subject: 'Update the authorized domain',+ requester_name: 'Taylor Brooks',+ requester_email: '[email protected]',+ sla_due_at: null,+ },+ {+ id: 'ticket-5',+ ticket_number: 118,+ channel_source: 'widget',+ status: 'open',+ priority: 'low',+ assignee: { user: { id: 2, name: 'Alex Kim' }, role: null },+ updated_at: '2026-05-25T11:20:00Z',+ last_message_text:+ 'We are still evaluating the new billing flow. Can you explain how usage limits apply when several teams send events to the same project?',+ unread_team_count: 2,+ email_subject: 'Question about usage limits',+ requester_name: 'Pat Garcia',+ requester_email: '[email protected]',+ sla_due_at: '2026-05-28T10:00:00Z',+ },+ {+ id: 'ticket-6',+ ticket_number: 117,+ channel_source: 'email',+ status: 'on_hold',+ priority: 'medium',+ assignee: { user: null, role: { id: 'role-support', name: 'Support team' } },+ updated_at: '2026-05-24T18:30:00Z',+ last_message_text: "We'll review the export and follow up.",+ unread_team_count: 0,+ email_subject: 'Requested audit log export',+ requester_name: 'Robin Patel',+ requester_email: '[email protected]',+ sla_due_at: null,+ },+]+export const Populated: Story = {+ decorators: [withConversationsProjectState(true)],+ args: { canMutateConversationsTickets: true, result: { results: tickets, hasMore: true, totalCount: 12 } },+}+export const SavedView: Story = {+ decorators: [withConversationsProjectState(true)],+ args: {+ config: { ...DEFAULT_CONFIG, savedViewId: 'needs-reply' },+ result: { results: tickets, hasMore: true, totalCount: 12 },+ },+}+export const Loading: Story = {+ decorators: [withConversationsProjectState(true)],+ args: { loading: true },+ parameters: {+ testOptions: { waitForLoadersToDisappear: false },+ },+}+export const Empty: Story = {+ decorators: [withConversationsProjectState(true)],+ args: { result: { results: [] } },+}+export const SetupUnavailable: Story = {+ decorators: [withConversationsProjectState(false)],+ parameters: {+ docs: {+ description: {+ story: 'Uses the Support availability guard when Support is disabled for the project.',+ },+ },+ },+}diff --git a/products/dashboards/frontend/widgets/conversations/ConversationsWidget.test.tsx b/products/dashboards/frontend/widgets/conversations/ConversationsWidget.test.tsxnew file mode 100644index 000000000000..a4c897c5f503--- /dev/null+++ b/products/dashboards/frontend/widgets/conversations/ConversationsWidget.test.tsx@@ -0,0 +1,92 @@+import { MOCK_DEFAULT_TEAM } from 'lib/api.mock'++import '@testing-library/jest-dom'++import { fireEvent, render, screen } from '@testing-library/react'+import posthog from 'posthog-js'++import { teamLogic } from 'scenes/teamLogic'++import { initKeaTests } from '~/test/init'++import { ConversationsWidget, ConversationsWidgetTopHeading } from './ConversationsWidget'+import { conversationsWidgetSavedViewsLogic } from './conversationsWidgetSavedViewsLogic'++describe('ConversationsWidget', () => {+ beforeEach(() => {+ initKeaTests(true, MOCK_DEFAULT_TEAM)+ teamLogic.mount()+ jest.mocked(posthog.capture).mockClear()+ })++ it('records when a ticket is opened from the widget', () => {+ render(+ <ConversationsWidget+ tileId={1}+ config={{ limit: 10 }}+ loading={false}+ result={{+ results: [+ {+ id: 'ticket-1',+ ticket_number: 123,+ channel_source: 'email',+ status: 'open',+ priority: 'high',+ assignee: {+ user: { id: 1, name: 'Test user' },+ role: null,+ },+ updated_at: '2026-08-11T12:00:00Z',+ last_message_text: 'I need help with my dashboard.',+ unread_team_count: 0,+ email_subject: null,+ requester_name: 'Jane Doe',+ requester_email: '[email protected]',+ sla_due_at: null,+ },+ ],+ }}+ />+ )++ fireEvent.click(screen.getByText('I need help with my dashboard.'))++ expect(posthog.capture).toHaveBeenCalledWith('dashboard widget open support ticket clicked', {+ widget_type: 'conversations_recent_tickets',+ tile_id: 1,+ ticket_id: 'ticket-1',+ })+ })++ it('shows the saved view name in the card top heading', () => {+ const savedViewsLogic = conversationsWidgetSavedViewsLogic({ projectId: teamLogic.values.currentProjectId })+ savedViewsLogic.mount()+ savedViewsLogic.actions.loadSavedViewsSuccess([+ {+ id: 'view-1',+ short_id: 'needs-reply',+ name: 'Needs a reply',+ created_at: '2026-08-11T12:00:00Z',+ created_by: {+ id: 1,+ uuid: 'user-1',+ email: '[email protected]',+ hedgehog_config: null,+ },+ },+ ])++ render(+ <ConversationsWidgetTopHeading+ config={{ savedViewId: 'needs-reply' }}+ widgetTypeLabel="Support"+ showWidgetType+ dateText={null}+ />+ )++ expect(screen.getByText('Support')).toBeInTheDocument()+ expect(screen.getByText('Needs a reply')).toBeInTheDocument()+ })+})diff --git a/products/dashboards/frontend/widgets/conversations/ConversationsWidget.tsx b/products/dashboards/frontend/widgets/conversations/ConversationsWidget.tsxnew file mode 100644index 000000000000..953d8461a1f2--- /dev/null+++ b/products/dashboards/frontend/widgets/conversations/ConversationsWidget.tsx@@ -0,0 +1,319 @@+import { BindLogic, useActions, useValues } from 'kea'+import posthog from 'posthog-js'+import { useEffect } from 'react'++import * as magnifyingGlassPng from '@posthog/brand/hoggies/png/magnifying-glass-1'+import { IconChevronDown } from '@posthog/icons'+import { LemonBadge, LemonButton, LemonSkeleton, LemonTag, Tooltip } from '@posthog/lemon-ui'++import { pngHoggie } from 'lib/brand/hoggies'+import { CardTopHeadingRow } from 'lib/components/Cards/CardTopHeadingRow'+import { TZLabel } from 'lib/components/TZLabel'+import { Link } from 'lib/lemon-ui/Link'+import { cn } from 'lib/utils/css-classes'+import { stripMarkdown } from 'lib/utils/markdown'+import { PersonDisplay } from 'scenes/persons/PersonDisplay'+import { teamLogic } from 'scenes/teamLogic'+import { urls } from 'scenes/urls'++import { AssigneeDisplay, AssigneeResolver, AssigneeSelect } from 'products/conversations/frontend/components/Assignee'+import { channelIcon } from 'products/conversations/frontend/components/Channels/ChannelsTag'+import { channelOptions } from 'products/conversations/frontend/types'++import {+ WIDGET_LIST_COUNT_TICKETS,+ WidgetCardBodyMessage,+ WidgetCardContent,+ WidgetContentFooter,+ WidgetListCount,+} from '../../components/WidgetCard'+import type { DashboardWidgetTopHeadingProps } from '../../components/WidgetCard/WidgetCardHeader'+import type { DashboardWidgetComponentProps } from '../registry'+import { parseConversationsWidgetConfig } from './conversationsWidgetConfigValidation'+import { conversationsWidgetLogic } from './conversationsWidgetLogic'+import { conversationsWidgetSavedViewsLogic } from './conversationsWidgetSavedViewsLogic'+import {+ priorityTagType,+ statusTagType,+ ticketAssignee,+ ticketAssigneeName,+ ticketTitle,+ TicketSlaIcon,+ type ConversationsWidgetTicket,+} from './conversationsWidgetUtils'++const HedgehogMagnifyingGlass = pngHoggie(magnifyingGlassPng)++export type { ConversationsWidgetTicket } from './conversationsWidgetUtils'++export type ConversationsWidgetResult = {+ results?: ConversationsWidgetTicket[]+ hasMore?: boolean+ totalCount?: number+ totalCountCapped?: boolean+}++export function ConversationsWidgetTopHeading({+ config,+ widgetTypeLabel,+ showWidgetType,+ dateText,+}: DashboardWidgetTopHeadingProps): JSX.Element {+ const savedViewId = parseConversationsWidgetConfig(config).savedViewId+ const { currentProjectId } = useValues(teamLogic)+ const savedViewsLogic = conversationsWidgetSavedViewsLogic({ projectId: currentProjectId })+ const { savedViewLabelById, savedViewsLoaded, savedViewsLoading } = useValues(savedViewsLogic)+ const { loadSavedViews } = useActions(savedViewsLogic)++ useEffect(() => {+ if (savedViewId && !savedViewsLoaded && !savedViewsLoading) {+ loadSavedViews()+ }+ }, [loadSavedViews, savedViewId, savedViewsLoaded, savedViewsLoading])++ return (+ <CardTopHeadingRow+ typeLabel={widgetTypeLabel}+ showTypeLabel={showWidgetType}+ dateText={savedViewId ? (savedViewLabelById[savedViewId] ?? 'Saved view') : dateText}+ />+ )+}++function ConversationsWidgetRow({+ tileId,+ ticket,+ canMutateTickets,+}: {+ tileId: number+ ticket: ConversationsWidgetTicket+ canMutateTickets: boolean+}): JSX.Element {+ const { ticketAssignmentLoadingId } = useValues(conversationsWidgetLogic)+ const { assignTicket } = useActions(conversationsWidgetLogic)+ const assignee = ticketAssignee(ticket)+ const assigneeName = ticketAssigneeName(ticket)+ const isAssignmentLoading = ticketAssignmentLoadingId === ticket.id+ const assignmentDisabledReason = ticketAssignmentLoadingId ? 'Updating assignee...' : undefined+ const channelLabel = channelOptions.find((option) => option.value === ticket.channel_source)?.label+ const captureTicketOpened = (): void => {+ posthog.capture('dashboard widget open support ticket clicked', {+ widget_type: 'conversations_recent_tickets',+ tile_id: tileId,+ ticket_id: ticket.id,+ })+ }+ return (+ <div className="border-b border-primary px-3 py-3 hover:bg-fill-highlight-100">+ <div className="flex min-w-0 items-center gap-2">+ <Link+ to={urls.supportTicketDetail(ticket.ticket_number)}+ target="_blank"+ subtle+ className="min-w-0 flex-1 text-current hover:text-current"+ onClick={captureTicketOpened}+ >+ <div className="flex min-w-0 items-center gap-2">+ <PersonDisplay+ person={{+ distinct_id: ticket.requester_email,+ properties: {+ name: ticket.requester_name ?? ticket.requester_email,+ email: ticket.requester_email,+ },+ }}+ withIcon="sm"+ noLink+ noPopover+ displayName={ticket.requester_name ?? ticket.requester_email}+ className="min-w-0 truncate font-semibold"+ />+ <span className="shrink-0 text-xs text-muted">#{ticket.ticket_number}</span>+ <Tooltip title={channelLabel}>+ <span className="flex size-3.5 shrink-0 items-center justify-center text-muted [&>svg]:size-3.5">+ {channelIcon[ticket.channel_source]}+ </span>+ </Tooltip>+ <TicketSlaIcon slaDueAt={ticket.sla_due_at} />+ </div>+ </Link>+ <div>+ {canMutateTickets ? (+ <AssigneeSelect+ assignee={assignee}+ onChange={(nextAssignee) => assignTicket(ticket.id, nextAssignee)}+ disabledReason={assignmentDisabledReason}+ loadOnOpen+ >+ {(resolvedAssignee, isOpen) => (+ <LemonButton+ size="xsmall"+ type="tertiary"+ active={isOpen}+ sideIcon={<IconChevronDown />}+ loading={isAssignmentLoading}+ >+ <AssigneeDisplay+ assignee={resolvedAssignee}+ size="xsmall"+ placeholder={assigneeName ?? 'Unassigned'}+ />+ </LemonButton>+ )}+ </AssigneeSelect>+ ) : (+ <AssigneeResolver assignee={assignee}>+ {({ assignee: resolvedAssignee }) => (+ <AssigneeDisplay+ assignee={resolvedAssignee}+ size="xsmall"+ placeholder={assigneeName ?? 'Unassigned'}+ />+ )}+ </AssigneeResolver>+ )}+ </div>+ </div>+ <Link+ to={urls.supportTicketDetail(ticket.ticket_number)}+ target="_blank"+ subtle+ className="mt-1.5 block min-w-0 text-current hover:text-current"+ onClick={captureTicketOpened}+ >+ <div className="flex min-w-0 items-start gap-2 text-sm text-muted">+ <span+ className={cn('line-clamp-2', ticket.unread_team_count > 0 && 'font-medium text-primary')}+ title={ticketTitle(ticket)}+ >+ {stripMarkdown(ticketTitle(ticket))}+ </span>+ {ticket.unread_team_count > 0 ? (+ <LemonBadge.Number count={ticket.unread_team_count} size="small" status="primary" />+ ) : null}+ </div>+ </Link>+ <div className="mt-1.5 flex min-w-0 items-center justify-between gap-2">+ <div className="flex min-w-0 items-center gap-1">+ {ticket.priority ? (+ <LemonTag type={priorityTagType(ticket.priority)}>{ticket.priority}</LemonTag>+ ) : null}+ <LemonTag type={statusTagType(ticket.status)}>{ticket.status.replace('_', ' ')}</LemonTag>+ </div>+ <TZLabel time={ticket.updated_at} showPopover={false} className="shrink-0 text-xs text-muted" />+ </div>+ </div>+ )+}++function ConversationsWidgetLoadingState(): JSX.Element {+ return (+ <WidgetCardContent>+ <div className="flex flex-col" aria-busy aria-label="Loading tickets">+ {Array.from({ length: 4 }, (_, index) => (+ <div key={index} className="space-y-1.5 border-b border-primary px-3 py-3" aria-hidden>+ <div className="flex items-center gap-2">+ <LemonSkeleton className="h-4 w-28" />+ <LemonSkeleton className="h-3 w-8" />+ <LemonSkeleton className="ml-auto h-3 w-16" />+ </div>+ <div className="flex items-start gap-2">+ <LemonSkeleton className="h-8 w-3/4" />+ <LemonSkeleton className="mt-0.5 size-4 rounded-full" />+ </div>+ <div className="flex items-center justify-between gap-2">+ <div className="flex items-center gap-1">+ <LemonSkeleton className="h-5 w-12 rounded" />+ <LemonSkeleton className="h-5 w-10 rounded" />+ </div>+ <LemonSkeleton className="h-3 w-16" />+ </div>+ </div>+ ))}+ </div>+ </WidgetCardContent>+ )+}++export function ConversationsWidget({+ tileId,+ result,+ loading,+ error,+ config,+ onRefresh,+ onRefreshData,+ canMutateConversationsTickets = false,+}: DashboardWidgetComponentProps): JSX.Element {+ const payload = result as ConversationsWidgetResult | null | undefined+ const tickets = payload?.results ?? []+ const parsedConfig = parseConversationsWidgetConfig(config)+ const hasActiveFilters =+ !!parsedConfig.savedViewId ||+ parsedConfig.status !== 'all' ||+ (parsedConfig.priorities?.length ?? 0) > 0 ||+ parsedConfig.channel !== 'all' ||+ (parsedConfig.assignees?.length ?? 0) > 0 ||+ !!parsedConfig.search++ if (loading) {+ return <ConversationsWidgetLoadingState />+ }+ if (error) {+ return (+ <WidgetCardContent>+ <WidgetCardBodyMessage variant="error" onRefresh={onRefresh} refreshing={loading}>+ Couldn't load recent tickets. Try again.+ </WidgetCardBodyMessage>+ </WidgetCardContent>+ )+ }+ if (tickets.length === 0) {+ return (+ <WidgetCardContent>+ <WidgetCardBodyMessage>+ <div+ className="flex max-w-xs flex-col items-center gap-2 px-2 text-balance"+ data-attr="conversations-widget-empty-state"+ >+ <HedgehogMagnifyingGlass className="size-20 shrink-0" />+ <p className="m-0 text-base font-semibold text-primary">+ {hasActiveFilters ? 'No tickets found' : 'No tickets yet'}+ </p>+ <p className="m-0 text-sm text-muted">+ {hasActiveFilters+ ? 'No tickets matched your filters.'+ : 'New support tickets will appear here.'}+ </p>+ </div>+ </WidgetCardBodyMessage>+ </WidgetCardContent>+ )+ }+ return (+ <BindLogic logic={conversationsWidgetLogic} props={{ tileId, onRefreshData }}>+ <WidgetCardContent>+ <div className="flex flex-col">+ {tickets.map((ticket) => (+ <ConversationsWidgetRow+ key={ticket.id}+ tileId={tileId}+ ticket={ticket}+ canMutateTickets={canMutateConversationsTickets}+ />+ ))}+ </div>+ </WidgetCardContent>+ <WidgetContentFooter>+ <WidgetListCount+ shown={tickets.length}+ totalCount={payload?.totalCount}+ totalCountIsLowerBound={payload?.totalCountCapped}+ noun={WIDGET_LIST_COUNT_TICKETS}+ hasMore={payload?.hasMore}+ dataAttr="conversations-widget-count"+ />+ </WidgetContentFooter>+ </BindLogic>+ )+}diff --git a/products/dashboards/frontend/widgets/conversations/ConversationsWidgetTileFilters.tsx b/products/dashboards/frontend/widgets/conversations/ConversationsWidgetTileFilters.tsxnew file mode 100644index 000000000000..8ed9c4e3f392--- /dev/null+++ b/products/dashboards/frontend/widgets/conversations/ConversationsWidgetTileFilters.tsx@@ -0,0 +1,195 @@+import { useActions, useValues } from 'kea'++import { LemonButton } from 'lib/lemon-ui/LemonButton'+import { LemonCheckbox } from 'lib/lemon-ui/LemonCheckbox'+import { LemonDropdown } from 'lib/lemon-ui/LemonDropdown'+import { LemonSelect } from 'lib/lemon-ui/LemonSelect'+import { teamLogic } from 'scenes/teamLogic'++import { AssigneeMultiSelect, type AssigneeFilterEntry } from 'products/conversations/frontend/components/Assignee'+import { clearFilterButtonProps } from 'products/conversations/frontend/components/clearFilterButtonProps'+import { priorityMultiselectOptions, statusOptions } from 'products/conversations/frontend/types'++import type { DashboardWidgetTileFiltersProps } from '../registry'+import { useWidgetTileConfigPersist } from '../widgetTileFiltersHooks'+import { WidgetTileFilterReadOnlyLabel, WidgetTileFiltersBar } from '../widgetTileFiltersReadOnly'+import {+ type ConversationsTicketAssignee,+ parseConversationsWidgetConfig,+ patchConversationsWidgetFilterFields,+ type ConversationsTicketPriority,+} from './conversationsWidgetConfigValidation'+import { conversationsWidgetSavedViewsLogic } from './conversationsWidgetSavedViewsLogic'++const NO_SAVED_VIEW = '__none__'++function priorityFilterLabel(priorities: ConversationsTicketPriority[]): string {+ if (priorities.length === 0) {+ return 'Priority'+ }+ if (priorities.length === 1) {+ return priorityMultiselectOptions.find((option) => option.key === priorities[0])?.label ?? priorities[0]+ }+ return `${priorities.length} priorities`+}++function ConversationsPriorityFilter({+ value,+ onChange,+}: {+ value: ConversationsTicketPriority[]+ onChange: (value: ConversationsTicketPriority[]) => void+}): JSX.Element {+ return (+ <LemonDropdown+ closeOnClickInside={false}+ overlay={+ <div className="space-y-px p-1">+ {priorityMultiselectOptions.map((option) => (+ <LemonButton+ key={option.key}+ type="tertiary"+ size="small"+ fullWidth+ icon={+ <LemonCheckbox checked={value.includes(option.key)} className="pointer-events-none" />+ }+ onClick={() => {+ const nextValue = value.includes(option.key)+ ? value.filter((priority) => priority !== option.key)+ : [...value, option.key]+ onChange(nextValue)+ }}+ >+ {option.label}+ </LemonButton>+ ))}+ </div>+ }+ >+ <LemonButton+ type="secondary"+ size="small"+ {...clearFilterButtonProps(value.length > 0 ? () => onChange([]) : null, 'Clear priority filter')}+ >+ {priorityFilterLabel(value)}+ </LemonButton>+ </LemonDropdown>+ )+}++export function ConversationsWidgetTileFilters({+ config,+ onUpdateConfig,+ disabledReason,+}: DashboardWidgetTileFiltersProps): JSX.Element {+ const parsedConfig = parseConversationsWidgetConfig(config)+ const status = parsedConfig.status ?? 'all'+ const priorities = parsedConfig.priorities ?? []+ const assignees = (parsedConfig.assignees ?? []) as AssigneeFilterEntry[]+ const savedViewId = parsedConfig.savedViewId ?? null+ const { currentProjectId } = useValues(teamLogic)+ const savedViewsLogic = conversationsWidgetSavedViewsLogic({ projectId: currentProjectId })+ const { savedViewOptions, savedViewsLoaded, savedViewsLoading, savedViewsError, savedViewLabelById } =+ useValues(savedViewsLogic)+ const { loadSavedViews } = useActions(savedViewsLogic)+ const { getLatestConfig, persistConfigNow } = useWidgetTileConfigPersist(onUpdateConfig, config)+ const statusLabel = statusOptions.find((option) => option.value === status)?.label ?? status+ const prioritiesLabel = priorities.length === 0 ? 'All priorities' : `${priorities.length} selected`+ const assigneesLabel = assignees.length === 0 ? 'All assignees' : `${assignees.length} selected`+ const savedViewLabel = savedViewId ? (savedViewLabelById[savedViewId] ?? savedViewId) : null++ if (!onUpdateConfig || disabledReason) {+ return (+ <WidgetTileFiltersBar dataAttr="conversations-widget-filters-readonly">+ {savedViewLabel ? (+ <WidgetTileFilterReadOnlyLabel name="Saved view" value={savedViewLabel} />+ ) : (+ <>+ <WidgetTileFilterReadOnlyLabel name="Status" value={statusLabel} />+ <WidgetTileFilterReadOnlyLabel name="Priority" value={prioritiesLabel} />+ <WidgetTileFilterReadOnlyLabel name="Assignee" value={assigneesLabel} />+ </>+ )}+ </WidgetTileFiltersBar>+ )+ }+ return (+ <WidgetTileFiltersBar dataAttr="conversations-widget-filters">+ <div className="flex w-full min-w-0 flex-nowrap items-center gap-2">+ <LemonSelect+ size="small"+ value={savedViewId ?? NO_SAVED_VIEW}+ loading={savedViewsLoading}+ disabled={!!savedViewsError}+ disabledReason={savedViewsError ? 'Could not load saved views.' : undefined}+ options={[{ value: NO_SAVED_VIEW, label: 'No saved view' }, ...savedViewOptions]}+ menu={{+ onVisibilityChange: (visible) => {+ if (visible && !savedViewsLoaded && !savedViewsLoading) {+ loadSavedViews()+ }+ },+ }}+ renderButtonContent={(option) =>+ option?.value === NO_SAVED_VIEW ? (+ 'Saved view'+ ) : (+ <span className="block max-w-32 truncate">{option?.label ?? 'Saved view'}</span>+ )+ }+ onChange={(value) => {+ const nextConfig = patchConversationsWidgetFilterFields(getLatestConfig(), {+ savedViewId: value === NO_SAVED_VIEW ? null : value,+ })+ void persistConfigNow(nextConfig)+ }}+ />+ {savedViewsError ? (+ <LemonButton size="small" loading={savedViewsLoading} onClick={loadSavedViews}>+ Retry+ </LemonButton>+ ) : null}+ {!savedViewId ? (+ <>+ <LemonSelect+ size="small"+ value={status}+ options={statusOptions}+ renderButtonContent={(option) =>+ option?.value === 'all' ? 'Status' : (option?.label ?? 'Status')+ }+ onChange={(value) => {+ if (value) {+ const nextConfig = patchConversationsWidgetFilterFields(getLatestConfig(), {+ status: value,+ })+ void persistConfigNow(nextConfig)+ }+ }}+ />+ <ConversationsPriorityFilter+ value={priorities}+ onChange={(value) => {+ const nextConfig = patchConversationsWidgetFilterFields(getLatestConfig(), {+ priorities: value,+ })+ void persistConfigNow(nextConfig)+ }}+ />+ <AssigneeMultiSelect+ value={assignees}+ emptyLabel="Assignee"+ onChange={(value) => {+ const nextConfig = patchConversationsWidgetFilterFields(getLatestConfig(), {+ assignees: value as ConversationsTicketAssignee[],+ })+ void persistConfigNow(nextConfig)+ }}+ />+ </>+ ) : null}+ </div>+ </WidgetTileFiltersBar>+ )+}diff --git a/products/dashboards/frontend/widgets/conversations/EditConversationsWidgetModal.stories.tsx b/products/dashboards/frontend/widgets/conversations/EditConversationsWidgetModal.stories.tsxnew file mode 100644index 000000000000..863871595d3a--- /dev/null+++ b/products/dashboards/frontend/widgets/conversations/EditConversationsWidgetModal.stories.tsx@@ -0,0 +1,24 @@+import type { Meta, StoryObj } from '@storybook/react'++import { widgetStorybookParameters } from '../../components/WidgetCard/widgetCardStoryFixtures'+import { getDashboardWidgetCatalogEntry } from '../../widget_types/catalog'+import { EditConversationsWidgetModal } from './EditConversationsWidgetModal'++const CATALOG = getDashboardWidgetCatalogEntry('conversations_recent_tickets')!+const meta: Meta<typeof EditConversationsWidgetModal> = {+ title: 'Products/Dashboards/Dashboard Widgets/Widget types/Support/Recent tickets/Widget settings',+ component: EditConversationsWidgetModal,+ parameters: { layout: 'fullscreen', ...widgetStorybookParameters },+ args: {+ isOpen: true,+ onClose: () => undefined,+ onSave: () => Promise.resolve(),+ config: CATALOG.defaultConfig,+ name: 'Recent tickets',+ defaultTitle: 'Recent tickets',+ description: CATALOG.description,+ },+}+export default meta+type Story = StoryObj<typeof EditConversationsWidgetModal>+export const Default: Story = {}diff --git a/products/dashboards/frontend/widgets/conversations/EditConversationsWidgetModal.tsx b/products/dashboards/frontend/widgets/conversations/EditConversationsWidgetModal.tsxnew file mode 100644index 000000000000..4e1ed9bdae6a--- /dev/null+++ b/products/dashboards/frontend/widgets/conversations/EditConversationsWidgetModal.tsx@@ -0,0 +1,72 @@+import { BindLogic, useActions, useValues } from 'kea'++import { LemonButton, LemonInput, LemonModal } from '@posthog/lemon-ui'++import { LemonField } from 'lib/lemon-ui/LemonField/LemonField'++import { EditWidgetModalTileDetailsSection } from '../EditWidgetModalTileDetailsSection'+import type { DashboardWidgetEditModalProps } from '../registry'+import { editConversationsWidgetModalLogic } from './editConversationsWidgetModalLogic'++function Contents(): JSX.Element {+ const { limit, tileName, tileDescription, saving, onClose, defaultTitle } = useValues(+ editConversationsWidgetModalLogic+ )+ const { setLimit, setTileName, setTileDescription, submit } = useActions(editConversationsWidgetModalLogic)+ return (+ <LemonModal+ isOpen+ onClose={onClose}+ title="Widget settings"+ description="Configure the tile details and number of recent tickets."+ width={680}+ footer={+ <>+ <div className="flex-1" />+ <LemonButton type="secondary" onClick={onClose} disabled={saving}>+ Cancel+ </LemonButton>+ <LemonButton+ type="primary"+ loading={saving}+ disabledReason={limit < 1 || limit > 25 ? 'Enter a number from 1 to 25' : undefined}+ onClick={() => submit()}+ >+ Save+ </LemonButton>+ </>+ }+ >+ <div className="flex flex-col gap-4">+ <EditWidgetModalTileDetailsSection+ tileName={tileName}+ tileDescription={tileDescription}+ defaultTitle={defaultTitle}+ saving={saving}+ setTileName={setTileName}+ setTileDescription={setTileDescription}+ />+ <LemonField.Pure label="Number of tickets" help="Show up to 25 recently updated tickets.">+ <LemonInput+ type="number"+ min={1}+ max={25}+ value={limit}+ onChange={(value) => setLimit(Number(value))}+ />+ </LemonField.Pure>+ </div>+ </LemonModal>+ )+}++export function EditConversationsWidgetModal({ isOpen, ...props }: DashboardWidgetEditModalProps): JSX.Element | null {+ if (!isOpen) {+ return null+ }+ return (+ <BindLogic logic={editConversationsWidgetModalLogic} props={props}>+ <Contents />+ </BindLogic>+ )+}diff --git a/products/dashboards/frontend/widgets/conversations/conversationsWidgetConfigValidation.test.ts b/products/dashboards/frontend/widgets/conversations/conversationsWidgetConfigValidation.test.tsnew file mode 100644index 000000000000..ff44587f80f5--- /dev/null+++ b/products/dashboards/frontend/widgets/conversations/conversationsWidgetConfigValidation.test.ts@@ -0,0 +1,23 @@+import { patchConversationsWidgetFilterFields } from './conversationsWidgetConfigValidation'++describe('conversationsWidgetConfigValidation', () => {+ it('sets and clears a saved view without dropping other config', () => {+ const config = { limit: 15, status: 'open' as const, priorities: ['high' as const] }+ const withSavedView = patchConversationsWidgetFilterFields(config, { savedViewId: 'view-1' })++ expect(withSavedView).toMatchObject({+ limit: 15,+ status: 'open',+ priorities: ['high'],+ savedViewId: 'view-1',+ })++ const cleared = patchConversationsWidgetFilterFields(withSavedView, { savedViewId: null })+ expect(cleared.savedViewId).toBeNull()+ expect(cleared.limit).toBe(15)+ })++ it('rejects saved view IDs longer than the backend short ID limit', () => {+ expect(() => patchConversationsWidgetFilterFields({}, { savedViewId: '1234567890123' })).toThrow()+ })+})diff --git a/products/dashboards/frontend/widgets/conversations/conversationsWidgetConfigValidation.ts b/products/dashboards/frontend/widgets/conversations/conversationsWidgetConfigValidation.tsnew file mode 100644index 000000000000..93721911ab95--- /dev/null+++ b/products/dashboards/frontend/widgets/conversations/conversationsWidgetConfigValidation.ts@@ -0,0 +1,59 @@+import { z } from 'zod'++import { ApiError } from 'lib/api-error'++import {+ conversationsRecentTicketsWidgetConfigSchema,+ conversationsRecentTicketsWidgetFormSchema,+ type ConversationsRecentTicketsWidgetConfig,+} from '../../generated/widget-configs.zod'+import { fieldErrorsFromZodError, parseWidgetConfig } from '../widgetConfigValidation'++export type ConversationsTicketStatus = NonNullable<ConversationsRecentTicketsWidgetConfig['status']>+export type ConversationsTicketPriority = NonNullable<ConversationsRecentTicketsWidgetConfig['priorities']>[number]+export type ConversationsTicketAssignee = NonNullable<ConversationsRecentTicketsWidgetConfig['assignees']>[number]+type ConversationsWidgetFormField = keyof z.infer<typeof conversationsRecentTicketsWidgetFormSchema>+export type ConversationsWidgetFieldErrors = Partial<Record<ConversationsWidgetFormField, string>>++export function parseConversationsWidgetConfig(+ config: Record<string, unknown>+): ConversationsRecentTicketsWidgetConfig {+ return parseWidgetConfig(conversationsRecentTicketsWidgetConfigSchema, config)+}++export function patchConversationsWidgetConfig(+ config: Record<string, unknown>,+ patch: Partial<ConversationsRecentTicketsWidgetConfig>+): ConversationsRecentTicketsWidgetConfig {+ return conversationsRecentTicketsWidgetConfigSchema.parse({ ...parseConversationsWidgetConfig(config), ...patch })+}++export function patchConversationsWidgetFilterFields(+ config: Record<string, unknown>,+ patch: {+ status?: ConversationsTicketStatus+ priorities?: ConversationsTicketPriority[]+ assignees?: ConversationsTicketAssignee[]+ savedViewId?: string | null+ }+): ConversationsRecentTicketsWidgetConfig {+ const base = parseConversationsWidgetConfig(config)+ return conversationsRecentTicketsWidgetConfigSchema.parse({+ ...base,+ status: patch.status ?? base.status,+ priorities: patch.priorities ?? base.priorities,+ assignees: patch.assignees ?? base.assignees,+ savedViewId: 'savedViewId' in patch ? patch.savedViewId : base.savedViewId,+ })+}++export function parseConversationsWidgetConfigApiError(+ error: unknown,+ config: Record<string, unknown>+): ConversationsWidgetFieldErrors | null {+ if (!(error instanceof ApiError)) {+ return null+ }+ const parsed = conversationsRecentTicketsWidgetConfigSchema.safeParse(config)+ return parsed.success ? null : fieldErrorsFromZodError(parsed.error)+}diff --git a/products/dashboards/frontend/widgets/conversations/conversationsWidgetLogic.test.ts b/products/dashboards/frontend/widgets/conversations/conversationsWidgetLogic.test.tsnew file mode 100644index 000000000000..27949d76bba6--- /dev/null+++ b/products/dashboards/frontend/widgets/conversations/conversationsWidgetLogic.test.ts@@ -0,0 +1,43 @@+import { expectLogic } from 'kea-test-utils'++import api from 'lib/api'+import { lemonToast } from 'lib/lemon-ui/LemonToast'++import { initKeaTests } from '~/test/init'++import { conversationsWidgetLogic } from './conversationsWidgetLogic'++describe('conversationsWidgetLogic', () => {+ beforeEach(() => {+ initKeaTests()+ })++ it('updates the assignee and refreshes the tile', async () => {+ const refresh = jest.fn()+ const update = jest.spyOn(api.conversationsTickets, 'update').mockResolvedValue({} as never)+ const logic = conversationsWidgetLogic({ tileId: 1, onRefreshData: refresh })+ logic.mount()++ await expectLogic(logic, () => logic.actions.assignTicket('ticket-1', { type: 'user', id: 3 }))+ .toFinishAllListeners()+ .toMatchValues({ ticketAssignmentLoadingId: null })++ expect(update).toHaveBeenCalledWith('ticket-1', { assignee: { type: 'user', id: 3 } })+ expect(refresh).toHaveBeenCalledTimes(1)+ logic.unmount()+ })++ it('shows an error and permits another assignment after a failed request', async () => {+ const errorToast = jest.spyOn(lemonToast, 'error').mockImplementation(() => 'toast-id')+ jest.spyOn(api.conversationsTickets, 'update').mockRejectedValue(new Error('Network unavailable'))+ const logic = conversationsWidgetLogic({ tileId: 1 })+ logic.mount()++ await expectLogic(logic, () => logic.actions.assignTicket('ticket-1', null))+ .toFinishAllListeners()+ .toMatchValues({ ticketAssignmentLoadingId: null })++ expect(errorToast).toHaveBeenCalledWith('Could not update the assignee. Try again.')+ logic.unmount()+ })+})diff --git a/products/dashboards/frontend/widgets/conversations/conversationsWidgetLogic.ts b/products/dashboards/frontend/widgets/conversations/conversationsWidgetLogic.tsnew file mode 100644index 000000000000..4eeea4554acf--- /dev/null+++ b/products/dashboards/frontend/widgets/conversations/conversationsWidgetLogic.ts@@ -0,0 +1,66 @@+import { MakeLogicType, actions, kea, key, listeners, path, props, reducers } from 'kea'++import api from 'lib/api'+import { lemonToast } from 'lib/lemon-ui/LemonToast'++import type { TicketAssignee } from 'products/conversations/frontend/components/Assignee'++export interface ConversationsWidgetLogicProps {+ tileId: number+ onRefreshData?: () => void+}++export interface conversationsWidgetLogicValues {+ ticketAssignmentLoadingId: string | null+}++export interface conversationsWidgetLogicActions {+ assignTicket: (ticketId: string, assignee: TicketAssignee) => { assignee: TicketAssignee; ticketId: string }+ assignTicketFailure: (ticketId: string) => { ticketId: string }+ assignTicketLoading: (ticketId: string) => { ticketId: string }+ assignTicketSuccess: (ticketId: string) => { ticketId: string }+}++export type conversationsWidgetLogicType = MakeLogicType<+ conversationsWidgetLogicValues,+ conversationsWidgetLogicActions,+ ConversationsWidgetLogicProps+>++export const conversationsWidgetLogic = kea<conversationsWidgetLogicType>([+ props({} as ConversationsWidgetLogicProps),+ key((props) => props.tileId),+ path((key) => ['products', 'dashboards', 'widgets', 'conversations', 'conversationsWidgetLogic', key]),+ actions({+ assignTicket: (ticketId: string, assignee: TicketAssignee) => ({ ticketId, assignee }),+ assignTicketLoading: (ticketId: string) => ({ ticketId }),+ assignTicketSuccess: (ticketId: string) => ({ ticketId }),+ assignTicketFailure: (ticketId: string) => ({ ticketId }),+ }),+ reducers({+ ticketAssignmentLoadingId: [+ null as string | null,+ {+ assignTicketLoading: (_, { ticketId }) => ticketId,+ assignTicketSuccess: () => null,+ assignTicketFailure: () => null,+ },+ ],+ }),+ listeners(({ actions, props, values }) => ({+ assignTicket: async ({ ticketId, assignee }) => {+ if (values.ticketAssignmentLoadingId) {+ return+ }+ actions.assignTicketLoading(ticketId)+ try {+ await api.conversationsTickets.update(ticketId, { assignee })+ actions.assignTicketSuccess(ticketId)+ props.onRefreshData?.()+ } catch {+ actions.assignTicketFailure(ticketId)+ lemonToast.error('Could not update the assignee. Try again.')+ }+ },+ })),+])diff --git a/products/dashboards/frontend/widgets/conversations/conversationsWidgetSavedViewsLogic.test.ts b/products/dashboards/frontend/widgets/conversations/conversationsWidgetSavedViewsLogic.test.tsnew file mode 100644index 000000000000..ef200b4468f5--- /dev/null+++ b/products/dashboards/frontend/widgets/conversations/conversationsWidgetSavedViewsLogic.test.ts@@ -0,0 +1,23 @@+import { expectLogic } from 'kea-test-utils'++import { initKeaTests } from '~/test/init'++import { conversationsWidgetSavedViewsLogic } from './conversationsWidgetSavedViewsLogic'++describe('conversationsWidgetSavedViewsLogic', () => {+ beforeEach(() => {+ initKeaTests()+ })++ it('caches an empty saved-view result for the project', async () => {+ const logic = conversationsWidgetSavedViewsLogic({ projectId: 2 })+ logic.mount()++ await expectLogic(logic, () => logic.actions.loadSavedViewsSuccess([])).toMatchValues({+ savedViews: [],+ savedViewsLoaded: true,+ })++ logic.unmount()+ })+})diff --git a/products/dashboards/frontend/widgets/conversations/conversationsWidgetSavedViewsLogic.ts b/products/dashboards/frontend/widgets/conversations/conversationsWidgetSavedViewsLogic.tsnew file mode 100644index 000000000000..4946eaf09247--- /dev/null+++ b/products/dashboards/frontend/widgets/conversations/conversationsWidgetSavedViewsLogic.ts@@ -0,0 +1,96 @@+import { MakeLogicType, kea, key, path, props, reducers, selectors } from 'kea'+import { loaders } from 'kea-loaders'++import { conversationsViewsList } from 'products/conversations/frontend/generated/api'+import type { TicketViewApi } from 'products/conversations/frontend/generated/api.schemas'++const SAVED_VIEWS_PAGE_SIZE = 100+const SAVED_VIEWS_MAX_RESULTS = 500++export interface conversationsWidgetSavedViewsLogicValues {+ savedViewsError: string | null+ savedViewsLoaded: boolean+ savedViewLabelById: Record<string, string>+ savedViewOptions: { label: string; value: string }[]+ savedViews: TicketViewApi[]+ savedViewsLoading: boolean+}++export interface conversationsWidgetSavedViewsLogicActions {+ loadSavedViews: () => void+ loadSavedViewsFailure: (error: string, errorObject?: unknown) => { error: string; errorObject?: unknown }+ loadSavedViewsSuccess: (savedViews: TicketViewApi[]) => { savedViews: TicketViewApi[] }+}++export interface ConversationsWidgetSavedViewsLogicProps {+ projectId: number | string+}++export interface conversationsWidgetSavedViewsLogicMeta {+ __keaTypeGenInternalSelectorTypes: {+ savedViewOptions: (savedViews: TicketViewApi[]) => { label: string; value: string }[]+ savedViewLabelById: (options: { label: string; value: string }[]) => Record<string, string>+ }+}++export type conversationsWidgetSavedViewsLogicType = MakeLogicType<+ conversationsWidgetSavedViewsLogicValues,+ conversationsWidgetSavedViewsLogicActions,+ ConversationsWidgetSavedViewsLogicProps,+ conversationsWidgetSavedViewsLogicMeta+>++export const conversationsWidgetSavedViewsLogic = kea<conversationsWidgetSavedViewsLogicType>([+ props({} as ConversationsWidgetSavedViewsLogicProps),+ key((props) => props.projectId),+ path(['products', 'dashboards', 'widgets', 'conversations', 'conversationsWidgetSavedViewsLogic']),+ loaders(({ props }) => ({+ savedViews: {+ __default: [] as TicketViewApi[],+ loadSavedViews: async () => {+ const savedViews: TicketViewApi[] = []+ for (let offset = 0; offset < SAVED_VIEWS_MAX_RESULTS; offset += SAVED_VIEWS_PAGE_SIZE) {+ const response = await conversationsViewsList(String(props.projectId), {+ limit: SAVED_VIEWS_PAGE_SIZE,+ offset,+ })+ savedViews.push(...response.results)+ if (!response.next) {+ break+ }+ }+ return savedViews+ },+ },+ })),+ reducers({+ savedViewsLoaded: [+ false,+ {+ loadSavedViews: () => false,+ loadSavedViewsFailure: () => false,+ loadSavedViewsSuccess: () => true,+ },+ ],+ savedViewsError: [+ null as string | null,+ {+ loadSavedViews: () => null,+ loadSavedViewsFailure: (_, { error }) => error,+ loadSavedViewsSuccess: () => null,+ },+ ],+ }),+ selectors({+ savedViewOptions: [+ (selectors) => [selectors.savedViews],+ (savedViews: TicketViewApi[]): { label: string; value: string }[] =>+ savedViews.map((view) => ({ value: view.short_id, label: view.name })),+ ],+ savedViewLabelById: [+ (selectors) => [selectors.savedViewOptions],+ (options: { label: string; value: string }[]): Record<string, string> =>+ Object.fromEntries(options.map((option) => [option.value, option.label])),+ ],+ }),+])diff --git a/products/dashboards/frontend/widgets/conversations/conversationsWidgetUtils.tsx b/products/dashboards/frontend/widgets/conversations/conversationsWidgetUtils.tsxnew file mode 100644index 000000000000..540447b13736--- /dev/null+++ b/products/dashboards/frontend/widgets/conversations/conversationsWidgetUtils.tsx@@ -0,0 +1,97 @@+import { IconCheckCircle, IconClock, IconWarning } from '@posthog/icons'+import { Tooltip } from '@posthog/lemon-ui'++import { dayjs } from 'lib/dayjs'++import type { TicketAssignee } from 'products/conversations/frontend/components/Assignee'+import { getSlaState } from 'products/conversations/frontend/components/SlaDisplay'+import type { TicketChannel } from 'products/conversations/frontend/types'++export type ConversationsWidgetTicket = {+ id: string+ ticket_number: number+ channel_source: TicketChannel+ status: string+ priority: string | null+ assignee: { user: { id: number; name: string } | null; role: { id: string; name: string } | null } | null+ updated_at: string+ last_message_text: string | null+ unread_team_count: number+ email_subject: string | null+ requester_name: string | null+ requester_email: string+ sla_due_at: string | null+}++export function ticketTitle(ticket: ConversationsWidgetTicket): string {+ return ticket.email_subject || ticket.last_message_text || `Ticket #${ticket.ticket_number}`+}++export function ticketAssignee(ticket: ConversationsWidgetTicket): TicketAssignee {+ if (ticket.assignee?.user) {+ return { type: 'user', id: ticket.assignee.user.id }+ }+ if (ticket.assignee?.role) {+ return { type: 'role', id: ticket.assignee.role.id }+ }+ return null+}++export function ticketAssigneeName(ticket: ConversationsWidgetTicket): string | null {+ return ticket.assignee?.user?.name ?? ticket.assignee?.role?.name ?? null+}++export function statusTagType(status: string): 'success' | 'primary' | 'default' {+ if (status === 'resolved') {+ return 'success'+ }+ if (status === 'new') {+ return 'primary'+ }+ return 'default'+}++export function priorityTagType(priority: string): 'danger' | 'caution' | 'warning' | 'default' {+ if (priority === 'critical') {+ return 'danger'+ }+ if (priority === 'high') {+ return 'caution'+ }+ if (priority === 'medium') {+ return 'warning'+ }+ return 'default'+}++export function TicketSlaIcon({ slaDueAt }: { slaDueAt: string | null }): JSX.Element | null {+ if (!slaDueAt) {+ return null+ }++ const slaState = getSlaState(slaDueAt)+ let icon = <IconCheckCircle className="text-success" />+ let tooltip = 'SLA on track'++ if (slaState === 'breached') {+ icon = <IconWarning className="text-danger" />+ tooltip = 'SLA breached'+ } else if (slaState === 'at-risk') {+ icon = <IconClock className="text-warning" />+ tooltip = 'SLA due soon'+ }+ tooltip = `${tooltip}. Due ${dayjs(slaDueAt).fromNow()}`++ return (+ <Tooltip title={tooltip}>+ <span+ role="img"+ aria-label={tooltip}+ tabIndex={0}+ className="flex size-3.5 shrink-0 items-center justify-center [&>svg]:size-3.5"+ >+ {icon}+ </span>+ </Tooltip>+ )+}diff --git a/products/dashboards/frontend/widgets/conversations/editConversationsWidgetModalLogic.test.ts b/products/dashboards/frontend/widgets/conversations/editConversationsWidgetModalLogic.test.tsnew file mode 100644index 000000000000..59744613dc92--- /dev/null+++ b/products/dashboards/frontend/widgets/conversations/editConversationsWidgetModalLogic.test.ts@@ -0,0 +1,41 @@+import { expectLogic } from 'kea-test-utils'++import { lemonToast } from 'lib/lemon-ui/LemonToast'++import { initKeaTests } from '~/test/init'++import { editConversationsWidgetModalLogic } from './editConversationsWidgetModalLogic'++describe('editConversationsWidgetModalLogic', () => {+ beforeEach(() => {+ initKeaTests()+ })++ it('reports a save failure and permits retry', async () => {+ const onSave = jest+ .fn()+ .mockRejectedValueOnce(new Error('Network unavailable'))+ .mockResolvedValueOnce(undefined)+ const onClose = jest.fn()+ const errorToast = jest.spyOn(lemonToast, 'error').mockImplementation(() => 'toast-id')+ const logic = editConversationsWidgetModalLogic({+ config: { limit: 10, status: 'all' },+ onSave,+ onClose,+ defaultTitle: 'Recent tickets',+ })+ logic.mount()++ await expectLogic(logic, () => logic.actions.submit())+ .toFinishAllListeners()+ .toMatchValues({ saving: false })+ expect(onClose).not.toHaveBeenCalled()+ expect(errorToast).toHaveBeenCalledWith('Could not save widget settings. Check your connection and try again.')++ await expectLogic(logic, () => logic.actions.submit())+ .toFinishAllListeners()+ .toMatchValues({ saving: false })+ expect(onClose).toHaveBeenCalledTimes(1)+ logic.unmount()+ })+})diff --git a/products/dashboards/frontend/widgets/conversations/editConversationsWidgetModalLogic.ts b/products/dashboards/frontend/widgets/conversations/editConversationsWidgetModalLogic.tsnew file mode 100644index 000000000000..169b3a589f2d--- /dev/null+++ b/products/dashboards/frontend/widgets/conversations/editConversationsWidgetModalLogic.ts@@ -0,0 +1,95 @@+import { MakeLogicType, actions, afterMount, kea, listeners, path, props, reducers, selectors } from 'kea'++import { lemonToast } from 'lib/lemon-ui/LemonToast'++import type { ConversationsRecentTicketsWidgetConfig } from '../../generated/widget-configs.zod'+import { conversationsRecentTicketsWidgetConfigSchema } from '../../generated/widget-configs.zod'+import {+ buildWidgetTileMetadataPatch,+ getWidgetEditModalTileDefaults,+ widgetEditModalTileActions,+} from '../editWidgetModalBuilders'+import type { DashboardWidgetEditModalProps } from '../registry'++export type EditConversationsWidgetModalLogicProps = Omit<DashboardWidgetEditModalProps, 'isOpen'>++export interface editConversationsWidgetModalLogicValues {+ config: ConversationsRecentTicketsWidgetConfig+ defaultTitle: string+ limit: number+ onClose: () => void+ saving: boolean+ tileDescription: string+ tileName: string+}++export interface editConversationsWidgetModalLogicActions {+ setLimit: (limit: number) => { limit: number }+ setTileDescription: (tileDescription: string) => { tileDescription: string }+ setTileName: (tileName: string) => { tileName: string }+ submit: () => { value: true }+ submitFailure: () => { value: true }+ submitSuccess: () => { value: true }+}++export type editConversationsWidgetModalLogicType = MakeLogicType<+ editConversationsWidgetModalLogicValues,+ editConversationsWidgetModalLogicActions,+ EditConversationsWidgetModalLogicProps+>++export const editConversationsWidgetModalLogic = kea<editConversationsWidgetModalLogicType>([+ path(['products', 'dashboards', 'widgets', 'conversations', 'editConversationsWidgetModalLogic']),+ props({} as EditConversationsWidgetModalLogicProps),+ actions({+ ...widgetEditModalTileActions,+ setLimit: (limit: number) => ({ limit }),+ submit: true,+ submitSuccess: true,+ submitFailure: true,+ }),+ reducers({+ limit: [10, { setLimit: (_state: number, { limit }: { limit: number }) => limit }],+ tileName: ['', { setTileName: (_state: string, { tileName }: { tileName: string }) => tileName }],+ tileDescription: [+ '',+ {+ setTileDescription: (_state: string, { tileDescription }: { tileDescription: string }) =>+ tileDescription,+ },+ ],+ saving: [false, { submit: () => true, submitSuccess: () => false, submitFailure: () => false }],+ defaultTitle: ['Recent tickets'],+ }),+ selectors({+ config: [+ (_state, props) => [props.config],+ (config): ConversationsRecentTicketsWidgetConfig =>+ conversationsRecentTicketsWidgetConfigSchema.parse(config),+ ],+ onClose: [(_state, props) => [props.onClose], (onClose): (() => void) => onClose],+ }),+ listeners(({ actions, values, props }) => ({+ submit: async () => {+ try {+ const config = conversationsRecentTicketsWidgetConfigSchema.parse({+ ...values.config,+ limit: values.limit,+ })+ await props.onSave(config, buildWidgetTileMetadataPatch(props, values.tileName, values.tileDescription))+ actions.submitSuccess()+ props.onClose()+ } catch {+ actions.submitFailure()+ lemonToast.error('Could not save widget settings. Check your connection and try again.')+ }+ },+ })),+ afterMount(({ actions, props }) => {+ const config = conversationsRecentTicketsWidgetConfigSchema.parse(props.config)+ const metadata = getWidgetEditModalTileDefaults(props)+ actions.setLimit(config.limit ?? 10)+ actions.setTileName(metadata.tileName)+ actions.setTileDescription(metadata.tileDescription)+ }),+])diff --git a/products/dashboards/frontend/widgets/previews/ConversationsWidgetPreview.test.tsx b/products/dashboards/frontend/widgets/previews/ConversationsWidgetPreview.test.tsxnew file mode 100644index 000000000000..4a29c7a13b2a--- /dev/null+++ b/products/dashboards/frontend/widgets/previews/ConversationsWidgetPreview.test.tsx@@ -0,0 +1,22 @@+import '@testing-library/jest-dom'++import { render, screen } from '@testing-library/react'++import { initKeaTests } from '~/test/init'++import { ConversationsWidgetPreview } from './ConversationsWidgetPreview'++describe('ConversationsWidgetPreview', () => {+ beforeEach(() => {+ initKeaTests()+ })++ it('renders the Support ticket row preview from the shared widget samples', () => {+ render(<ConversationsWidgetPreview />)++ expect(screen.getByText('Jordan Lee')).toBeInTheDocument()+ expect(screen.getByText(/I can't invite a teammate to our project/)).toBeInTheDocument()+ expect(screen.getByText('critical')).toBeInTheDocument()+ expect(screen.getByText('Morgan Chen')).toBeInTheDocument()+ })+})diff --git a/products/dashboards/frontend/widgets/previews/ConversationsWidgetPreview.tsx b/products/dashboards/frontend/widgets/previews/ConversationsWidgetPreview.tsxnew file mode 100644index 000000000000..13fd3090008a--- /dev/null+++ b/products/dashboards/frontend/widgets/previews/ConversationsWidgetPreview.tsx@@ -0,0 +1,15 @@+import { conversationsSampleTickets } from '../../components/WidgetCard/widgetOverviewStoryFixtures'+import { ConversationsWidget } from '../conversations/ConversationsWidget'++export function ConversationsWidgetPreview(): JSX.Element {+ return (+ <div className="shadow-sm">+ <ConversationsWidget+ tileId={0}+ config={{ limit: 3 }}+ loading={false}+ result={{ results: conversationsSampleTickets.slice(0, 3) }}+ />+ </div>+ )+}diff --git a/products/dashboards/frontend/widgets/registry.tsx b/products/dashboards/frontend/widgets/registry.tsxindex e77973b0d34a..7df3828429a3 100644--- a/products/dashboards/frontend/widgets/registry.tsx+++ b/products/dashboards/frontend/widgets/registry.tsx@@ -15,6 +15,7 @@ export type DashboardWidgetTileFiltersProps = {canMutateErrorTrackingIssues?: boolean}import { parseActivityEventsWidgetConfigApiError } from './activity/activityEventsWidgetConfigValidation'+import { parseConversationsWidgetConfigApiError } from './conversations/conversationsWidgetConfigValidation'import type {WidgetIssueMetadataContext,WidgetIssueMetadataDelta,@@ -35,6 +36,20 @@ import { parseSurveyResultsWidgetConfigApiError } from './surveys/surveysWidgetCconst ActivityEventsWidget = lazyWithRetry(() =>import('./activity/ActivityEventsWidget').then((m) => ({ default: m.ActivityEventsWidget })))+const ConversationsWidget = lazyWithRetry(() =>+ import('./conversations/ConversationsWidget').then((m) => ({ default: m.ConversationsWidget }))+)+const ConversationsWidgetTopHeading = lazyWithRetry(() =>+ import('./conversations/ConversationsWidget').then((m) => ({ default: m.ConversationsWidgetTopHeading }))+)+const ConversationsWidgetTileFilters = lazyWithRetry(() =>+ import('./conversations/ConversationsWidgetTileFilters').then((m) => ({+ default: m.ConversationsWidgetTileFilters,+ }))+)+const EditConversationsWidgetModal = lazyWithRetry(() =>+ import('./conversations/EditConversationsWidgetModal').then((m) => ({ default: m.EditConversationsWidgetModal }))+)const ActivityEventsWidgetTileFilters = lazyWithRetry(() =>import('./activity/ActivityEventsWidgetTileFilters').then((m) => ({ default: m.ActivityEventsWidgetTileFilters })))@@ -186,6 +201,8 @@ export type DashboardWidgetComponentProps = {) => void/** Error tracking list only — status/assignee controls when false stay read-only. */canMutateErrorTrackingIssues?: boolean+ /** Support list only — assignee controls when false stay read-only. */+ canMutateConversationsTickets?: booleanonUpdateConfig?: (config: Record<string, unknown>) => void | Promise<void>}@@ -210,6 +227,14 @@ export type DashboardWidgetEditModalProps = {* `satisfies Record<DashboardWidgetCatalogKey, …>` fails typecheck if catalog grows without a matching key.*/export const DASHBOARD_WIDGET_REGISTRY = {+ conversations_recent_tickets: {+ Component: ConversationsWidget,+ TopHeading: ConversationsWidgetTopHeading,+ TileFilters: ConversationsWidgetTileFilters,+ EditModal: EditConversationsWidgetModal,+ productAccess: 'ticket',+ parseConfigApiError: parseConversationsWidgetConfigApiError,+ },activity_events_list: {Component: ActivityEventsWidget,TileFilters: ActivityEventsWidgetTileFilters,diff --git a/products/dashboards/frontend/widgets/widgetConfigSchemaParity.test.ts b/products/dashboards/frontend/widgets/widgetConfigSchemaParity.test.tsindex 20cb234ad74f..d875885c8c61 100644--- a/products/dashboards/frontend/widgets/widgetConfigSchemaParity.test.ts+++ b/products/dashboards/frontend/widgets/widgetConfigSchemaParity.test.ts@@ -2,6 +2,7 @@import configPropertyMetadata from '../generated/widget-config-property-keys.json'import {activityEventsWidgetConfigSchema,+ conversationsRecentTicketsWidgetConfigSchema,errorTrackingWidgetConfigSchema,experimentResultsWidgetConfigSchema,experimentsWidgetConfigSchema,@@ -12,6 +13,7 @@ import {} from '../generated/widget-configs.zod'const WIDGET_CONFIG_SCHEMAS = {+ conversations_recent_tickets: conversationsRecentTicketsWidgetConfigSchema,activity_events_list: activityEventsWidgetConfigSchema,error_tracking_list: errorTrackingWidgetConfigSchema,session_replay_list: sessionReplayWidgetConfigSchema,diff --git a/products/dashboards/frontend/widgets/widgetTileFiltersHooks.test.ts b/products/dashboards/frontend/widgets/widgetTileFiltersHooks.test.tsindex 1b0f3379d810..6a4524af80d5 100644--- a/products/dashboards/frontend/widgets/widgetTileFiltersHooks.test.ts+++ b/products/dashboards/frontend/widgets/widgetTileFiltersHooks.test.ts@@ -1,5 +1,7 @@import { act, renderHook } from '@testing-library/react'+import { lemonToast } from 'lib/lemon-ui/LemonToast'+import { WIDGET_TILE_REFRESH_DEBOUNCE_MS } from './constants'import { useWidgetTileConfigPersist } from './widgetTileFiltersHooks'@@ -102,6 +104,7 @@ describe('useWidgetTileConfigPersist', () => {})it('keeps a newer queued config when an earlier update fails', async () => {+ const errorToast = jest.spyOn(lemonToast, 'error').mockImplementation(() => 'toast-id')let rejectFirstUpdate: ((error: Error) => void) | undefinedconst onUpdateConfig = jest.fn()@@ -132,6 +135,7 @@ describe('useWidgetTileConfigPersist', () => {})expect(result.current.getLatestConfig()).toEqual({ status: 'resolved' })+ expect(errorToast).toHaveBeenCalledWith('Could not update widget filters. Check your connection and try again.')})it('flushes a pending debounced update on unmount', async () => {diff --git a/products/dashboards/frontend/widgets/widgetTileFiltersHooks.ts b/products/dashboards/frontend/widgets/widgetTileFiltersHooks.tsindex b91d6097d0fb..c92e0a4fcada 100644--- a/products/dashboards/frontend/widgets/widgetTileFiltersHooks.ts+++ b/products/dashboards/frontend/widgets/widgetTileFiltersHooks.ts@@ -95,6 +95,8 @@ export function useWidgetTileConfigPersist(lemonToast.error(validationMessage ?? 'Could not update widget filters. Check the values and try again.')+ } else {+ lemonToast.error('Could not update widget filters. Check your connection and try again.')}} finally {pendingPersistCountRef.current -= 1diff --git a/services/mcp/src/api/generated.ts b/services/mcp/src/api/generated.tsindex e44485d60fbb..c82c9fa31ce2 100644--- a/services/mcp/src/api/generated.ts+++ b/services/mcp/src/api/generated.ts@@ -5438,14 +5438,106 @@ export namespace Schemas {config: LogsListWidgetConfig;}- export type AddDashboardWidgetRequest = ActivityEventsListWidgetAddRequestOpenApi | ErrorTrackingListWidgetAddRequestOpenApi | SessionReplayListWidgetAddRequestOpenApi | ExperimentsListWidgetAddRequestOpenApi | ExperimentResultsWidgetAddRequestOpenApi | SurveyResultsWidgetAddRequestOpenApi | LogsListWidgetAddRequestOpenApi;+ export type ConversationsRecentTicketsWidgetAddRequestOpenApiWidgetType = typeof ConversationsRecentTicketsWidgetAddRequestOpenApiWidgetType[keyof typeof ConversationsRecentTicketsWidgetAddRequestOpenApiWidgetType];+++ export const ConversationsRecentTicketsWidgetAddRequestOpenApiWidgetType = {+ ConversationsRecentTickets: 'conversations_recent_tickets',+ } as const;++ /**+ * Ticket status filter.+ */+ export type ConversationsRecentTicketsWidgetConfigStatus = typeof ConversationsRecentTicketsWidgetConfigStatus[keyof typeof ConversationsRecentTicketsWidgetConfigStatus];+++ export const ConversationsRecentTicketsWidgetConfigStatus = {+ New: 'new',+ Open: 'open',+ Pending: 'pending',+ OnHold: 'on_hold',+ Resolved: 'resolved',+ All: 'all',+ } as const;++ export type ConversationsRecentTicketsWidgetConfigPrioritiesItem = typeof ConversationsRecentTicketsWidgetConfigPrioritiesItem[keyof typeof ConversationsRecentTicketsWidgetConfigPrioritiesItem];+++ export const ConversationsRecentTicketsWidgetConfigPrioritiesItem = {+ Low: 'low',+ Medium: 'medium',+ High: 'high',+ Critical: 'critical',+ } as const;++ /**+ * Ticket channel filter.+ */+ export type ConversationsRecentTicketsWidgetConfigChannel = typeof ConversationsRecentTicketsWidgetConfigChannel[keyof typeof ConversationsRecentTicketsWidgetConfigChannel];+++ export const ConversationsRecentTicketsWidgetConfigChannel = {+ Widget: 'widget',+ Email: 'email',+ Slack: 'slack',+ Teams: 'teams',+ Github: 'github',+ All: 'all',+ } as const;++ export interface ConversationsRecentTicketsWidgetConfig {+ /**+ * Maximum number of tickets to return.+ * @minimum 1+ * @maximum 25+ */+ limit?: number;+ /** Ticket status filter. */+ status?: ConversationsRecentTicketsWidgetConfigStatus;+ /** Only show tickets with these priorities. Empty shows all priorities. */+ priorities?: ConversationsRecentTicketsWidgetConfigPrioritiesItem[];+ /** Ticket channel filter. */+ channel?: ConversationsRecentTicketsWidgetConfigChannel;+ /**+ * Only show tickets assigned to these users or roles. 'me' means the requesting user and 'unassigned' means tickets without an assignment. Empty shows all assignees.+ * @maxItems 100+ */+ assignees?: ('me' | 'unassigned' | WidgetAssigneeFilter)[];+ /**+ * Search requester name or email, ticket subject, message text, or ticket number.+ * @maxLength 200+ */+ search?: string;+ /** short_id of a saved Support view to use as the source. When set, the saved view owns the ticket filters; the widget still sorts by most recently updated and applies its limit. */+ savedViewId?: string | null;+ }++ export interface ConversationsRecentTicketsWidgetAddRequestOpenApi {+ /**+ * Optional custom display name for the widget tile.+ * @maxLength 400+ * @nullable+ */+ name?: string | null;+ /** Optional markdown description shown when show_description is enabled. */+ description?: string;+ /** Optional react-grid-layout positions keyed by breakpoint (sm, xs). */+ layouts?: _WidgetTileLayoutsOpenApi;+ /** Whether to show the description on the dashboard tile. */+ show_description?: boolean;+ widget_type: ConversationsRecentTicketsWidgetAddRequestOpenApiWidgetType;+ /** Configuration for the recent tickets widget. */+ config: ConversationsRecentTicketsWidgetConfig;+ }++ export type AddDashboardWidgetRequest = ActivityEventsListWidgetAddRequestOpenApi | ErrorTrackingListWidgetAddRequestOpenApi | SessionReplayListWidgetAddRequestOpenApi | ExperimentsListWidgetAddRequestOpenApi | ExperimentResultsWidgetAddRequestOpenApi | SurveyResultsWidgetAddRequestOpenApi | LogsListWidgetAddRequestOpenApi | ConversationsRecentTicketsWidgetAddRequestOpenApi;/*** OpenAPI-only batch-add schema with widget_type-discriminated config shapes for agents.*/export interface AddDashboardWidgetsBatchRequestOpenApi {/**- * Widget tiles to add atomically. Supported widget_type values: activity_events_list, error_tracking_list, experiment_results, experiments_list, logs_list, session_replay_list, survey_results. Use dashboard-widget-catalog-list for per-type config_schema documentation. (1–10 per request).+ * Widget tiles to add atomically. Supported widget_type values: activity_events_list, conversations_recent_tickets, error_tracking_list, experiment_results, experiments_list, logs_list, session_replay_list, survey_results. Use dashboard-widget-catalog-list for per-type config_schema documentation. (1–10 per request).* @minItems 1* @maxItems 10*/@@ -8356,7 +8448,7 @@ export namespace Schemas {team: number;}- export type DashboardWidgetConfig = ActivityEventsListWidgetConfig | ErrorTrackingListWidgetConfig | SessionReplayListWidgetConfig | ExperimentsListWidgetConfig | ExperimentResultsWidgetConfig | SurveyResultsWidgetConfig | LogsListWidgetConfig;+ export type DashboardWidgetConfig = ActivityEventsListWidgetConfig | ErrorTrackingListWidgetConfig | SessionReplayListWidgetConfig | ExperimentsListWidgetConfig | ExperimentResultsWidgetConfig | SurveyResultsWidgetConfig | LogsListWidgetConfig | ConversationsRecentTicketsWidgetConfig;export interface DashboardWidget {readonly id: string;@@ -16744,6 +16836,60 @@ export namespace Schemas {readonly task: ConversationTask | null;}+ export type ConversationsRecentTicketsWidgetCatalogEntryOpenApiWidgetType = typeof ConversationsRecentTicketsWidgetCatalogEntryOpenApiWidgetType[keyof typeof ConversationsRecentTicketsWidgetCatalogEntryOpenApiWidgetType];+++ export const ConversationsRecentTicketsWidgetCatalogEntryOpenApiWidgetType = {+ ConversationsRecentTickets: 'conversations_recent_tickets',+ } as const;++ export interface ConversationsRecentTicketsWidgetCatalogEntryOpenApi {+ widget_type: ConversationsRecentTicketsWidgetCatalogEntryOpenApiWidgetType;+ group_id: string;+ group_label: string;+ label: string;+ description: string;+ /** OpenAPI config shape for this widget type (documentation; matches batch-add/PATCH schemas). */+ readonly config_schema: ConversationsRecentTicketsWidgetConfig;+ /** @nullable */+ required_product_access?: string | null;+ /** Whether tiles of this type self-update in real time after load. Live tiles show a fixed real-time window and cannot apply test-account filtering to the stream, so their config takes neither dateRange nor filterTestAccounts. */+ live: boolean;+ }++ /**+ * * `conversations_recent_tickets` - conversations_recent_tickets+ */+ export type ConversationsRecentTicketsWidgetTypeEnum = typeof ConversationsRecentTicketsWidgetTypeEnum[keyof typeof ConversationsRecentTicketsWidgetTypeEnum];+++ export const ConversationsRecentTicketsWidgetTypeEnum = {+ ConversationsRecentTickets: 'conversations_recent_tickets',+ } as const;++ export type ConversationsRecentTicketsWidgetUpdateRequestOpenApiWidgetType = typeof ConversationsRecentTicketsWidgetUpdateRequestOpenApiWidgetType[keyof typeof ConversationsRecentTicketsWidgetUpdateRequestOpenApiWidgetType];+++ export const ConversationsRecentTicketsWidgetUpdateRequestOpenApiWidgetType = {+ ConversationsRecentTickets: 'conversations_recent_tickets',+ } as const;++ export interface ConversationsRecentTicketsWidgetUpdateRequestOpenApi {+ /** ID of the widget tile to update. Use dashboard-get to look up widget tile IDs. */+ tile_id: number;+ /**+ * New display name for the widget. Empty string or null clears it; omit to leave unchanged.+ * @maxLength 400+ * @nullable+ */+ name?: string | null;+ /** New markdown description for the widget. Omit to leave unchanged. */+ description?: string;+ widget_type: ConversationsRecentTicketsWidgetUpdateRequestOpenApiWidgetType;+ /** New configuration for the recent tickets widget. Omit to leave unchanged. */+ config?: ConversationsRecentTicketsWidgetConfig;+ }+export interface ConversationsTicketImage {url: string;author: string;@@ -18334,6 +18480,7 @@ export namespace Schemas {/*** * `activity_events_list` - activity_events_list+ * * `conversations_recent_tickets` - conversations_recent_tickets* * `error_tracking_list` - error_tracking_list* * `experiment_results` - experiment_results* * `experiments_list` - experiments_list@@ -18346,6 +18493,7 @@ export namespace Schemas {export const DashboardPatchWidgetOpenApiWidgetTypeEnum = {ActivityEventsList: 'activity_events_list',+ ConversationsRecentTickets: 'conversations_recent_tickets',ErrorTrackingList: 'error_tracking_list',ExperimentResults: 'experiment_results',ExperimentsList: 'experiments_list',@@ -18360,6 +18508,7 @@ export namespace Schemas {/** Widget type identifier (cannot be changed on update).** * `activity_events_list` - activity_events_list+ * * `conversations_recent_tickets` - conversations_recent_tickets* * `error_tracking_list` - error_tracking_list* * `experiment_results` - experiment_results* * `experiments_list` - experiments_list@@ -60362,7 +60511,7 @@ export namespace Schemas {config?: SurveyResultsWidgetConfig;}- export type UpdateDashboardWidgetRequest = ActivityEventsListWidgetUpdateRequestOpenApi | ErrorTrackingListWidgetUpdateRequestOpenApi | SessionReplayListWidgetUpdateRequestOpenApi | ExperimentsListWidgetUpdateRequestOpenApi | ExperimentResultsWidgetUpdateRequestOpenApi | SurveyResultsWidgetUpdateRequestOpenApi | LogsListWidgetUpdateRequestOpenApi;+ export type UpdateDashboardWidgetRequest = ActivityEventsListWidgetUpdateRequestOpenApi | ErrorTrackingListWidgetUpdateRequestOpenApi | SessionReplayListWidgetUpdateRequestOpenApi | ExperimentsListWidgetUpdateRequestOpenApi | ExperimentResultsWidgetUpdateRequestOpenApi | SurveyResultsWidgetUpdateRequestOpenApi | LogsListWidgetUpdateRequestOpenApi | ConversationsRecentTicketsWidgetUpdateRequestOpenApi;/*** OpenAPI-only batch-update schema with widget_type-discriminated config shapes for agents.@@ -78081,7 +78230,7 @@ export namespace Schemas {is_organization_first_user: boolean;}- export type WidgetCatalogEntry = ActivityEventsListWidgetCatalogEntryOpenApi | ErrorTrackingListWidgetCatalogEntryOpenApi | SessionReplayListWidgetCatalogEntryOpenApi | ExperimentsListWidgetCatalogEntryOpenApi | ExperimentResultsWidgetCatalogEntryOpenApi | SurveyResultsWidgetCatalogEntryOpenApi | LogsListWidgetCatalogEntryOpenApi;+ export type WidgetCatalogEntry = ActivityEventsListWidgetCatalogEntryOpenApi | ErrorTrackingListWidgetCatalogEntryOpenApi | SessionReplayListWidgetCatalogEntryOpenApi | ExperimentsListWidgetCatalogEntryOpenApi | ExperimentResultsWidgetCatalogEntryOpenApi | SurveyResultsWidgetCatalogEntryOpenApi | LogsListWidgetCatalogEntryOpenApi | ConversationsRecentTicketsWidgetCatalogEntryOpenApi;export interface WidgetCatalogResponse {/** Registered dashboard widget types available when dashboard-widgets is enabled. */diff --git a/services/mcp/src/generated/dashboards/api.ts b/services/mcp/src/generated/dashboards/api.tsindex a9c52916c254..85215a6849c2 100644--- a/services/mcp/src/generated/dashboards/api.ts+++ b/services/mcp/src/generated/dashboards/api.ts@@ -226,6 +226,18 @@ export const dashboardsPartialUpdateBodyTilesItemWidgetOneConfigOneSevenLimitMaxexport const dashboardsPartialUpdateBodyTilesItemWidgetOneConfigOneSevenOrderByDefault = `latest`export const dashboardsPartialUpdateBodyTilesItemWidgetOneConfigOneSevenWrapLinesDefault = falseexport const dashboardsPartialUpdateBodyTilesItemWidgetOneConfigOneSevenTimezoneDefault = `UTC`+export const dashboardsPartialUpdateBodyTilesItemWidgetOneConfigOneEightLimitDefault = 10+export const dashboardsPartialUpdateBodyTilesItemWidgetOneConfigOneEightLimitMax = 25++export const dashboardsPartialUpdateBodyTilesItemWidgetOneConfigOneEightStatusDefault = `all`+export const dashboardsPartialUpdateBodyTilesItemWidgetOneConfigOneEightChannelDefault = `all`+export const dashboardsPartialUpdateBodyTilesItemWidgetOneConfigOneEightAssigneesMax = 100++export const dashboardsPartialUpdateBodyTilesItemWidgetOneConfigOneEightSearchDefault = ``+export const dashboardsPartialUpdateBodyTilesItemWidgetOneConfigOneEightSearchMax = 200++export const dashboardsPartialUpdateBodyTilesItemWidgetOneConfigOneEightSavedViewIdOneMax = 12+export const dashboardsPartialUpdateBodyTilesItemWidgetOneNameMax = 400export const DashboardsPartialUpdateBody = /* @__PURE__ */ zod@@ -282,6 +294,7 @@ export const DashboardsPartialUpdateBody = /* @__PURE__ */ zodwidget_type: zod.enum(['activity_events_list',+ 'conversations_recent_tickets','error_tracking_list','experiment_results','experiments_list',@@ -290,11 +303,11 @@ export const DashboardsPartialUpdateBody = /* @__PURE__ */ zod'survey_results',]).describe(- '\* `activity_events_list` - activity_events_list\n\* `error_tracking_list` - error_tracking_list\n\* `experiment_results` - experiment_results\n\* `experiments_list` - experiments_list\n\* `logs_list` - logs_list\n\* `session_replay_list` - session_replay_list\n\* `survey_results` - survey_results'+ '\* `activity_events_list` - activity_events_list\n\* `conversations_recent_tickets` - conversations_recent_tickets\n\* `error_tracking_list` - error_tracking_list\n\* `experiment_results` - experiment_results\n\* `experiments_list` - experiments_list\n\* `logs_list` - logs_list\n\* `session_replay_list` - session_replay_list\n\* `survey_results` - survey_results').optional().describe(- 'Widget type identifier (cannot be changed on update).\n\n\* `activity_events_list` - activity_events_list\n\* `error_tracking_list` - error_tracking_list\n\* `experiment_results` - experiment_results\n\* `experiments_list` - experiments_list\n\* `logs_list` - logs_list\n\* `session_replay_list` - session_replay_list\n\* `survey_results` - survey_results'+ 'Widget type identifier (cannot be changed on update).\n\n\* `activity_events_list` - activity_events_list\n\* `conversations_recent_tickets` - conversations_recent_tickets\n\* `error_tracking_list` - error_tracking_list\n\* `experiment_results` - experiment_results\n\* `experiments_list` - experiments_list\n\* `logs_list` - logs_list\n\* `session_replay_list` - session_replay_list\n\* `survey_results` - survey_results'),config: zod.union([@@ -893,6 +906,73 @@ export const DashboardsPartialUpdateBody = /* @__PURE__ */ zod'short_id of a saved logs view to use as the source. When set, the saved view owns the date range, severity, service, and property filters; only orderBy and limit still apply.'),}),+ zod.object({+ limit: zod+ .number()+ .min(1)+ .max(dashboardsPartialUpdateBodyTilesItemWidgetOneConfigOneEightLimitMax)+ .default(+ dashboardsPartialUpdateBodyTilesItemWidgetOneConfigOneEightLimitDefault+ )+ .describe('Maximum number of tickets to return.'),+ status: zod+ .enum(['new', 'open', 'pending', 'on_hold', 'resolved', 'all'])+ .default(+ dashboardsPartialUpdateBodyTilesItemWidgetOneConfigOneEightStatusDefault+ )+ .describe('Ticket status filter.'),+ priorities: zod+ .array(zod.enum(['low', 'medium', 'high', 'critical']))+ .optional()+ .describe(+ 'Only show tickets with these priorities. Empty shows all priorities.'+ ),+ channel: zod+ .enum(['widget', 'email', 'slack', 'teams', 'github', 'all'])+ .default(+ dashboardsPartialUpdateBodyTilesItemWidgetOneConfigOneEightChannelDefault+ )+ .describe('Ticket channel filter.'),+ assignees: zod+ .array(+ zod.union([+ zod.enum(['me', 'unassigned']),+ zod.object({+ id: zod.union([zod.string(), zod.number()]),+ type: zod.enum(['user', 'role']),+ }),+ ])+ )+ .max(+ dashboardsPartialUpdateBodyTilesItemWidgetOneConfigOneEightAssigneesMax+ )+ .optional()+ .describe(+ "Only show tickets assigned to these users or roles. 'me' means the requesting user and 'unassigned' means tickets without an assignment. Empty shows all assignees."+ ),+ search: zod+ .string()+ .max(dashboardsPartialUpdateBodyTilesItemWidgetOneConfigOneEightSearchMax)+ .default(+ dashboardsPartialUpdateBodyTilesItemWidgetOneConfigOneEightSearchDefault+ )+ .describe(+ 'Search requester name or email, ticket subject, message text, or ticket number.'+ ),+ savedViewId: zod+ .union([+ zod+ .string()+ .max(+ dashboardsPartialUpdateBodyTilesItemWidgetOneConfigOneEightSavedViewIdOneMax+ ),+ zod.null(),+ ])+ .optional()+ .describe(+ 'short_id of a saved Support view to use as the source. When set, the saved view owns the ticket filters; the widget still sorts by most recently updated and applies its limit.'+ ),+ }),]).optional().describe("Widget-specific configuration. Shape depends on the tile's widget_type."),@@ -1285,6 +1365,20 @@ export const dashboardsWidgetsBatchCreateBodyWidgetsItemSevenConfigOneLimitMax =export const dashboardsWidgetsBatchCreateBodyWidgetsItemSevenConfigOneOrderByDefault = `latest`export const dashboardsWidgetsBatchCreateBodyWidgetsItemSevenConfigOneWrapLinesDefault = falseexport const dashboardsWidgetsBatchCreateBodyWidgetsItemSevenConfigOneTimezoneDefault = `UTC`+export const dashboardsWidgetsBatchCreateBodyWidgetsItemEightNameMax = 400++export const dashboardsWidgetsBatchCreateBodyWidgetsItemEightConfigOneLimitDefault = 10+export const dashboardsWidgetsBatchCreateBodyWidgetsItemEightConfigOneLimitMax = 25++export const dashboardsWidgetsBatchCreateBodyWidgetsItemEightConfigOneStatusDefault = `all`+export const dashboardsWidgetsBatchCreateBodyWidgetsItemEightConfigOneChannelDefault = `all`+export const dashboardsWidgetsBatchCreateBodyWidgetsItemEightConfigOneAssigneesMax = 100++export const dashboardsWidgetsBatchCreateBodyWidgetsItemEightConfigOneSearchDefault = ``+export const dashboardsWidgetsBatchCreateBodyWidgetsItemEightConfigOneSearchMax = 200++export const dashboardsWidgetsBatchCreateBodyWidgetsItemEightConfigOneSavedViewIdOneMax = 12+export const dashboardsWidgetsBatchCreateBodyWidgetsMax = 10export const DashboardsWidgetsBatchCreateBody = /* @__PURE__ */ zod@@ -2267,12 +2361,128 @@ export const DashboardsWidgetsBatchCreateBody = /* @__PURE__ */ zod}).describe('Configuration for the recent logs widget.'),}),+ zod.object({+ name: zod+ .string()+ .max(dashboardsWidgetsBatchCreateBodyWidgetsItemEightNameMax)+ .nullish()+ .describe('Optional custom display name for the widget tile.'),+ description: zod+ .string()+ .optional()+ .describe('Optional markdown description shown when show_description is enabled.'),+ layouts: zod+ .object({+ sm: zod+ .object({+ x: zod+ .number()+ .optional()+ .describe('Column position in the dashboard grid (0-indexed).'),+ y: zod+ .number()+ .optional()+ .describe('Row position in the dashboard grid (0-indexed).'),+ w: zod+ .number()+ .optional()+ .describe('Width in grid columns. The desktop grid is 12 columns wide.'),+ h: zod.number().optional().describe('Height in grid rows.'),+ })+ .optional()+ .describe(+ 'Layout for the standard (desktop) breakpoint. The grid is 12 columns wide.'+ ),+ xs: zod+ .object({+ x: zod+ .number()+ .optional()+ .describe('Column position in the dashboard grid (0-indexed).'),+ y: zod+ .number()+ .optional()+ .describe('Row position in the dashboard grid (0-indexed).'),+ w: zod+ .number()+ .optional()+ .describe('Width in grid columns. The desktop grid is 12 columns wide.'),+ h: zod.number().optional().describe('Height in grid rows.'),+ })+ .optional()+ .describe('Layout for the small (mobile) breakpoint. The grid is 1 column wide.'),+ })+ .optional()+ .describe('Optional react-grid-layout positions keyed by breakpoint (sm, xs).'),+ show_description: zod+ .boolean()+ .optional()+ .describe('Whether to show the description on the dashboard tile.'),+ widget_type: zod.enum(['conversations_recent_tickets']),+ config: zod+ .object({+ limit: zod+ .number()+ .min(1)+ .max(dashboardsWidgetsBatchCreateBodyWidgetsItemEightConfigOneLimitMax)+ .default(dashboardsWidgetsBatchCreateBodyWidgetsItemEightConfigOneLimitDefault)+ .describe('Maximum number of tickets to return.'),+ status: zod+ .enum(['new', 'open', 'pending', 'on_hold', 'resolved', 'all'])+ .default(dashboardsWidgetsBatchCreateBodyWidgetsItemEightConfigOneStatusDefault)+ .describe('Ticket status filter.'),+ priorities: zod+ .array(zod.enum(['low', 'medium', 'high', 'critical']))+ .optional()+ .describe('Only show tickets with these priorities. Empty shows all priorities.'),+ channel: zod+ .enum(['widget', 'email', 'slack', 'teams', 'github', 'all'])+ .default(dashboardsWidgetsBatchCreateBodyWidgetsItemEightConfigOneChannelDefault)+ .describe('Ticket channel filter.'),+ assignees: zod+ .array(+ zod.union([+ zod.enum(['me', 'unassigned']),+ zod.object({+ id: zod.union([zod.string(), zod.number()]),+ type: zod.enum(['user', 'role']),+ }),+ ])+ )+ .max(dashboardsWidgetsBatchCreateBodyWidgetsItemEightConfigOneAssigneesMax)+ .optional()+ .describe(+ "Only show tickets assigned to these users or roles. 'me' means the requesting user and 'unassigned' means tickets without an assignment. Empty shows all assignees."+ ),+ search: zod+ .string()+ .max(dashboardsWidgetsBatchCreateBodyWidgetsItemEightConfigOneSearchMax)+ .default(dashboardsWidgetsBatchCreateBodyWidgetsItemEightConfigOneSearchDefault)+ .describe(+ 'Search requester name or email, ticket subject, message text, or ticket number.'+ ),+ savedViewId: zod+ .union([+ zod+ .string()+ .max(+ dashboardsWidgetsBatchCreateBodyWidgetsItemEightConfigOneSavedViewIdOneMax+ ),+ zod.null(),+ ])+ .optional()+ .describe(+ 'short_id of a saved Support view to use as the source. When set, the saved view owns the ticket filters; the widget still sorts by most recently updated and applies its limit.'+ ),+ })+ .describe('Configuration for the recent tickets widget.'),+ }),])).min(1).max(dashboardsWidgetsBatchCreateBodyWidgetsMax).describe(- 'Widget tiles to add atomically. Supported widget_type values: activity_events_list, error_tracking_list, experiment_results, experiments_list, logs_list, session_replay_list, survey_results. Use dashboard-widget-catalog-list for per-type config_schema documentation. (1–10 per request).'+ 'Widget tiles to add atomically. Supported widget_type values: activity_events_list, conversations_recent_tickets, error_tracking_list, experiment_results, experiments_list, logs_list, session_replay_list, survey_results. Use dashboard-widget-catalog-list for per-type config_schema documentation. (1–10 per request).'),}).describe('OpenAPI-only batch-add schema with widget_type-discriminated config shapes for agents.')@@ -2354,6 +2564,20 @@ export const dashboardsUpdateWidgetsBatchBodyWidgetsItemSevenConfigOneLimitMax =export const dashboardsUpdateWidgetsBatchBodyWidgetsItemSevenConfigOneOrderByDefault = `latest`export const dashboardsUpdateWidgetsBatchBodyWidgetsItemSevenConfigOneWrapLinesDefault = falseexport const dashboardsUpdateWidgetsBatchBodyWidgetsItemSevenConfigOneTimezoneDefault = `UTC`+export const dashboardsUpdateWidgetsBatchBodyWidgetsItemEightNameMax = 400++export const dashboardsUpdateWidgetsBatchBodyWidgetsItemEightConfigOneLimitDefault = 10+export const dashboardsUpdateWidgetsBatchBodyWidgetsItemEightConfigOneLimitMax = 25++export const dashboardsUpdateWidgetsBatchBodyWidgetsItemEightConfigOneStatusDefault = `all`+export const dashboardsUpdateWidgetsBatchBodyWidgetsItemEightConfigOneChannelDefault = `all`+export const dashboardsUpdateWidgetsBatchBodyWidgetsItemEightConfigOneAssigneesMax = 100++export const dashboardsUpdateWidgetsBatchBodyWidgetsItemEightConfigOneSearchDefault = ``+export const dashboardsUpdateWidgetsBatchBodyWidgetsItemEightConfigOneSearchMax = 200++export const dashboardsUpdateWidgetsBatchBodyWidgetsItemEightConfigOneSavedViewIdOneMax = 12+export const dashboardsUpdateWidgetsBatchBodyWidgetsMax = 10export const DashboardsUpdateWidgetsBatchBody = /* @__PURE__ */ zod@@ -3049,6 +3273,81 @@ export const DashboardsUpdateWidgetsBatchBody = /* @__PURE__ */ zod.optional().describe('New configuration for the recent logs widget. Omit to leave unchanged.'),}),+ zod.object({+ tile_id: zod+ .number()+ .describe('ID of the widget tile to update. Use dashboard-get to look up widget tile IDs.'),+ name: zod+ .string()+ .max(dashboardsUpdateWidgetsBatchBodyWidgetsItemEightNameMax)+ .nullish()+ .describe(+ 'New display name for the widget. Empty string or null clears it; omit to leave unchanged.'+ ),+ description: zod+ .string()+ .optional()+ .describe('New markdown description for the widget. Omit to leave unchanged.'),+ widget_type: zod.enum(['conversations_recent_tickets']),+ config: zod+ .object({+ limit: zod+ .number()+ .min(1)+ .max(dashboardsUpdateWidgetsBatchBodyWidgetsItemEightConfigOneLimitMax)+ .default(dashboardsUpdateWidgetsBatchBodyWidgetsItemEightConfigOneLimitDefault)+ .describe('Maximum number of tickets to return.'),+ status: zod+ .enum(['new', 'open', 'pending', 'on_hold', 'resolved', 'all'])+ .default(dashboardsUpdateWidgetsBatchBodyWidgetsItemEightConfigOneStatusDefault)+ .describe('Ticket status filter.'),+ priorities: zod+ .array(zod.enum(['low', 'medium', 'high', 'critical']))+ .optional()+ .describe('Only show tickets with these priorities. Empty shows all priorities.'),+ channel: zod+ .enum(['widget', 'email', 'slack', 'teams', 'github', 'all'])+ .default(dashboardsUpdateWidgetsBatchBodyWidgetsItemEightConfigOneChannelDefault)+ .describe('Ticket channel filter.'),+ assignees: zod+ .array(+ zod.union([+ zod.enum(['me', 'unassigned']),+ zod.object({+ id: zod.union([zod.string(), zod.number()]),+ type: zod.enum(['user', 'role']),+ }),+ ])+ )+ .max(dashboardsUpdateWidgetsBatchBodyWidgetsItemEightConfigOneAssigneesMax)+ .optional()+ .describe(+ "Only show tickets assigned to these users or roles. 'me' means the requesting user and 'unassigned' means tickets without an assignment. Empty shows all assignees."+ ),+ search: zod+ .string()+ .max(dashboardsUpdateWidgetsBatchBodyWidgetsItemEightConfigOneSearchMax)+ .default(dashboardsUpdateWidgetsBatchBodyWidgetsItemEightConfigOneSearchDefault)+ .describe(+ 'Search requester name or email, ticket subject, message text, or ticket number.'+ ),+ savedViewId: zod+ .union([+ zod+ .string()+ .max(+ dashboardsUpdateWidgetsBatchBodyWidgetsItemEightConfigOneSavedViewIdOneMax+ ),+ zod.null(),+ ])+ .optional()+ .describe(+ 'short_id of a saved Support view to use as the source. When set, the saved view owns the ticket filters; the widget still sorts by most recently updated and applies its limit.'+ ),+ })+ .optional()+ .describe('New configuration for the recent tickets widget. Omit to leave unchanged.'),+ }),])).min(1)diff --git a/services/mcp/tests/unit/__snapshots__/tool-schemas/dashboard-update.json b/services/mcp/tests/unit/__snapshots__/tool-schemas/dashboard-update.jsonindex 143b30077b3d..93e0370be7a5 100644--- a/services/mcp/tests/unit/__snapshots__/tool-schemas/dashboard-update.json+++ b/services/mcp/tests/unit/__snapshots__/tool-schemas/dashboard-update.json@@ -1000,6 +1000,89 @@}},"type": "object"+ },+ {+ "properties": {+ "assignees": {+ "description": "Only show tickets assigned to these users or roles. 'me' means the requesting user and 'unassigned' means tickets without an assignment. Empty shows all assignees.",+ "items": {+ "anyOf": [+ {+ "enum": ["me", "unassigned"],+ "type": "string"+ },+ {+ "properties": {+ "id": {+ "anyOf": [+ {+ "type": "string"+ },+ {+ "type": "number"+ }+ ]+ },+ "type": {+ "enum": ["user", "role"],+ "type": "string"+ }+ },+ "required": ["id", "type"],+ "type": "object"+ }+ ]+ },+ "maxItems": 100,+ "type": "array"+ },+ "channel": {+ "default": "all",+ "description": "Ticket channel filter.",+ "enum": ["widget", "email", "slack", "teams", "github", "all"],+ "type": "string"+ },+ "limit": {+ "default": 10,+ "description": "Maximum number of tickets to return.",+ "maximum": 25,+ "minimum": 1,+ "type": "number"+ },+ "priorities": {+ "description": "Only show tickets with these priorities. Empty shows all priorities.",+ "items": {+ "enum": ["low", "medium", "high", "critical"],+ "type": "string"+ },+ "type": "array"+ },+ "savedViewId": {+ "anyOf": [+ {+ "maxLength": 12,+ "type": "string"+ },+ {+ "type": "null"+ }+ ],+ "description": "short_id of a saved Support view to use as the source. When set, the saved view owns the ticket filters; the widget still sorts by most recently updated and applies its limit."+ },+ "search": {+ "default": "",+ "description": "Search requester name or email, ticket subject, message text, or ticket number.",+ "maxLength": 200,+ "type": "string"+ },+ "status": {+ "default": "all",+ "description": "Ticket status filter.",+ "enum": ["new", "open", "pending", "on_hold", "resolved", "all"],+ "type": "string"+ }+ },+ "type": "object"}],"description": "Widget-specific configuration. Shape depends on the tile's widget_type."@@ -1025,9 +1108,10 @@"description": "Optional custom display name for the widget tile."},"widget_type": {- "description": "Widget type identifier (cannot be changed on update).\n\n* `activity_events_list` - activity_events_list\n* `error_tracking_list` - error_tracking_list\n* `experiment_results` - experiment_results\n* `experiments_list` - experiments_list\n* `logs_list` - logs_list\n* `session_replay_list` - session_replay_list\n* `survey_results` - survey_results",+ "description": "Widget type identifier (cannot be changed on update).\n\n* `activity_events_list` - activity_events_list\n* `conversations_recent_tickets` - conversations_recent_tickets\n* `error_tracking_list` - error_tracking_list\n* `experiment_results` - experiment_results\n* `experiments_list` - experiments_list\n* `logs_list` - logs_list\n* `session_replay_list` - session_replay_list\n* `survey_results` - survey_results","enum": ["activity_events_list",+ "conversations_recent_tickets","error_tracking_list","experiment_results","experiments_list",diff --git a/services/mcp/tests/unit/__snapshots__/tool-schemas/dashboard-widgets-batch-add.json b/services/mcp/tests/unit/__snapshots__/tool-schemas/dashboard-widgets-batch-add.jsonindex 998f223a0beb..04986500fb97 100644--- a/services/mcp/tests/unit/__snapshots__/tool-schemas/dashboard-widgets-batch-add.json+++ b/services/mcp/tests/unit/__snapshots__/tool-schemas/dashboard-widgets-batch-add.json@@ -6,7 +6,7 @@"type": "number"},"widgets": {- "description": "Widget tiles to add atomically. Supported widget_type values: activity_events_list, error_tracking_list, experiment_results, experiments_list, logs_list, session_replay_list, survey_results. Use dashboard-widget-catalog-list for per-type config_schema documentation. (1–10 per request).",+ "description": "Widget tiles to add atomically. Supported widget_type values: activity_events_list, conversations_recent_tickets, error_tracking_list, experiment_results, experiments_list, logs_list, session_replay_list, survey_results. Use dashboard-widget-catalog-list for per-type config_schema documentation. (1–10 per request).","items": {"anyOf": [{@@ -1434,6 +1434,170 @@},"required": ["widget_type", "config"],"type": "object"+ },+ {+ "properties": {+ "config": {+ "description": "Configuration for the recent tickets widget.",+ "properties": {+ "assignees": {+ "description": "Only show tickets assigned to these users or roles. 'me' means the requesting user and 'unassigned' means tickets without an assignment. Empty shows all assignees.",+ "items": {+ "anyOf": [+ {+ "enum": ["me", "unassigned"],+ "type": "string"+ },+ {+ "properties": {+ "id": {+ "anyOf": [+ {+ "type": "string"+ },+ {+ "type": "number"+ }+ ]+ },+ "type": {+ "enum": ["user", "role"],+ "type": "string"+ }+ },+ "required": ["id", "type"],+ "type": "object"+ }+ ]+ },+ "maxItems": 100,+ "type": "array"+ },+ "channel": {+ "default": "all",+ "description": "Ticket channel filter.",+ "enum": ["widget", "email", "slack", "teams", "github", "all"],+ "type": "string"+ },+ "limit": {+ "default": 10,+ "description": "Maximum number of tickets to return.",+ "maximum": 25,+ "minimum": 1,+ "type": "number"+ },+ "priorities": {+ "description": "Only show tickets with these priorities. Empty shows all priorities.",+ "items": {+ "enum": ["low", "medium", "high", "critical"],+ "type": "string"+ },+ "type": "array"+ },+ "savedViewId": {+ "anyOf": [+ {+ "maxLength": 12,+ "type": "string"+ },+ {+ "type": "null"+ }+ ],+ "description": "short_id of a saved Support view to use as the source. When set, the saved view owns the ticket filters; the widget still sorts by most recently updated and applies its limit."+ },+ "search": {+ "default": "",+ "description": "Search requester name or email, ticket subject, message text, or ticket number.",+ "maxLength": 200,+ "type": "string"+ },+ "status": {+ "default": "all",+ "description": "Ticket status filter.",+ "enum": ["new", "open", "pending", "on_hold", "resolved", "all"],+ "type": "string"+ }+ },+ "type": "object"+ },+ "description": {+ "description": "Optional markdown description shown when show_description is enabled.",+ "type": "string"+ },+ "layouts": {+ "description": "Optional react-grid-layout positions keyed by breakpoint (sm, xs).",+ "properties": {+ "sm": {+ "description": "Layout for the standard (desktop) breakpoint. The grid is 12 columns wide.",+ "properties": {+ "h": {+ "description": "Height in grid rows.",+ "type": "number"+ },+ "w": {+ "description": "Width in grid columns. The desktop grid is 12 columns wide.",+ "type": "number"+ },+ "x": {+ "description": "Column position in the dashboard grid (0-indexed).",+ "type": "number"+ },+ "y": {+ "description": "Row position in the dashboard grid (0-indexed).",+ "type": "number"+ }+ },+ "type": "object"+ },+ "xs": {+ "description": "Layout for the small (mobile) breakpoint. The grid is 1 column wide.",+ "properties": {+ "h": {+ "description": "Height in grid rows.",+ "type": "number"+ },+ "w": {+ "description": "Width in grid columns. The desktop grid is 12 columns wide.",+ "type": "number"+ },+ "x": {+ "description": "Column position in the dashboard grid (0-indexed).",+ "type": "number"+ },+ "y": {+ "description": "Row position in the dashboard grid (0-indexed).",+ "type": "number"+ }+ },+ "type": "object"+ }+ },+ "type": "object"+ },+ "name": {+ "anyOf": [+ {+ "maxLength": 400,+ "type": "string"+ },+ {+ "type": "null"+ }+ ],+ "description": "Optional custom display name for the widget tile."+ },+ "show_description": {+ "description": "Whether to show the description on the dashboard tile.",+ "type": "boolean"+ },+ "widget_type": {+ "enum": ["conversations_recent_tickets"],+ "type": "string"+ }+ },+ "required": ["widget_type", "config"],+ "type": "object"}]},diff --git a/services/mcp/tests/unit/__snapshots__/tool-schemas/dashboard-widgets-batch-update.json b/services/mcp/tests/unit/__snapshots__/tool-schemas/dashboard-widgets-batch-update.jsonindex d24df1e0d5c0..63ae0b3862d3 100644--- a/services/mcp/tests/unit/__snapshots__/tool-schemas/dashboard-widgets-batch-update.json+++ b/services/mcp/tests/unit/__snapshots__/tool-schemas/dashboard-widgets-batch-update.json@@ -1084,6 +1084,120 @@},"required": ["tile_id", "widget_type"],"type": "object"+ },+ {+ "properties": {+ "config": {+ "description": "New configuration for the recent tickets widget. Omit to leave unchanged.",+ "properties": {+ "assignees": {+ "description": "Only show tickets assigned to these users or roles. 'me' means the requesting user and 'unassigned' means tickets without an assignment. Empty shows all assignees.",+ "items": {+ "anyOf": [+ {+ "enum": ["me", "unassigned"],+ "type": "string"+ },+ {+ "properties": {+ "id": {+ "anyOf": [+ {+ "type": "string"+ },+ {+ "type": "number"+ }+ ]+ },+ "type": {+ "enum": ["user", "role"],+ "type": "string"+ }+ },+ "required": ["id", "type"],+ "type": "object"+ }+ ]+ },+ "maxItems": 100,+ "type": "array"+ },+ "channel": {+ "default": "all",+ "description": "Ticket channel filter.",+ "enum": ["widget", "email", "slack", "teams", "github", "all"],+ "type": "string"+ },+ "limit": {+ "default": 10,+ "description": "Maximum number of tickets to return.",+ "maximum": 25,+ "minimum": 1,+ "type": "number"+ },+ "priorities": {+ "description": "Only show tickets with these priorities. Empty shows all priorities.",+ "items": {+ "enum": ["low", "medium", "high", "critical"],+ "type": "string"+ },+ "type": "array"+ },+ "savedViewId": {+ "anyOf": [+ {+ "maxLength": 12,+ "type": "string"+ },+ {+ "type": "null"+ }+ ],+ "description": "short_id of a saved Support view to use as the source. When set, the saved view owns the ticket filters; the widget still sorts by most recently updated and applies its limit."+ },+ "search": {+ "default": "",+ "description": "Search requester name or email, ticket subject, message text, or ticket number.",+ "maxLength": 200,+ "type": "string"+ },+ "status": {+ "default": "all",+ "description": "Ticket status filter.",+ "enum": ["new", "open", "pending", "on_hold", "resolved", "all"],+ "type": "string"+ }+ },+ "type": "object"+ },+ "description": {+ "description": "New markdown description for the widget. Omit to leave unchanged.",+ "type": "string"+ },+ "name": {+ "anyOf": [+ {+ "maxLength": 400,+ "type": "string"+ },+ {+ "type": "null"+ }+ ],+ "description": "New display name for the widget. Empty string or null clears it; omit to leave unchanged."+ },+ "tile_id": {+ "description": "ID of the widget tile to update. Use dashboard-get to look up widget tile IDs.",+ "type": "number"+ },+ "widget_type": {+ "enum": ["conversations_recent_tickets"],+ "type": "string"+ }+ },+ "required": ["tile_id", "widget_type"],+ "type": "object"}]},diff --git a/tach.toml b/tach.tomlindex 5e7d995eb62f..e4a542570fec 100644--- a/tach.toml+++ b/tach.toml@@ -236,6 +236,7 @@ depends_on = ["products.mcp_analytics","products.notifications","products.product_analytics",+ "products.conversations","products.surveys",]layer = "modules"