####Status: (NOTE)
This work is in discussion and not currently prioritized by any WMF team.
A community consultation will be started if plans are made to move this work forward.
####User story:
As a WMF Product Manager, Tl;dr
Flow is a complex piece of software that was never quite finished, fits poorly into the MediaWiki architecture due to its many (eventually un-uitilized) layers of abstraction, lacks key features (such as search and solid moderation) and has many disruptive bugs, and is rejected by most Wikimedia communities. I want to reduce our unnecessary maintenance burdenWhile there are communities that are happy with it, because I want teams to be able to focus on high-impact work and community needs.
####Background:
WMF intended for Flow (a.k.a [[ https://www.mediawiki.org/wiki/Extension:StructuredDiscussions | StructuredDiscussions ]]) to be the successor to plain wikitext talk pages.the value it provides isn't commensurate with its maintenance cost, much less with the expected future maintenance cost once there are major changes to Parsoid or VisualEditor. DiscussionTools now provides a similarly user-friendly UI, without all the problems. We should invest into undeploying Flow - it will be a significant effort, Product envisioned that Flow would also accommodate flexible workflows (hence the name Flow) related to managing edits to wiki pagesbut keeping it in production would take more effort eventually.
Full rollout of Flow to WMF wikis did not succeed. WMF [[ https://lists.wikimedia.org/hyperkitty/list/wikitech-l@lists.wikimedia.org/message/FLFE77BXJBKDSJHP6BCYUMQOR5FBWHZK/ | paused development in 2015 ]]. A few communities still use Flow. WMF also instituted a freeze in new deployments of Flow several years ago.### History
Talk pages were long seen as a usability pain point (see the talk pages consultation's [[https://www.mediawiki.org/wiki/Talk_pages_consultation_2019/Discussion_tools_in_the_past|historical overview]]). The [[https://www.mediawiki.org/wiki/Extension:LiquidThreads|LiquidThreads]] extension was created back when the movement had very limited technical resources; plans to improve it eventually evolved into replacing it with an ambitious workflow system, Flow (later renamed [[ https://www.mediawiki.org/wiki/Extension:StructuredDiscussions | StructuredDiscussions ]]) which would have different modules for different types of talk page activities such as threaded discussion, voting or requests.
The eventual release only supported threaded discussion, and while it was a huge usability improvement for users unfamiliar with wikitext, it broke a number of workflows that power users considered very important, such as moderation or talk page refactoring. As a result, the rollout of Flow met fierce opposition from many wiki communities, and deployments were halted (and in some cases reversed). The WMF [[ https://lists.wikimedia.org/hyperkitty/list/wikitech-l@lists.wikimedia.org/message/FLFE77BXJBKDSJHP6BCYUMQOR5FBWHZK/ | paused development in 2015 ]] and instituted a freeze in new deployments of Flow a few years later. [[https://www.mediawiki.org/wiki/Structured_Discussions/Wikis|a few communities]] still use Flow.
In 2019, the WMF organized the [[ https://www.mediawiki.org/wiki/Talk_pages_consultation_2019 | talk pages consultation ]] to look at the future of talk pages. The consultation yielded the [[ https://www.mediawiki.org/wiki/Talk_pages_project?tableofcontents=0 | Talk pages project ]]. That project produced the [[ https://www.mediawiki.org/wiki/Extension:DiscussionTools | DiscussionTools ]] extension, which gained wide community adoption and is now the default on all wikis.
Community members have initiated discussions to [[ https://www.mediawiki.org/wiki/Topic:Wvqji3vfu2j1na7g | replace Flow pages with DiscussionTools on https://www.mediawiki.org/ ]] and at [[ https://translatewiki.net/wiki/Thread:Support/Replacing_the_discussion_system | translatewiki.net ]].
**### Problems
##### Maintenance burden:** #####
Maintaining Flow is a drain on WMF resources:
- It is a large and complex codebase, with approximately [[https://sonarcloud.io/code?id=mediawiki-extensions-Flow|36,000 lines of code]].
- The code is complicated to reason about and difficult to work with. Some of the original authors are no longer at WMF.
- Subtle bugs relating to database replication issues periodically cause user- As it provides an alternative talk pages to become broken (see e.g. implementation, T308907)all features that need to be interact with talk pages need a separate Flow and wikitext implementation. SomeonOn the from Growth then has to run a maintenance script to fix the problem.ntend side this is somewhat managed via mw.messagePoster, Fixingon the underlying issuserver side there is not trivialn't an off-the-shelf way to do it.
- Flow accounts for [[https://phabricator.wikimedia.org/maniphest/query/Di8rR9_JVJBf/#R|24 issues on the production error workboard]]Subtle bugs relating to database replication issues periodically cause user talk pages to become broken (see e.g. There have been 100 production error tasks in total.
- There are ~1200 tasks on the [[https://phabricator.wikimedia.org/project/board/657/|Flow workboard]]{T308907}). Someone from Growth then has to run a maintenance script to fix the problem. Fixing the underlying issue is not trivial.
- Other teams are blocked on overdue maintenance needed in Flow: Content Transformers needs stored Flow HTML to be updated to the newest Parsoid version (T209120)Flow accounts for [[https://phabricator.wikimedia.org/maniphest/query/Di8rR9_JVJBf/#R|25 open issues on the production error workboard]]. There have been 111 Flow production error tasks in total.
- Flow uses patterns and libraries not found elsewhere in MediaWiki, increasing maintenance cost.- There are [[https://phabricator.wikimedia.org/maniphest/query/LH0MrbesSxn./#R|16 open Flow tasks tagged with Security]], For example,including some crippling limitations to moderation functionality. it uses Pimple rather than MediaWikiServices for dependency injectionThe non-trivial data flow makes it nearly impossible to make sure proper escaping is done before building SQL queries, and it uses lightncandy for its templates, unlike any other extension. T150350
####See also:making it prone to SQL injection.
- There are ~1200 open tasks on the [[https://phabricator.wikimedia.org/project/board/657/|Flow workboard]], with about a hundred of them having high priority.
- Other teams are blocked on overdue maintenance needed in Flow: Content Transformers needs stored Flow HTML to be updated to the newest Parsoid version ({T209120}, {T124837}). Given its shaky change list integration (see below), it will require a lot of extra work for patrolling or moderation changes (a priority area for the next year).
- Flow uses patterns and libraries not found elsewhere in MediaWiki, increasing maintenance cost. For example, it uses Pimple rather than MediaWikiServices for dependency injection (T150350), and it uses lightncandy for its templates, unlike any other extension.
##### Architecture burden ######
Because Flow was intended to be very generic and support all kinds of different workflows, the codebase ended up with many layers of abstractions (which eventually weren't used since only one workflow was implemented), making it hard to understand and maintain. Because it envisioned sharing talk pages between multiple wikis (this mostly got implemented but wasn't deployed), it had to invent its own alternative revision system. In addition, its authors tried to innovate in directions that the wider MediaWiki community didn't pick up on (e.g. [[https://raw.githubusercontent.com/wikimedia/mediawiki-extensions-Flow/e2bf374ba0881283c8404981a173f8079c520388/DATA_ABSTRACTION|using MySQL as a noSQL database]]), so Flow ended up being something of an alien object wedged into MediaWiki. Not using the revision table means Flow has to reimplement every single feature related to changes lists (page history / contributions / RC / watchlist) and moderation that other extensions get for free.
##### UX burden #####
Two competing interfaces for the same use case, where the user cannot chose which one to use and eventually has to learn both (wikis that use Flow don't use it on all talk pages), adds to the mental burden of using the site. While at a high level Flow is in many ways closer to user expectations of how a discussion system should look, the implementation is unfinished, lacks key features (such as searching or [[https://www.mediawiki.org/wiki/Flow/2017_community_feedback_concerning_URLs_format|legible links]]), has many severe bugs and usability issues (e.g. {T324416} ) and integrates with moderation tools poorly.
### See also
* https://www.mediawiki.org/wiki/Structured_Discussions/Deprecation
* {T325222}