Skip to content

feat(results): add Refine flow, improved result states, and weekly funnel analytics - #60

Merged
chake111 merged 1 commit into
mainfrom
codex/add-refine-entry-to-results-page
Apr 20, 2026
Merged

chake111 merged 1 commit into
mainfrom
codex/add-refine-entry-to-results-page

Conversation

@chake111

Copy link
Copy Markdown
Owner

Motivation

  • Provide a Refine entry on the results page so users can submit a follow-up query while preserving current filter/sort context.
  • Improve UX for three key result states (loading, empty results, and no-match-under-filter) to reduce user confusion and surface appropriate CTAs.
  • Add a small internal analytics surface to track a core search→converge→convert funnel and enable 1–2 quick experiments driven by the largest drop-off.

Description

  • Add a Refine input and submit flow in the toolbar and results list and wire its handler in ui/components/results/results-toolbar.tsx and ui/components/results/results-list.tsx, keeping existing filter/sort context on submit.
  • Extend useSearchFlow in ui/hooks/use-search-flow.ts to emit a requestId on each search and return it to callers so tracking events can be correlated with a single search request.
  • Expand tracking helpers and server handling: update ui/lib/track.ts to include optional metadata on search and always forward metadata, and update ui/app/api/track/route.ts to persist search metadata; add track calls from results/home pages to include request_id, query, locale, and action context.
  • Add a new internal funnel API GET /api/track/funnel implemented at ui/app/api/track/funnel/route.ts that returns stage totals, daily buckets, adjacent drop-off rates, and the largest drop-off node for the requested window.
  • Improve result UI states by rendering dedicated loading, empty, and no-match messages and add i18n strings in ui/messages/en.json and ui/messages/zh.json.
  • Add documentation docs/funnel-dashboard-and-experiments.md describing funnel stages, the one-week dashboard API, and two small-step experiment templates triggered by the biggest drop-off.

Testing

  • Ran TypeScript checks with cd ui && npm run typecheck, which completed successfully.
  • Ran cd ui && npm run lint, which failed due to missing ESLint flat config in the repo (environment/repo config issue rather than code type errors).
  • No UI/browser screenshot tests were executed in this environment; server-side code paths were exercised by tsc type checking.

Codex Task

@vercel

vercel Bot commented Apr 20, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
ai-tool-picker Ready Ready Preview, Comment Apr 20, 2026 1:03pm

@chake111
chake111 merged commit f49c0e4 into main Apr 20, 2026
2 of 3 checks passed

This branch was successfully deployed

1 active deployment
Preview 4eaeb4e4 Deployed Apr 20, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant