Skip to content

fix: search suggestions not loading on first open#49

Merged
rsbh merged 1 commit intomainfrom
fix_search_suggestions
May 7, 2026
Merged

fix: search suggestions not loading on first open#49
rsbh merged 1 commit intomainfrom
fix_search_suggestions

Conversation

@rsbh
Copy link
Copy Markdown
Member

@rsbh rsbh commented May 7, 2026

Summary

  • Replace useDocsSearch from fumadocs with custom fetch + lodash debounce
  • Fumadocs hook's useOnChange skips initial render callback, so suggestions never load until user types and clears
  • Now fetches suggestions immediately when search dialog opens
  • Abort controller cancels in-flight requests on new search

Test plan

  • Open search dialog (Cmd/Ctrl+K) — suggestions should appear immediately
  • Type a query — results should load after 150ms debounce
  • Clear search — suggestions should reappear
  • Close and reopen dialog — suggestions load again
  • Test with versioned docs — tag param passed correctly

🤖 Generated with Claude Code

@vercel
Copy link
Copy Markdown

vercel Bot commented May 7, 2026

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

Project Deployment Actions Updated (UTC)
chronicle Ready Ready Preview, Comment May 7, 2026 6:24am

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 7, 2026

Warning

Rate limit exceeded

@rsbh has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 37 minutes and 46 seconds before requesting another review.

To continue reviewing without waiting, purchase usage credits in the billing tab.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 0b416173-829b-4b2e-a446-37d76120231c

📥 Commits

Reviewing files that changed from the base of the PR and between aab68a1 and afc0a9e.

📒 Files selected for processing (1)
  • packages/chronicle/src/components/ui/search.tsx
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix_search_suggestions

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.

Replace fumadocs useDocsSearch hook with custom fetch + lodash debounce.
The fumadocs hook's useOnChange skips the initial render callback, so
suggestions never load until user types and clears. Now fetches
suggestions immediately when dialog opens.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@rsbh rsbh merged commit 6306a72 into main May 7, 2026
4 checks passed
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