Background
On 2026-09-17 every iOS widget (Top Read, Featured Article, Picture of the Day) broke at the same time. Picture of the Day showed the sample image (Picture of the Year 2019, "the bulls") and the other widgets showed placeholders.
The cause was a single field: the image object in en.wikipedia.org/api/rest_v1/feed/featured/2026/09/17 came without description. The widget models decode the whole WidgetFeaturedContent at once with non-optional fields, so one missing key fails the decode of the entire payload and every widget falls back to sample content. The card in the Explore feed was not affected because the main app uses its own Objective-C models with a fallback to the file name.
Steps to reproduce
- Install the app on a device with the Picture of the Day, Top Read and Featured Article widgets on the home screen.
- Set the app language to a wiki whose feed of the day omits a field the widget models require (on 2026-09-17, English).
- Wait for the widgets to refresh.
Expected
Each widget shows the content of the sections that did decode. A missing caption shows the image without a caption.
Actual
All widgets show sample or placeholder content, and nothing records why.
Proposed solution
- Decode each feed section (tfa, mostread, onthisday, image) independently, so a broken section becomes nil and the others survive.
- Decode arrays element by element, dropping only the article or event that fails.
- Make optional every field the widgets do not render, including description and license of the picture of the day, and fall back to the Commons structured caption when the feed has no description.
- When a section is missing, carry the previous cached section over, flagged as stale, instead of showing sample content. When the whole fetch fails, serve the previous cache as is and retry in one hour.
- Record the result of the last fetch (date, language, HTTP status, decoding error per section) in the shared widget cache and show it in Developer Settings, with a button to clear the cache and reload the widgets.
- Add a daily GitHub Actions job that decodes the live feed for en, de, ja, ar and zh with the widget models, so a feed change is visible before it reaches home screens.
QA steps
- With the 2026-09-17 payload (added as a unit test fixture), all three widgets show content; Picture of the Day shows the image with the structured caption.
- Developer Settings > Widgets lists the cached sections and the last fetch result, including the section that failed and the JSON path.
- "Clear cache and reload widgets" empties the cache and the widgets refresh from the network.
- Switching the app language refreshes the widgets in the new language.
