Skip to content

feat: ask AI hint when no search results#174

Merged
dcrawbuck merged 1 commit intomainfrom
dcrawbuck/search-empty-ask-ai-hint
Apr 20, 2026
Merged

feat: ask AI hint when no search results#174
dcrawbuck merged 1 commit intomainfrom
dcrawbuck/search-empty-ask-ai-hint

Conversation

@dcrawbuck
Copy link
Copy Markdown
Collaborator

@dcrawbuck dcrawbuck commented Apr 20, 2026

This adds an Ask AI hint state to the docs search dialog when a settled search returns no results.
It smooths the hint behavior across debounce/loading transitions so the button does not flicker off and on while the user changes a query.
The shimmer is clipped inside a dedicated child layer so the existing keyboard-shortcut tooltip still renders outside the button.
Validated with bun test and bun run build:cf.


Note

Low Risk
Low risk UI-only change that adds debounced state tracking around search results; main risk is minor UX regressions (hint not appearing/clearing correctly).

Overview
When a docs search query settles with no results, the Search Dialog now activates an Ask AI hint state instead of leaving the button unchanged.

This adds debounced tracking of search vs results loading to prevent flicker during typing/loading, and updates the Ask AI button to expose data-ai-hint and apply a shimmer/border highlight (with reduced-motion fallback) via new .ask-ai-button* CSS.

Reviewed by Cursor Bugbot for commit 15e99f4. Bugbot is set up for automated code reviews on this repo. Configure here.

@cloudflare-workers-and-pages
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
superwall-docs-staging 15e99f4 Commit Preview URL

Branch Preview URL
Apr 20 2026, 09:57 PM

@dcrawbuck dcrawbuck changed the title Add Ask AI hint for empty search feat: ask AI hint when no search results Apr 20, 2026
@dcrawbuck dcrawbuck merged commit 97345fa into main Apr 20, 2026
3 checks passed
@dcrawbuck dcrawbuck deleted the dcrawbuck/search-empty-ask-ai-hint branch April 20, 2026 22:23
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