Skip to content

Make sure the post list is fetched and displayed in the same order#25085

Merged
crazytonyli merged 4 commits intotrunkfrom
bugfix/CMM-1070-fetch-posts-order
Jan 5, 2026
Merged

Make sure the post list is fetched and displayed in the same order#25085
crazytonyli merged 4 commits intotrunkfrom
bugfix/CMM-1070-fetch-posts-order

Conversation

@crazytonyli
Copy link
Copy Markdown
Contributor

Description

Fixes https://linear.app/a8c/issue/CMM-1070.

I suggest reviewing this PR commit by commit, as each commit contains detailed messages.

Testing instructions

See the Linear issue.

The property values can be 0, which fails the if check. However, that
does not mean we should not set their corresponding API parameters.
This property was added 9 years, and I don't think it applies to how the
posts are currently fetched and displayed anymore.

The current code fetched posts that is created after the `oldestPostDate`
(when set). However, the post list does not always sort by the "creation date".
Draft posts are sorted using modified date. So, the predicate created
based on `oldestPostDate` does not apply here.

There is also a related `fetchLimit` property. I'm not sure why we need
that. We should be displaying a full post list. There is no need to set
a limit here.
Fixes https://linear.app/a8c/issue/CMM-1070

The posts list's display order is set in `PostListFilter`, but is
fetched in a different order in `PostRepository`. This change makes
sure the orders now are the same.
@crazytonyli crazytonyli requested a review from kean December 19, 2025 00:59
@crazytonyli crazytonyli added this to the 26.6 milestone Dec 19, 2025
@wpmobilebot
Copy link
Copy Markdown
Contributor

wpmobilebot commented Dec 19, 2025

App Icon📲 You can test the changes from this Pull Request in WordPress by scanning the QR code below to install the corresponding build.
App NameWordPress
ConfigurationRelease-Alpha
Build Number30253
VersionPR #25085
Bundle IDorg.wordpress.alpha
Commitcb0131f
Installation URL5e9lq9d913md8
Automatticians: You can use our internal self-serve MC tool to give yourself access to those builds if needed.

@wpmobilebot
Copy link
Copy Markdown
Contributor

wpmobilebot commented Dec 19, 2025

App Icon📲 You can test the changes from this Pull Request in Jetpack by scanning the QR code below to install the corresponding build.
App NameJetpack
ConfigurationRelease-Alpha
Build Number30253
VersionPR #25085
Bundle IDcom.jetpack.alpha
Commitcb0131f
Installation URL1iabtrl5oiqk8
Automatticians: You can use our internal self-serve MC tool to give yourself access to those builds if needed.

Copy link
Copy Markdown
Contributor

@kean kean left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice

@crazytonyli crazytonyli enabled auto-merge January 5, 2026 00:51
@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented Jan 5, 2026

@crazytonyli crazytonyli added this pull request to the merge queue Jan 5, 2026
Merged via the queue into trunk with commit 4edf9d0 Jan 5, 2026
26 of 32 checks passed
@crazytonyli crazytonyli deleted the bugfix/CMM-1070-fetch-posts-order branch January 5, 2026 01:23
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.

3 participants