Page MenuHomePhabricator

Make Flow notification content truncation length configurable
Closed, ResolvedPublic

Description

It would be nice to make the truncation length for Flow notification content configurable, so that more content can be included in an email.

That allows people to read the contents of a message in their inbox, instead of having to click a link to come back on wiki to read the contents there.

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

Change 912952 had a related patch set uploaded (by Kosta Harlan; author: Kosta Harlan):

[mediawiki/extensions/Flow@master] Notifications: Allow configuring the truncation length of content

https://gerrit.wikimedia.org/r/912952

Change 912952 merged by jenkins-bot:

[mediawiki/extensions/Flow@master] Notifications: Allow configuring the truncation length of content

https://gerrit.wikimedia.org/r/912952

There are three lengths:

  • how much goes into the database
  • how much goes into the email
  • how much goes into the flyout

We probably don't want to put a lot of text in the flyout. But (IMO) we do want to put a lot of text in the email, something like 30K should comfortably fit into the DB.

@Ladsgroup do you think there are DB size concerns here? At the very worst this would duplicate how much DB space is taken up by user talk pages, right? (Or talk pages in general if we extend the concept to notification emails about other kinds of messages.)

Also I wonder if we really need the DB here. Can we just put the revision ID in the event, and parse the revision on the fly? In general maybe there would be performance concerns (although all notifications about the same event are sent out roughly the same time so caching should work well), but specifically for talk pages, there's only one notification per event.

This task is specific to StructuredDiscussons which is being undeployed soon. Are you sure you're in the right place?

There are three lengths:

  • how much goes into the database
  • how much goes into the email
  • how much goes into the flyout

We probably don't want to put a lot of text in the flyout. But (IMO) we do want to put a lot of text in the email, something like 30K should comfortably fit into the DB.

@Ladsgroup do you think there are DB size concerns here? At the very worst this would duplicate how much DB space is taken up by user talk pages, right? (Or talk pages in general if we extend the concept to notification emails about other kinds of messages.)

Content of user talk pages are stored in ExternalStore which has a completely different architecture and is designed to handle large blobs of text. x1/core dbs are not designed for this.

Several mitigations I can think of:

Also I wonder if we really need the DB here. Can we just put the revision ID in the event, and parse the revision on the fly? In general maybe there would be performance concerns (although all notifications about the same event are sent out roughly the same time so caching should work well), but specifically for talk pages, there's only one notification per event.

That would be nicer indeed.

This task is specific to StructuredDiscussons which is being undeployed soon. Are you sure you're in the right place?

Uh, right. There is no other task though (aside from the parent) so let's just make this one more generic.

On second thought, let's not, I'll just copy the DB comment to a better place.

Tgr renamed this task from Make notification content truncation length configurable to Make Flow notification content truncation length configurable.Nov 19 2025, 10:27 AM
Tgr closed this task as Resolved.
Tgr assigned this task to kostajh.

This was done by @kostajh a while ago. IMO not the most useful in its present form because we probably want different length for email and web, but Flow is on its way out so doesn't really matter either way.