mirror of
https://github.com/supabase/supabase.git
synced 2026-12-04 23:49:03 +00:00
create-pull-request/patch
3
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
1d31266c82 |
fix(docs): stop sending Ask AI question text to telemetry (#53142)
<!-- claude-slack-attribution --> _Requested via [Slack thread](https://supabase.slack.com/archives/C076KTY11DF/p1794187436590809?thread_ts=1794187436.590809&cid=C076KTY11DF)_ ## Problem **Before:** `docs_search_v2_ask_ai_question_submitted` sent the user's Ask AI question, cut to its first 300 characters, as a `question` property (added in #52459). Free-text questions can contain personal data such as names, emails, pasted logs, or connection strings. **After:** the event sends only `questionLength` and `questionSource`. No question text leaves the browser. This matches `kb_search_submitted`, which already leaves the query text out and sends only its length. Linear: [GROWTH-1458](https://linear.app/supabase/issue/GROWTH-1458/stop-sending-ask-ai-question-text-in-docs-search-v2-ask-ai-question) ## Solution - `packages/common/telemetry-constants.ts`: remove `question` from `DocsSearchV2AskAiQuestionSubmittedEvent` and note in the event doc that the question text is left out, as `KbSearchSubmittedEvent` does. - `apps/docs/features/SearchV2/AskAiPanel.tsx` (typed questions) and `SearchV2Provider.tsx` (questions carried over from search): drop the `question` property. - `apps/docs/features/SearchV2/constants.ts`: delete `ASK_AI_QUESTION_TELEMETRY_LENGTH`, which nothing uses now. - `SearchV2.telemetry.test.tsx`: replace the truncation test with one that checks a typed question sends exactly `{ questionLength, questionSource: 'typed' }`, has no `question` property, and does not contain the question text. Out of scope: `docs_search_v2_search_submitted.query` and `docs_search_v2_result_clicked.query` stay as they are. ## Review instructions 1. Check that the event type in `telemetry-constants.ts` no longer has `question`, and that typecheck enforces this at both call sites. 2. Run `pnpm vitest --run features/SearchV2` in `apps/docs`. All 33 tests pass locally. 3. `tsc --noEmit` passes in `apps/docs` (after `codegen:graphql`) and `packages/common`. Prettier is clean on changed files. ## Checklist Check all before review: - [ ] I have read [CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md) - [ ] If I wrote a new docs topic or edited an existing topic, I used the `/write-the-docs` or `/edit-the-docs` skill, which applies the docs [style guide](https://github.com/supabase/supabase/tree/master/apps/docs/style-guide) (not applicable: no docs content changed) --- _Generated by [Claude Code](https://claude.ai/code/session_011aGhSD3LLt9nZYbsWkZBjJ)_ Co-authored-by: Claude <noreply@anthropic.com> |
||
|
|
63e52e119a |
feat(docs): ask ai enhancements (#52774)
## Problem - the ask ai answer in the docs search dialog come in bursts - the result is text that jumps by whole phrases and then stops, and each new line moves the scroll position with a jump - the copy button of an answer is always visible, a question has no copy button ## Solution - changes the answer to show a part of the waiting text on each animation frame, so a burst of chunks shows at a steady rate - adds a fade from a small blur to each new paragraph, list item and source chip, and the source chips enter one after another - changes the auto-scroll to move smoothly to each new line, and both animations stop when the user sets reduced motion - changes the copy buttons to show on hover, on keyboard focus and on touch screens, and adds a copy button to each question | before | after | | -------|------| | <video src="https://github.com/user-attachments/assets/87f6710a-8174-460d-b343-90d19757d673" /> | <video src="https://github.com/user-attachments/assets/50bdbec3-d553-4ab3-96bb-2bf30c403815" /> | <!-- ## Preview links If relevant, include links to changed pages for easy review access. Copy the preview base URL from the Vercel bot comment on this PR. Use the following table as an example template. | Site | Live | Preview | Search for | | -------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------ | ----------------------------- | | WWW | [/blog/your-post](https://supabase.com/blog/your-post) | [/blog/your-post](https://zone-www-dot-com-git-branch-name-supabase.vercel.app/blog/your-post) | unique phrase from the change | | Docs | [/docs/guides/your-page](https://supabase.com/docs/guides/your-page) | [/docs/guides/your-page](https://docs-git-branch-name-supabase.vercel.app/docs/guides/your-page) | unique phrase from the change | | Studio | [/dashboard](https://supabase.com/dashboard) | [/dashboard](https://studio-git-branch-name-supabase.vercel.app/dashboard) | unique phrase from the change | | Design system | [/design-system](https://supabase.com/design-system) | [/design-system](https://design-system-git-branch-name-supabase.vercel.app/design-system) | unique phrase from the change | | UI library | [/library](https://supabase.com/library) | [/library](https://ui-library-git-branch-name-supabase.vercel.app/library) | unique phrase from the change | | Knowledge base | [/kb/guides/your-page](https://supabase.com/kb/guides/your-page) | [/kb/guides/your-page](https://kb-git-branch-name-supabase.vercel.app/kb/guides/your-page) | unique phrase from the change | --> <!-- ## Additional context Optionally add any other context or screenshots. --> ## Review instructions 1. open [/docs](https://supabase.com/docs) and [/docs](https://docs-git-antlio-feat-ask-ai-streaming-supabase.vercel.app/docs) side by side 2. press `Cmd+I` on each page, and ask `how do I set up row level security?` 3. make sure that the preview answer shows at a steady rate, and that each new paragraph fades in 4. make sure that the preview source chips enter one after another when the answer completes 5. move the pointer over the answer and over the question, and make sure that each copy button shows 6. click the copy button of the question, and make sure that the clipboard has the question text ## Checklist Check all before review: - [x] I have read [CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md) - [x] If I wrote a new docs topic or edited an existing topic, I used the `/write-the-docs` or `/edit-the-docs` skill, which applies the docs [style guide](https://github.com/supabase/supabase/tree/master/apps/docs/style-guide) |
||
|
|
1a2db3779e |
feat(docs): ask ai v2 (#52459)
## Problem - the change is a follow-up to search v2 (#51175, #52233), which runs as the `docs-search-v2` experiment - in the `search-v2-active` group, `cmd+k` opens the new search instead of the legacy command menu, so readers lose ask ai - a search with no results stops at "No results found." and gives no next step ## Solution - adds an ask ai panel and a `cmd+i` shortcut to search v2, so the `search-v2-active` group can ask supabase ai - adds ask ai entries to the top nav, the results footer and empty results, so readers can ask from search - changes search and ask ai to use one dialog for the page, so two dialogs never open together - adds `renderNoResults` and `renderFooterStart` slots to the `docs-search` panel, so the package has no ask ai code - nit: adds a `keycaps` variant to `KeyboardShortcut` with a design-system example, and uses it in the search trigger and footers | state | preview | | -------|------| | after | <video src="https://github.com/user-attachments/assets/6681fcba-6267-4ee1-b9e0-154b5f45091d" /> | <!-- ## Preview links If relevant, include links to changed pages for easy review access. Copy the preview base URL from the Vercel bot comment on this PR. Use the following table as an example template. | Site | Live | Preview | Search for | | -------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------ | ----------------------------- | | WWW | [/blog/your-post](https://supabase.com/blog/your-post) | [/blog/your-post](https://zone-www-dot-com-git-branch-name-supabase.vercel.app/blog/your-post) | unique phrase from the change | | Docs | [/docs/guides/your-page](https://supabase.com/docs/guides/your-page) | [/docs/guides/your-page](https://docs-git-branch-name-supabase.vercel.app/docs/guides/your-page) | unique phrase from the change | | Studio | [/dashboard](https://supabase.com/dashboard) | [/dashboard](https://studio-git-branch-name-supabase.vercel.app/dashboard) | unique phrase from the change | | Design system | [/design-system](https://supabase.com/design-system) | [/design-system](https://design-system-git-branch-name-supabase.vercel.app/design-system) | unique phrase from the change | | UI library | [/library](https://supabase.com/library) | [/library](https://ui-library-git-branch-name-supabase.vercel.app/library) | unique phrase from the change | | Knowledge base | [/kb/guides/your-page](https://supabase.com/kb/guides/your-page) | [/kb/guides/your-page](https://kb-git-branch-name-supabase.vercel.app/kb/guides/your-page) | unique phrase from the change | --> <!-- ## Additional context Optionally add any other context or screenshots. --> ## Review instructions 1. open [/docs?docs-search-v2=search-v2-active](https://docs-git-antlio-feat-docs-ask-ai-supabase.vercel.app/docs?docs-search-v2=search-v2-active) 2. make sure that the top nav shows the search box and an `Ask AI` button 3. press `cmd+i` (`ctrl+i` on windows and linux), and make sure that the ask ai dialog opens with example questions 4. select an example question, and make sure that the bolt icon changes from gray to color while the answer loads 5. press `cmd+k`, and make sure that the same dialog changes to search 6. search for `zzqqxx`, select `Ask Supabase AI: zzqqxx`, and make sure that ask ai opens and sends the question 7. search for `auth`, and make sure that the results footer shows `Ask Supabase AI` and the keycap hints ## Checklist Check all before review: - [x] I have read [CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md) - [x] If I wrote a new docs topic or edited an existing topic, I used the `/write-the-docs` or `/edit-the-docs` skill, which applies the docs [style guide](https://github.com/supabase/supabase/tree/master/apps/docs/style-guide) |