Skip to content

Experiment: Topic Pages - Introduce narrative guides for category archives - #1306

Open
himanshupathak95 wants to merge 61 commits into
WordPress:developfrom
himanshupathak95:feat/1136-topic-pages
Open

himanshupathak95 wants to merge 61 commits into
WordPress:developfrom
himanshupathak95:feat/1136-topic-pages

Conversation

@himanshupathak95

@himanshupathak95 himanshupathak95 commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

What?

Closes #1136.

Adds an opt-in Topic Pages experiment for category archives. Editors can publish a short summary and a cited overview alongside a timeline of posts.

Why?

A category archive shows what was published recently. A topic guide gives readers a way to catch up and see how the story developed.

How?

The blocks use the category being viewed. Eligible archives show a timeline of published posts and keep the theme’s existing post list and pagination. Editors generate and review each text section on the category edit screen.
The public archive changes when they save a preview.

Use of AI Tools

AI assistance: Yes
Tools and models: Codex (Astra 6.0), Gemini 4.0 (Argon)
Used for: Implementation assistance, testing, code review, and PR description.

Testing Instructions

  1. On a test site with Twenty Twenty-Five and a connected text provider, enable Topic Pages under Settings → AI.
  2. Visit a category with five public, password-free posts. Check that the timeline is visible before generating any text.
  3. Edit the category. Generate a Summary and Narrative overview. Refresh the archive before and after saving each preview.
  4. Regenerate a published section, then discard the preview. Confirm the public text stays the same.
  5. Visit another category and check that it shows its own content. Make a source post private while at least five public posts remain. Confirm the affected text and timeline entry disappear.

Screenshots or screencast

Generation demo

Screen.Recording.2026-11-11.at.16.20.55.mov

Blocks in the template and ineligibility

Screen.Recording.2026-11-11.at.16.20.55.mov

Enablement of Topic guide in child category and generation

Screen.Recording.2026-11-11.at.16.23.47.mov

Changelog Entry

Added - Experimental Topic Pages with editor-reviewed guides and timelines for category archives.

Open WordPress Playground Preview

@codecov

codecov Bot commented Nov 6, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 85.35620% with 111 lines in your changes missing coverage. Please review.
✅ Project coverage is 85.07%. Comparing base (d1a9bf4) to head (ff54361).
⚠️ Report is 3 commits behind head on develop.

Files with missing lines Patch % Lines
...cludes/Abilities/Topic_Overview/Topic_Overview.php 76.47% 36 Missing ⚠️
includes/Experiments/Topic_Pages/Topic_Pages.php 73.07% 35 Missing ⚠️
includes/Experiments/Topic_Pages/Controller.php 74.19% 16 Missing ⚠️
includes/Experiments/Topic_Pages/Template.php 83.67% 8 Missing ⚠️
includes/Experiments/Topic_Pages/Sources.php 96.60% 7 Missing ⚠️
includes/Experiments/Topic_Pages/Store.php 96.10% 6 Missing ⚠️
...es/Abilities/Topic_Overview/system-instruction.php 0.00% 3 Missing ⚠️
Additional details and impacted files
@@              Coverage Diff              @@
##             develop    #1306      +/-   ##
=============================================
+ Coverage      85.05%   85.07%   +0.01%     
- Complexity      4836     5061     +225     
=============================================
  Files            190      197       +7     
  Lines          17971    18729     +758     
=============================================
+ Hits           15286    15933     +647     
- Misses          2685     2796     +111     
Flag Coverage Δ
unit 85.07% <85.35%> (+0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@himanshupathak95
himanshupathak95 force-pushed the feat/1136-topic-pages branch 2 times, most recently from a8c6968 to dfb6eb8 Compare November 6, 2026 15:37
@himanshupathak95
himanshupathak95 marked this pull request as ready for review November 11, 2026 10:59
@himanshupathak95
himanshupathak95 requested a review from a team November 11, 2026 10:59
@github-actions

github-actions Bot commented Nov 11, 2026 •

Copy link
Copy Markdown

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: himanshupathak95 <abcd95@git.wordpress.org>
Co-authored-by: jeffpaul <jeffpaul@git.wordpress.org>
Co-authored-by: dkotter <dkotter@git.wordpress.org>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.


Props Bot commands

You can trigger Props Bot actions by commenting on this PR:

  • @propsbot add <username> to give props to a GitHub or WordPress.org user. Requires write access.
  • @propsbot remove <username> to leave a user out of the props. Requires write access.
  • @propsbot refresh to refresh this list. Adding the props-bot label works too.

@jeffpaul jeffpaul added this to the 1.6.0 milestone Nov 17, 2026
@jeffpaul

Copy link
Copy Markdown
Member

@dkotter curious if you've got any UX ideas in mind where that are better than adding these section generations on the category page in the admin? Otherwise, this seems ok for a v1 though I feel like there could be a an alternate to consider. Maybe viewing the archive page in the site editor could allow us to view a specific category and (re)generate section content there?

@dkotter

dkotter commented Nov 18, 2026

Copy link
Copy Markdown
Contributor

@dkotter curious if you've got any UX ideas in mind where that are better than adding these section generations on the category page in the admin? Otherwise, this seems ok for a v1 though I feel like there could be a an alternate to consider. Maybe viewing the archive page in the site editor could allow us to view a specific category and (re)generate section content there?

Yeah, while I don't mind this approach it feels outdated with the Site Editor we have available now. My expectation is I should be able to go to the Editor and create a custom category template and from there, trigger these new items. So I'd love to see an approach that looks into that to see how feasible that is and how exactly we'd trigger that functionality at the template level (are these custom blocks you add? Are these options in the sidebar you trigger?)

@himanshupathak95

Copy link
Copy Markdown
Contributor Author

Hey @jeffpaul @dkotter, thanks for taking a look at this!

I did consider the Site Editor as a possible screen for generation (and regeneration) earlier, but then eventually shifted to the category edit screen to keep the first version small, since this already identifies the category and the term context, so generating, previewing, and saving apply directly to that category’s content. In the Site Editor, we'd need a way to select which category to target and wire up extra states around that.

The Summary, Overview, and Timeline are already custom blocks you can place in any template. The part I deferred was choosing which category to preview and regenerate when editing a shared category template. Having a template for a specific category down the road could make that a lot simpler.

@dkotter

dkotter commented Nov 19, 2026

Copy link
Copy Markdown
Contributor

I did consider the Site Editor as a possible screen for generation (and regeneration) earlier, but then eventually shifted to the category edit screen to keep the first version small, since this already identifies the category and the term context, so generating, previewing, and saving apply directly to that category’s content. In the Site Editor, we'd need a way to select which category to target and wire up extra states around that.

I'd push back on this a bit as the Site Editor makes it pretty easy to create your own archive pages, either generally (say for all categories) or specific (for a single category). If you go to Editor > Templates and click Add Template, one of the options there is Category Archives. If you choose that, it then prompts if you want a template for all categories or a specific one, and if you choose the singular category option, you then choose which category to target.

At that point, you now have a custom template specific to that category archive and from here it would be nice to have the AI controls, instead of managing that from the category edit screen. If you haven't investigated that yet, I'd prefer to at least look into that before we proceed here.

@himanshupathak95

himanshupathak95 commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor Author

Hey @dkotter, thanks for pointing me to the template setup flow. I tried it with a template for one category and got generation, preview, and publishing working from a small sidebar using our existing code. WordPress already knows which category the template is for, so there’s no extra picker in that case.

I'd still keep the category edit screen for two reasons:

  • Editors can manage categories but can't open the Site Editor.
  • It also works when several categories share one archive layout, so you can publish a guide without creating a separate template for each category

For the first version, would you prefer to keep generation on the category screen and add Site Editor controls later, or include both now, with the Site Editor controls shown only on templates for a specific category?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

New Experiment: AI-generated Topic Pages with a narrative overview and content timeline

3 participants