Skip to content

Conversation

charlesBochet
Copy link
Member

@charlesBochet charlesBochet commented Jun 17, 2025

Context

Support button was missing for configuration having support enabled (FrontApp)

image

How

Recently, we changed some enums from lowercase to uppercase in graphql

Problem resolution

supportDriver was typed as a string where we could have used SupportDriver type. I'm exposing it in the graphql generated files to re-use in the front so this issue cannot happen anymore

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

PR Summary

Implements strong typing for support chat functionality by replacing string literals with a proper SupportDriver enum across frontend and backend components.

  • Changed supportDriver from string to SupportDriver enum in packages/twenty-server/src/engine/core-modules/client-config/client-config.entity.ts enforcing only 'NONE' or 'FRONT' values
  • Updated frontend components to use SupportDriver.FRONT/NONE enum values instead of string literals 'front'/'none' in multiple files
  • Added GraphQL enum type registration for SupportDriver to ensure proper type checking between frontend and backend
  • Fixed case mismatch in useSupportChat.ts that was preventing support chat from loading

9 files reviewed, no comments
Edit PR Review Bot Settings | Greptile

Copy link
Contributor

github-actions bot commented Jun 17, 2025

📊 API Changes Report

GraphQL Schema Changes

GraphQL Schema Changes

[log]
Detected the following changes (2) between schemas:

[log] ✖ Field Support.supportDriver changed type from String! to SupportDriver!
[log] ✔ Type SupportDriver was added
[error] Detected 1 breaking change
⚠️ Breaking changes or errors detected in GraphQL schema

[log] 
Detected the following changes (2) between schemas:

[log] ✖  Field Support.supportDriver changed type from String! to SupportDriver!
[log] ✔  Type SupportDriver was added
[error] Detected 1 breaking change
Error generating diff

GraphQL Metadata Schema Changes

GraphQL Metadata Schema Changes

[log]
Detected the following changes (2) between schemas:

[log] ✖ Field Support.supportDriver changed type from String! to SupportDriver!
[log] ✔ Type SupportDriver was added
[error] Detected 1 breaking change
⚠️ Breaking changes or errors detected in GraphQL metadata schema

[log] 
Detected the following changes (2) between schemas:

[log] ✖  Field Support.supportDriver changed type from String! to SupportDriver!
[log] ✔  Type SupportDriver was added
[error] Detected 1 breaking change
Error generating diff

⚠️ Please review these API changes carefully before merging.

✅ Breaking Change Protocol

This PR title contains "breaking" and breaking changes were detected - the CI will fail as expected.

📝 Action Required: Please add BREAKING CHANGE: to your commit message to trigger a major version bump.

Example:

feat: add new API endpoint

BREAKING CHANGE: removed deprecated field from User schema

Copy link
Contributor

github-actions bot commented Jun 17, 2025

🚀 Preview Environment Ready!

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

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

@charlesBochet charlesBochet changed the title Fix broken support button BREAKING CHANGE: Fix broken support button Jun 17, 2025
Copy link
Member

@Weiko Weiko left a comment

Choose a reason for hiding this comment

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

LGTM

@charlesBochet charlesBochet merged commit 0043665 into main Jun 17, 2025
59 checks passed
@charlesBochet charlesBochet deleted the fix-support-button-missing branch June 17, 2025 08:26
abdulrahmancodes pushed a commit to abdulrahmancodes/twenty that referenced this pull request Jun 18, 2025
## Context 

Support button was missing for configuration having support enabled
(FrontApp)

<img width="1253" alt="image"
src="https://github.com/user-attachments/assets/930e3e0c-05a1-4a5b-820b-bb257f19fdde"
/>


## How

Recently, we changed some enums from lowercase to uppercase in graphql

## Problem resolution

supportDriver was typed as a string where we could have used
SupportDriver type. I'm exposing it in the graphql generated files to
re-use in the front so this issue cannot happen anymore
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants