Skip to content

Support default search query from URL params#568

Open
sarah-inkeep wants to merge 2 commits intogravitational:mainfrom
inkeep:feat/inkeep-search-default-query-from-url
Open

Support default search query from URL params#568
sarah-inkeep wants to merge 2 commits intogravitational:mainfrom
inkeep:feat/inkeep-search-default-query-from-url

Conversation

@sarah-inkeep
Copy link
Contributor

@sarah-inkeep sarah-inkeep commented Feb 27, 2026

Support default search query from URL params

Read the ?q= query parameter from the URL and pass it as defaultQuery to the Inkeep search modal. When present, the modal opens automatically with the query pre-filled in both search and chat.

This came up in a conversation with @benarent about whether it would be possible to link directly to search results with Inkeep (e.g. /docs?q=install).

A one-time guard in handleChatInputChange prevents the chat's onInputMessageChange('') from overwriting the initial query on mount.

@ptgott
Copy link
Contributor

ptgott commented Feb 27, 2026

@sarah-inkeep Thanks for submitting this change, but I'm not really sure what it does or what to expect from it. Would you mind formatting your commit message so that:

  • The first line is a short summary (50 chars or less)
  • After a blank line, the body is a description of what this change does and why we are making it

Thanks!

@sarah-inkeep sarah-inkeep marked this pull request as draft February 27, 2026 22:56
@sarah-inkeep sarah-inkeep changed the title Read query from url params and set as default query, auto open modal … Support default search query from URL params Feb 27, 2026
@benarent
Copy link
Contributor

@ptgott this was a request from a Teleporter that uses zen browser, https://zen-browser.app/ that allows it to be a 'search engine' I would also expect that this would make it easier for other bots to search our docs.
image

@ptgott
Copy link
Contributor

ptgott commented Mar 2, 2026

Thanks for the context, @benarent! Even though the commit message is still difficult for me to understand (and is longer than expected character length of the first line of a commit), at least the pull request commit will include a PR number that future maintainers can use to look up context.

@sarah-inkeep Since this PR is in draft, is there still work that you are planning to do? Once I verify the search box works as intended on the preview site, I'll go ahead and approve.

@sarah-inkeep sarah-inkeep marked this pull request as ready for review March 2, 2026 21:19
@sarah-inkeep
Copy link
Contributor Author

hi @ptgott,
The PR is ready for review, I recorded a short loom to demo the functionality in case it is helpful.

@ptgott ptgott self-requested a review March 3, 2026 19:55
@ptgott
Copy link
Contributor

ptgott commented Mar 4, 2026

@sarah-inkeep Looks like this commit now conflicts with origin/main. Would you mind resolving the conflict? Once that's done I'll create a buddy PR with your commit so this passes our Amplify preview workflow in CI. Thanks!

@sarah-inkeep
Copy link
Contributor Author

@ptgott the conflict has been resolved!

@ptgott
Copy link
Contributor

ptgott commented Mar 4, 2026

Here's the buddy PR:

I went ahead and modified the commit message to use best practices.

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.

3 participants