From f285709e9d1b129e3a70c1b0e13ee8623ed1a083 Mon Sep 17 00:00:00 2001 From: Charlie Tonneslan Date: Sun, 17 May 2026 14:37:16 -0400 Subject: [PATCH] Remove showLLMFeatures feature flag The LLM bill summaries and tags have been on for all environments for a while, so the gate isn't doing any work anymore. Drop the flag from FeatureFlags and the three env defaults, and inline the bill summary block in Summary.tsx without the surrounding conditional. Also drop the now-unused useFlags import. Closes #2079. Signed-off-by: Charlie Tonneslan --- components/bill/Summary.tsx | 101 ++++++++++++++++-------------------- components/featureFlags.ts | 5 -- 2 files changed, 46 insertions(+), 60 deletions(-) diff --git a/components/bill/Summary.tsx b/components/bill/Summary.tsx index 828174535..9366efbeb 100644 --- a/components/bill/Summary.tsx +++ b/components/bill/Summary.tsx @@ -5,7 +5,6 @@ import type { ModalProps } from "react-bootstrap" import styled, { ThemeConsumer } from "styled-components" import { useMediaQuery } from "usehooks-ts" import { Button, Col, Container, Image, Modal, Row, Stack } from "../bootstrap" -import { useFlags } from "../featureFlags" import { firestore } from "../firebase" import * as links from "../links" import { @@ -121,8 +120,6 @@ export const Summary = ({ const isBallotMeasure = bill?.currentCommittee?.id === currentBallotInitiativeCommittee - const { showLLMFeatures } = useFlags() - const { t } = useTranslation("common") const isMobile = useMediaQuery("(max-width: 991px)") @@ -210,65 +207,59 @@ export const Summary = ({ <> )} - {showLLMFeatures ? ( + {bill.summary !== undefined && bill.topics !== undefined ? ( <> - {bill.summary !== undefined && bill.topics !== undefined ? ( - <> -
- - - ) : bill.summary !== undefined && isBallotMeasure ? ( +
+ + + ) : bill.summary !== undefined && isBallotMeasure ? ( + <> +
+ + ) : ( + <> + )} + {bill.summary !== undefined && isBallotMeasure ? ( + + {bill.summary.length > BALLOT_SUMMARY_CHAR_LIMIT ? ( <> -
+ {bill.summary.slice(0, BALLOT_SUMMARY_CHAR_LIMIT)}…{" "} + setShowFullSummary(true)} + > + {t("bill.view_full_summary")} + + setShowFullSummary(false)} + size="lg" + > + setShowFullSummary(false)} + > + {bill?.id} + + + + {bill.summary} + + + ) : ( - <> - )} - {bill.summary !== undefined && isBallotMeasure ? ( - - {bill.summary.length > BALLOT_SUMMARY_CHAR_LIMIT ? ( - <> - {bill.summary.slice(0, BALLOT_SUMMARY_CHAR_LIMIT)}…{" "} - setShowFullSummary(true)} - > - {t("bill.view_full_summary")} - - setShowFullSummary(false)} - size="lg" - > - setShowFullSummary(false)} - > - {bill?.id} - - - - {bill.summary} - - - - - ) : ( - bill.summary - )} - - ) : ( - {bill.summary} + bill.summary )} - - {bill.topics?.map(t => ( - - ))} - - +
) : ( - <> + {bill.summary} )} + + {bill.topics?.map(t => ( + + ))} + ) } diff --git a/components/featureFlags.ts b/components/featureFlags.ts index 04214dc18..83041ebcd 100644 --- a/components/featureFlags.ts +++ b/components/featureFlags.ts @@ -12,8 +12,6 @@ export const FeatureFlags = z.object({ followOrg: z.boolean().default(false), /** Lobbying Table */ lobbyingTable: z.boolean().default(false), - /** LLM Bill Summary and Tags **/ - showLLMFeatures: z.boolean().default(false), /** Hearings and Transcriptions **/ hearingsAndTranscriptions: z.boolean().default(false), /** Phone Verification UI changes **/ @@ -40,7 +38,6 @@ const defaults: Record = { billTracker: true, followOrg: true, lobbyingTable: false, - showLLMFeatures: true, hearingsAndTranscriptions: true, phoneVerificationUI: true, ballotQuestions: true, @@ -52,7 +49,6 @@ const defaults: Record = { billTracker: false, followOrg: true, lobbyingTable: false, - showLLMFeatures: true, hearingsAndTranscriptions: true, phoneVerificationUI: false, ballotQuestions: false, @@ -64,7 +60,6 @@ const defaults: Record = { billTracker: false, followOrg: true, lobbyingTable: false, - showLLMFeatures: true, hearingsAndTranscriptions: true, phoneVerificationUI: true, ballotQuestions: false,