Iāve investigated and found why the rspec failed.
The original spec is asserting a component with property expect(page).to have_css(".user-stream-item [data-post-id='#{post_1.id}']").
However, the data-post-id was changed to the reaction_user_id in the last commit, this caused a mismatch, leading to the failure.
The original thought is to change id to fit the api need, however, I missed the fact that the id is also used in PostList as post_id, like follows:
<PostList
@posts={{@model}}
@fetchMorePosts={{@controller.loadMore}}
@emptyText={{i18n "notifications.empty"}}
@additionalItemClasses="user-stream-item"
@showUserInfo={{false}}
class="user-stream"
>
And the id used in it is mapped in post.gjs component
data-post-id={{@post.id}}
data-topic-id={{@post.topicId}}
data-user-id={{@post.user_id}}
So, the original id behavior shouldnāt be changed, as this may cause severe mismatches in the postList, that directly leads to the failure of rspec yesterday.
As a workaround, there might be another way to solve this:
Adding a new field reaction_user_id: reaction.id in flattenForPostList, then alter the return array.length ? array[array.length - 1].id : null; in #getLastIdFrom(array) func to return array.length ? array[array.length - 1].reaction_user_id.
TL:DR;
The reaction_id, post_id, and now the reaction_user_id are totally different ones, but the id used in the postList component needs to be post_id. While the id needed in fetching the next page should be reaction_user_id, that is extremely perplexing.
@nat