feat(app): gate the expression info card behind an experiment (#2773)

This commit is contained in:
Hampus authored and GitHub committed 2026-09-14 20:14:58 +02:00
1 parent 7c9274847f
commit 6339c3b8ad
110 files changed
+12827 -5191

No files matched your search

@@ -8,6 +8,10 @@ import {
BlockedMessageGroupsAssignmentResponse,
INERT_BLOCKED_MESSAGE_GROUPS_ASSIGNMENT,
} from '@fluxer/schema/src/domains/experiment/BlockedMessageGroupsSchemas';
import {
ExpressionInfoCardAssignmentResponse,
INERT_EXPRESSION_INFO_CARD_ASSIGNMENT,
} from '@fluxer/schema/src/domains/experiment/ExpressionInfoCardSchemas';
import {
GuildActivityLogPresentationAssignmentResponse,
INERT_GUILD_ACTIVITY_LOG_PRESENTATION_ASSIGNMENT,
@@ -62,6 +66,7 @@ const ExperimentAssignmentsSchema = z.object({
message_keyboard_focus: MessageKeyboardFocusAssignmentResponse.optional(),
blocked_message_groups: BlockedMessageGroupsAssignmentResponse.optional(),
guild_activity_log_presentation: GuildActivityLogPresentationAssignmentResponse.optional(),
expression_info_card: ExpressionInfoCardAssignmentResponse.optional(),
});
export const ExperimentAssignmentsResponse = z.object({
@@ -107,3 +112,9 @@ export function readGuildActivityLogPresentationAssignment(
): GuildActivityLogPresentationAssignmentResponse {
return response.assignments.guild_activity_log_presentation ?? INERT_GUILD_ACTIVITY_LOG_PRESENTATION_ASSIGNMENT;
}
export function readExpressionInfoCardAssignment(
response: ExperimentAssignmentsResponse,
): ExpressionInfoCardAssignmentResponse {
return response.assignments.expression_info_card ?? INERT_EXPRESSION_INFO_CARD_ASSIGNMENT;
}