Skip to content

SWF(refactor): share the home and tag post list and date sort - #814

Open
devin-ai-integration[bot] wants to merge 3 commits into
mainfrom
devin/1795145898-share-post-list
Open

devin-ai-integration[bot] wants to merge 3 commits into
mainfrom
devin/1795145898-share-post-list

Conversation

@devin-ai-integration

@devin-ai-integration devin-ai-integration Bot commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

Summary

The home page and tag pages now render their post lists through one shared PostList component and one sortPostsByDateDescending() helper. Before this, each page had its own copy of the wrapper markup and the pubDate sort. The built HTML for / and all 26 /tags/* pages is byte-identical to main.

  • src/components/PostList.astro: the wrapper, .container, grid ul and PostItem list. The default slot renders before the ul, which is where the tag page's <h1> goes. Posts with no url are skipped, which keeps the tag page's old guard. getPublishedPosts() always sets url, so the home page is unaffected.
  • sortPostsByDateDescending() in src/lib/posts.ts: the same comparator as before, but it sorts a copy, so it no longer mutates posts in place. getPublishedPosts() ordering is unchanged.
  • Unit tests in tests/unit/posts.test.ts, plus a short docs/post-list.md (AGENTS.md asks for docs on new components).

Evidence

Built HTML compared with main, using pnpm run build:ci on both:

$ diff -q /tmp/dist-before/index.html dist/index.html
$ diff -rq /tmp/dist-before/tags dist/tags
(exit 0, no output)

A full diff -r of dist differs only in link-card images on three posts and in RSS. Those come from external fetches at build time and differ between builds; this PR does not touch them.

pnpm run lint        -> 0 errors, 0 warnings
pnpm run test:unit   -> Test Files 8 passed, Tests 134 passed
pnpm run test:e2e tests/e2e/specs/smoke.spec.ts tests/e2e/specs/tag.spec.ts --project=chromium -> 7 passed

Try it: pnpm run build:ci && pnpm exec astro preview, then open / and /tags/PC.

QA Engineer: passed. In Chrome at 1280px and 390px, the full-page screenshots of / and three tag pages (PC, Astro, ガジェット) differ by 0 pixels from main (report below in the comments).


Software Factory opened this PR for Daiki
Implemented in session Share post list wrapper and date sort
Review with Devin · Open in Devin Desktop


Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@devin-ai-integration

Copy link
Copy Markdown
Contributor Author

I'll fix CI failures and address comments from users with write access that start with 'Devin'.

  • Disable automatic comment, CI, and merge conflict monitoring

@coderabbitai

coderabbitai Bot commented Nov 20, 2026

Copy link
Copy Markdown

Important

Review skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 65113a26-632c-4e66-8ea5-287f5f6ffbbe

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no bugs or issues to report.

Devin Review

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Nov 20, 2026 •

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
blog 409ef22 Commit Preview URL

Branch Preview URL
Nov 20 2026, 03:46 AM

@devin-ai-integration

Copy link
Copy Markdown
Contributor Author
記事一覧の比較結果

トップページとタグページ3件(PC、Astro、ガジェット)を、PR の 409ef22 と main との共通祖先 e693614 で比較しました。Chrome のデスクトップ表示(1280 px)とモバイル表示(390 px)で、記事はすべて日付の新しい順に並び、表示日付、タグの見出し、余白、1列のグリッドは一致しました。ページ全体の画像も全8組で差分が0ピクセルでした。

/tags/PC/ の比較画像:左が共通祖先、右が PR です。

デスクトップ

デスクトップの比較

モバイル

モバイルの比較

録画

4ページの比較録画

ページ別の検証レポート · 録画(チャプター付き) · Devin セッション

This branch has not been deployed

No deployments
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.

0 participants