mirror of
https://github.com/snapotter-hq/SnapOtter.git
synced 2026-08-03 07:46:42 +02:00
feat: request a tool when home search finds nothing (#385)
Adds a prefilled 'Request a tool' affordance to the home search empty state and beneath weak results. Opens the in-app feedback dialog with a new search_miss source and a structured search_query when analytics is on; links to a prefilled GitHub Discussions (Ideas) post when off, so a request is never silently dropped. Reuses the existing feedback pipe, dialog, and analytics gate; no new storage. i18n across all 21 locales.
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
import { describe, expect, it } from "vitest";
|
||||
import { promptVariantForSource, surveyIdForSource } from "@/lib/feedback";
|
||||
|
||||
describe("feedback search_miss mappings", () => {
|
||||
it("maps the search_miss source to its survey id", () => {
|
||||
expect(surveyIdForSource("search_miss")).toBe("search-miss-v1");
|
||||
});
|
||||
|
||||
it("defaults the search_miss prompt variant to the empty-results entry point", () => {
|
||||
expect(promptVariantForSource("search_miss")).toBe("search-empty-v1");
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user