Skip to content

Conversation

@aubin-tchoi
Copy link
Contributor

@aubin-tchoi aubin-tchoi commented Mar 14, 2025

Description

  • Follow up on feat(Gong) - add an optional retention policy #11264.
  • This PR augments the GongOptionComponent to allow setting the desired retention period (in number of days).
  • The additions include an Input and a Button that calls the connector manager's setConfigurationKey to update the retention period (backend already implemented).
Screenshot 2025-03-17 at 10 40 54 AM

Tests

  • Tested locally.

Risk

  • N/A.

Deploy Plan

  • Deploy front.

Base automatically changed from gong-retention-policy to main March 17, 2025 09:00
@aubin-tchoi aubin-tchoi force-pushed the gong-retention-policy-ui branch from 5a836d7 to 10edcc4 Compare March 17, 2025 09:16
Copy link
Contributor

@JulesBelveze JulesBelveze left a comment

Choose a reason for hiding this comment

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

LGTM, left a few nits.

Could we add a screenshot? 🙏🏼

isAdmin: boolean;
dataSource: DataSourceType;
}) {
const configKey = "gongRetentionPeriodDays";
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: Let's extract a global var?

Comment on lines +24 to +27
owner: WorkspaceType;
readOnly: boolean;
isAdmin: boolean;
dataSource: DataSourceType;
Copy link
Contributor

Choose a reason for hiding this comment

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

Let's extract everything as an interface ? 🙏🏼

import { useConnectorConfig } from "@app/lib/swr/connectors";

function checkIsPositiveInteger(value: string) {
return /^[0-9]+$/.test(value);
Copy link
Contributor

Choose a reason for hiding this comment

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

Noob question: any reason for a regex over a parseInt + inequality?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

not really, we can def do a parseInt + inequality 👍

Copy link
Contributor Author

Choose a reason for hiding this comment

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

actually parseInt is less restrictive, keeping the regex

> parseInt("123abc", 10);
123

@aubin-tchoi aubin-tchoi merged commit 34ff6bb into main Mar 17, 2025
6 checks passed
@aubin-tchoi aubin-tchoi deleted the gong-retention-policy-ui branch March 17, 2025 09:56
frankaloia pushed a commit that referenced this pull request Mar 17, 2025
…nt` (#11384)

* add an Input to update the retention period

* fix: update imports to use @app/types instead of the deprecated @dust-tt/types

* add a global variable for RETENTION_PERIOD_CONFIG_KEY

* rename the global variable

* add an interface GongOptionComponentProps

* replace regex check with parseInt + inequality

* rename checkIsPositiveInteger into checkIsNonNegativeInteger since 0 is allowed

* Revert "rename checkIsPositiveInteger into checkIsNonNegativeInteger since 0 is allowed"

This reverts commit 4d59803.

* Revert "replace regex check with parseInt + inequality"

This reverts commit 5c79fab.

* rename checkIsPositiveInteger into checkIsNonNegativeInteger since 0 is allowed
pinotalexandre pushed a commit that referenced this pull request Apr 30, 2025
…nt` (#11384)

* add an Input to update the retention period

* fix: update imports to use @app/types instead of the deprecated @dust-tt/types

* add a global variable for RETENTION_PERIOD_CONFIG_KEY

* rename the global variable

* add an interface GongOptionComponentProps

* replace regex check with parseInt + inequality

* rename checkIsPositiveInteger into checkIsNonNegativeInteger since 0 is allowed

* Revert "rename checkIsPositiveInteger into checkIsNonNegativeInteger since 0 is allowed"

This reverts commit 4d59803.

* Revert "replace regex check with parseInt + inequality"

This reverts commit 5c79fab.

* rename checkIsPositiveInteger into checkIsNonNegativeInteger since 0 is allowed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants