Page MenuHomePhabricator

Decide how to render failing and pending fragments when creating a section
Closed, ResolvedPublic

Description

Description

When the update script builds a section, it fetches the existing fragments as they are stored in the fragment cache.
Fragments can be:

  • available and successful: they return an html blob
  • available and failing: they return an error
  • not available

Although the goal is that:

  • failing fragments will occur rarely
  • pending fragments will never occur

We need to define a way these are displayed in the end article render that a end-user will read.


In the Abstract Wikipedia interface:

  • fragments are run till they are ready to be shown, so there's no "pending" fragment
  • failing fragments are expected to be understood and fixed by the user, so they are large error boxes:

Screenshot from 2026-06-10 19-13-54.png (891×271 px, 25 KB)


The reader of the the Special:PreviewAbstract page, unlike the Abstract Wikipedia editor, is not expected to understand or take action to fix the error. They are the reader of a Wikipedia article, and they should be minimally bothered about fragment error or pending states.

Few quick takes using small signaling inline blocks:

Screenshot from 2026-06-10 20-01-39.png (1,290×422 px, 33 KB)
failed fragments on destructive, pending on warning
Screenshot from 2026-06-10 19-58-23.png (1,290×422 px, 33 KB)
failed fragments on destructive, subtle grey on pending
Screenshot from 2026-06-10 19-57-52.png (1,290×422 px, 33 KB)
as pills
Screenshot from 2026-06-10 19-59-01.png (1,290×422 px, 34 KB)
different wording, maybe no need to differentiate Failing vs Pending, just Missing

Event Timeline

Jdforrester-WMF renamed this task from Decide how to render failind an pending framgnets when creating a section to Decide how to render failing and pending framgents when creating a section.Jun 10 2026, 11:03 PM
Jdforrester-WMF triaged this task as High priority.

Discussed with @LMorgantini-WMF

  • this task should be addressed by @gonyeahialam for a final well-rounded decision on how we are showing these failing or pending fragments in the AW integrated article.
  • In the meantime, we will push a zero-opinionated patch just to unbreak the current state, with the following look:

Screenshot from 2026-06-12 14-26-00.png (1,253×441 px, 32 KB)

  • both tags are shown in an uninterrupting grey.
  • "Failing fragment" and "Pending fragment" for more clarity.

Again, this next patch is a non-decision to fix broken messages but this task should remain open till we have design input.

Change #1301352 had a related patch set uploaded (by Genoveva Galarza; author: Genoveva Galarza):

[mediawiki/extensions/WikiLambda@master] Add error and pending styles to rendered fragment blocks

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

Change #1301352 merged by jenkins-bot:

[mediawiki/extensions/WikiLambda@master] Add error and pending styles to rendered fragment blocks

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

Jdforrester-WMF renamed this task from Decide how to render failing and pending framgents when creating a section to Decide how to render failing and pending fragments when creating a section.Jun 16 2026, 12:48 PM
Jdforrester-WMF changed the task status from Open to In Progress.
Jdforrester-WMF added a project: Design.

cc @gengh

Who will see this

The people most likely to see this indicator on pages where pre-rendered Abstract content is shown (e.g. Special:PreviewAbstract, and eventually integrated Wikipedia articles) are:

  • Article readers (primary audience) — most probably know little or nothing about Abstract Wikipedia. We do not expect them to take any action; the chip should be understandable enough that they are not confused about what happened.
  • A few Wikipedia admins / pilot reviewers — may know about AW and have approved or are evaluating the integration. They may use what they see to inform integration decisions, or raise concerns through normal channels if needed.
  • Abstract Wikipedia editors (unlikely) — i guess they will rarely see this surface. If they need detail or want to fix something, they already know how to do that on the AW edit page.

Copy

Based on the above, I would like to optimize copy for article readers by avoiding the technical term “fragment” .

Current stateproposed chip label
Failing fragmentContent unavailable
Pending fragmentContent pending

Styling and component

The main purpose of these pages is reading, so we should minimize distraction. Even when content is failing or not yet available, use a subtle treatment rather than an alarming error style.

Recommendation: CSS-only Codex InfoChip with subtle status:
https://doc.wikimedia.org/codex/latest/components/demos/info-chip.html#css-only-version
I believe we cannot use the Vue <cdx-info-chip> component here, right?
The InfoChips may not render cleanly on the page due to the article line-height, I don't remember how we solved this for WF integration with WP perhaps we can reuse that solution. If still not possible we can fall back to your pill solution here.

Change #1306659 had a related patch set uploaded (by Genoveva Galarza; author: Genoveva Galarza):

[mediawiki/extensions/WikiLambda@master] Fix pending and failing fragment copy for AW consumer pages

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

Copy is now updated.
As you noted, cdx-info styles aren't available in the page and having them would require to add a large module. Until we have a better solution to include granular codex styles, we will be leaving the current pill aspect.

Change #1306659 merged by jenkins-bot:

[mediawiki/extensions/WikiLambda@master] i18n: Fix pending and failing fragment copy for AW consumer pages

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