Support default search query from URL params#568
Support default search query from URL params#568sarah-inkeep wants to merge 2 commits intogravitational:mainfrom
Conversation
…if query param is present
|
@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:
Thanks! |
|
@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. |
|
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 Looks like this commit now conflicts with |
|
@ptgott the conflict has been resolved! |
|
Here's the buddy PR: I went ahead and modified the commit message to use best practices. |

Support default search query from URL params
Read the ?q= query parameter from the URL and pass it as
defaultQueryto 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
handleChatInputChangeprevents the chat'sonInputMessageChange('')from overwriting the initial query on mount.