Skip to content

🔍 Build Pagefind index on first dev run when it's missing#342

Merged
joshbermanssw merged 1 commit into
mainfrom
jb/refresh-pagefind-on-clone
Jun 19, 2026
Merged

🔍 Build Pagefind index on first dev run when it's missing#342
joshbermanssw merged 1 commit into
mainfrom
jb/refresh-pagefind-on-clone

Conversation

@joshbermanssw

@joshbermanssw joshbermanssw commented Jun 19, 2026

Copy link
Copy Markdown
Member

TL;DR

Search silently breaks in dev when the Pagefind index is absent — predev only printed a warning telling the user to run build-local-pagefind themselves. This builds the index automatically on the first dev run instead.

How

scripts/check-pagefind.js: when pagefind-entry.json is missing, run pnpm build-local-pagefind (a full build + index) instead of just warning. The staleness-age warning for an existing index is unchanged.

Reviewer notes

  • First run only. Once the index exists, this path is skipped, so normal pnpm dev is unaffected.

@vercel

vercel Bot commented Jun 19, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
tina-docs Ready Ready Preview, Comment Jun 19, 2026 6:00am

Request Review

0xharkirat
0xharkirat previously approved these changes Jun 19, 2026

@0xharkirat 0xharkirat 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.

LGTM - wait for the github actions workflows to complete and then good to merge

@joshbermanssw joshbermanssw enabled auto-merge (squash) June 19, 2026 02:06
@joshbermanssw joshbermanssw force-pushed the jb/refresh-pagefind-on-clone branch from 3314f2f to 0e6443f Compare June 19, 2026 03:01
@joshbermanssw joshbermanssw changed the title 🔍 Build Pagefind index on first clone instead of shipping a stale one 🔍 Build Pagefind index on first dev run when it's missing Jun 19, 2026
predev only warned when the index was absent, so search silently broke until
the user knew to run build-local-pagefind by hand. Build it automatically on
the first dev run instead.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

@0xharkirat 0xharkirat 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.

LGTM - this is the perfect UX

@joshbermanssw joshbermanssw merged commit c977daf into main Jun 19, 2026
7 checks passed
@joshbermanssw joshbermanssw deleted the jb/refresh-pagefind-on-clone branch June 19, 2026 06:07
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