Remove the IS_MESSAGE_ATTACHMENT_ENABLED feature flag
Why
Message attachments are on by default for new workspaces and the 2.57 add-message-attachment-target command turned the flag on for existing ones, so the flag no longer gates anything. This removes IS_MESSAGE_ATTACHMENT_ENABLED and keeps the flag-on behaviour everywhere. First of a series removing the messaging and permissions flags, one PR per flag.
What changes
- The four messaging services (app message ingestion, app send attachments, import attachments, sent message persistence) no longer check the flag and no longer inject
FeatureFlagService.FeatureFlagModuleis dropped from the two modules that only needed it for this. - Front: the thread query always selects
attachments, the attachment listener always runs, andcanAttachFilesis gone fromuseEmailComposerState,ChatThreadComposerandChatThreadNewMessagesince it was always true. - The key is removed from
FeatureFlagKey, the default flags, the dev seeder, the admin panel list and the generated schemas (front and client SDK). - The 2.57
add-message-attachment-targetcommand keeps creating the fields and index but no longer writes the flag, since the flag service rejects keys outside the enum. LeftoverfeatureFlagrows are ignored, same as previous flag removals, so there is no cleanup command. - Flag-off unit cases and story assertions are removed.
Risk
A workspace that has not run the 2.57 command has no attachment.targetMessageId column, so app message ingestion and the thread query fail there until it runs. This is accepted: on self-hosted the entrypoint finishes upgrade before the server starts (the gaps are a worker started with DISABLE_DB_MIGRATIONS=true during the migration, and a workspace whose upgrade failed), and cloud workspaces are past 2.57. Not checked against prod before opening.
Screenshots
No visual change: the UI is the same as with the flag on.
Validation
Server typecheck, lint:diff-with-main on server and front, front emails unit tests and server messaging unit tests. Front typecheck is clean on the touched files.