Skip to content

feat: sae feature flag#900

Open
meeh0w wants to merge 1 commit intomainfrom
feat/sae-feature-flag
Open

feat: sae feature flag#900
meeh0w wants to merge 1 commit intomainfrom
feat/sae-feature-flag

Conversation

@meeh0w
Copy link
Copy Markdown
Collaborator

@meeh0w meeh0w commented Apr 21, 2026

Description

Changes

Testing

Screenshots:

Checklist for the author

Tick each of them when done or if not applicable.

  • I've covered new/modified business logic with Jest test cases.
  • I've tested the changes myself before sending it to code review and QA.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds a new feature gate to control SAE behavior by disabling optimistic confirmations when the flag is enabled.

Changes:

  • Introduces FeatureGates.FORCE_SAE in shared feature flag types.
  • Adds default/disabled values for the new gate in common feature flag constants.
  • Updates useIsOptimisticConfirmationEnabled to short-circuit (return false) when FORCE_SAE is enabled.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
packages/ui/src/hooks/useIsOptimisticConfirmationEnabled.ts Reads the new feature flag and disables optimistic confirmations when enabled.
packages/types/src/feature-flags.ts Adds the FORCE_SAE feature gate enum value.
packages/common/src/feature-flags.ts Registers the new gate in DISABLED_FLAG_VALUES and DEFAULT_FLAGS.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +22 to +28
const isForceSaeEnabled = featureFlags[FeatureGates.FORCE_SAE];

return useCallback(
async (network?: NetworkWithCaipId) => {
if (isForceSaeEnabled) {
return false;
}
Copy link

Copilot AI Apr 21, 2026

Choose a reason for hiding this comment

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

FeatureGates.FORCE_SAE is used here to force useIsOptimisticConfirmationEnabled to return false (i.e., disable optimistic confirmations). The flag name reads like an enablement gate, so the intent is ambiguous for future readers. Consider either renaming the gate/variable to reflect that it disables optimistic confirmations, or add an inline comment explaining the relationship between “SAE” and optimistic confirmations.

Copilot uses AI. Check for mistakes.
Comment on lines +22 to +28
const isForceSaeEnabled = featureFlags[FeatureGates.FORCE_SAE];

return useCallback(
async (network?: NetworkWithCaipId) => {
if (isForceSaeEnabled) {
return false;
}
Copy link

Copilot AI Apr 21, 2026

Choose a reason for hiding this comment

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

New behavior is introduced via FeatureGates.FORCE_SAE, but there’s no unit test coverage verifying that the hook returns false when this flag is enabled (and ideally that it short-circuits without hitting provider.getInfo()). Please add a Jest test for this hook similar to other hook tests in packages/ui/src/hooks.

Copilot uses AI. Check for mistakes.
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.

2 participants