Repository navigation
feat(insights): show query fan-out on result detail - #362
Conversation
There was a problem hiding this comment.
Welcome to Ansvisor, and thank you for your first PR! A maintainer will be by soon to review.
In the meantime, two things that make review faster:
- A short description of why the change matters, not just what it does — most of our PRs link a
Fixes #...to the issue that explains the why. - A quick local test note if there's anything worth eyeballing in the browser.
If you'd like to keep an eye on where Ansvisor goes next, a ⭐ on the repo helps others discover it (and Watch sends you a ping when related issues land). Either way — looking forward to your next one.
32cf417 to
db65b08
Compare
gkhngyk
left a comment
There was a problem hiding this comment.
Excellent work — clean data plumbing (ObservedSearchQuery + a safe searchQueries mapping in mapResultRow), the fan-out section renders only when present, and nice cleanup swapping the duplicated local PLATFORM_LABELS for the shared @/config/platform-labels. The extracted query-fanout helpers + tests are a nice touch too.
Since deps wouldn't install in your environment, I ran the checks in an isolated worktree: typecheck, the new tests (4 passing), format:check, and lint all pass. LGTM! 🎉
Summary
prompt_results.search_queriesthrough toPromptResult.searchQueriesQuery fan-outsection below Citations on the result detail pageValidation
npx --yes [email protected] run src/lib/actions/tracking.test.ts 'src/app/[locale]/(dashboard)/dashboard/insights/[id]/query-fanout.test.ts' --config vitest.local.config.mjsnpx --yes [email protected] --check src/types/index.ts src/lib/actions/tracking.ts src/lib/actions/tracking.test.ts 'src/app/[locale]/(dashboard)/dashboard/insights/[id]/page.tsx' 'src/app/[locale]/(dashboard)/dashboard/insights/[id]/query-fanout.ts' 'src/app/[locale]/(dashboard)/dashboard/insights/[id]/query-fanout.test.ts'Note: the Vitest command used a temporary local config for alias resolution because this checkout did not have dependencies installed.
yarn install --frozen-lockfilerepeatedly stalled while fetching packages in my local environment, so I could not run the full project test/typecheck commands locally.Closes #361