Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Nov 8, 2025

TODO

  • AIレビュー
  • セルフレビュー
    • markdownが期待通りにレンダリングされているかチェック
    • 誤字脱字チェック
    • 読みづらいところがないかチェック
    • TODOが残ってないかチェック
    • textlintの指摘で直したいところがあれば修正
    • 技術的に不正確/不明瞭な記述がないかチェック

変更内容

親PR #246 のレビューコメント対応。forEach内のasync関数はPromiseを待機しないため、すべてのOGP取得完了を保証できていなかった。

Promise.all + Array.from().map()パターンに変更:

// Before
cards.forEach(async (card) => {
  const ogpData = await fetchOGPData(url);
  // ...
});

// After
await Promise.all(Array.from(cards).map(async (card) => {
  const ogpData = await fetchOGPData(url);
  // ...
}));

並列実行を維持しつつ、全fetch完了を適切に待機する。


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Co-authored-by: kyu08 <49891479+kyu08@users.noreply.github.com>
Copilot AI changed the title [WIP] Address feedback on blog card link preview feature implementation Fix async forEach pattern in blog card OGP fetching Nov 8, 2025
Copilot AI requested a review from kyu08 November 8, 2025 17:39
Copilot finished work on behalf of kyu08 November 8, 2025 17:39
@kyu08 kyu08 marked this pull request as ready for review November 9, 2025 01:02
@github-actions
Copy link
Contributor

github-actions bot commented Nov 9, 2025

プレビュー環境

プレビュー環境が更新されました。

URL: https://blog.kyu08.com/pr-247/

Commit: cb4b997ae5c1dbe434691ff179ef7be5f56de730

※ デプロイ完了まで数分かかる場合があります。

@github-actions
Copy link
Contributor

github-actions bot commented Nov 9, 2025

OGP画像に差分はありません

OGP画像は最新の状態です。

@kyu08 kyu08 merged commit 166d7a9 into claude/implement-blog-card-011CUvm6CxVowkigoux8VGUV Nov 9, 2025
6 of 7 checks passed
@kyu08 kyu08 deleted the copilot/sub-pr-246 branch November 9, 2025 01:02
github-actions bot added a commit that referenced this pull request Nov 9, 2025
kyu08 added a commit that referenced this pull request Nov 9, 2025
* Add blog card (link preview) feature

Implemented a blog card shortcode that displays rich link previews with:
- Automatic OGP metadata fetching (title, description, image)
- Manual parameter specification support
- Responsive design with dark theme styling
- Hover animations and effects
- CORS-friendly fetching via proxy service

Usage: {{< blogcard url="https://example.com" >}}

* Fix blogcard: remove border and improve OGP fetching

Changes:
- Remove border from blogcard for cleaner look
- Add debug logging to blogcard.js for troubleshooting
- Update documentation to recommend manual parameter specification
- Add working examples for immediate testing
- Improve error handling in OGP fetch logic

The manual specification method is now recommended as the most reliable approach, with auto-fetch as a bonus feature.

* Improve blogcard performance with faster proxies and timeout

Performance improvements:
- Add multiple proxy fallback (corsproxy.io as primary, allOrigins as backup)
- Implement 5-second timeout per proxy (max 10 seconds total)
- Add loading animation while fetching OGP data
- Log elapsed time for debugging

This should significantly reduce the wait time from 10+ seconds to under 5 seconds in most cases.

* update

* test

* delete

* Revert "test"

This reverts commit b79a35f.

* Update static/blogcard.js

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Fix async forEach pattern in blog card OGP fetching (#247)

* Initial plan

* Fix async forEach issue - use Promise.all with map pattern

Co-authored-by: kyu08 <49891479+kyu08@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: kyu08 <49891479+kyu08@users.noreply.github.com>

* 独立したリンクはブログカードとして表示する

---------

Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com>
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.

2 participants