Skip to content

[codex] Add notes archive - #197

Merged
big-mon merged 5 commits into
mainfrom
codex/add-notes-archive
Jun 21, 2026
Merged

[codex] Add notes archive#197
big-mon merged 5 commits into
mainfrom
codex/add-notes-archive

Conversation

@big-mon

@big-mon big-mon commented Jun 21, 2026

Copy link
Copy Markdown
Owner

Summary

  • Added a standalone Notes archive with /notes/ and individual /notes/[slug] pages.
  • Added URL-backed modal reading from archive contexts while preserving direct note pages for no-JS and sharing.
  • Updated the editorial header, article/note typography sharing, homepage Recent Notes, and archive URL handling.

Validation

  • pnpm --filter astro-blog build
  • Notes アーカイブ機能を新規追加 - /notes/ 一覧ページと /notes/[slug] 詳細ページ、URL-backed modal 読み込み機能を実装し、ノート共有と JavaScript 非実装環境対応を実現

  • ノートコンテンツ管理ロジックを構築 - lib/content.tsNoteMeta/NoteHTML インターフェースと、メタ抽出・全件取得・関連ノート算出などの専用関数群を追加

  • 記事・ノート本文の typography を統一 - app.css に見出し・段落・リスト・テーブル等の共通スタイルを集約し、一元管理を実現

  • ナビゲーション構成を簡潔化 - Editorial Masthead を CATEGORIES / NOTES / ABOUT の 3 リンクに統一し、ユーザビリティを向上

  • ホームページに Recent Notes セクション追加 - 先頭 4 件のノートカードを表示し、モーダル操作に対応させて記事との並列提示を実現

@coderabbitai

coderabbitai Bot commented Jun 21, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Important

Review skipped

Auto incremental reviews are disabled on this repository.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 6661ecb3-9cb1-4ffa-9ecf-ae84bac0a2f2

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
📝 Walkthrough

Walkthrough

ブログにノート(Notes)機能を追加した。content.tsNoteMeta/NoteHTML型と取得・変換・関連スコアリング関数を新設し、NoteCardNoteDetailNoteModalコンポーネントと/notes//notes/[slug]ページを追加した。本文スタイル(.article-body.note-body共通)をapp.cssへ集約し、post/[slug]/index.astroからグローバルスタイル定義を削除。サイトマップ・リダイレクト生成スクリプト・ナビゲーション定数をノート対応に拡張し、トップページにRecentNotesセクションとNoteModalを組み込んだ。

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed タイトル「[codex] Add notes archive」は PR の主要な変更内容である Notes アーカイブ機能の追加を明確に示しており、PR 全体の目的と一致しています。
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/add-notes-archive

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

Comment @coderabbitai help to get the list of available commands and usage tips.

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Jun 21, 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
estrilda 9250ad3 Commit Preview URL

Branch Preview URL
Jun 21 2026, 05:35 PM

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: eeaf855449

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread apps/astro-blog/src/pages/notes/[slug].astro Outdated
Comment thread apps/astro-blog/src/components/NoteModal.astro

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 3

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@apps/astro-blog/src/app.css`:
- Line 99: The text-decoration-color property value uses `currentColor` but
Stylelint's `value-keyword-case` rule requires keyword values to be lowercase.
Change `currentColor` to `currentcolor` in the text-decoration-color property on
line 99 to comply with the linting rules.

In `@apps/astro-blog/src/lib/content.ts`:
- Around line 90-103: The normalizeDate function currently returns a fallback
new Date() when an invalid value is provided, which allows invalid publishedAt
values to pass validation silently and use the current build time as the
publication date instead. To fix this, modify the normalizeDate function to
throw an error when an invalid date value is encountered (when the value is not
a Date instance and is not a valid string or number that can be parsed as a
Date), rather than returning a default fallback date. This will enforce that
publishedAt is treated as a truly required field and prevent the published date
from becoming dependent on build time.
- Around line 270-310: The getAllNotes function currently has O(n²) complexity
because it calls getNoteBySlug for each note (which internally calls
getNoteMarkdownFiles() and iterates through all files each time). Refactor
getAllNotes to iterate through the markdown files only once by directly calling
getNoteMarkdownFiles() in getAllNotes, then build the notes array by extracting
meta with extractNoteMeta, filtering by slug matches against the noteMeta array,
and processing each matching file with processMarkdown. This eliminates the
redundant file scanning that happens in the current approach where getNoteBySlug
is called multiple times.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: af0f5e97-d4de-4396-8422-60eacd5c8ee2

📥 Commits

Reviewing files that changed from the base of the PR and between 8c3ad39 and eeaf855.

📒 Files selected for processing (18)
  • AGENTS.md
  • apps/astro-blog/scripts/generate-redirects.mjs
  • apps/astro-blog/src/app.css
  • apps/astro-blog/src/components/ArchiveListing.astro
  • apps/astro-blog/src/components/EditorialMasthead.astro
  • apps/astro-blog/src/components/NoteCard.astro
  • apps/astro-blog/src/components/NoteDetail.astro
  • apps/astro-blog/src/components/NoteModal.astro
  • apps/astro-blog/src/constants/index.ts
  • apps/astro-blog/src/lib/content.ts
  • apps/astro-blog/src/pages/category/[category]/[...page].astro
  • apps/astro-blog/src/pages/index.astro
  • apps/astro-blog/src/pages/notes/[slug].astro
  • apps/astro-blog/src/pages/notes/index.astro
  • apps/astro-blog/src/pages/post/[slug]/index.astro
  • apps/astro-blog/src/pages/sitemap.xml.ts
  • apps/astro-blog/src/pages/tag/[tag]/[...page].astro
  • content/notes/2026-06-21-zone-of-interest.md

Comment thread apps/astro-blog/src/app.css Outdated
Comment thread apps/astro-blog/src/lib/content.ts Outdated
Comment thread apps/astro-blog/src/lib/content.ts

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 51835e849c

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread apps/astro-blog/src/components/NoteModal.astro
@big-mon
big-mon merged commit aa0f1b4 into main Jun 21, 2026
3 checks passed
@big-mon
big-mon deleted the codex/add-notes-archive branch June 21, 2026 17:37
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.

1 participant